From 45db2f69183dec3c0187faed254a32dd6b69a1f7 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Tue, 14 Jan 2025 23:45:33 -0700 Subject: [PATCH] [MIRROR] stop upgrade spam on griders (#9873) Co-authored-by: Cameron Lennox --- code/game/objects/structures/girders.dm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 6622f75ff6..d47ae49395 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -15,6 +15,7 @@ var/datum/material/girder_material var/datum/material/reinf_material var/reinforcing = 0 + var/upgrading = FALSE var/applies_material_colour = 1 var/wall_type = /turf/simulated/wall @@ -208,8 +209,13 @@ if(!reinforce_with_material(W, user)) return ..() else + if(upgrading) + return + upgrading = TRUE if(!construct_wall(W, user)) + upgrading = FALSE return ..() + upgrading = FALSE else return ..() @@ -226,23 +232,23 @@ var/amount_to_use = reinf_material ? 1 : 2 if(S.get_amount() < amount_to_use) to_chat(user, span_notice("There isn't enough material here to construct a wall.")) - return 0 + return FALSE var/datum/material/M = name_to_material[S.default_type] if(!istype(M)) - return 0 + return FALSE var/wall_fake add_hiddenprint(user) if(M.integrity < 50) to_chat(user, span_notice("This material is too soft for use in wall construction.")) - return 0 + return FALSE to_chat(user, span_notice("You begin adding the plating...")) if(!do_after(user,40) || !S.use(amount_to_use)) - return 1 //once we've gotten this far don't call parent attackby() + return TRUE //once we've gotten this far don't call parent attackby() if(anchored) to_chat(user, span_notice("You added the plating!")) @@ -258,7 +264,7 @@ T.can_open = 1 T.add_hiddenprint(user) qdel(src) - return 1 + return TRUE /obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed. if(reinf_material)