Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Creative Radiation #652

Open
DustyDave961 opened this issue Oct 14, 2024 · 4 comments
Open

No Creative Radiation #652

DustyDave961 opened this issue Oct 14, 2024 · 4 comments
Labels

Comments

@DustyDave961
Copy link

DustyDave961 commented Oct 14, 2024

Radiation does not function if a world previously enabled Creative mode, and radioactive blocks were obtained or placed during that time.

Create a new Creative World with damage enabled, obtain radioactive blocks, and place them. Disabling Creative mode and reloading the world does not fix the issue. Bug is still not fully understood, but confirmed to be present on Minetest version 5.8.0.

@DustyBagel
Copy link
Contributor

I am having the same issue on minetest version 5.9.1 on a windows 11 system.

@SmallJoker
Copy link
Member

This is the code to damage nearby players and other objects:

if minetest.settings:get_bool("enable_damage") then
minetest.register_abm({
label = "Radiation damage",
nodenames = {"group:radioactive"},
interval = 1,
chance = 1,
action = dmg_abm,
})
if longterm_damage then
minetest.register_globalstep(function(dtime)
for pn, dmg in pairs(radiated_players) do
dmg = dmg - (dtime / 8)
local player = minetest.get_player_by_name(pn)

The damage is based on the radioactive node group; used in radiation.lua and items.lua.
Based on static analysis I do not see any reason why this would not damage players. If you're willing to debug - check whether the function dmg_abm is executed by inserting print calls.

I'd also welcome a trivial reproduction, such as a world or a worldedit-exported schematic.

@DustyBagel
Copy link
Contributor

It appears there may be a new setting called radiation_protection in config.lua. Try setting it to false, that fixed it for me.
https://github.com/minetest-mods/technic/blob/master/technic/config.lua#L12

I have no idea why it is set to true by default though. Also at some point we need to implement a setting system that supports both the technic settings table defined in config.lua and mintest's settingtypes.txt. That way we can maintain comparability for older minetest versions and we can have the benefits of minetest's setting system like your settings not being reset to default every time you update technic. It also makes it harder for android users to edit setttings because accessing the mod files are much harder on phones as opposed to mintest's settings ui.

@DustyDave961
Copy link
Author

Oh, that did fix it. I had no idea what that setting did. I still don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants