diff --git a/_maps/RandomRuins/SpaceRuins/nova/port_tarkon.dmm b/_maps/RandomRuins/SpaceRuins/nova/port_tarkon.dmm index 614f46f1e2e..0ee2bf12ab5 100644 --- a/_maps/RandomRuins/SpaceRuins/nova/port_tarkon.dmm +++ b/_maps/RandomRuins/SpaceRuins/nova/port_tarkon.dmm @@ -279,7 +279,7 @@ /turf/open/floor/iron, /area/ruin/space/has_grav/port_tarkon/power1) "bS" = ( -/obj/machinery/modular_computer/console{ +/obj/machinery/modular_computer{ dir = 4 }, /obj/effect/turf_decal/tile/blue/anticorner{ @@ -1160,7 +1160,7 @@ /turf/open/floor/iron, /area/ruin/space/has_grav/port_tarkon/centerhall) "ig" = ( -/obj/machinery/modular_computer/console{ +/obj/machinery/modular_computer{ dir = 8 }, /obj/effect/turf_decal/tile/brown/anticorner{ @@ -5902,7 +5902,7 @@ /obj/effect/turf_decal/tile/purple/half{ dir = 1 }, -/obj/machinery/modular_computer/console, +/obj/machinery/modular_computer, /turf/open/floor/iron/dark, /area/ruin/space/has_grav/port_tarkon/developement) "NS" = ( @@ -6885,7 +6885,7 @@ /turf/open/floor/iron, /area/ruin/space/has_grav/port_tarkon/forehall) "Uk" = ( -/obj/machinery/modular_computer/console{ +/obj/machinery/modular_computer{ dir = 1 }, /obj/effect/turf_decal/tile/blue/anticorner{ diff --git a/modular_nova/modules/connecting_computer/code/_computer.dm b/modular_nova/modules/connecting_computer/code/_computer.dm index 146a70d5570..3970eee7439 100644 --- a/modular_nova/modules/connecting_computer/code/_computer.dm +++ b/modular_nova/modules/connecting_computer/code/_computer.dm @@ -8,7 +8,7 @@ if(connectable) AddComponent(/datum/component/connectable_computer) -/obj/machinery/modular_computer/console/Initialize(mapload) +/obj/machinery/modular_computer/Initialize(mapload) . = ..() // Modular consoles all have the same case. diff --git a/modular_nova/modules/connecting_computer/code/connectable_component.dm b/modular_nova/modules/connecting_computer/code/connectable_component.dm index c9304f73196..35be440bfe5 100644 --- a/modular_nova/modules/connecting_computer/code/connectable_component.dm +++ b/modular_nova/modules/connecting_computer/code/connectable_component.dm @@ -10,11 +10,13 @@ /datum/component/connectable_computer/RegisterWithParent() RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(on_update_overlays)) + RegisterSignal(parent, COMSIG_ATOM_POST_DIR_CHANGE, PROC_REF(on_dir_change)) update_neighbors() /datum/component/connectable_computer/UnregisterFromParent() UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS) + UnregisterSignal(parent, COMSIG_ATOM_POST_DIR_CHANGE) update_neighbors() @@ -43,6 +45,28 @@ return null +/** + * Handles COMSIG_ATOM_POST_DIR_CHANGE for machines. + * + * Because ingame construction sets dir after Initialize and LateInitialize + * And changing dir doesn't trigger appearance updates + * + * Arguments: + * * source - The parent we're manipulating + * * old_dir - old dir + * * new_dir - new dir + */ +/datum/component/connectable_computer/proc/on_dir_change(datum/source, old_dir, new_dir) + SIGNAL_HANDLER + + if (old_dir == new_dir) + return + + // Call appearance update on us and our neighbors + var/obj/machinery/parent_machine = parent + parent_machine.update_appearance() + update_neighbors() + /** * Handles COMSIG_ATOM_UPDATE_OVERLAYS for machines. *