From c44dbece68c28af75101d62e620d91de1359a09c Mon Sep 17 00:00:00 2001 From: Wallem <66052067+Wallemations@users.noreply.github.com> Date: Tue, 6 Sep 2022 18:08:43 -0400 Subject: [PATCH] Gives the ORM a visual indicator showing which side is the input and which is the output (#69551) About The Pull Request Gives the ORM a light on either side showing which is the input and which is the output, blue for input, red for output. ORM 121212 233123123 Why It's Good For The Game Useful for if anyone decides to move the ORM. Changelog cl Wallem qol: The ORM now has color-coded lights showing which side is the input and output. Blue for input, red for output. /cl --- code/modules/mining/machine_redemption.dm | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 4178d4446ab..7228bb97504 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -197,6 +197,7 @@ to_chat(user, span_notice("You change [src]'s I/O settings, setting the input to [dir2text(input_dir)] and the output to [dir2text(output_dir)].")) unregister_input_turf() // someone just rotated the input and output directions, unregister the old turf register_input_turf() // register the new one + update_appearance(UPDATE_OVERLAYS) return TRUE /obj/machinery/mineral/ore_redemption/ui_interact(mob/user, datum/tgui/ui) @@ -359,3 +360,45 @@ /obj/machinery/mineral/ore_redemption/update_icon_state() icon_state = "[initial(icon_state)][powered() ? null : "-off"]" return ..() + +/obj/machinery/mineral/ore_redemption/update_overlays() + . = ..() + if((machine_stat & NOPOWER)) + return + var/image/ore_input + var/image/ore_output + + switch(input_dir) + if(NORTH) + ore_input = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_n") + ore_input.pixel_y = 32 + ore_output = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_s") + ore_output.pixel_y = -32 + if(SOUTH) + ore_input = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_s") + ore_input.pixel_y = -32 + ore_output = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_n") + ore_output.pixel_y = 32 + if(EAST) + ore_input = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_e") + ore_input.pixel_x = 32 + ore_output = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_w") + ore_output.pixel_x = -32 + if(WEST) + ore_input = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_w") + ore_input.pixel_x = -32 + ore_output = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_e") + ore_output.pixel_x = 32 + ore_input.color = COLOR_MODERATE_BLUE + ore_output.color = COLOR_SECURITY_RED + var/mutable_appearance/light_in = emissive_appearance(ore_input.icon, ore_input.icon_state, alpha = ore_input.alpha) + light_in.pixel_y = ore_input.pixel_y + light_in.pixel_x = ore_input.pixel_x + var/mutable_appearance/light_out = emissive_appearance(ore_output.icon, ore_output.icon_state, alpha = ore_output.alpha) + light_out.pixel_y = ore_output.pixel_y + light_out.pixel_x = ore_output.pixel_x + . += ore_input + . += ore_output + . += light_in + . += light_out +