1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-24 01:30:22 +01:00

add nil check to replace function

This commit is contained in:
TenPlus1 2020-05-05 21:32:24 +01:00
parent 99fe3d0ce1
commit 9928b0e35e

View File

@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20200504",
version = "20200505",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -1423,7 +1423,7 @@ function mob_class:replace(pos)
if self.on_replace then
local oldnode = what
local oldnode = what or ""
local newnode = with
-- convert any group: replacements to actual node name