review+linters

This commit is contained in:
spacegeese
2025-11-06 19:26:50 -08:00
parent 01c18f876e
commit eb16791c11
3 changed files with 60 additions and 63 deletions
-1
View File
@@ -172,7 +172,6 @@
/obj/structure/barricade/wooden/crude/snow
desc = "This space is blocked off by a crude assortment of planks. It seems to be covered in a layer of snow."
icon_state = "woodenbarricade-snow-old"
max_integrity = 75
/obj/structure/barricade/sandbags
name = "sandbags"
+30 -31
View File
@@ -278,42 +278,41 @@
return
/obj/machinery/door/proc/construct_barricade(obj/item/Q, mob/user)
if(istype(Q, /obj/item/stack/sheet/wood) && user.a_intent == INTENT_HELP)
var/obj/item/stack/sheet/wood/S = Q
if(!density)
to_chat(user, "<span class='warning'>[src] must be closed before you can barricade it!</span>")
return ITEM_INTERACT_COMPLETE
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least 2 planks of wood to barricade [src]!</span>")
return ITEM_INTERACT_COMPLETE
if(barricaded)
to_chat(user, "<span class='warning'>There's already a barricade here!</span>")
return ITEM_INTERACT_COMPLETE
var/turf/buildloc = get_turf(src)
for(var/atom/blocker in buildloc.contents)
if(blocker != src)
if(blocker.density)
to_chat(user, "<span class='warning'>There's something preventing [src] from closing!</span>")
return ITEM_INTERACT_COMPLETE
to_chat(user, "<span class='notice'>You start barricading [src]...</span>")
if(do_after_once(user, 4 SECONDS, target = src))
if(!S.use(2))
to_chat(user, "<span class='warning'>You've run out of wood!</span>")
return ITEM_INTERACT_COMPLETE
else if(!barricaded) //one last check in case someone pre-barricades it
close()
user.visible_message(
"<span class='warning'>[user] barricades [src] shut!</span>",
"<span class='notice'>You barricade [src] shut.</span>"
)
var/obj/structure/barricade/wooden/crude/newbarricade = new(loc)
transfer_fingerprints_to(newbarricade)
var/obj/item/stack/sheet/wood/S = Q
if(!density)
to_chat(user, "<span class='warning'>[src] must be closed before you can barricade it!</span>")
return ITEM_INTERACT_COMPLETE
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least 2 planks of wood to barricade [src]!</span>")
return ITEM_INTERACT_COMPLETE
if(barricaded)
to_chat(user, "<span class='warning'>There's already a barricade here!</span>")
return ITEM_INTERACT_COMPLETE
var/turf/buildloc = get_turf(src)
for(var/atom/blocker in buildloc.contents)
if(blocker != src)
if(blocker.density)
to_chat(user, "<span class='warning'>There's something preventing [src] from closing!</span>")
return ITEM_INTERACT_COMPLETE
to_chat(user, "<span class='notice'>You start barricading [src]...</span>")
if(do_after_once(user, 4 SECONDS, target = src))
if(!S.use(2))
to_chat(user, "<span class='warning'>You've run out of wood!</span>")
return ITEM_INTERACT_COMPLETE
else if(!barricaded) //one last check in case someone pre-barricades it
close()
user.visible_message(
"<span class='warning'>[user] barricades [src] shut!</span>",
"<span class='notice'>You barricade [src] shut.</span>"
)
var/obj/structure/barricade/wooden/crude/newbarricade = new(loc)
transfer_fingerprints_to(newbarricade)
return ITEM_INTERACT_COMPLETE
/obj/machinery/door/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(HAS_TRAIT(src, TRAIT_CMAGGED) && used.can_clean()) //If the cmagged door is being hit with cleaning supplies, don't open it, it's being cleaned!
return ITEM_INTERACT_SKIP_TO_AFTER_ATTACK
else if(!barricaded && user.a_intent != INTENT_HARM)
else if(is_type(used, /obj/item/stack/sheet/wood) && user.a_intent != INTENT_HARM)
construct_barricade(used, user)
return ITEM_INTERACT_COMPLETE
else if(!(used.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
+30 -31
View File
@@ -115,38 +115,37 @@
addtimer(CALLBACK(src, PROC_REF(operate)), close_delay)
/obj/structure/mineral_door/proc/construct_barricade(obj/item/Q, mob/user)
if(istype(Q, /obj/item/stack/sheet/wood) && user.a_intent == INTENT_HELP)
var/obj/item/stack/sheet/wood/S = Q
if(!density)
to_chat(user, "<span class='warning'>[src] must be closed!</span>")
return ITEM_INTERACT_COMPLETE
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least 2 planks of wood to barricade [src]!</span>")
return ITEM_INTERACT_COMPLETE
if(barricaded)
to_chat(user, "<span class='warning'>There's already a barricade here!</span>")
return ITEM_INTERACT_COMPLETE
var/turf/buildloc = get_turf(src)
for(var/atom/blocker in buildloc.contents)
if(blocker != src)
if(blocker.density)
to_chat(user, "<span class='warning'>There's something preventing [src] from closing!</span>")
return ITEM_INTERACT_COMPLETE
to_chat(user, "<span class='notice'>You start barricading [src]...</span>")
if(do_after_once(user, 4 SECONDS, target = src))
if(!S.use(2))
to_chat(user, "<span class='warning'>You've run out of wood!</span>")
return ITEM_INTERACT_COMPLETE
else if(!barricaded) //one last check in case someone pre-barricades it
if(!density)
operate()
user.visible_message(
"<span class='warning'>[user] barricades [src] shut.</span>",
"<span class='notice'>You barricade [src] shut.</span>"
)
var/obj/structure/barricade/wooden/crude/newbarricade = new(loc)
transfer_fingerprints_to(newbarricade)
var/obj/item/stack/sheet/wood/S = Q
if(!density)
to_chat(user, "<span class='warning'>[src] must be closed!</span>")
return ITEM_INTERACT_COMPLETE
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least 2 planks of wood to barricade [src]!</span>")
return ITEM_INTERACT_COMPLETE
if(barricaded)
to_chat(user, "<span class='warning'>There's already a barricade here!</span>")
return ITEM_INTERACT_COMPLETE
var/turf/buildloc = get_turf(src)
for(var/atom/blocker in buildloc.contents)
if(blocker != src)
if(blocker.density)
to_chat(user, "<span class='warning'>There's something preventing [src] from closing!</span>")
return ITEM_INTERACT_COMPLETE
to_chat(user, "<span class='notice'>You start barricading [src]...</span>")
if(do_after_once(user, 4 SECONDS, target = src))
if(!S.use(2))
to_chat(user, "<span class='warning'>You've run out of wood!</span>")
return ITEM_INTERACT_COMPLETE
else if(!barricaded) //one last check in case someone pre-barricades it
if(!density)
operate()
user.visible_message(
"<span class='warning'>[user] barricades [src] shut.</span>",
"<span class='notice'>You barricade [src] shut.</span>"
)
var/obj/structure/barricade/wooden/crude/newbarricade = new(loc)
transfer_fingerprints_to(newbarricade)
return ITEM_INTERACT_COMPLETE
/obj/structure/mineral_door/update_icon_state()
if(state_open)