mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Converts simple rotation into a bespoke element (#94582)
## About The Pull Request <img width="579" height="67" alt="image" src="https://github.com/user-attachments/assets/d7a4427e-2a6e-44d3-94ba-c90a2d474984" /> Simple rotation components number in the 8-9k range per round, and each contains a needless callback datum as well. These do not need to hold any state and can be bespoke elements, and the proc to do things post_rotation can just be a normal atom proc. <details><summary>Still works as you'd expect, including items that have flag requirements like the wrench</summary>   </details> ## Why It's Good For The Game Makes a heavily used element much more lightweight, saves a few mb of memory. ## Changelog 🆑 refactor: simple rotation component has been refactored into an element Please report any bugs to github. /🆑
This commit is contained in:
@@ -639,7 +639,7 @@
|
||||
if(emagged_reagents != null && !emagged_reagents.len)
|
||||
emagged_reagents = drink_emagged_reagents
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation)
|
||||
AddElement(/datum/element/simple_rotation)
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/setDir()
|
||||
var/old = dir
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
. = ..()
|
||||
|
||||
AddComponent(/datum/component/plumbing/simple_demand, distinct_reagent_cap = 5)
|
||||
AddComponent(/datum/component/simple_rotation)
|
||||
AddElement(/datum/element/simple_rotation)
|
||||
|
||||
register_context()
|
||||
|
||||
|
||||
@@ -653,7 +653,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/reagent_dispensers/wall/virusfood, 30
|
||||
|
||||
/obj/structure/reagent_dispensers/plumbed/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation)
|
||||
AddElement(/datum/element/simple_rotation)
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/plumbed/storage/update_overlays()
|
||||
|
||||
Reference in New Issue
Block a user