diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index aba995a4770b..d215e9bef3fc 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -35,6 +35,8 @@ var/burn_flame_multiplier = 1 var/repair_materials = list() var/metallic = TRUE + /// var that say what state a barricade can't be fix by welder. null mean it can be repair no matter the state. + var/welder_fix /obj/structure/barricade/Initialize(mapload, mob/user) . = ..() @@ -480,3 +482,7 @@ if(user.action_busy) return + + if(damage_state == welder_fix && damage_state != null) + to_chat(user, SPAN_WARNING("[src] has sustained too much structural damage to be repaired.")) + return diff --git a/code/game/objects/structures/barricade/metal.dm b/code/game/objects/structures/barricade/metal.dm index d8d9913fe498..5fae5c5b576d 100644 --- a/code/game/objects/structures/barricade/metal.dm +++ b/code/game/objects/structures/barricade/metal.dm @@ -19,6 +19,8 @@ var/build_state = BARRICADE_BSTATE_SECURED //Look at __game.dm for barricade defines var/upgrade = null + welder_fix = BARRICADE_DMG_HEAVY + /obj/structure/barricade/metal/update_icon() . = ..() if(dir > 2) @@ -46,9 +48,6 @@ if(iswelder(item)) attackby_welder(item, user)// the idea is to replace a bunch of repetitive task with a prop - if(damage_state == BARRICADE_DMG_HEAVY) - to_chat(user, SPAN_WARNING("[src] has sustained too much structural damage to be repaired.")) - return if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You're not trained to repair [src]...")) return diff --git a/code/game/objects/structures/barricade/plasteel.dm b/code/game/objects/structures/barricade/plasteel.dm index 424b64cf590b..7a829e9a0b9c 100644 --- a/code/game/objects/structures/barricade/plasteel.dm +++ b/code/game/objects/structures/barricade/plasteel.dm @@ -26,6 +26,7 @@ var/recentlyflipped = FALSE var/hasconnectionoverlay = TRUE var/linkable = TRUE + welder_fix = BARRICADE_DMG_HEAVY /obj/structure/barricade/plasteel/update_icon() ..() @@ -64,11 +65,8 @@ /obj/structure/barricade/plasteel/attackby(obj/item/item, mob/user) if(iswelder(item)) - attackby_welder(item, user)// the idea is to replace a bunch of repetitive task with a prop + attackby_welder(item, user)// the idea is to replace a bunch of repetitive test that return. - if(damage_state == BARRICADE_DMG_HEAVY) - to_chat(user, SPAN_WARNING("[src] has sustained too much structural damage to be repaired.")) - return if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You're not trained to repair [src]...")) return