Alter playsound paradigm

This commit is contained in:
Aronai Sieyes
2020-05-29 14:54:11 -04:00
parent b8aa62d75a
commit 12af6afc9b
3 changed files with 18 additions and 21 deletions
@@ -75,7 +75,7 @@
/obj/item/weapon/spell/audible_deception/on_ranged_cast(atom/hit_atom, mob/living/user)
var/turf/T = get_turf(hit_atom)
if(selected_sound && pay_energy(200))
playsound(hit_atom, selected_sound, 80, 1, -1)
playsound(src, selected_sound, 80, 1, -1)
adjust_instability(1)
// Air Horn time.
if(selected_sound == 'sound/items/AirHorn.ogg' && pay_energy(3800))
@@ -414,19 +414,18 @@
visible_message("<span class='danger'>\The [src] begins to shake violently!</span>")
spawn(0)
breakout = 1 //can't think of a better way to do this right now.
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
if(!do_after(escapee, 50)) //5 seconds
breakout = 0
return
if(!escapee || escapee.incapacitated() || escapee.loc != src)
breakout = 0
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(!req_breakout())
breakout = 0
return
breakout = 1 //can't think of a better way to do this right now.
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
if(!do_after(escapee, 50)) //5 seconds
breakout = 0
return
if(!escapee || escapee.incapacitated() || escapee.loc != src)
breakout = 0
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(!req_breakout())
breakout = 0
return
playsound(src, breakout_sound, 100, 1)
animate_shake()
+5 -7
View File
@@ -32,18 +32,16 @@
ingested.clear_reagents()
touching.clear_reagents()
..()
/* VOREStation Edit - Duplicated in our code
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
if(.)
if(src.nutrition && src.stat != 2)
if(src.nutrition && src.stat != 2)
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
if(src.m_intent == "run")
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
if(src.m_intent == "run")
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2
// Moving around increases germ_level faster
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))