Skip to content

Commit

Permalink
Update airlock.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
WolferOkt committed Nov 16, 2023
1 parent 8954d31 commit 78d7b82
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
var/normal_integrity = AIRLOCK_INTEGRITY_N
var/prying_so_hard = FALSE
var/paintable = TRUE // If the airlock type can be painted with an airlock painter
var/welding = FALSE // Displays the state of the door when exposed to welding
var/reinforcing = FALSE // Displays the state of the door when exposed to reinforcement

var/image/old_frame_overlay //keep those in order to prevent unnecessary updating
var/image/old_filling_overlay
Expand Down Expand Up @@ -908,21 +910,30 @@ About the new airlock wires panel:
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least 2 metal sheets to reinforce [src].</span>")
return
if(reinforcing)
to_chat(user, "<span class='notice'>You are already reinforcing [src].</span>")
return
to_chat(user, "<span class='notice'>You start reinforcing [src]...</span>")
reinforcing = TRUE
if(do_after(user, 20, 1, target = src))
if(!panel_open || !S.use(2))
return
user.visible_message("<span class='notice'>[user] reinforces \the [src] with metal.</span>",
"<span class='notice'>You reinforce \the [src] with metal.</span>")
security_level = AIRLOCK_SECURITY_METAL
update_icon()
reinforcing = FALSE
return
else if(istype(C, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/plasteel/S = C
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least 2 plasteel sheets to reinforce [src].</span>")
return
if(reinforcing)
to_chat(user, "<span class='notice'>You are already reinforcing [src].</span>")
return
to_chat(user, "<span class='notice'>You start reinforcing [src]...</span>")
reinforcing = TRUE
if(do_after(user, 20, 1, target = src))
if(!panel_open || !S.use(2))
return
Expand All @@ -932,6 +943,7 @@ About the new airlock wires panel:
modify_max_integrity(normal_integrity * AIRLOCK_INTEGRITY_MULTIPLIER)
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R
update_icon()
reinforcing = FALSE
return

if(istype(C, /obj/item/assembly/signaler))
Expand Down Expand Up @@ -1044,14 +1056,19 @@ About the new airlock wires panel:
if(panel_open) // panel should be open before we try to slice out any shielding.
switch(security_level)
if(AIRLOCK_SECURITY_METAL)
if(welding)
to_chat(user, "<span class='notice'>You are already cutting the panel's shielding</span>")
return
to_chat(user, "<span class='notice'>You begin cutting the panel's shielding...</span>")
welding = TRUE
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
return
visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
"<span class='italics'>You hear welding.</span>")
security_level = AIRLOCK_SECURITY_NONE
spawn_atom_to_turf(/obj/item/stack/sheet/metal, user.loc, 2)
welding = FALSE
if(AIRLOCK_SECURITY_PLASTEEL_O)
to_chat(user, "<span class='notice'>You begin cutting the outer layer of shielding...</span>")
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
Expand Down

0 comments on commit 78d7b82

Please sign in to comment.