mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-11-14 14:50:21 +01:00
nil check for player when using lava pick
This commit is contained in:
parent
2fdfd7f84c
commit
674afa91e5
|
@ -116,6 +116,9 @@ local old_handle_node_drops = minetest.handle_node_drops
|
||||||
|
|
||||||
function minetest.handle_node_drops(pos, drops, digger)
|
function minetest.handle_node_drops(pos, drops, digger)
|
||||||
|
|
||||||
|
-- does player exist?
|
||||||
|
if not digger then return end
|
||||||
|
|
||||||
-- are we holding Lava Pick?
|
-- are we holding Lava Pick?
|
||||||
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
|
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
|
||||||
return old_handle_node_drops(pos, drops, digger)
|
return old_handle_node_drops(pos, drops, digger)
|
||||||
|
|
|
@ -3,7 +3,8 @@ local S = mobs.intllib
|
||||||
|
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
local effect = function(
|
||||||
|
pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
||||||
|
|
||||||
radius = radius or 2
|
radius = radius or 2
|
||||||
min_size = min_size or 0.5
|
min_size = min_size or 0.5
|
||||||
|
|
Loading…
Reference in New Issue
Block a user