Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix runtime relating to wooden barricades #2082

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading