[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 01:38:20 +00:00
committed by GitHub
co-authored by Tim Tom Gandalf
parent e73aa07ddd
commit d682fbfbc8
33 changed files with 203 additions and 393 deletions
@@ -501,7 +501,7 @@
/obj/machinery/chem_dispenser/drinks/Initialize(mapload)
. = ..()
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE)
AddComponent(/datum/component/simple_rotation)
/obj/machinery/chem_dispenser/drinks/setDir()
var/old = dir
+6 -10
View File
@@ -243,22 +243,23 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/reagent_dispensers/wall/virusfood, 30
desc = "A stationary, plumbed, water tank."
can_be_tanked = FALSE
/obj/structure/reagent_dispensers/plumbed/Initialize(mapload)
. = ..()
AddComponent(/datum/component/plumbing/simple_supply)
/obj/structure/reagent_dispensers/plumbed/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I)
return TRUE
/obj/structure/reagent_dispensers/plumbed/ComponentInitialize()
AddComponent(/datum/component/plumbing/simple_supply)
/obj/structure/reagent_dispensers/plumbed/storage
name = "stationary storage tank"
icon_state = "tank_stationary"
reagent_id = null //start empty
/obj/structure/reagent_dispensers/plumbed/storage/ComponentInitialize()
/obj/structure/reagent_dispensers/plumbed/storage/Initialize(mapload)
. = ..()
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, .proc/can_be_rotated))
AddComponent(/datum/component/simple_rotation)
/obj/structure/reagent_dispensers/plumbed/storage/update_overlays()
. = ..()
@@ -272,11 +273,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/reagent_dispensers/wall/virusfood, 30
tank_color.color = mix_color_from_reagents(reagents.reagent_list)
. += tank_color
/obj/structure/reagent_dispensers/plumbed/storage/proc/can_be_rotated(mob/user, rotation_type)
if(anchored)
to_chat(user, span_warning("It is fastened to the floor!"))
return !anchored
/obj/structure/reagent_dispensers/plumbed/fuel
name = "stationary fuel tank"
icon_state = "fuel_stationary"