mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 16:14:08 +01:00
[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:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user