I would like to add compatibility for my mod [morphinggrid]. What my mod does is it adds power rangers to Minetest allowing players to morph. The mod provides it's own layer of armor over the 3d_armor armor by using a modified version of the 3d armor character model found here. The idea is that when a player is a power ranger, the armor of [3d_armor] is protected when a player takes a hit. However instead of this, both armors are damaged. The code responsible for not allowing this feature to be possible is found in [3d_armor].
My mod uses the same callback (minetest.register_on_player_hpchange) to prevent damage to a player so this is a very simple fix. All that is needed is to prevent the player's armor from being punched if the player is morphed, which can be done AFTER checking if [morphingrid] is installed. I will also be uploading a pull request. My mod can be found here: https://github.com/LandonAConway/powerrangers_modpack & and the specific file located in my mod which is responsible for preventing player damage is found here: https://github.com/LandonAConway/powerrangers_modpack/blob/master/morphinggrid/ranger_armor.lua
I would like to add compatibility for my mod [morphinggrid]. What my mod does is it adds power rangers to Minetest allowing players to morph. The mod provides it's own layer of armor over the 3d_armor armor by using a modified version of the 3d armor character model found here. The idea is that when a player is a power ranger, the armor of [3d_armor] is protected when a player takes a hit. However instead of this, both armors are damaged. The code responsible for not allowing this feature to be possible is found in [3d_armor].
Take a look at line 422-439 in 3d_armor/init.lua https://github.com/minetest-mods/3d_armor/blob/master/3d_armor/init.lua
My mod uses the same callback (
minetest.register_on_player_hpchange
) to prevent damage to a player so this is a very simple fix. All that is needed is to prevent the player's armor from being punched if the player is morphed, which can be done AFTER checking if [morphingrid] is installed. I will also be uploading a pull request. My mod can be found here: https://github.com/LandonAConway/powerrangers_modpack & and the specific file located in my mod which is responsible for preventing player damage is found here: https://github.com/LandonAConway/powerrangers_modpack/blob/master/morphinggrid/ranger_armor.lua