Skip to content

Commit

Permalink
Fix runtime relating to wooden barricades (#2082)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored May 31, 2024
1 parent fbb2e05 commit e27784e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions code/game/machinery/deployable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,20 @@
else
to_chat(user, span_notice("You start adding [I] to [src]..."))
playsound(src, 'sound/items/hammering_wood.ogg', 50, vary = TRUE)
if(do_after(user, 50, target=src))
W.use(5)
if(do_after(user, 50, target=src) && W.use(5))
var/turf/T = get_turf(src)
T.PlaceOnTop(/turf/closed/wall/mineral/wood/nonmetal)
qdel(src)
return
return ..()

/obj/structure/barricade/wooden/crowbar_act(mob/living/user, obj/item/tool)
balloon_alert(user, "deconstructing barricade...")
loc.balloon_alert(user, "deconstructing barricade...")
if(!tool.use_tool(src, user, 2 SECONDS, volume=50))
return
balloon_alert(user, "barricade deconstructed")
loc.balloon_alert(user, "barricade deconstructed")
tool.play_tool_sound(src)
new /obj/item/stack/sheet/mineral/wood(get_turf(src), drop_amount)
new /obj/item/stack/sheet/mineral/wood(drop_location(), drop_amount)
qdel(src)
return TOOL_ACT_TOOLTYPE_SUCCESS

Expand Down

0 comments on commit e27784e

Please sign in to comment.