mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Added invtweak, tweaked some returns to avoid strange behavior
- Updated news.txt - Added invtweak mod instead of old intweak - Updated world.mt - Tweaked builtin_falling and creative/init.lua to avoir strange behavior from the builtin when parsing on_placenode callbacks in creative mode
This commit is contained in:
@ -121,20 +121,16 @@ function add_falling_protect_item(named)
|
||||
minetest.override_item(named, {
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not pointed_thing.type == "node" then
|
||||
return itemstack
|
||||
return
|
||||
end
|
||||
local pn = placer:get_player_name()
|
||||
if minetest.is_protected(pointed_thing.above, pn) then
|
||||
return itemstack
|
||||
return
|
||||
end
|
||||
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.get_meta(pointed_thing.above)
|
||||
meta:set_string("owner", pn)
|
||||
nodeupdate(pointed_thing.above)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
end
|
||||
|
Reference in New Issue
Block a user