mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-10 04:10:33 +02:00
better creative mode checks, fix crash when digging walls in MCL
This commit is contained in:
@ -47,7 +47,7 @@ local punch_fix = function(pos, node, puncher, pointed_thing)
|
||||
if wielded:get_name() == mese_crystal_node then
|
||||
minetest.set_node(pos, {name="df_underworld_items:ancient_lantern_slade"})
|
||||
minetest.get_node_timer(pos):stop()
|
||||
if not (creative and creative.is_enabled_for and creative.is_enabled_for(puncher:get_player_name())) then
|
||||
if not minetest.is_creative_enabled(puncher:get_player_name()) then
|
||||
wielded:take_item()
|
||||
puncher:set_wielded_item(wielded)
|
||||
end
|
||||
|
@ -57,7 +57,9 @@ if invulnerable then
|
||||
end
|
||||
minetest.register_node("df_underworld_items:slade_brick", slade_brick_def)
|
||||
|
||||
local slade_wall_groups = {wall=1}
|
||||
-- can't use "wall=1" because MCL has special handling for nodes in that group that explodes if it tries handling this one.
|
||||
-- fortunately minetest_game walls also connect to group fence, so this should be fine.
|
||||
local slade_wall_groups = {fence=1}
|
||||
for key, val in pairs(slade_groups) do
|
||||
slade_wall_groups[key]=val
|
||||
end
|
||||
|
Reference in New Issue
Block a user