Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deconstruct Act Respects Invulnerability #4008

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1231,6 +1231,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 @@ -229,6 +229,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 @@ -292,6 +292,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
Loading