Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
tenplus1 committed Jan 16, 2022
1 parent b756aa5 commit f01e8a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1002,19 +1002,19 @@ end


-- Returns true is node can deal damage to self
function mobs:is_node_dangerous(mob_obj, nodename)
function mobs:is_node_dangerous(mob_object, nodename)

if mob_obj.water_damage > 0
if mob_object.water_damage > 0
and minetest.get_item_group(nodename, "water") ~= 0 then
return true
end

if mob_obj.lava_damage > 0
if mob_object.lava_damage > 0
and minetest.get_item_group(nodename, "lava") ~= 0 then
return true
end

if mob_obj.fire_damage > 0
if mob_object.fire_damage > 0
and minetest.get_item_group(nodename, "fire") ~= 0 then
return true
end
Expand All @@ -1026,8 +1026,8 @@ function mobs:is_node_dangerous(mob_obj, nodename)
return false
end

local function is_node_dangerous(mob_obj, nodename)
return mobs:is_node_dangerous(mob_obj, nodename)
local function is_node_dangerous(mob_object, nodename)
return mobs:is_node_dangerous(mob_object, nodename)
end


Expand Down

0 comments on commit f01e8a6

Please sign in to comment.