Commit Graph

970 Commits

Author SHA1 Message Date
esainane
cec4dcce27 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.
2021-02-01 12:54:15 -08:00
vincentiusvin
2a15650455 Trit & H2 Consistency Fix (#56265)
Make the reactions for trit and h2 fires more consistent with other gas reactions
2021-01-31 23:13:40 -08:00
小月猫
d48f2a022d Fixes thermomachine power bug (#56261)
fixes #56257 .... Gilkher when he made thermomachines he didnt add in not a single check to make sure the machine actually had power to use, so was able to be used in space, with no power, so long as the machine was on. I simply added the proc that processed its gas contents behind a simple check to ensure it has power, isnt broken, and the maint cover is closed. if one of those is true, it will turn the machine back off and set power usage to 0

Before the fix:
https://user-images.githubusercontent.com/40489693/104986520-28165d00-59e1-11eb-9402-a883baa61dea.mp4

After the fix:
https://i.gyazo.com/3e3392095797a8ffc78178504117be8e.mp4
2021-01-31 21:13:48 -08:00
LemonInTheDark
4cd1db4e6f 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.
2021-01-23 01:56:19 -08:00
esainane
fb52a47ed7 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)
2021-01-19 00:38:49 -08:00
esainane
1b9ea1a37e 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.
2021-01-19 00:09:34 -08:00
Xenomedes
ec3a1f6ceb 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.
2021-01-17 16:57:29 -03:00
LemonInTheDark
cc98bcd019 Temperature Pump Sanity (#55926)
* fix temperature pump

* Cleanup and ui stuff

* Punctuation is important you know

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* tgui rebuild

Co-authored-by: Ghilker <minefap44@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2021-01-16 17:06:22 +02:00
LemonInTheDark
2d02d10e86 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.
2021-01-15 15:46:25 -05:00
esainane
727c5cf0ad HFR: Better observation of delta_time (#56009)
This changes HFR's fusion_process() to better observe delta_time.
2021-01-12 00:29:46 -08:00
LemonInTheDark
655d5dc902 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.
2021-01-10 00:08:24 -03:00
LemonInTheDark
6d1cb94ffb LINDA Reforged (#55604)
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
2021-01-08 08:14:08 +01:00
LemonInTheDark
67c7dd8712 Fixes empty gaslist entries, jesus fuck (#56027) 2021-01-08 07:58:53 +01:00
TemporalOroboros
9a465505c0 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)
2021-01-07 14:50:49 -08:00
vincentiusvin
9d6e0eb735 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.
2021-01-07 14:02:04 -08:00
esainane
0ad9a227e6 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.
2021-01-06 23:19:22 -08:00
esainane
61114c2dc2 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)
2021-01-06 22:10:22 -08:00
LemonInTheDark
e9280ec452 Fixes an issue in pipenet code caused by poor conversion, we want to return if either sharer or partial is equal to or less then 0, not if they both are (#55918) 2021-01-02 20:31:57 -08:00
Ghilker
1365110935 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>
2021-01-02 17:44:38 -08:00
esainane
c63a8bdc41 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().
2021-01-02 10:39:33 +13:00
WarlockD
56345975ba The Great Radio Rework: NTNET Part 1 of many. (#54462)
Machinery networking refactor.
2020-12-30 21:54:34 +01:00
Ghilker
1f2ea0261d 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
2020-12-29 14:56:51 +13:00
Ghilker
060442cb74 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
2020-12-20 14:09:33 -08:00
Ghilker
241e9cf111 fix infinite gas production (#55510)
No more infinite gas production due to a gas_mixture not clearing up
2020-12-15 10:11:12 -08:00
Ghilker
d186c4f236 Temperature control unit (#55345)
This PR changes how freezers/heaters work by adding a button in the GUI that allow the users to switch between cooling and heating without the need to deconstruct the machine.
Circuitboards now will build the freezer and can't be changed by screwdriving the board.
Mapping isn't touched, all other functionalities are still there.
2020-12-13 07:16:53 +02:00
Ghilker
7d97b14455 manifolds (#55455) 2020-12-12 15:24:51 +01:00
Whoneedspacee
021917a193 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.
2020-12-10 23:34:56 -08:00
NightRed
198ea3b575 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.
2020-12-06 00:47:53 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Ghilker
5d76efe40e 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
2020-11-30 18:53:03 +02:00
Bobbahbrown
24e447418a tgui: Round Gauge (#55230)
This PR introduces the wacky round gauge for showing all of your favourite metrics in half-circle format. Show off those wacky numbers, use some scary blinking lights, feel alive!

I've also gone ahead and included this in the canister and tank (think internals) UIs. I've also done some refactoring of data sending from canisters because GOSH DANG it required some.
2020-11-30 18:48:52 +02:00
NightRed
62c211dac7 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.
2020-11-29 23:04:40 -05:00
Ghilker
5389e99dc9 Proto Nitrate reaction fix (#55188)
Fix runtime with proto_nitrate reaction with trit
2020-11-28 07:41:50 -03:00
Ghilker
3ea9f55ebb HFR runtime fix (#55189) 2020-11-28 07:39:24 -03:00
Ghom
4c31b0e116 CanUseTopic() refactor. (#54747)
* CanUseTopic() refactor.

* Forgot about default_can_use_topic. Tested and working.

* Update bin.dm

* no-nonsense.
2020-11-25 13:12:12 +01:00
Maurukas
a5c2bd12f7 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
2020-11-23 13:40:57 -08:00
Ghilker
9fd3f5a0dd 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
2020-11-19 00:33:18 -08:00
Ghilker
f8581a636a Hypertorus Fusion Machinery (#54379)
This PR removes fusion from reactions.dm and add the Hypertorus machine and its new and improved fusion reaction (results may vary).

Fusion is one of the most costly reactions from the atmos system, is one of the most complex and yet most simple ones; this will move fusion inside a buildable machine and it will allow a degree of complexity that can't be done inside react()
2020-11-18 15:44:39 +02:00
Timberpoes
3475080f21 [TM Candidate] Fix a number of atmos-related runtimes through pipeline and SSair tweaks. (#54804)
* Feex

* Moar feex
2020-11-14 20:07:30 -05:00
ArcaneMusic
5338ad1696 Re-assesses 99% of vending prices through Arconomics to match player resources and round-length. (#54715)
* The Re-pricening

* Rewritten and adjusted for paycheck defines.

* I made the map changes finally.

* And the refills too.

* "OH YEAH REPLACING IT ALL WITH DEFINES AND SCALING IT THE EXCEL DOCUMENT WILL BE EASY, ARCANE!!!"

* And the premium ones too.

* Accidently spoiled a future pr due to dme bleedover
2020-11-13 16:17:22 -05:00
Ghom
91bfedcd16 Refactored 'IsAdvancedToolUser' into a macro plus relative trait. Tweaked 'can_hold_items'. (#54665)
The PR aims to allow advanced tool users to be defined by traits rather than a hardcoded proc.
Also necessary for the CanUseTopic refactor I'm working on, which will be PRed separately for atomization purposes.
This PR also fixes an inconsistency with can_hold_items (since monkeys can actually hold items).
2020-11-10 15:15:31 -03:00
TiviPlus
9fb0c73f63 Grep for proc(var/bad) (#54848) 2020-11-09 08:44:35 -03:00
TemporalOroboros
edd6500d78 /obj/screen --> /atom/movable/screen (#54403)
Repaths screen objects to /atom/movable
2020-11-08 23:07:15 -03:00
prodirus
34f8b02530 Mob stays vertical while in cryo (#54800)
Currently, mobs in cryo will turn horizontal in the cryotube when they fall unconscious. This should stop that.
2020-11-08 17:53:51 -03:00
LemonInTheDark
a035c1e502 Merge pull request #53835 from Ghilker/hypernob
This PR changes the Hypernoblium gas around a bit.
First the stop-all-reaction property has been limited to a minimum temperature of 20 K, under that it will no longer stop the reactions in the container (canister, pipenet or open air), over that it will behave normally
Second the production of the Hypernoblium has been shifted to very low temperature, under 15 K so you need at least t3 freezers to achieve and at least 1000 moles of BZ as catalyst to lower the vey high energy released by the reaction

Lowered amount of credit received by cargo to 5.

The production of Hypernoblium was always a pain to make it happen, so it was a super rare gas that almost nobody made, now that the endgame for atmos shifted to more advanced gases and tools, Hypernoblium needed a little rework to fit right into those changes.
2020-11-04 21:18:01 -08:00
MadMedicineMan
d29c75d1eb Canister max. pressure capacity display fix (#54600)
Atmos canisters now display their correct max. pressure capacity. Game code always expects kPa, code for SI-prefix-generation only expects the base unit (here: Pa), so the displayed value was always off by the factor 1000.
2020-10-26 12:23:54 -03:00
Capsandi
484f8f2d5f [READY]Removes Nitryl burn damage and adds Nitryl decomposition reaction (#53821)
This PR removes the burn damage you accumulate when breathing nitryl and adds a reaction to breakdown nitryl into its components(excluding bz) when in contact with oxygen under 600k. This produces small amounts of heat.

Nitryl, as it stands, is barely made or used due to the constant damage you take from breathing it, which causes damage slowdown after less than a minute of use. By making nitryl unsafe or unable to breathe with oxygen present, users must turn to pluoxium while using it in tanks, or hyper-nobilium when filling a room with it. BZ is not refunded if you waste your nitryl.
You now burp while breathing nitryl instead of gasping because it no longer directly harms you.
Breathing nitryl will cause lung damage proportional to the amount you are breathing at a rate proportional to the amount you are breathing when it makes up more than 10% of your breath.
2020-10-24 14:16:15 -07:00
Qustinnus
74755a5a3a Audio falloff re-work, and increased audio range. (#54362)
imo; the ss13 audio-scape is quite barren, you can only hear most things if you can see them, which in my opinion doesn't make much sense. This changes that so you can hear further away, but falloff is much higher, so in reality you will only hear things relatively quietly when they're out of sight.

This PR increases the hearing distance of most sound by 9, excluding sounds such as antag items that are meant to be used stealthily

This PR also replaces Byond's inbuilt falloff system with something I made, (And thanks to potato for helping me throw together a formula for it). This fall-off system makes sound fall off more naturally, with sounds being full volume within a certain range, and then softly falling off until they are completely quiet. This makes for a smoother transition between "This sound is full volume" and "I dont hear this sound".

Co-authored-by: ff <ff>
2020-10-20 17:14:16 -07:00
Fikou
500608ac6d removes hexane (#54437)
removes hexane gas from video game

(the ability to hear dchat got removed like half a day ago) (Lemons note, it's been more then half a day)

it will speed up atmos a bit with less reactions, the reagent from the gas does the same things as halon + bz and the reaction from it is pretty similar to halon, they are both gases that exist to stop fires, i dont think we need both
2020-10-19 11:41:25 -07:00
nicbn
a653bc6350 Refactors occupant to use setter (#54373)
This is to make it easier to attach a signal to the setting of the occupant.
2020-10-18 12:46:14 -03:00