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>


![dreamseeker_UhvaohsIYK](https://github.com/user-attachments/assets/a4bd6b3f-d502-4a11-852f-0b96472d688d)


![dreamseeker_fEwUfNQben](https://github.com/user-attachments/assets/62dca771-4622-4cb2-9105-7f3a7c73e15a)

</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:
Bloop
2025-12-25 10:32:41 +01:00
committed by GitHub
parent 9ae596611b
commit 0190e64654
45 changed files with 190 additions and 198 deletions
+2 -2
View File
@@ -69,7 +69,7 @@
flags_1 |= ALLOW_DARK_PAINTS_1
RegisterSignal(src, COMSIG_OBJ_PAINTED, PROC_REF(on_painted))
AddElement(/datum/element/atmos_sensitive, mapload)
AddComponent(/datum/component/simple_rotation, ROTATION_NEEDS_ROOM, post_rotation = CALLBACK(src, PROC_REF(post_rotation)))
AddElement(/datum/element/simple_rotation, ROTATION_NEEDS_ROOM)
var/static/list/loc_connections = list(
COMSIG_ATOM_EXIT = PROC_REF(on_exit),
@@ -360,7 +360,7 @@
dropped_debris += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
return dropped_debris
/obj/structure/window/proc/post_rotation(mob/user, degrees)
/obj/structure/window/post_rotation(mob/user, degrees)
air_update_turf(TRUE, FALSE)
/obj/structure/window/proc/on_painted(obj/structure/window/source, mob/user, obj/item/toy/crayon/spraycan/spraycan, is_dark_color)