Alter playsound paradigm

This commit is contained in:
Aronai Sieyes
2020-05-19 11:03:23 -04:00
parent 7d5042cacd
commit ad75bb86bd
347 changed files with 1541 additions and 1543 deletions

View File

@@ -40,7 +40,7 @@
if(emagged)
projectile = /obj/item/projectile/beam/shock
playsound(loc, emagged ? 'sound/weapons/laser3.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
playsound(src, emagged ? 'sound/weapons/laser3.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
var/obj/item/projectile/P = new projectile(loc)
P.firer = src

View File

@@ -22,7 +22,7 @@
/mob/living/bot/cleanbot/handleIdle()
if(!screwloose && !oddbutton && prob(2))
custom_emote(2, "makes an excited booping sound!")
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(screwloose && prob(5)) // Make a mess
if(istype(loc, /turf/simulated))
@@ -179,7 +179,7 @@
if(!screwloose || !oddbutton)
if(user)
to_chat(user, "<span class='notice'>The [src] buzzes and beeps.</span>")
playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
oddbutton = 1
screwloose = 1
return 1

View File

@@ -65,7 +65,7 @@
if(emagged)
projectile = /obj/item/projectile/beam
playsound(loc, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
playsound(src, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
var/obj/item/projectile/P = new projectile(loc)
P.firer = src

View File

@@ -27,7 +27,7 @@
/mob/living/bot/cleanbot/edCLN/handleIdle()
if(prob(10))
custom_emote(2, "makes a less than thrilled beeping sound.")
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(red_switch && !blue_switch && !green_switch && prob(10) || src.emagged)
if(istype(loc, /turf/simulated))
@@ -124,7 +124,7 @@
if(!emagged)
if(user)
to_chat(user, "<span class='notice'>The [src] buzzes and beeps.</span>")
playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
emagged = 1
return 1

View File

@@ -180,7 +180,7 @@
busy = 1
if(do_after(src, 30, A))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
visible_message("<span class='notice'>[src] waters \the [A].</span>")
tank.reagents.trans_to(T, 100 - T.waterlevel)
if(FARMBOT_UPROOT)
@@ -218,7 +218,7 @@
while(do_after(src, 10) && tank.reagents.total_volume < tank.reagents.maximum_volume)
tank.reagents.add_reagent("water", 10)
if(prob(5))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
busy = 0
action = ""

View File

@@ -58,7 +58,7 @@
emagged = 1
if(user)
to_chat(user, "<span class='notice'>The [src] buzzes and beeps.</span>")
playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
return 1
/mob/living/bot/floorbot/Topic(href, href_list)
@@ -102,7 +102,7 @@
if(prob(1))
custom_emote(2, "makes an excited beeping sound!")
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
/mob/living/bot/floorbot/handleAdjacentTarget()
if(get_turf(target) == src.loc)
@@ -278,7 +278,7 @@
/mob/living/bot/floorbot/explode()
turn_off()
visible_message("<span class='danger'>\The [src] blows apart!</span>")
playsound(src.loc, "sparks", 50, 1)
playsound(src, "sparks", 50, 1)
var/turf/Tsec = get_turf(src)
var/obj/item/weapon/storage/toolbox/mechanical/N = new /obj/item/weapon/storage/toolbox/mechanical(Tsec)

View File

@@ -44,7 +44,7 @@
)
var/message = pick(message_options)
say(message)
playsound(loc, message_options[message], 50, 0)
playsound(src, message_options[message], 50, 0)
/mob/living/bot/medbot/handleAdjacentTarget()
UnarmedAttack(target)
@@ -88,7 +88,7 @@
)
var/message = pick(message_options)
say(message)
playsound(loc, message_options[message], 50, 0)
playsound(src, message_options[message], 50, 0)
custom_emote(1, "points at [H.name].")
last_newpatient_speak = world.time
break
@@ -133,7 +133,7 @@
)
var/message = pick(death_messages)
say(message)
playsound(loc, death_messages[message], 50, 0)
playsound(src, death_messages[message], 50, 0)
// This is down here for the same reason as above.
else
@@ -148,7 +148,7 @@
)
var/message = pick(possible_messages)
say(message)
playsound(loc, possible_messages[message], 50, 0)
playsound(src, possible_messages[message], 50, 0)
busy = 0
update_icons()
@@ -293,7 +293,7 @@
reagent_glass = null
if(emagged && prob(25))
playsound(loc, 'sound/voice/medbot/minsult.ogg', 50, 0)
playsound(src, 'sound/voice/medbot/minsult.ogg', 50, 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)

View File

@@ -183,7 +183,7 @@
locked = !locked
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the mulebot's controls!</span>")
flick("mulebot-emagged", src)
playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
playsound(src, 'sound/effects/sparks1.ogg', 100, 0)
return 1
/mob/living/bot/mulebot/update_icons()
@@ -202,13 +202,13 @@
/mob/living/bot/mulebot/handleFrustrated()
custom_emote(2, "makes a sighing buzz.")
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
..()
/mob/living/bot/mulebot/handleAdjacentTarget()
if(target == src.loc)
custom_emote(2, "makes a chiming sound.")
playsound(loc, 'sound/machines/chime.ogg', 50, 0)
playsound(src, 'sound/machines/chime.ogg', 50, 0)
UnarmedAttack(target)
resetTarget()
if(auto_return && home && (loc != home))
@@ -244,7 +244,7 @@
/mob/living/bot/mulebot/proc/runOver(var/mob/living/carbon/human/H)
if(istype(H)) // No safety checks - WILL run over lying humans. Stop ERPing in the maint!
visible_message("<span class='warning'>[src] drives over [H]!</span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
playsound(src, 'sound/effects/splat.ogg', 50, 1)
var/damage = rand(5, 7)
H.apply_damage(2 * damage, BRUTE, BP_HEAD)
@@ -298,7 +298,7 @@
if(crates_only && !istype(C,/obj/structure/closet/crate))
custom_emote(2, "makes a sighing buzz.")
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
var/obj/structure/closet/crate/crate = C

View File

@@ -158,7 +158,7 @@
return
if(!target)
playsound(src.loc, pick(threat_found_sounds), 50)
playsound(src, pick(threat_found_sounds), 50)
global_announcer.autosay("[src] was attacked by a hostile <b>[target_name(attacker)]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
target = attacker
attacked = TRUE
@@ -169,7 +169,7 @@
if(declare_arrests)
global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect <b>[suspect_name]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME*2] seconds to comply.")
playsound(src.loc, pick(preparing_arrest_sounds), 50)
playsound(src, pick(preparing_arrest_sounds), 50)
// Register to be told when the target moves
GLOB.moved_event.register(target, src, /mob/living/bot/secbot/proc/target_moved)
@@ -207,7 +207,7 @@
awaiting_surrender = 0
say("Level [threat] infraction alert!")
custom_emote(1, "points at [M.name]!")
playsound(src.loc, pick(threat_found_sounds), 50)
playsound(src, pick(threat_found_sounds), 50)
return
/mob/living/bot/secbot/handleAdjacentTarget()
@@ -256,10 +256,10 @@
if(can_next_insult > world.time)
return
if(threat >= 10)
playsound(src.loc, 'sound/voice/binsult.ogg', 75)
playsound(src, 'sound/voice/binsult.ogg', 75)
can_next_insult = world.time + 20 SECONDS
else
playsound(src.loc, pick(fighting_sounds), 75)
playsound(src, pick(fighting_sounds), 75)
can_next_insult = world.time + 5 SECONDS
@@ -278,7 +278,7 @@
cuff = FALSE
if(!cuff)
H.stun_effect_act(0, stun_strength, null)
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1, -1)
do_attack_animation(H)
busy = TRUE
update_icons()
@@ -288,7 +288,7 @@
visible_message("<span class='warning'>\The [H] was prodded by \the [src] with a stun baton!</span>")
insult(H)
else
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
playsound(src, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
visible_message("<span class='warning'>\The [src] is trying to put handcuffs on \the [H]!</span>")
busy = TRUE
if(do_mob(src, H, 60))
@@ -303,7 +303,7 @@
var/mob/living/L = M
L.adjustBruteLoss(xeno_harm_strength)
do_attack_animation(M)
playsound(loc, "swing_hit", 50, 1, -1)
playsound(src, "swing_hit", 50, 1, -1)
busy = TRUE
update_icons()
spawn(2)