mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2025-01-08 22:37:36 +01:00
fancy shop timer
This commit is contained in:
parent
1b10674e75
commit
0019edd504
@ -29,6 +29,8 @@ local shopcraft = core.settings:get_bool("emeraldbank.shop_craft") or true
|
||||
|
||||
local formspec_prefix = "emeraldbank:shop_formspec"
|
||||
|
||||
local shop_timer = emeraldbank.shop_timer
|
||||
|
||||
local display_node = (settings:get("fancy_vend.display_node") or "mcl_core:glass")
|
||||
local max_logs = (tonumber(settings:get("fancy_vend.log_max")) or 40)
|
||||
local autorotate_speed = (tonumber(settings:get("fancy_vend.autorotate_speed")) or 1)
|
||||
@ -1308,6 +1310,12 @@ local vendor_template = {
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
core.get_node_timer(pos):start(shop_timer)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
core.get_node_timer(pos):start(shop_timer)
|
||||
end,
|
||||
on_dig = function(pos, node, digger)
|
||||
-- Set variables for access later (for various checks, etc.)
|
||||
local name = digger:get_player_name()
|
||||
@ -1421,6 +1429,7 @@ local vendor_template = {
|
||||
pos.y = pos.y - 1
|
||||
end
|
||||
show_vendor_formspec(clicker, pos)
|
||||
core.get_node_timer(pos):start(shop_timer)
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
minetest.log("action", player:get_player_name().." moves stuff in vendor at "..minetest.pos_to_string(pos))
|
||||
|
Loading…
Reference in New Issue
Block a user