From 421f6c1ca51a2371dece97a1625da377722645ce Mon Sep 17 00:00:00 2001 From: tool mind Date: Fri, 3 Nov 2023 15:52:55 -0500 Subject: [PATCH 1/3] theyre in the walls --- code/game/objects/items/stacks/stack.dm | 5 +++++ code/game/objects/structures/girders.dm | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index d85e615bc1c8..644d82bcc063 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -174,6 +174,7 @@ Also change the icon to reflect the amount of sheets, if possible.*/ if(R.on_floor && istype(usr.loc, /turf/open)) var/turf/open/OT = usr.loc var/obj/structure/blocker/anti_cade/AC = locate(/obj/structure/blocker/anti_cade) in usr.loc // for M2C HMG, look at smartgun_mount.dm + var/obj/structure/tunnel/TUNNELBLOCK = locate(/obj/structure/tunnel) in usr.loc if(!OT.allow_construction) to_chat(usr, SPAN_WARNING("The [R.title] must be constructed on a proper surface!")) return @@ -182,6 +183,10 @@ Also change the icon to reflect the amount of sheets, if possible.*/ to_chat(usr, SPAN_WARNING("The [R.title] cannot be built here!")) //might cause some friendly fire regarding other items like barbed wire, shouldn't be a problem? return + if(TUNNELBLOCK) + to_chat(usr, SPAN_WARNING("The [R.title] cannot be constructed on a tunnel!")) + return + if((R.flags & RESULT_REQUIRES_SNOW) && !(istype(usr.loc, /turf/open/snow) || istype(usr.loc, /turf/open/auto_turf/snow))) to_chat(usr, SPAN_WARNING("The [R.title] must be built on snow!")) return diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index e719359ab439..bf702b83c3e8 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -173,6 +173,14 @@ return do_reinforced_wall(W, user) if(STATE_DISPLACED) if(HAS_TRAIT(W, TRAIT_TOOL_CROWBAR)) + var/turf/open/CONBLOCK = loc + var/obj/structure/tunnel/TUNNELBLOCK = locate(/obj/structure/tunnel) in loc + if(!(istype(CONBLOCK) && CONBLOCK.allow_construction)) + to_chat(user, SPAN_WARNING("The girder must be secured on a proper surface!")) + return + if(TUNNELBLOCK) + to_chat(user, SPAN_WARNING("The girder cannot be secured on a tunnel!")) + return playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) to_chat(user, SPAN_NOTICE("Now securing the girder...")) if(!do_after(user, 40 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) From 210bce2f40d02f3bfa921ea6f7eabae7790286e4 Mon Sep 17 00:00:00 2001 From: tool mind Date: Fri, 3 Nov 2023 16:44:21 -0500 Subject: [PATCH 2/3] catching things up to standard --- code/game/objects/items/stacks/stack.dm | 4 ++-- code/game/objects/structures/girders.dm | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 644d82bcc063..3912e2d64165 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -174,7 +174,6 @@ Also change the icon to reflect the amount of sheets, if possible.*/ if(R.on_floor && istype(usr.loc, /turf/open)) var/turf/open/OT = usr.loc var/obj/structure/blocker/anti_cade/AC = locate(/obj/structure/blocker/anti_cade) in usr.loc // for M2C HMG, look at smartgun_mount.dm - var/obj/structure/tunnel/TUNNELBLOCK = locate(/obj/structure/tunnel) in usr.loc if(!OT.allow_construction) to_chat(usr, SPAN_WARNING("The [R.title] must be constructed on a proper surface!")) return @@ -183,7 +182,8 @@ Also change the icon to reflect the amount of sheets, if possible.*/ to_chat(usr, SPAN_WARNING("The [R.title] cannot be built here!")) //might cause some friendly fire regarding other items like barbed wire, shouldn't be a problem? return - if(TUNNELBLOCK) + var/obj/structure/tunnel/tunnel = locate(/obj/structure/tunnel) in usr.loc + if(tunnel) to_chat(usr, SPAN_WARNING("The [R.title] cannot be constructed on a tunnel!")) return diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index bf702b83c3e8..814ddca8e675 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -173,12 +173,12 @@ return do_reinforced_wall(W, user) if(STATE_DISPLACED) if(HAS_TRAIT(W, TRAIT_TOOL_CROWBAR)) - var/turf/open/CONBLOCK = loc - var/obj/structure/tunnel/TUNNELBLOCK = locate(/obj/structure/tunnel) in loc - if(!(istype(CONBLOCK) && CONBLOCK.allow_construction)) + var/turf/open/floor = loc + var/obj/structure/tunnel/tunnel = locate(/obj/structure/tunnel) in loc + if(!floor.allow_construction) to_chat(user, SPAN_WARNING("The girder must be secured on a proper surface!")) return - if(TUNNELBLOCK) + if(tunnel) to_chat(user, SPAN_WARNING("The girder cannot be secured on a tunnel!")) return playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) From 910f51b4bb54c6cd6787a95b14eb079c14f20685 Mon Sep 17 00:00:00 2001 From: tool mind Date: Fri, 3 Nov 2023 17:14:07 -0500 Subject: [PATCH 3/3] very small touchup --- code/game/objects/structures/girders.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 814ddca8e675..6cd6a5cd0300 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -174,10 +174,10 @@ if(STATE_DISPLACED) if(HAS_TRAIT(W, TRAIT_TOOL_CROWBAR)) var/turf/open/floor = loc - var/obj/structure/tunnel/tunnel = locate(/obj/structure/tunnel) in loc if(!floor.allow_construction) to_chat(user, SPAN_WARNING("The girder must be secured on a proper surface!")) return + var/obj/structure/tunnel/tunnel = locate(/obj/structure/tunnel) in loc if(tunnel) to_chat(user, SPAN_WARNING("The girder cannot be secured on a tunnel!")) return