summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-08-07 10:53:51 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-08-07 10:53:51 +0100
commitba167a345160a6066795777dd90fdb52ef8f8ba4 (patch)
tree920d1ba7db5d42224927bd6622b23c924367cf87
parentbc13ef741022d61d75e5d2b5d8f01938931d8bf7 (diff)
added flight nil check
-rw-r--r--api.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/api.lua b/api.lua
index 281296c..884dacb 100644
--- a/api.lua
+++ b/api.lua
@@ -1,9 +1,9 @@
--- Mobs Api (4th August 2017)
+-- Mobs Api (7th August 2017)
mobs = {}
mobs.mod = "redo"
-mobs.version = "20170804"
+mobs.version = "20170807"
-- Intllib
@@ -260,6 +260,8 @@ local flight_check = function(self, pos_w)
local nod = self.standing_in
local def = minetest.registered_nodes[nod]
+ if not def then return false end -- nil check
+
if type(self.fly_in) == "string"
and (nod == self.fly_in or def.liquid_alternative_flowing ~= "") then