mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Implement copying maps
This commit is contained in:
parent
1079ab74d4
commit
f22b3fd457
@ -185,6 +185,23 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mcl_maps:filled_map 2",
|
||||
recipe = {"mcl_maps:filled_map", "mcl_maps:empty_map"},
|
||||
})
|
||||
|
||||
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
|
||||
if itemstack:get_name() == "mcl_maps:filled_map" then
|
||||
for _, stack in pairs(old_craft_grid) do
|
||||
if stack:get_name() == "mcl_maps:filled_map" then
|
||||
itemstack:get_meta():from_table(stack:get_meta():to_table())
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local maps = {}
|
||||
local huds = {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user