CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.33k stars 4.14k forks source link

Not receiving non-environmental radiation #58441

Closed Terrorforge closed 2 years ago

Terrorforge commented 2 years ago

Describe the bug

I'm getting zero rads from every source I can think of other than the environmental effect of the Hazardous Waste Sarcophagus. I don't get irradiated by being around raw plutonium, plutonium slurry, a broken atomic coffee maker or irradiated wanderers.

Steps to reproduce

  1. Get geiger counter
  2. Measure own rads
  3. Spawn plutonium and/or irradiated wanderer
  4. Wait a bit
  5. Measure rads again

Expected behavior

I am irradiated by radioactive things.

Screenshots

No response

Versions and configuration

Additional context

No response

Hirmuolio commented 2 years ago

I don't see anything in irradiated wanderer data that would make them radioactive.

Seems like the handling for radioactive items was not updated for the containers so the check only checks for top level items and does not care about items inside other items.

This thing here https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/inventory.cpp#L785. It needs to be updated to also check the wielded item and all items in containers.

Terrorforge commented 2 years ago

Are they not also supposed to irradiate you when they're on the ground? Because they currently do not.

I kind of assumed that irradiated wanderers are supposed to be radioactive because they're called "irradiated wanderers" and their description says their bodies "seep a glowing ooze". I know that "irradiated" is not the same thing as "radioactive", but all that definitely reads as video game speak for "this guy will give you cancer".

Hirmuolio commented 2 years ago

Looking at the inventory::leak_level() more closesly the math is pretty much nonsense.

The return value of this function is treated as mSv.

First of all it makes no sense for Sieverts to be used in here. It should be something like Sievert/hour.

For items that always leak the function returns volume/250 ml (round down to integer).
This of course will round small items always to zero.

For items that leak when damaged it returns the item damage level. Item damage level ranges from 0 to 4. There is no scaling to item volume/mass.

andrei8l commented 2 years ago

I tried fixing this ages ago as well and my conclusion was that any simple solution like this is basically nonsense. Most of the RADIOACTIVE items wouldn't be radioactive on the scale (currently) tracked by the game. The few that are harmfully radioactive (off the top of my head, cobalt-60 and a broken RTG) have different decay paths and abstracting their impact to 1mSv/s is not better than no radiation.

Then you also have to implement radioactivity from items on the map...

PatrikLundell commented 2 years ago

I did get weak from passing somewhat near plutonium slurry a month or so ago, and did get radiated from a damaged mininuke in 0.E-2. Irradiated wanderers didn't register any radiation a month or so ago (and I believe it had been noted at the time that nothing in the "radioactive zone" actually was radioactive), and they didn't revive either.

andrei8l commented 2 years ago

I did get weak from passing somewhat near plutonium slurry a month or so ago, and did get radiated from a damaged mininuke in 0.E-2

That's form mapgen radioactivity. It's added to the map with the nested chunk and doesn't follow the mininuke/slurry/whatever else.

PatrikLundell commented 2 years ago

I can't talk for the slurry, but the mininuke did increase radiation in my camp after I've carried it back.