From 4e62bfc2a9a229cd8b2f6a92fa0eb81ab3f34dd1 Mon Sep 17 00:00:00 2001 From: MoNTE48 Date: Wed, 17 Nov 2021 01:37:16 +0200 Subject: [PATCH] Minor fixes for latest release --- files/3d_armor/api.lua | 25 ++++++++++++++----------- files/dye/init.lua | 8 ++++---- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/files/3d_armor/api.lua b/files/3d_armor/api.lua index d8d5ce5..5d48a06 100644 --- a/files/3d_armor/api.lua +++ b/files/3d_armor/api.lua @@ -227,17 +227,6 @@ armor.set_player_armor = function(self, player) armor_groups.level = floor(armor_level / 20) armor_groups.fleshy = 100 - armor_level end - if use_pova_mod then - -- only add the changes, not the default 1.0 for each physics setting - pova.add_override(player, "3d_armor", { - speed = physics.speed - 1, - jump = physics.jump - 1, - gravity = physics.gravity - 1, - }) - pova.do_override(player) - else - player:set_physics_override(physics) - end self.textures[name].armor = texture self.def[name].state = state self.def[name].count = count @@ -250,6 +239,20 @@ armor.set_player_armor = function(self, player) if enable_damage then player:set_armor_groups(armor_groups) + + if use_pova_mod then + -- only add the changes, not the default 1.0 for each physics setting + pova.add_override(player, "3d_armor", { + speed = physics.speed - 1, + jump = physics.jump - 1, + gravity = physics.gravity - 1, + }) + pova.do_override(player) + else + player:set_physics_override(physics) + end + + -- Update HUD local max_level = 80 -- full emerald armor local armor_lvl = floor(20 * (armor_level/max_level)) or 0 hud.change_item(player, "armor", {number = armor_lvl}) diff --git a/files/dye/init.lua b/files/dye/init.lua index 93fc4bd..542a2a4 100644 --- a/files/dye/init.lua +++ b/files/dye/init.lua @@ -30,7 +30,7 @@ dye.dyes = { } -- Define items -for _, row in pairs(dye.dyes) do +for _, row in ipairs(dye.dyes) do local name = row[1] local description = row[2] local groups = {dye = 1, nohit = 1} @@ -61,11 +61,11 @@ minetest.register_craft({ -- Manually add flowers recipes local flowers_recipes = { - "blue", "orange", "red", - "violet", "yellow" + "blue", "magenta", "orange", "pink", + "red", "violet", "yellow" } -for _, name in pairs(flowers_recipes) do +for _, name in ipairs(flowers_recipes) do minetest.register_craft({ output = "dye:" .. name .. " 4", recipe = {