diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index d215e9bef3fc..64f4709b9f5b 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -5,21 +5,28 @@ climbable = TRUE anchored = TRUE density = TRUE - throwpass = TRUE //You can throw objects over this, despite its density. + /// You can throw objects over this, despite its density. + throwpass = TRUE layer = BELOW_OBJ_LAYER flags_atom = ON_BORDER - var/stack_type //The type of stack the barricade dropped when disassembled if any. - var/stack_amount = 5 //The amount of stack dropped when disassembled at full health - var/destroyed_stack_amount //to specify a non-zero amount of stack to drop when destroyed + /// The type of stack the barricade dropped when disassembled if any. + var/stack_type + /// The amount of stack dropped when disassembled at full health + var/stack_amount = 5 + /// to specify a non-zero amount of stack to drop when destroyed + var/destroyed_stack_amount health = 100 //Pretty tough. Changes sprites at 300 and 150 - var/maxhealth = 100 //Basic code functions + var/maxhealth = 100 /// Used for calculating some stuff related to maxhealth as it constantly changes due to e.g. barbed wire. set to 100 to avoid possible divisions by zero var/starting_maxhealth = 100 - var/crusher_resistant = TRUE //Whether a crusher can ram through it. - var/force_level_absorption = 5 //How much force an item needs to even damage it at all. + /// Whether a crusher can ram through it. + var/crusher_resistant = TRUE + /// How much force an item needs to even damage it at all. + var/force_level_absorption = 5 var/barricade_hitsound var/barricade_type = "barricade" //"metal", "plasteel", etc. - var/wire_icon = 'icons/obj/structures/barricades.dmi' //! Icon file used for the wiring + /// ! Icon file used for the wiring + var/wire_icon = 'icons/obj/structures/barricades.dmi' var/can_change_dmg_state = TRUE var/damage_state = BARRICADE_DMG_NONE var/closed = FALSE @@ -36,7 +43,7 @@ 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 + var/welder_fix = null /obj/structure/barricade/Initialize(mapload, mob/user) . = ..() @@ -469,7 +476,8 @@ nailgun.load_into_chamber() return TRUE -// testing making a prop +// testing making a prop the idea is to regroup all the check that would cancel a repair into this prop.. +// put it after iswelder check... for repair on installed cades... /obj/structure/barricade/proc/attackby_welder(obj/item/item, mob/user) if(!HAS_TRAIT(item, TRAIT_TOOL_BLOWTORCH)) @@ -481,6 +489,7 @@ return if(user.action_busy) + to_chat(user, SPAN_WARNING("You are currently doing something else")) return if(damage_state == welder_fix && damage_state != null) diff --git a/code/game/objects/structures/barricade/deployable.dm b/code/game/objects/structures/barricade/deployable.dm index 1550a8a36ba0..1e18fae047cd 100644 --- a/code/game/objects/structures/barricade/deployable.dm +++ b/code/game/objects/structures/barricade/deployable.dm @@ -26,7 +26,7 @@ /obj/structure/barricade/deployable/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) var/obj/item/tool/weldingtool/welder = item weld_cade(welder, user) diff --git a/code/game/objects/structures/barricade/metal.dm b/code/game/objects/structures/barricade/metal.dm index 5fae5c5b576d..6e756b6a038c 100644 --- a/code/game/objects/structures/barricade/metal.dm +++ b/code/game/objects/structures/barricade/metal.dm @@ -46,7 +46,7 @@ /obj/structure/barricade/metal/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) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You're not trained to repair [src]...")) diff --git a/code/game/objects/structures/barricade/plasteel.dm b/code/game/objects/structures/barricade/plasteel.dm index 7a829e9a0b9c..c739bab75517 100644 --- a/code/game/objects/structures/barricade/plasteel.dm +++ b/code/game/objects/structures/barricade/plasteel.dm @@ -20,8 +20,10 @@ repair_materials = list("plasteel" = 0.3) var/build_state = BARRICADE_BSTATE_SECURED //Look at __game.dm for barricade defines - var/tool_cooldown = 0 //Delay to apply tools to prevent spamming - var/busy = FALSE //Standard busy check + /// Delay to apply tools to prevent spamming + var/tool_cooldown = 0 + /// Standard busy check + var/busy = FALSE var/linked = 0 var/recentlyflipped = FALSE var/hasconnectionoverlay = TRUE @@ -65,7 +67,7 @@ /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 test that return. + attackby_welder(item, user) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You're not trained to repair [src]..."))