mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 13:24:01 +02:00
Old uncommited changes, restock from cli, "cleanup bounty" feature
This commit is contained in:
parent
84881dece3
commit
934873c2fc
6 changed files with 51 additions and 2 deletions
|
@ -17,6 +17,7 @@ Usage: brmbar-cli.py COMMAND ARGS...
|
|||
changecredit USER +-AMT
|
||||
sellitem USER ITEM +-AMT
|
||||
You can use negative AMT to undo a sale.
|
||||
restock ITEM AMT
|
||||
userinfo USER
|
||||
iteminfo ITEM
|
||||
|
||||
|
@ -199,7 +200,15 @@ elif sys.argv[1] == "consolidate":
|
|||
print ("Invalid number of parameters, check your parameters.")
|
||||
else:
|
||||
shop.consolidate()
|
||||
|
||||
elif sys.argv[1] == "restock":
|
||||
if (len(sys.argv) != 4):
|
||||
print ("Invalid number of parameters, check your parameters.")
|
||||
else:
|
||||
iacct = load_item(sys.argv[2])
|
||||
amt = int(sys.argv[3])
|
||||
cash = shop.buy_for_cash(iacct, amt);
|
||||
print("Old amount {}, increased by {}, take {} from cashbox".format(iacct.balance(), amt, cash))
|
||||
|
||||
|
||||
else:
|
||||
help()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue