Add files via upload

master
AiTechEye 2018-06-26 11:12:01 +02:00 committed by GitHub
parent bff475cd2c
commit a6469dde16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1 @@
vexcazer

19
vexcazer_regen/init.lua Normal file
View File

@ -0,0 +1,19 @@
vexcazer.registry_mode({
name="Regen",
info="USE to re generate area\nstack count to left, is area size",
hide_mode_default=true,
hide_mode_mod=true,
on_use = function(itemstack, user, pointed_thing,input)
if pointed_thing.type~="node" then return itemstack end
local count=user:get_inventory():get_stack("main", input.index-1):get_count()
if count>input.max_amount then
count=vexcazer.round(input.max_amount/2)
end
local p1=vector.add(pointed_thing.under,-count)
local p2=vector.add(pointed_thing.under,count)
minetest.chat_send_player(input.user_name, "<Vexcazer> regeneration area")
minetest.delete_area(p1, p2)
minetest.chat_send_player(input.user_name, "<Vexcazer> done")
return itemstack
end
})