1
0
mirror of https://github.com/SmallJoker/exchange_shop.git synced 2025-07-27 04:12:39 +02:00

First version 🐈

This commit is contained in:
SmallJoker
2018-07-08 09:30:13 +02:00
commit 89d08b907b
11 changed files with 594 additions and 0 deletions

19
currency_override.lua Normal file
View File

@ -0,0 +1,19 @@
local def = table.copy(minetest.registered_nodes["currency:shop"])
def.groups.not_in_creative_inventory = 1
minetest.override_item("currency:shop", {
groups = def.groups,
on_construct = function() end,
after_place_node = function(pos, ...)
local node = minetest.get_node(pos)
node.name = exchange_shop.shopname
minetest.swap_node(pos, node)
local new_def = minetest.registered_nodes[exchange_shop.shopname]
if new_def.on_construct then
new_def.on_construct(pos)
end
new_def.after_place_node(pos, unpack({...}))
end
})