Commit Graph

9 Commits

Author SHA1 Message Date
LemonInTheDark
319d7079c3 Revert "Finishes the allocation refactor (#55965)" (#56137)
This reverts commit 87234f3fd8.
2021-01-13 01:17:59 +00:00
TiviPlus
87234f3fd8 Finishes the allocation refactor (#55965)
#53841 continuation
I recall that the reason for infinite stuns and such was that the priority wasn't being cleared properly when something hitched and I fixed it and I don't remember where exactly but it works now (TM)
A variation of this is TMed on TGMC and it works fine
2021-01-11 15:42:00 -03:00
Donkie
53b212ddf2 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
2020-09-08 10:24:05 +02:00
Emmett Gaines
9e34b3d6a1 Supports named arguments in AddComponent and AddElement (#49098)
AddComponent/AddElement now support named arguments. This requires passing around an argument list instead of using actual proc args which a bit gross but we can blame byond for forcing this.

InheritComponent uses mirrored init arguments instead of an argument list which means no more accessing it via index to get to the same arguments as in init.

As a small bonus I restructured dcs defines to be a bit more manageable. Mainly just splits them into separate files and gives them their own folder.
2020-02-17 17:57:52 +13:00
Emmett Gaines
12a4983b75 Adds a flag for bespoke elements (#47807)
* Adds a flag for bespoke elements

And applies it to firestacker

* Improves bespoke documentation
2019-11-25 17:53:00 +01:00
Emmett Gaines
328fc7b1f1 Adds elements: Lightweight shared components/Global components (#44817)
If you came here thinking this was some game feature then you are in the wrong place. Here is where I ramble about code.

This adds /datum/element as a sort of sibling to components. Only one of each type gets instanced and they do not get tied directly to any particular thing like a component does. Basically they're a very lightweight component for doing simple functionality that doesn't have much state.

Originally this concept came about as a kind of component that could be shared between many parents to reduce some resource costs. Doing this would allow us to componentize more behaviors that are a part of too many things to be viable to have a whole component for every single one. For example a component on every space turf would be entirely unviable. With elements it's much more reasonable.

This implements a prety bare framework and a couple components are migrated to it. It's ready to be used but I fully expect I'm going to need to refine how it works for all the usecases we'll want it for.

Also: this fixes the qdeleted signal. This signal isn't even possible because after qdel is done there's nothing to receive a signal anyway. I've changed it to a qdeling signal instead. I need it to work for some elements to know when to clean themselves up.
2019-07-09 11:26:51 +12:00
Emmett Gaines
34a3d2da4d Refactors component signals registration (#38798)
Datums know what signals are being listened for and components can now be registered to listen for signals on more than one object.
2018-07-05 00:56:39 +03:00
ninjanomnom
b889b7bc49 Comment and subsystem recover 2018-06-18 15:40:53 -04:00
ninjanomnom
71e2354d48 Adds global signals and a silly example use case 2018-06-18 03:06:09 -04:00