Add files via upload
parent
6ad427a07b
commit
857f9ea46c
|
@ -1,19 +1,3 @@
|
|||
vexcazer.registry_mode({
|
||||
name="Undo",
|
||||
info="USE to Undo the last change",
|
||||
disallow_damage_on_use=true,
|
||||
hide_mode_default=true,
|
||||
hide_mode_mod=true,
|
||||
on_button=function(user,input)
|
||||
if vexcazer.undo[input.user_name] then
|
||||
for pos,n in pairs(vexcazer.undo[input.user_name]) do
|
||||
minetest.set_node(minetest.string_to_pos(pos),{name=n})
|
||||
end
|
||||
end
|
||||
vexcazer.undo[input.user_name] = nil
|
||||
end
|
||||
})
|
||||
|
||||
vexcazer.bot_use=function(itemstack, user, pos,dir,input)
|
||||
local plus=1
|
||||
local minus=-1
|
||||
|
@ -127,6 +111,24 @@ vexcazer.registry_mode({
|
|||
end
|
||||
})
|
||||
|
||||
vexcazer.registry_mode({
|
||||
name="Undo",
|
||||
info="USE to Undo the last change",
|
||||
disallow_damage_on_use=true,
|
||||
hide_mode_default=true,
|
||||
hide_mode_mod=true,
|
||||
on_button=function(user,input)
|
||||
if vexcazer.undo[input.user_name] then
|
||||
for pos,n in pairs(vexcazer.undo[input.user_name]) do
|
||||
if not minetest.is_protected(pos,input.user_name) then
|
||||
minetest.set_node(minetest.string_to_pos(pos),{name=n})
|
||||
end
|
||||
end
|
||||
end
|
||||
vexcazer.undo[input.user_name] = nil
|
||||
end
|
||||
})
|
||||
|
||||
local replace=function(itemstack, user, pointed_thing,input)
|
||||
if pointed_thing.type~="node" then return itemstack end
|
||||
local pos=pointed_thing.under
|
||||
|
|
Loading…
Reference in New Issue