Minor fixes for latest release

This commit is contained in:
MoNTE48 2021-11-17 01:37:16 +02:00
parent 8154119d8d
commit 4e62bfc2a9
2 changed files with 18 additions and 15 deletions

View File

@ -227,17 +227,6 @@ armor.set_player_armor = function(self, player)
armor_groups.level = floor(armor_level / 20) armor_groups.level = floor(armor_level / 20)
armor_groups.fleshy = 100 - armor_level armor_groups.fleshy = 100 - armor_level
end 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.textures[name].armor = texture
self.def[name].state = state self.def[name].state = state
self.def[name].count = count self.def[name].count = count
@ -250,6 +239,20 @@ armor.set_player_armor = function(self, player)
if enable_damage then if enable_damage then
player:set_armor_groups(armor_groups) 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 max_level = 80 -- full emerald armor
local armor_lvl = floor(20 * (armor_level/max_level)) or 0 local armor_lvl = floor(20 * (armor_level/max_level)) or 0
hud.change_item(player, "armor", {number = armor_lvl}) hud.change_item(player, "armor", {number = armor_lvl})

View File

@ -30,7 +30,7 @@ dye.dyes = {
} }
-- Define items -- Define items
for _, row in pairs(dye.dyes) do for _, row in ipairs(dye.dyes) do
local name = row[1] local name = row[1]
local description = row[2] local description = row[2]
local groups = {dye = 1, nohit = 1} local groups = {dye = 1, nohit = 1}
@ -61,11 +61,11 @@ minetest.register_craft({
-- Manually add flowers recipes -- Manually add flowers recipes
local flowers_recipes = { local flowers_recipes = {
"blue", "orange", "red", "blue", "magenta", "orange", "pink",
"violet", "yellow" "red", "violet", "yellow"
} }
for _, name in pairs(flowers_recipes) do for _, name in ipairs(flowers_recipes) do
minetest.register_craft({ minetest.register_craft({
output = "dye:" .. name .. " 4", output = "dye:" .. name .. " 4",
recipe = { recipe = {