diff --git a/mods/carts/cart_entity.lua b/mods/carts/cart_entity.lua index 8008bcfb..b3b4ae41 100644 --- a/mods/carts/cart_entity.lua +++ b/mods/carts/cart_entity.lua @@ -398,7 +398,7 @@ minetest.register_craftitem("carts:cart", { pointed_thing) or itemstack end - if not pointed_thing.type == "node" then + if pointed_thing.type ~= "node" then return end if carts:is_rail(pointed_thing.under) then diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 403ad5ab..0c0f0896 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -260,7 +260,7 @@ function doors.register(name, def) on_place = function(itemstack, placer, pointed_thing) local pos - if not pointed_thing.type == "node" then + if pointed_thing.type ~= "node" then return itemstack end diff --git a/mods/player_api/api.lua b/mods/player_api/api.lua index b3e3f5ee..a80cecb9 100644 --- a/mods/player_api/api.lua +++ b/mods/player_api/api.lua @@ -182,7 +182,7 @@ minetest.register_globalstep(function() for _, player in pairs(minetest.get_connected_players()) do local name = player:get_player_name() local player_data = players[name] - local model = models[player_data.model] + local model = player_data and models[player_data.model] if model and not player_attached[name] then local controls = player:get_player_control() local animation_speed_mod = model.animation_speed or 30 diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 19fe330c..1c4ead33 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -243,9 +243,9 @@ local function add_effects(pos, radius, drops) local def = minetest.registered_nodes[name] if def then node = { name = name } - end - if def and def.tiles and def.tiles[1] then - texture = def.tiles[1] + if def.tiles and type(def.tiles[1]) == "string" then + texture = def.tiles[1] + end end end end