space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.12k stars 2.8k forks source link

Reagents permanently pollute bloodstream unless drawn with blood #25467

Open thebadman4662 opened 4 months ago

thebadman4662 commented 4 months ago

Description

Oxygen and carbon dioxide do not tick down at 1u like most other reagents that do not have stomach/heart reactions. Its possible to fill someone with 250u and make it impossible for them to be injected or fed unless someone realizes they can draw chemicals with blood to make space in bloodstream.

Reproduction Inject yourself with oxygen/carbon dioxide, check solution.

Screenshots obraz

QuietlyWhisper commented 4 months ago

I think this issue is caused because the chemstream cannot metabolize gases for some reason...

My best guess is the lungs cannot metabolize solutions, and the only metabolizer for these "chemicals" are gas type organs

This would need to be either fixed in the code or gases need to have some sort of metabolism effect.

MjrLandWhale commented 4 months ago

I think this issue is caused because the chemstream cannot metabolize gases for some reason...

My best guess is the lungs cannot metabolize solutions, and the only metabolizer for these "chemicals" are gas type organs

This would need to be either fixed in the code or gases need to have some sort of metabolism effect.

I think you're on the right track here. Using CO2 as an example, the only metabolism is for gas. The solution in my mind is to treat the non-metabolizing gases like plasma/trit are in the gases YAML.

metabolisms:

Poison:
  effects:
  - !type:HealthChange
    damage:
      types:
        Poison: 3
  - !type:AdjustReagent
    reagent: Inaprovaline
    amount: -2.0
Gas:
  effects:
  - !type:HealthChange
    scaleByQuantity: true
    ignoreResistances: true
    damage:
      types:
        Poison:
          1

This will require adding poison metabolisms for all the gases that can now be found in liquid form thanks to the condenser:

There is already precedence for this behavior with cold/inert gases under nitrogen: metabolisms:

Poison:
  effects:
  - !type:HealthChange
    damage:
      types:
        Cold: 1 # liquid nitrogen is cold

If we want to do this "right" I think having these reagents reduce body temp is also appropriate, kinda like we do for Insuzine / Leporazine. If you think that's appropriate, I can make the changes & PR, but I'm still relatively new to the codebase & want to make sure I'm not thinking about it like an idiot.