Commit Graph

25 Commits

Author SHA1 Message Date
SkyratBot
169c42a262 [MIRROR] Refactors connect_loc_behalf into a component (#7613)
* Refactors connect_loc_behalf into a component (#60678)

See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.

This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.

connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs. 

On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image

If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs

This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.

(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)

* Update glass.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-17 20:29:11 +01:00
SkyratBot
56d4291ef6 [MIRROR] Reverts Entered() passing dir instead of old loc (#6646)
* Reverts Entered() passing dir instead of old loc (#59910)

* Reverts Entered() passing dir instead of old loc

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-07-02 16:42:34 +01:00
SkyratBot
5326760cb3 [MIRROR] Makes turfs persist their signals, uses this to optimize connect_loc (#6465)
* Makes turfs persist their signals, uses this to optimize connect_loc  (#59608)

* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel

* Makes turfs persist their signals, uses this to optimize connect_loc

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-06-23 04:23:48 +01:00
SkyratBot
d85a02babd [MIRROR] Refactors move procs to support multitle objects (#6423)
* Refactors move procs to support multitle objects

* Update _blob.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-22 22:40:04 +01:00
SkyratBot
5880be0168 [MIRROR] (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#5524)
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc

* WHEW THAT WAS EASY

* Update ammo.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-07 22:39:27 +01:00
SkyratBot
df584da6c2 [MIRROR] Makes rot more forgiving of slow cleanup (#4847)
* Gives rotting things a timer before they become fully effective to give more leeway for cleanup. Lowers the max values for disease effect and proc chance significantly. Cleans up some silly zone selection code. (#58290)

* Makes rot more forgiving of slow cleanup

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-04-12 13:53:41 +01:00
SkyratBot
4303af606c [MIRROR] Lowers rot disease chance (#4525)
* Lowers rot disease chance (#58034)

Lowered the chance of disease creation by ~60%
Every round was having horrible breakouts, this ought to fix that

* Lowers rot disease chance

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2021-03-30 11:39:50 +01:00
SkyratBot
cdfbf86d07 [MIRROR] Gibs/Dead bodies no longer produce miasma (#4444)
* Gibs/Dead bodies no longer produce miasma (#57957)

* Gibs/Dead bodies no longer produce miasma

Miasma production as it is now is too little over too long a time span, and it just ends up spreading across the
station and having little effect. My goal here is to remove a source of uninteresting gas from the station's
air, and make corpses and gib piles more infectious.
I've placed the cap on disease payout at a strength of 7, so there's a slight chance of a positive disease, but
I think it's counteracted by the danger presented by just infecting yourself till you get what you want.

I've rewriten the rot component to just run a percent chance to infect someone with a disease based on the type
of rot, and moved almost all of its behavior to signals. There's one portion I can't rewrite without making
significant changes to how I handle atmos sensitivity, so that'll come later.

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Gibs/Dead bodies no longer produce miasma

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2021-03-27 14:20:55 +00:00
SkyratBot
da88064b1d [MIRROR] Tweaks cryostylane to use the new reaction mechanics, incorporating stasis iceblocks, freezing, temporary organ decay prevention and surgery speed modifiers. (#3841)
* Tweaks cryostylane to use the new reaction mechanics, incorporating stasis iceblocks, freezing, temporary organ decay prevention and surgery speed modifiers.

* Update holder.dm

* Update holder.dm

Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-03-04 16:56:37 +00:00
SkyratBot
f79e91462c [MIRROR] LINDA Reforged (#2573)
* LINDA Reforged

* Update airlock.dm

* Update biohazard_blob_controller.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-01-08 18:52:35 +01:00
Azarak
344cafa158 Removes old chemicals, adjusts stuff related to hypovials (#2538)
* weh

* aa
2021-01-07 21:05:19 +01:00
SkyratBot
1853459ade [MIRROR] Rot component no longer makes miasma on planetary turfs, and has a time limit of 5 minutes (#2332)
* Rot component no longer makes miasma on planetary turfs, and has a time limit of 5 minutes (#55713)

* Update rot.dm

* Update rot.dm

* Update rot.dm

* Update rot.dm

* Rot component no longer makes miasma on planetary turfs, and has a time limit of 5 minutes

Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-26 23:39:08 +01:00
SkyratBot
b7ba0f286a [MIRROR] Removes roundstart miasma, from everything. (#2202)
* Removes roundstart miasma. Yes, even the gibs that are marked as miasma producers. Fuck you. Carbons now start listening for death at init, then get the component when they die. Gibs behave just as they used to. (#55343)

* Removes roundstart miasma, from everything.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2020-12-17 07:57:31 +01:00
ShadeAware
f02b02dfa9 [Modular] Ports over our old chemicals. (#1864)
* Get fucked, cobbychem.

* Click-Clack

* C u m .

* Update readme.md

* Update oldchem_medicines.dm

* Update oldchem_reactions.dm

* Update code/modules/reagents/reagent_containers/borghydro.dm

Co-authored-by: Gandalf <jzo123@hotmail.com>

* Fucking there

* Unga

you people have skin made of tissue paper

Co-authored-by: Gandalf <jzo123@hotmail.com>
2020-11-28 21:42:19 +00:00
SkyratBot
1c065882f7 [MIRROR] [ready] Reverts metabolism on stomachs, keep them as important to eating (#1690)
* Reverts metabolism on stomachs, keep them as important to eating (#54632)

* [ready] Reverts metabolism on stomachs, keep them as important to eating

* Merge branch 'master' into upstream-merge-54632

* Update food_reagents.dm

* Update alcohol_reagents.dm

Co-authored-by: NightRed <nightred@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-11-15 06:47:17 +01:00
SkyratBot
1e705faa19 [MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)

* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

* Redefined the SS*_DT defines to use the subsystem wait vars

* Implemented suggested changes by @AnturK

* Commented /datum/proc/process about the deltatime stuff

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities

Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
2020-09-09 08:19:23 +02:00
SkyratBot
c6007727cd Many issue fixes for stomachs and chem interactions (#53440) (#671)
This changes the has_reagent check to work with stomachs.
Several supporting procs have been added to fully support this behavior.
end_metabolization will work as expected again
expose is working with INGEST items again
on_mob_add working as intended
on_mob_life has been reviewed and worked over.

Health Analyzers now show stomach contents, same with the medical kiosk.

Included the unit test to validate reagent checks.
Unit tests for the new procs on mob

Co-authored-by: NightRed <nightred@gmail.com>
2020-09-07 04:10:16 +02:00
nemvar
fd214c52a4 Turns mob biotypes into flags instead of lists. (#45905)
About The Pull Request

title.

Also renames INORGANIC to MINERAL and removes it from simplemobs (never used for simplemobs) where it doesn't fit. Doesn't make sense to have both ORGANIC and INORGANIC as a flag.
Why It's Good For The Game

There's no reason to use a list for this.
Changelog

cl
code: Changed mob biotypes from lists to flags.
/cl
2019-08-21 11:28:30 +12:00
granpawalton
e92a3187a9 miasma temp and pressure (#44586)
* miasma temp and pressure

* temp changed from T20C to BODYTEMP_NORMAL
2019-06-18 21:29:05 +02:00
vuonojenmustaturska
6a106bc877 Remove reagent ids and use typepaths where applicable (#44166)
cl Naksu
code: reagent IDs have been removed in favor using reagent typepaths where applicable
fix: mechas, borg hyposprays etc no longer display internal reagent ids to the player
/cl
2019-05-31 21:57:26 +12:00
vuonojenmustaturska
fb45b7a017 Turns trait accessors into defines, fixes some bugs (#43820)
It's free performance.
2019-05-06 19:44:05 -04:00
Tad Hardesty
adb9c884d3 Create gas mixture and use assume_air 2019-01-03 16:00:20 -08:00
Tad Hardesty
36a611b49f Fix miasma infecting space 2019-01-02 15:09:30 -08:00
coiax
f7f403f7d4 Fixes runtimes when a monkey dies (#41893)
cl coiax
fix: Dead monkeys now produce miasma.
/cl

Previously any time there was a dead monkey, it would constantly runtime with incompatible component warnings.
2018-12-16 12:59:42 +13:00
coiax
277c8c078c Gibs now rot and generate miasma (#41782)
* Gibs now rot and generate miasma

🆑 coiax
add: Gibs will now rot if not cleaned, and produce small amounts of miasma, approximately
equal to a quarter of a corpse.
/🆑

Miasma is fun. Gives the janitor more of a reason to do work. It will only become
dangerous if you have a lot of gibs in a small space. So better keep those Hopline shutters
open.

* Rot component, for things that rot

* Whoops

* No longer processes, so doesn't need to stop
2018-12-10 00:29:42 +11:00