[MIRROR] Rotation component refactor and improvements [MDB IGNORE] (#11304)

* Rotation component refactor and improvements

* Update code/modules/power/singularity/emitter.dm

* e

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-02-08 02:38:20 +01:00
committed by GitHub
parent e73aa07ddd
commit d682fbfbc8
33 changed files with 203 additions and 393 deletions
+2 -3
View File
@@ -14,10 +14,9 @@
var/obj/item/assembly/a_left = null
var/obj/item/assembly/a_right = null
/obj/item/assembly_holder/ComponentInitialize()
/obj/item/assembly_holder/Initialize(mapload)
. = ..()
var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS
AddComponent(/datum/component/simple_rotation, rotation_flags)
AddComponent(/datum/component/simple_rotation)
/obj/item/assembly_holder/Destroy()
QDEL_NULL(a_left)
+2 -6
View File
@@ -18,13 +18,9 @@
. = ..()
beams = list()
START_PROCESSING(SSobj, src)
AddComponent(/datum/component/simple_rotation, AfterRotation = CALLBACK(src, .proc/AfterRotation))
/obj/item/assembly/infra/ComponentInitialize()
. = ..()
var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS
AddComponent(/datum/component/simple_rotation, rotation_flags, after_rotation=CALLBACK(src,.proc/after_rotation))
/obj/item/assembly/infra/proc/after_rotation()
/obj/item/assembly/infra/proc/AfterRotation(mob/user, degrees)
refreshBeam()
/obj/item/assembly/infra/Destroy()