diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm index c573d9d9b55..ba79b603edf 100644 --- a/code/modules/power/lighting/light.dm +++ b/code/modules/power/lighting/light.dm @@ -81,6 +81,8 @@ var/power_consumption_rate = 20 ///break if moved, if false also makes it ignore if the wall its on breaks var/break_if_moved = TRUE + //ARK STATION + var/pixel_shift = 32 /obj/machinery/light/Move() if(status != LIGHT_BROKEN && break_if_moved) @@ -457,6 +459,18 @@ new_light.icon_state = "bulb-construct-stage[current_stage]" new_light.setDir(dir) new_light.stage = current_stage + // ARK STATION ADD START + if(pixel_shift) + switch(dir) + if(NORTH) + new_light.pixel_y = pixel_shift + if(SOUTH) + new_light.pixel_y = -pixel_shift + if(EAST) + new_light.pixel_x = pixel_shift + if(WEST) + new_light.pixel_x = -pixel_shift +// ARK STATION ADD END if(!disassembled) new_light.take_damage(new_light.max_integrity * 0.5, sound_effect=FALSE) if(status != LIGHT_BROKEN) diff --git a/code/modules/power/lighting/light_construct.dm b/code/modules/power/lighting/light_construct.dm index 902ca9fb0eb..81587591861 100644 --- a/code/modules/power/lighting/light_construct.dm +++ b/code/modules/power/lighting/light_construct.dm @@ -20,6 +20,8 @@ var/obj/item/stock_parts/power_store/cell ///Can we support a cell? var/cell_connectors = TRUE + ///ARK STATION + var/pixel_shift = 32 /datum/armor/structure_light_construct melee = 50 @@ -148,6 +150,18 @@ if("bulb") new_light = new /obj/machinery/light/small/built(loc) new_light.setDir(dir) +// ARK STATION ADD START + if(pixel_shift) + switch(dir) + if(NORTH) + new_light.pixel_y = pixel_shift + if(SOUTH) + new_light.pixel_y = -pixel_shift + if(EAST) + new_light.pixel_x = pixel_shift + if(WEST) + new_light.pixel_x = -pixel_shift +// ARK STATION ADD END transfer_fingerprints_to(new_light) if(!QDELETED(cell)) new_light.cell = cell diff --git a/modularz_arkstation/modules/light-change/code.dm b/modularz_arkstation/modules/light-change/code.dm index 19ec9dcc312..59e3c338cce 100644 --- a/modularz_arkstation/modules/light-change/code.dm +++ b/modularz_arkstation/modules/light-change/code.dm @@ -124,6 +124,33 @@ /obj/machinery/light/warm bulb_colour = "#fae5c1" +/obj/item/wallframe/light_fixture/attach(turf/on_wall, mob/user) + if(result_path) + playsound(src.loc, 'sound/machines/click.ogg', 75, TRUE) + user.visible_message(span_notice("[user.name] attaches [src] to the wall."), + span_notice("You attach [src] to the wall."), + span_hear("You hear clicking.")) + var/floor_to_wall = get_dir(user, on_wall) + + var/obj/hanging_object = new result_path(get_turf(user), floor_to_wall, TRUE) + hanging_object.setDir(floor_to_wall) + pixel_shift = 32 + if(pixel_shift) + switch(floor_to_wall) + if(NORTH) + hanging_object.pixel_y = pixel_shift + if(SOUTH) + hanging_object.pixel_y = -pixel_shift + if(EAST) + hanging_object.pixel_x = pixel_shift + if(WEST) + hanging_object.pixel_x = -pixel_shift + after_attach(hanging_object) + + qdel(src) + + + #define MAPPING_DIRECTIONAL_HELPERS_LIGHT(path, dop_offset) ##path/directional/north {\ dir = NORTH; \ pixel_y = 32 + dop_offset; \