From 1742298614cc9963cb640c1839dad0ce60d7f092 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Mon, 13 Jan 2025 23:28:59 +0100 Subject: [PATCH] stop upgrade spam on griders --- 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 6a65b14eeb..3c63119222 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)