Merge pull request #6535 from dylanstrategie/Sound-Fix

Fix health analyzer sound, add extra error catcher in sound.dm
This commit is contained in:
Rob Nelson
2015-11-10 17:12:33 -08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ proc/healthanalyze(mob/living/M as mob, mob/living/user as mob, var/mode = 0, va
if(((M_CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
user.visible_message("<span class='warning'>[user] analyzes the floor's vitals!</span>", \
"<span class='warning'>You analyze the floor's vitals!</span>")
playsound(get_turf(src), 'sound/items/healthanalyzer.ogg', 50, 1)
playsound(user, 'sound/items/healthanalyzer.ogg', 50, 1)
user << {"<span class='notice'>Analyzing Results for the floor:<br>Overall Status: Healthy</span>
Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>
Damage Specifics: <font color='blue'>0</font> - <font color='green'>0</font> - <font color='#FFA500'>0</font> - <font color='red'>0</font>
@@ -136,7 +136,7 @@ Subject's pulse: ??? BPM"}
if(!silent)
user.visible_message("<span class='notice'>[user] analyzes [M]'s vitals.</span>", \
"<span class='notice'>You analyze [M]'s vitals.</span>")
playsound(get_turf(src), 'sound/items/healthanalyzer.ogg', 50, 1)
playsound(user, 'sound/items/healthanalyzer.ogg', 50, 1)
var/fake_oxy = max(rand(1, 40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
var/OX = M.getOxyLoss() > 50 ? "<b>[M.getOxyLoss()]</b>" : M.getOxyLoss()
var/TX = M.getToxLoss() > 50 ? "<b>[M.getToxLoss()]</b>" : M.getToxLoss()

View File

@@ -29,6 +29,7 @@ var/list/lightning_sound = list('sound/effects/lightning/chainlightning1.ogg', '
var/frequency = get_rand_frequency() // Same frequency for everybody
var/turf/turf_source = get_turf(source)
if(!turf_source)
error("Warning : [source] trying to play sound '[soundin]', but turf could not be found.")
return
/* What's going on in this block?