* Fixes Cigarettes being lit in no-oxygen environments (#56911)
This closes#26487 (Issue about cigs working fine in non-oxygenated enviroments) which has been a known bug for years. Everyone knows how EXTREMELY CRITICAL cigarettes are to game balance. Plasmamen being able to smoke in a room with no oxygen? Spessmen smoking in the hard vacuum of space? What is this madness?!?
I must put an end to these OP tactics.
My changes make it so that if a cigarette has either one mole of oxygen in the current atmosphere or is injected with oxygen reagents, then it can be smoked.
I've also made it so "Space" cigarettes can be smoked in space by changing the default starting reagents to include oxygen. The description was also updated to hint that they can be smoked anywhere.
Also I added a has_gas proc to gasmixtures. I have seen a few places in the code where this can be used and once this gets merged, I will be doing a refactor to clean some code involving it. (bonfires, plasmamen code, etc.)
(Note from lemon, if you use this in the supermatter I will eat you)
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* Fixes Cigarettes being lit in no-oxygen environments
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* Makes cryo handle reagent transfer better. (#56755)
Cryogenics has a reagent_transfer variable that is set to throttle the
reagent injection. Upgrading bins increase efficiency and transfer
amount, thus making the reagent_transfer threshold larger, making it
take longer between each injections.
However, this variable is stored
in the object itself and not on the process proc, presumably to prevent
exploits such as rapidly turning the machine on and off. This has a
really bad consequence that makes cryo really clunky to use, since you
may need to wait for the reagent_transfer variable to hit threshold and
then reset again for a new patient before any cryoxadone can be
injected. Not to mention how upgrading the bins somehow timegaps it
even further.
This PR seeks to change the whole system to transfer reagents in a
smaller and more continuous manner.
* Makes cryo handle reagent transfer better.
Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
* Refactor ventcrawling flag into traits (#56620)
Instead of using var/ventcrawling on `/mob/living`, it is now instead
two traits. It functions in exactly the same way.
This now ensures that manipulation of ventcrawling will not clash with
any other manipulation, such as a proposed genetics ability to give
people ventcrawling, versus abductor organs.
---
Intended to be a pure refactor, no functionality should change.
* Refactor ventcrawling flag into traits
* Update true_changeling.dm
* Update true_changeling.dm
Co-authored-by: coiax <yellowbounder@gmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* renames metal sheets to iron sheets
* Merge branch 'master' into upstream-merge-56643
* yay metal
* Update DeltaStation2_skyrat.dmm
* a
* Update CentCom_skyrat_z2.dmm
* a
* a
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* Makes reinforced plasma windows block heatspreading, mostly so the sm delams properly, and partially so mappers have a tool for this sort of thing (#56545)
* Makes reinforced plasma windows block heatspreading
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Clarify Temperature Gate description (#56611)
There is apparently some confusion where people were under the impression
that the gate allows gas to move bidirectionally once open.
* Clarify Temperature Gate description
Co-authored-by: esainane <esainane+github@gmail.com>
* BZ Formation: Respect BZ_RESEARCH_MAX_AMOUNT (#56529)
You can still produce points at a decent rate. This stops someone
that managed to thread the needle to extremely low pressures while still
meeting mass requirements from making half a million points per second,
though that did require maxed out parts.
* BZ Formation: Respect BZ_RESEARCH_MAX_AMOUNT
Co-authored-by: esainane <esainane+github@gmail.com>
* Trit & H2 Consistency Fix (#56265)
Make the reactions for trit and h2 fires more consistent with other gas reactions
* Trit & H2 Consistency Fix
Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
* Prevents the most common case of fire settling with an excited group (#56317)
Basically when a group with a breakdown timer one tick away from settling merges with a group with hotspots in
it, and the one with a high breakdown timer is larger, the group would settle without respecting the timer of
the hotspot group, causing fwoosh levels of flame.
There's two other ways to achieve this, if you had one group of tiles that are close to the same gasmix as
another
group, and they became inactive, we'd have the same issue. I've solved this by moving the hotspot subprocess to
after active turfs and before excited groups, just for safety ya feel me?
It's still in theory possible, but much much harder. The hard solution to this would be to integrate heat with
how we reset excited group timers, and split excited groups into smaller portions, but I'm not sure I like that
idea.
I need to mull it over.
* Prevents the most common case of fire settling with an excited group
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* HFR: Fix activation after deconstruction (#56249)
core/var/corners is assumed to be a list at all times.
Previously, deconstructing then reconstructing the HFR would get one
stuck where:
- "Activate the machine first by using a multitool on the interface." when attempting to use the interface
- "You already activated the machine" when attempting to use a multitool on the interface
All components, except the core, would show as correctly inactive.
This situation can be worked around by deconstructing and reconstructing
the core, or varediting the core to have active = 0 and corners = list().
This fixes runtimes of the form:
> [21:03:06] Runtime in hypertorus.dm,368: type mismatch: 0 |= HFR corner (/obj/machinery/hypertorus/corner)
> proc name: check part connectivity (/obj/machinery/atmospherics/components/unary/hypertorus/core/proc/check_part_connectivity)
* HFR: Fix activation after deconstruction
Co-authored-by: esainane <esainane+github@gmail.com>
* HFR: Respect moderator heat_output effects (#56248)
The additional heat users were supposed to deal with when producing
higher tier gases with Proto-Nitrate, and the reduced heat output that
came from managing to run a mix with enough Freon without also killing
the reaction, was being silently discarded because the temperature
adjustment was applied before heat_output was modified.
The changed value would still show up in the UI, but would have no effect
since the application used the pre-modification value.
While internal_fusion has gases added and removed directly as part of
the gas consumption and producion process, no reference to temperature
is made, so it's safe to just move the application of internal_fusion's
temperature change to immediately after the gas consumption and production
process, instead of immediately before it.
* HFR: Respect moderator heat_output effects
Co-authored-by: esainane <esainane+github@gmail.com>
* Applies #55457 (#56202)
A Pipeline that should've died when its last atmos component got deleted hasn't died, because of SSair.networks. Now they die. Its non-existence grants a lilliputian performance improvement to SSAIR_PIPENETS. airs[i] qdel is mostly about being thorough; every component has a gas mixture for each node all the time by default.
* Re-PR of #55457 ([Port] Atmos components now nullifies node properly)
Co-authored-by: Xenomedes <park246824@gmail.com>
* Makes excited breakdowns independent of adding new turfs. This prevents the dreaded stationwide firelock, at least mostly, and moves us away from being dependant on room size. As a downside, we're closer then ever to ZAS. This also allows us to raise the breakdown timer and decrease the amount of overtime experienced in each tick. (#56081)
## About The Pull Request
This prevents the dreaded station-wide firelock, at least mostly, and moves us away from being dependent on room size. As a downside, we're closer then ever to ZAS, and the transition between pre-breakdown and post-breakdown is a lot more visible. This also allows us to raise the breakdown timer and decrease the amount of overtime experienced in each tick.
See video, I'm not sure I'm happy with the current rate, it does look somewhat shit. I'm considering tweaking the alpha curve for gas visuals to try and make it look less not good. [Video](https://cdn.discordapp.com/attachments/326831214667235328/797766078389813298/2021-01-10_01-55-53.mp4)
Closes#56066
## Why It's Good For The Game
Station spanning excited groups are rarer, and will settle down more often. Cold things like space will cool down their group faster, preventing station spanning non updating excited groups.
* Makes excited breakdowns independent of adding new turfs
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Converts the pictures in the atmos documentation away from my repo and towards tgstation's copy, preventing me from going rouge and replacing them with le funny memes (#56031)
Instead points them towards tgstation's copy, so open source contributionTM is possible.
* Converts the pictures in the atmos documentation away from my repo
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Applies the pluox formation code portable atmos devices and tanks (#55923)
Makes irradiating tanks and portable atmospherics devices (canisters, pumps, scrubber) induce pluoxium and tritium formation if they contain the correct gases.
Does NOT affect atmos components or pipes because I don't think Lemon would let me do that to pipecode. (He's right)
* Makes pluox formation slightly more consistent
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* Fixes cryo not working with HE (#55995)
There was a bug that makes cryo unable to work in tandem with heat exchanger pipes because update_parents() isn't called. This isn't evident with thermomachines because the thermomachines call update_parents() on temperature differences. This fixes that.
* Fixes cryo not "connecting" to pipenet.
Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
* Fix rare HFR moderator filter removal failure (#55982)
Looking at gas_mixture.dm, remove_specific appears to be able to
return null if the amount of a gas becomes exactly zero or negative,
somehow.
Adding a null check seems safe, and should prevent this from reoccuring.
The temperature is already assigned in remove_specific.
* Fix rare HFR moderator filter removal failure
Co-authored-by: esainane <esainane+github@gmail.com>
* Ensure gases exist in proto nitrate responses (#55981)
When the type of gas to be created did not already exist, the reaction
caused a runtime and halted processing.
While tritium would still be consumed, no hydrogen would be created,
and no heat modification would occur.
This fixes runtimes of the form:
> [02:02:46] Runtime in reactions.dm,946: cannot read from list
> proc name: react (/datum/gas_reaction/proto_nitrate_tritium_response/react)
* Ensure gases exist in proto nitrate responses
Co-authored-by: esainane <esainane+github@gmail.com>
* datum_pipeline.dm code cleanup (#55514)
A bit of code clean up and var name change for clarity, hopefully i got them all right
will add some docs another day
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* datum_pipeline.dm code cleanup
* Update datum_pipeline.dm
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
* HFR can now output waste gases again (#55864)
Commit 241e9cf broke HFR. Leaving internal_output as null meant that
execution would hit runtimes during process(), and never reach the end
where changes were applied.
No radiation was emitted, no nuclear particles were generated.
No waste gases could be removed, neither by fusion waste removal nor by
moderator filtering. Fusion would produce nothing.
It could still enter meltdown, though.
This fixes the endless runtimes like the following:
[07:51:05] Runtime in hypertorus.dm,1067: Cannot execute null.total moles().
[07:52:09] Runtime in hypertorus.dm,957: Cannot execute null.assert gases().
[07:52:17] Runtime in hypertorus.dm,983: Cannot execute null.assert gases().
[07:53:21] Runtime in hypertorus.dm,1012: Cannot execute null.assert gases().
* HFR can now output waste gases again
Co-authored-by: esainane <esainane+github@gmail.com>
* The Great Radio Rework: NTNET Part 1 of many.
* Update airlock.dm
Co-authored-by: WarlockD <warlockd@gmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* atmosmachinery.dm docs (#55479)
Add some documentation to atmosmachinery.dm to try and briefly explain each proc. i hope i have them all right
Why It's Good For The Game
documentation is good
changelog shouldn't be needed
* atmosmachinery.dm docs
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
* Fix/improve DeltaStation SM and atmos (#55427)
- Fix layer manifolds under floor (path was missing `hide = FALSE`)
- Add missing lights
- Move some tables to better spots
- Add buttons and shutters to the atmos testing room chambers to vent
to space
* delta SM and atmos fixes and QoL
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
* fix infinite gas production (#55510)
No more infinite gas production due to a gas_mixture not clearing up
* Fix HFR infinite gas production
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
* Planetary Atmos Changes (#55398)
This PR sets several Icebox turfs to be planetary atmos turfs, such as the openspace, to return the gas mix to a standard, and reduce the number of active turfs overall. To aid in this, planetary atmos calculations are a seperate share from the main 4 turf share now, and instead re-archive and share 4/5 of their difference in moles to the atmosphere, as well as temperature sharing with a higher heat capacity. This should result in the planetary atmos turfs returning to their standard much faster than before.
Before at most planetary turfs would keep 0.8 of their difference after sharing, compared to the 0.2 difference they will keep now, log(0.2) / log(0.8) showing this is sharing about 7 times faster in getting rid of gas diffs. This should also reduce the effects of continuous fires and limit their active turfs to a certain region on the planet, ex: the incinerator outlet wouldn't spread to the entire planets turfs. This also makes behavior more like space for the purposes of cooling and venting gas for toxins.
This might also make gas farming slightly faster since the gas will also come back faster, but considering most of the expensive gasses have been removed and this will also reduce the lag from gas farms, I think it is a worthwhile change. It can't be worse than making the turfs immutable anyways since that would be the fastest.
Reduces lag and makes gameplay more in-line with space stations in ways that improve quality of life but still preserve uniqueness by not making the planetary turfs completely immutable.
* Planetary Atmos Changes
Co-authored-by: Whoneedspacee <yougotreallyowned@gmail.com>
* base temp of gas mix (#55352)
When generating a gas mix with no temp provided the gas mix starts out at basically 0K.
This set this gas mix to room temp if no temp is listed in the gas mix string.
Nothing should start at 0K for temp, gasses being one of the big issue points.
* Gas mixes default to room temp if no temp is specified
Co-authored-by: NightRed <nightred@gmail.com>
* New TGUI component: the round gauge + initial uses of it
* aaa
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* More HFR fixes (#55203)
- Refractor HFR core from binary device to unary device to fix issue with cooling not properly connecting, that was deleting gases when tryed to use (only one port cooling now similar to a Thermomachine)
- Small fix of GUI data where two vars were inverted
* More HFR fixes
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
* Cryopod cooling fix for humans (#55221)
The core temp was meant to be cooled separately through the skin in cryo pods, but on inspection that interaction was skipped.
This makes the core temp match skin temp in a cryo pod.
* Cryopod cooling fix for humans
Co-authored-by: NightRed <nightred@gmail.com>
* Fixes cryogenics infinite gas deletion (#55068)
* cryo fixes and cleanup
Move magic numbers to defines
Fixes cryo deleting 100L of gas each time it transfers
Remove unneeded/unused variables
Moves gas all gas consumption to process_atmos
delta_time in process_atmos
* simplify consume_gas
* Fixes cryogenics infinite gas deletion
Co-authored-by: Maurukas <66576896+Maurukas@users.noreply.github.com>
* fix proto nitrate negative temperature + temperature fix for other reactions (#54945)
Fixed negative energy that allowed proto nitrate to go negative temperature,
fixed other reactions from possible negative temperature
* fix proto nitrate negative temperature + temperature fix for other reactions
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>