default price, default count

This commit is contained in:
GNU Hacker 2021-12-16 19:47:35 +01:00
parent e8189b3641
commit 36e7cc8a9e

@ -128,6 +128,8 @@ core.register_node("emeraldbank:shop", {
local meta = core.get_meta(pos) local meta = core.get_meta(pos)
meta:set_string("infotext", S("Exchange shop (owned by @1)", owner)) meta:set_string("infotext", S("Exchange shop (owned by @1)", owner))
meta:set_string("owner", owner) meta:set_string("owner", owner)
meta:set_int("count", 10) -- default count
meta:set_int("price", 5) -- default price
core.get_node_timer(pos):start(shop_timer) core.get_node_timer(pos):start(shop_timer)
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("stock", stock_w*stock_h) inv:set_size("stock", stock_w*stock_h)