diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 5de6b4d61d3..c3c7f2bb2b6 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -1,5 +1,5 @@
-#define CONSTRUCTION_PANEL_OPEN 1 //Maintenance panel is open, still functioning
-#define CONSTRUCTION_NO_CIRCUIT 2 //Circuit board removed, can safely weld apart
+#define CONSTRUCTION_NO_CIRCUIT 1 //Empty frame, can safely weld apart or install circuit
+#define CONSTRUCTION_PANEL_OPEN 2 //Circuit panel exposed for removal or securing
#define DEFAULT_STEP_TIME 20 /// default time for each step
#define REACTIVATION_DELAY (3 SECONDS) // Delay on reactivation, used to prevent dumb crowbar things. Just trust me
@@ -709,6 +709,7 @@
else
unbuilt_lock.constructionStep = CONSTRUCTION_NO_CIRCUIT
unbuilt_lock.update_integrity(unbuilt_lock.max_integrity * 0.5)
+ unbuilt_lock.setDir(dir)
unbuilt_lock.update_appearance()
else
new /obj/item/electronics/firelock (targetloc)
@@ -728,6 +729,7 @@
can_crush = FALSE
flags_1 = ON_BORDER_1
can_atmos_pass = ATMOS_PASS_PROC
+ assemblytype = /obj/structure/firelock_frame/border_only
/obj/machinery/door/firedoor/border_only/closed
icon_state = "door_closed"
@@ -810,13 +812,15 @@
density = TRUE
var/constructionStep = CONSTRUCTION_NO_CIRCUIT
var/reinforced = 0
+ /// Is this a border_only firelock? Used in several checks during construction
+ var/directional = FALSE
/obj/structure/firelock_frame/examine(mob/user)
. = ..()
switch(constructionStep)
if(CONSTRUCTION_PANEL_OPEN)
. += span_notice("It is unbolted from the floor. The circuit could be removed with a crowbar.")
- if(!reinforced)
+ if(!reinforced && !directional)
. += span_notice("It could be reinforced with plasteel.")
if(CONSTRUCTION_NO_CIRCUIT)
. += span_notice("There are no firelock electronics in the frame. The frame could be welded apart .")
@@ -859,11 +863,18 @@
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, TRUE)
if(reinforced)
new /obj/machinery/door/firedoor/heavy(get_turf(src))
+ else if(directional)
+ var/obj/machinery/door/firedoor/border_only/new_firedoor = new /obj/machinery/door/firedoor/border_only(get_turf(src))
+ new_firedoor.setDir(dir)
+ new_firedoor.adjust_lights_starting_offset()
else
new /obj/machinery/door/firedoor(get_turf(src))
qdel(src)
return
if(istype(attacking_object, /obj/item/stack/sheet/plasteel))
+ if(directional)
+ to_chat(user, span_warning("[src] can not be reinforced."))
+ return
var/obj/item/stack/sheet/plasteel/plasteel_sheet = attacking_object
if(reinforced)
to_chat(user, span_warning("[src] is already reinforced."))
@@ -897,6 +908,7 @@
span_notice("You insert and secure [attacking_object]."))
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, TRUE)
constructionStep = CONSTRUCTION_PANEL_OPEN
+ update_appearance()
return
if(attacking_object.tool_behaviour == TOOL_WELDER)
if(!attacking_object.tool_start_check(user, amount=1))
@@ -909,10 +921,10 @@
return
user.visible_message(span_notice("[user] cuts apart [src]!"), \
span_notice("You cut [src] into metal."))
- var/turf/tagetloc = get_turf(src)
- new /obj/item/stack/sheet/iron(tagetloc, 3)
+ var/turf/targetloc = get_turf(src)
+ new /obj/item/stack/sheet/iron(targetloc, directional ? 2 : 3)
if(reinforced)
- new /obj/item/stack/sheet/plasteel(tagetloc, 2)
+ new /obj/item/stack/sheet/plasteel(targetloc, 2)
qdel(src)
return
if(istype(attacking_object, /obj/item/electroadaptive_pseudocircuit))
@@ -949,6 +961,45 @@
name = "heavy firelock frame"
reinforced = TRUE
+/obj/structure/firelock_frame/border_only
+ icon = 'icons/obj/doors/edge_Doorfire.dmi'
+ flags_1 = ON_BORDER_1
+ obj_flags = CAN_BE_HIT | IGNORE_DENSITY
+ directional = TRUE
+
+/obj/structure/firelock_frame/border_only/Initialize(mapload)
+ . = ..()
+ AddComponent(/datum/component/simple_rotation, ROTATION_NEEDS_ROOM)
+
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_exit),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/structure/firelock_frame/border_only/proc/on_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER
+
+ if(leaving == src)
+ return // Let's not block ourselves.
+
+ if(!(direction & dir))
+ return
+
+ if (!density)
+ return
+
+ if (leaving.movement_type & (PHASING))
+ return
+
+ if (leaving.move_force >= MOVE_FORCE_EXTREMELY_STRONG)
+ return
+
+ leaving.Bump(src)
+ return COMPONENT_ATOM_BLOCK_EXIT
+
+/obj/structure/firelock_frame/border_only/CanPass(atom/movable/mover, border_dir)
+ return border_dir & dir ? ..() : TRUE
+
#undef CONSTRUCTION_PANEL_OPEN
#undef CONSTRUCTION_NO_CIRCUIT
#undef REACTIVATION_DELAY
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 3ccb06c3c01..f24833ac5fd 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -113,6 +113,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
)), \
null, \
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
+ new/datum/stack_recipe("directional firelock frame", /obj/structure/firelock_frame/border_only, 2, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_CHECK_DIRECTION, category = CAT_DOORS), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 2.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 2.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \
new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 2.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \
diff --git a/icons/obj/doors/edge_Doorfire.dmi b/icons/obj/doors/edge_Doorfire.dmi
index bb6bee3fc87..b4866a0951b 100644
Binary files a/icons/obj/doors/edge_Doorfire.dmi and b/icons/obj/doors/edge_Doorfire.dmi differ