luacheck and fixes / no dep on vacuum

This commit is contained in:
NatureFreshMilk
2019-12-10 15:05:37 +01:00
parent a3fcba69c3
commit 379d07a8fc
7 changed files with 42 additions and 38 deletions
+2 -4
View File
@@ -8,9 +8,7 @@ minetest.register_globalstep(function(dtime)
local t0 = minetest.get_us_time()
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local name, armor_inv = armor.get_valid_player(armor, player, "[spacesuit]")
local _, armor_inv = armor.get_valid_player(armor, player, "[spacesuit]")
local has_helmet = armor_inv:contains_item("armor", "spacesuit:helmet")
local has_chestplate = armor_inv:contains_item("armor", "spacesuit:chestplate")
@@ -30,7 +28,7 @@ minetest.register_globalstep(function(dtime)
if not stack:is_empty() then
local name = stack:get_name()
if name:sub(1, 10) == "spacesuit:" then
local use = minetest.get_item_group(name, "armor_use") * timer or 0
local use = minetest.get_item_group(name, "armor_use") * timer or 0
armor:damage(player, i, stack, use)
end
end