Commit 7e37f00d authored by Vanessa Dannenberg's avatar Vanessa Dannenberg

add some useful info to the itemstack description

parent 5b3cdf0a
......@@ -591,9 +591,14 @@ function minislots.register_machine(mdef)
local stack = ItemStack("minislots:"..def.name)
local nodemeta = minetest.get_meta(pos)
local stackmeta = stack:get_meta()
stackmeta:set_int("balance", nodemeta:get_int("balance"))
stackmeta:set_string("casino_name", nodemeta:get_string("casino_name"))
local balance = nodemeta:get_int("balance") or 0
local casino = nodemeta:get_string("casino_name")
stackmeta:set_int("balance", balance)
stackmeta:set_string("casino_name", casino)
stackmeta:set_int("last_cashout", nodemeta:get_int("last_cashout"))
stackmeta:set_string("description",
def.description.."\n(balance: "..balance.." Mg;\ncasino: "..casino..")")
local inv = digger:get_inventory()
if inv:room_for_item("main", stack) then
if (not creative or not creative.is_enabled_for(player_name))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment