stop upgrade spam on griders

This commit is contained in:
Kashargul
2025-01-13 23:28:59 +01:00
committed by GitHub
parent af2409151b
commit 1742298614
+11 -5
View File
@@ -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)