[FEATURE] Add node_placer support

master
Emojigit 2021-06-19 07:24:13 +08:00
parent 7c68a9a765
commit b398504cb1
No known key found for this signature in database
GPG Key ID: 2443E5F619026B90
3 changed files with 6 additions and 0 deletions

1
depends.txt Normal file
View File

@ -0,0 +1 @@
node_placer?

View File

@ -4,6 +4,7 @@ License detail at LICENSE.md
LGPL text at lgpl-2.1.md
]]--
local NP_E = minetest.get_modpath("node_placer")
copier = {}
local WP = minetest.get_worldpath()
copier.save_path = WP .. "/copier_saves"
@ -37,6 +38,9 @@ function copier.place_node_from_copier(pos,IS,placer)
minetest.set_node(pos, {name=n_name,param1=n_param1,param2=n_param2})
local pn_meta = minetest.get_meta(pos)
pn_meta:from_table(n_meta)
if NP_E then
node_placer.set_placer(pos,placer:get_player_name())
end
return true
end

View File

@ -1 +1,2 @@
name = copier
optional_depends = node_placer