Skip to content

Commit

Permalink
Shop fix (#33)
Browse files Browse the repository at this point in the history
* Shorten inventory entry

* fix: Update create item save dict
  • Loading branch information
Ranger-4297 authored Jul 27, 2023
1 parent 821d947 commit bd7d544
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Economy/Shop/create-item.cc.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{$e := sdict "title" "Item info" "footer" (sdict "text" "Type cancel to cancel the setup") "color" 0x00ff7b "timestamp" currentTime}}
{{$s := or (dbGet 0 "store").Value (sdict "items" sdict)}}
{{$i := $s.items}}
{{$iD := sdict "desc" "" "price" 0 "quantity" 0 "role" 0 "reply-msg" ""}}
{{$iD := sdict "desc" "" "price" 0 "quantity" 0 "role" 0 "replyMsg" "" "expiry" 0}}
{{$p := split (index (split (exec "viewperms") "\n") 2) ", "}}
{{if not .ExecData}}
{{with $eco := (dbGet 0 "EconomySettings").Value}}
Expand Down
3 changes: 1 addition & 2 deletions Economy/Shop/inventory.cc.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
{{else}}
{{$role = "none"}}
{{end}}
{{$expires := $v.expires}}
{{$entry = $entry.Append (sdict "Name" $item "value" (joinStr "\n" (print "Description: " $desc) (print "Quantity: " (humanizeThousands $qty)) (print "Role given: " $role) (print "Expiry: " $expires)) "inline" false)}}
{{$entry = $entry.Append (sdict "Name" $item "value" (joinStr "\n" (print "Description: " $desc) (print "Quantity: " (humanizeThousands $qty)) (print "Role given: " $role) (print "Expiry: " $v.expires)) "inline" false)}}
{{end}}
{{$page := ""}}
{{if $.CmdArgs}}
Expand Down

0 comments on commit bd7d544

Please sign in to comment.