update 3d_armor with last fixed backported

* update from https://codeberg.org/minenux/minetest-mod-3d_armor
* Fix armor radiation values were not not summed up
* Closes https://github.com/minetest-mods/3d_armor/issues/136
  radiation does not work when using technic armor
* resolve player object in async function again (different globalstep)
   due the core.after we need to recall player name
  closes https://github.com/minetest-mods/3d_armor/issues/132
* Make all admin armor to protect from drowning
  group of water is the same as if you get asfixiate,
  admin armor must be protected, this was missing cos the
  chessplate already has the armor_water=1 set..
  closes https://github.com/minetest-mods/3d_armor/issues/130
* Call custom on_punched functions w/ hitter = nil too
  this allows to propagates the nil on custom mods
  related to https://github.com/minetest-mods/3d_armor/pull/138#discussion_r1529014373
  backported https://github.com/minetest-mods/3d_armor/pull/141
* Don't assume hitter ~= nil in on_punchplayer callback
  closes https://github.com/minetest-mods/3d_armor/issues/137
  related to https://github.com/minetest/minetest/pull/14319#issuecomment-1989555604
master
general 2024-03-29 17:47:29 -04:00
parent 0445c9f90d
commit 7e2beca1bd
8 changed files with 45 additions and 11 deletions

View File

@ -235,6 +235,8 @@ end)
## LICENSE
License Source Code: (C) 2023 PICCORO Lenz McKAY
License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1
License Textures: Copyright (C) 2017 davidthecreator - CC-BY-SA 3.0

View File

@ -235,6 +235,8 @@ end)
## LICENSE
License Source Code: (C) 2023 PICCORO Lenz McKAY
License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1
License Textures: Copyright (C) 2017 davidthecreator - CC-BY-SA 3.0

View File

@ -457,7 +457,7 @@ armor.set_player_armor = function(self, player)
end
-- DEPRECATED, use armor_groups instead
if def.groups["armor_radiation"] and levels["radiation"] then
levels["radiation"] = def.groups["armor_radiation"]
levels["radiation"] = levels["radiation"] + def.groups["armor_radiation"]
end
end
local item = stack:get_name()
@ -768,6 +768,7 @@ armor.unequip = function(self, player, armor_element)
if self:get_element(stack:get_name()) == armor_element then
armor_inv:set_stack("armor", i, "")
minetest.after(0, function()
player = minetest.get_player_by_name(name) -- recall sync cos we are inside core.after
local inv = player:get_inventory()
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)

View File

@ -42,7 +42,7 @@ armor:register_armor("3d_armor:chestplate_admin", {
description = S("Admin Chestplate"),
inventory_image = "3d_armor_inv_chestplate_admin.png",
armor_groups = {fleshy=100},
groups = {armor_torso=1, armor_heal=100, armor_use=0,
groups = {armor_torso=1, armor_heal=100, armor_use=0, armor_water=1,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
return
@ -62,7 +62,7 @@ armor:register_armor("3d_armor:leggings_admin", {
description = S("Admin Leggings"),
inventory_image = "3d_armor_inv_leggings_admin.png",
armor_groups = {fleshy=100},
groups = {armor_legs=1, armor_heal=100, armor_use=0,
groups = {armor_legs=1, armor_heal=100, armor_use=0, armor_water=1,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
return
@ -82,7 +82,7 @@ armor:register_armor("3d_armor:boots_admin", {
description = S("Admin Boots"),
inventory_image = "3d_armor_inv_boots_admin.png",
armor_groups = {fleshy=100},
groups = {armor_feet=1, armor_heal=100, armor_use=0,
groups = {armor_feet=1, armor_heal=100, armor_use=0, physics_speed=1, armor_water=1,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
return

View File

@ -34,7 +34,7 @@ end
armor:register_armor("3d_armor_gloves:gloves_admin", {
description = S("Admin Gauntlets"),
inventory_image = "3d_armor_gloves_inv_gloves_admin.png",
groups = {armor_hands=1000, armor_heal=100, armor_use=0, not_in_creative_inventory=1},
groups = {armor_hands=1000, armor_heal=100, armor_use=0, armor_water=1, not_in_creative_inventory=1},
})
minetest.register_alias("admingloves", "3d_armor_gloves:gloves_admin")
@ -59,7 +59,7 @@ if armor.materials.cactus then
armor:register_armor("3d_armor_gloves:gloves_cactus", {
description = S("Cactus Gauntlets"),
inventory_image = "3d_armor_gloves_inv_gloves_cactus.png",
groups = {armor_hands=1, armor_heal=0, armor_use=1000},
groups = {armor_hands=1, armor_heal=0, armor_use=1000, armor_water=1},
armor_groups = {fleshy=5},
damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
})

View File

@ -1,5 +1,5 @@
title = technic_armor
name = technic_armor
title = 3d_armor_technic
name = 3d_armor_technic
description = ARMOR TECH made from lead, brass, cast iron, carbon steel, stainless steel, tin and silver
depends = 3d_armor
optional_depends = default, moreores, technic_worldgen

View File

@ -1,4 +1,4 @@
name = 3d_armor_ui
depends = default
depends = default, 3d_armor
optional_depends = unified_inventory
description = ARMOR PAGE to the unified inventory

View File

@ -1,7 +1,7 @@
minetest modpack 3d Armor
===========================
ARMOR pack for your gameplay
ARMOR pack for your gameplay, **full all engines compatible**
## Information
--------------
@ -18,6 +18,31 @@ This modpack must be named `3d_armor` and enables armor manage for the gameplay
Makes hand wielded items visible to other players.
Adds a chest-like armor stand for armor storage and display.
This is a **fork that unify all the 3d_armor mods.. the features on this
repository is the simplification & compatibility game of the mod**, this means you
will find a **more faster but less featured mod**.. if you want a minetest game with simple armors
and faster response use this mod:
* The mods are **compatible with minetest 0.4, 5.2, 5.3, 5.4 and multicraft 2.X**
* The damage is not distributed 100% between the armor, it is only **distributed according to the height of the hit** puch from hitter
* Repairs are simplified, you will reapir using only one mod from xdecor of minenux project
* Improved **optimized reduced textures, with more colorfull aditions**
* The texture of **admin armor was improved with new desing**
* Some checks for avoid nil on game for older engines
Differences
This armor pack tracks all the upstream original Stuart ones, plus patches from mt-mods fork,
but the only removed feature is the protected armor stand and more detailes separate damage.
### Contribution
The development is really at [https://codeberg.org/minenux/minetest-mod-3d_armor](https://codeberg.org/minenux/minetest-mod-3d_armor) you must follow minenux preferences to code!
The mods that this special fork handle are developed at [https://git.minetest.io/minenux?q=3d_armor&tab=repositories](https://git.minetest.io/minenux?sort=recentupdate&language=&q=3d_armor&tab=repositories)
### Download and requirements
It can be download from
* https://git.minetest.io/minenux/minetest-mod-3d_armor
@ -70,12 +95,16 @@ and [simple_skins] by TenPlus1.
Armor can be configured by adding a file called armor.conf in 3d_armor mod or world directory.
see armor.conf.example for all available options.
For mod installation instructions, please visit: http://wiki.minetest.com/wiki/Installing_Mods
For mod installation instructions, please visit: http://wiki.minetest.org/wiki/Installing_Mods
We promoted the [http://minetest.org](http://minetest.org) site!
Adds a chest-like armor stand for armor storage and display.
## LICENSE
License Source Code: Copyright (C) 2023+ PICCORO Lenz McKAY - CC-BY-SA-NC 3.0
License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1
Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0