mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 10:10:21 +01:00
added flight nil check
This commit is contained in:
parent
bc13ef7410
commit
ba167a3451
6
api.lua
6
api.lua
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
-- Mobs Api (4th August 2017)
|
-- Mobs Api (7th August 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
mobs.version = "20170804"
|
mobs.version = "20170807"
|
||||||
|
|
||||||
|
|
||||||
-- Intllib
|
-- Intllib
|
||||||
@ -260,6 +260,8 @@ local flight_check = function(self, pos_w)
|
|||||||
local nod = self.standing_in
|
local nod = self.standing_in
|
||||||
local def = minetest.registered_nodes[nod]
|
local def = minetest.registered_nodes[nod]
|
||||||
|
|
||||||
|
if not def then return false end -- nil check
|
||||||
|
|
||||||
if type(self.fly_in) == "string"
|
if type(self.fly_in) == "string"
|
||||||
and (nod == self.fly_in or def.liquid_alternative_flowing ~= "") then
|
and (nod == self.fly_in or def.liquid_alternative_flowing ~= "") then
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user