Balloon Alerts (#12020)

This commit is contained in:
Geeves
2021-07-21 14:19:39 +02:00
committed by GitHub
parent d6ff9dc7f7
commit b04be7bcda
6 changed files with 101 additions and 0 deletions
@@ -88,6 +88,7 @@
if(prob(jam_chance))
playsound(src.loc, 'sound/items/trayhit2.ogg', 50, TRUE)
to_chat(user, "<span class='danger'>\The [src] jams!</span>")
balloon_alert(user, SPAN_RED("JAM"))
jam_num = rand(2, 5) // gotta attackself two to five times to unjam
return TRUE
@@ -220,8 +221,11 @@
jam_num--
if(!jam_num)
visible_message(SPAN_DANGER("\The [user] unjams \the [src]!"))
balloon_alert(user, SPAN_GREEN("CLEAR"))
playsound(src.loc, 'sound/weapons/unjam.ogg', 100, TRUE)
unjam_cooldown = world.time
else
balloon_alert(user, SPAN_YELLOW("CLICK"))
else if(unjam_cooldown + 2 SECONDS > world.time)
return
else if(firemodes.len > 1)