PilzAdam wrote:Suggestion:
Dont restore the health when in lava but override the default:lava and remove damage_per_second. Then use an abm to damage players in lava that dont have the lava suit.
That's what I was thinking. It'd be really nice if we got a LOT more control over the damage system. It was a neat idea to unify damage with the digging of blocks, but it absolutely cripples a ton of extensibility possibilities that we'd otherwise have at our fingertips from Lua. It would probably have been better to go the OTHER way and give each node a HP rating. That would be more useful than param1 and param2, and nodes have those....
Also, from a performance POV it might work better to use minetest.after() instead of an ABM. There are bound to be a lot fewer players than there are blocks of lava. So iterate over all the connected players and test whether there is lava at their current position (or the block above for the head); if so, apply damage to them. Or better yet, instead of testing for just lava, introduce a new GROUP for DPS that can be handled from Lua instead of the core engine. Then add a callback function registration system for the mod....