Add files via upload

master
AiTechEye 2019-05-21 16:47:01 +02:00 committed by GitHub
parent 6ad427a07b
commit 857f9ea46c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 16 deletions

View File

@ -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