Skip to content

Commit

Permalink
Deconstruct Act Respects Invulnerability (#4008)
Browse files Browse the repository at this point in the history
https://github.com/user-attachments/assets/8457df17-6084-4cea-a59f-7490e7e7f769



🆑
fix: you can no longer grind down the outpost
/🆑

---------

Signed-off-by: Erika Fox <[email protected]>
Co-authored-by: FalloutFalcon <[email protected]>
  • Loading branch information
Erikafox and FalloutFalcon authored Jan 20, 2025
1 parent a88e2f6 commit 18c6922
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,8 @@

///Deconstruct act
/atom/proc/deconstruct_act(mob/living/user, obj/item/I)
if(flags_1 & NODECONSTRUCT_1)
return TRUE
return SEND_SIGNAL(src, COMSIG_ATOM_DECONSTRUCT_ACT, user, I)

///Generate a tag for this atom
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

/obj/structure/frame/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if(I.use_tool(src, user, 3 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/deployable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@

/obj/structure/barricade/wooden/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, 2 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,8 @@

/obj/machinery/door/airlock/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
var/decon_time = 5 SECONDS
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@
return FALSE
return TRUE

/obj/deconstruct_act(mob/living/user, obj/item/I)
if(resistance_flags & INDESTRUCTIBLE)
to_chat(user, span_warning("[src] cannot be deconstructed!"))
return FALSE
return ..()

/obj/analyzer_act(mob/living/user, obj/item/I)
if(atmosanalyzer_scan(user, src))
return TRUE
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/door_assembly.dm
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@

/obj/structure/door_assembly/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, 3 SECONDS, volume=100))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/dresser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

/obj/structure/dresser/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
to_chat(user, span_notice("You begin to disassemble [src]."))
if(I.use_tool(src, user, 10, volume=50))
to_chat(user, span_notice("You successfully deconstruct [src]."))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/girders.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@

/obj/structure/girder/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if(I.use_tool(src, user, 3 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/grille.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@

/obj/structure/grille/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, 1 SECONDS, volume=100))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/lattice.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

/obj/structure/lattice/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if(I.use_tool(src, user, 1 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/platforms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@

/obj/structure/platform/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if(I.use_tool(src, user, 3 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/railings.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@

/obj/structure/railing/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, 3 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/salvaging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

/obj/structure/salvageable/deconstruct_act(mob/living/user, obj/item/tool)
. = ..()
if(.)
return FALSE
user.visible_message("<span class='notice'>[user] starts slicing [src].</span>", \
"<span class='notice'>You start salvaging anything useful from [src]...</span>")
if(tool.use_tool(src, user, 6 SECONDS))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@

/obj/structure/table/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, 1 SECONDS, volume=0))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@

/obj/structure/window/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, decon_time, volume=100))
Expand Down
3 changes: 3 additions & 0 deletions code/game/turfs/closed/_closed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@

/turf/closed/deconstruct_act(mob/living/user, obj/item/I)
var/act_duration = breakdown_duration
if(breakdown_duration == -1)
to_chat(user, span_warning("[src] cannot be deconstructed!"))
return FALSE
if(!I.tool_start_check(user, amount=0))
return FALSE
to_chat(user, "<span class='notice'>You begin slicing through the outer plating...</span>")
Expand Down
1 change: 1 addition & 0 deletions code/game/turfs/closed/indestructible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
icon = 'icons/turf/walls.dmi'
explosion_block = 50
max_integrity = 10000000
breakdown_duration = -1

/turf/closed/indestructible/TerraformTurf(path, new_baseturf, flags, defer_change = FALSE, ignore_air = FALSE)
return
Expand Down

0 comments on commit 18c6922

Please sign in to comment.