Skip to content

Commit

Permalink
Tent Quickfix (#4100)
Browse files Browse the repository at this point in the history
# About the pull request

Prevent noise spam by using action_busy

# Explain why it's good for the game

My code was bad, this improves it. Prevents people from spamming
deconstruction noise and text
  • Loading branch information
ghostsheet authored Aug 4, 2023
1 parent 7e822b9 commit 50e83da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/tents/deployed_tents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@

/obj/structure/tent/attackby(obj/item/item, mob/user)
var/obj/item/tool/shovel/shovel = item
if(!istype(shovel) || shovel.folded)
if(!istype(shovel) || shovel.folded || user.action_busy)
return
visible_message(SPAN_HIGHDANGER("[user] is trying to tear down the [src]"))
playsound(src, 'sound/items/paper_ripped.ogg', 25, 1)

if(user.action_busy || !do_after(user, 150, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_HOSTILE, src) || QDELETED(src))
if(!do_after(user, 150, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_HOSTILE, src) || QDELETED(src))
return

visible_message(SPAN_HIGHDANGER("[user] tears down the [src]"))
Expand Down

0 comments on commit 50e83da

Please sign in to comment.