Adds helpers to avoid << use
This commit is contained in:
@@ -448,7 +448,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
var/sound = pick(ambientsounds)
|
||||
|
||||
if(!L.client.played)
|
||||
L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE)
|
||||
SEND_SOUND(L, sound(sound, repeat = 0, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE))
|
||||
L.client.played = 1
|
||||
sleep(600) //ewww - this is very very bad
|
||||
if(L.&& L.client)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/game/area/areas.dm b/code/game/area/areas.dm (rejected hunks)
|
||||
@@ -432,7 +432,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
if(L.client && !L.client.ambience_playing && L.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
|
||||
L.client.ambience_playing = 1
|
||||
- L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ)
|
||||
+ SEND_SOUND(L, sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ))
|
||||
|
||||
if(!(L.client && (L.client.prefs.toggles & SOUND_AMBIENCE)))
|
||||
return //General ambience check is below the ship ambience so one can play without the other
|
||||
@@ -110,7 +110,7 @@
|
||||
SSticker.mode.apprentices += M.mind
|
||||
M.mind.special_role = "apprentice"
|
||||
SSticker.mode.update_wiz_icons_added(M.mind)
|
||||
M << sound('sound/effects/magic.ogg')
|
||||
SEND_SOUND(M, sound('sound/effects/magic.ogg'))
|
||||
var/newname = copytext(sanitize(input(M, "You are [wizard_name]'s apprentice. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
|
||||
if (!newname)
|
||||
newname = randomname
|
||||
|
||||
@@ -171,8 +171,8 @@
|
||||
if(candidates.len) //if we got at least one candidate, they're a blobbernaut now.
|
||||
var/client/C = pick(candidates)
|
||||
blobber.key = C.key
|
||||
blobber << 'sound/effects/blobattack.ogg'
|
||||
blobber << 'sound/effects/attackblob.ogg'
|
||||
SEND_SOUND(blobber, sound('sound/effects/blobattack.ogg'))
|
||||
SEND_SOUND(blobber, sound('sound/effects/attackblob.ogg'))
|
||||
to_chat(blobber, "<b>You are a blobbernaut!</b>")
|
||||
to_chat(blobber, "You are powerful, hard to kill, and slowly regenerate near nodes and cores, but will slowly die if not near the blob or if the factory that made you is killed.")
|
||||
to_chat(blobber, "You can communicate with other blobbernauts and GLOB.overminds via <b>:b</b>")
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
if(istype(I, /obj/item/device/analyzer))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
to_chat(user, "<b>The analyzer beeps once, then reports:</b><br>")
|
||||
user << 'sound/machines/ping.ogg'
|
||||
SEND_SOUND(user, sound('sound/machines/ping.ogg'))
|
||||
chemeffectreport(user)
|
||||
typereport(user)
|
||||
else
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
C.confused += 25
|
||||
C.Jitter(50)
|
||||
else
|
||||
C << sound('sound/effects/screech.ogg')
|
||||
SEND_SOUND(C, sound('sound/effects/screech.ogg'))
|
||||
|
||||
if(issilicon(M))
|
||||
M << sound('sound/weapons/flash.ogg')
|
||||
SEND_SOUND(M, sound('sound/weapons/flash.ogg'))
|
||||
M.Knockdown(rand(100,200))
|
||||
|
||||
for(var/obj/machinery/light/L in range(4, user))
|
||||
|
||||
@@ -150,7 +150,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
if(prob(ratvarian_prob))
|
||||
message = text2ratvar(message)
|
||||
to_chat(invoker, "<span class='[get_component_span(primary_component)]_large'>\"[message]\"</span>")
|
||||
invoker << 'sound/magic/clockwork/invoke_general.ogg'
|
||||
SEND_SOUND(invoker, sound('sound/magic/clockwork/invoke_general.ogg'))
|
||||
return TRUE
|
||||
|
||||
/datum/clockwork_scripture/proc/check_offstation_penalty()
|
||||
|
||||
@@ -103,13 +103,13 @@
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
if(!B.current.incapacitated())
|
||||
B.current << 'sound/hallucinations/im_here1.ogg'
|
||||
SEND_SOUND(B.current, 'sound/hallucinations/im_here1.ogg')
|
||||
to_chat(B.current, "<span class='cultlarge'>Acolyte [Nominee] has asserted that they are worthy of leading the cult. A vote will be called shortly.</span>")
|
||||
sleep(100)
|
||||
var/list/asked_cultists = list()
|
||||
for(var/datum/mind/B in SSticker.mode.cult)
|
||||
if(B.current && B.current != Nominee && !B.current.incapacitated())
|
||||
B.current << 'sound/magic/exit_blood.ogg'
|
||||
SEND_SOUND(B.current, 'sound/magic/exit_blood.ogg')
|
||||
asked_cultists += B.current
|
||||
var/list/yes_voters = pollCandidates("[Nominee] seeks to lead your cult, do you support [Nominee.p_them()]?", poll_time = 300, group = asked_cultists)
|
||||
if(QDELETED(Nominee) || Nominee.incapacitated())
|
||||
@@ -280,7 +280,7 @@
|
||||
for(var/datum/mind/B in SSticker.mode.cult)
|
||||
if(B.current && B.current.stat != DEAD && B.current.client)
|
||||
to_chat(B.current, "<span class='cultlarge'><b>Master [ranged_ability_user] has marked [GLOB.blood_target] in the [A.name] as the cult's top priority, get there immediately!</b></span>")
|
||||
B.current << pick(sound('sound/hallucinations/over_here2.ogg',0,1,75), sound('sound/hallucinations/over_here3.ogg',0,1,75))
|
||||
SEND_SOUND(B.current, sound(pick('sound/hallucinations/over_here2.ogg','sound/hallucinations/over_here3.ogg'),0,1,75))
|
||||
B.current.client.images += GLOB.blood_target_image
|
||||
attached_action.owner.update_action_buttons_icon()
|
||||
remove_ranged_ability("<span class='cult'>The marking rite is complete! It will last for 90 seconds.</span>")
|
||||
@@ -324,7 +324,7 @@
|
||||
return FALSE
|
||||
if(cooldown > world.time)
|
||||
if(!PM.active)
|
||||
owner << "<span class='cultlarge'><b>You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can pulse again!</b></span>"
|
||||
to_chat(owner, "<span class='cultlarge'><b>You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can pulse again!</b></span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
if(!attached_action.throwing)
|
||||
attached_action.throwing = TRUE
|
||||
attached_action.throwee = target
|
||||
ranged_ability_user << 'sound/weapons/thudswoosh.ogg'
|
||||
SEND_SOUND(ranged_ability_user, sound('sound/weapons/thudswoosh.ogg'))
|
||||
to_chat(ranged_ability_user,"<span class='cult'><b>You reach through the veil with your mind's eye and seize [target]!</b></span>")
|
||||
return
|
||||
else
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/paper/talisman/supply/Topic(href, href_list)
|
||||
world.log << "[usr], [href], [href_list]"
|
||||
if(QDELETED(src) || usr.incapacitated() || !in_range(src, usr))
|
||||
return
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
if(target.use(25))
|
||||
new /obj/structure/constructshell(T)
|
||||
to_chat(user, "<span class='warning'>The talisman clings to the metal and twists it into a construct shell!</span>")
|
||||
user << sound('sound/effects/magic.ogg',0,1,25)
|
||||
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
|
||||
invoke(user, 1)
|
||||
qdel(src)
|
||||
else
|
||||
@@ -281,7 +281,7 @@
|
||||
new /obj/item/stack/sheet/runed_metal(T,quantity)
|
||||
target.use(quantity)
|
||||
to_chat(user, "<span class='warning'>The talisman clings to the plasteel, transforming it into runed metal!</span>")
|
||||
user << sound('sound/effects/magic.ogg',0,1,25)
|
||||
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
|
||||
invoke(user, 1)
|
||||
if(uses <= 0)
|
||||
qdel(src)
|
||||
|
||||
@@ -375,8 +375,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
minor_announce("[key] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE)
|
||||
|
||||
/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << 'sound/machines/alarm.ogg'
|
||||
sound_to_playing_players('sound/machines/alarm.ogg')
|
||||
sleep(100)
|
||||
for(var/mob/living/L in GLOB.mob_list)
|
||||
var/turf/T = get_turf(L)
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
player_mind.special_role = "Morph"
|
||||
SSticker.mode.traitors |= player_mind
|
||||
to_chat(S, S.playstyle_string)
|
||||
S << 'sound/magic/mutate.ogg'
|
||||
SEND_SOUND(S, sound('sound/magic/mutate.ogg'))
|
||||
message_admins("[key_name_admin(S)] has been made into a morph by an event.")
|
||||
log_game("[key_name(S)] was spawned as a morph by an event.")
|
||||
spawned_mobs += S
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
generated_objectives_and_spells = TRUE
|
||||
mind.remove_all_antag()
|
||||
mind.wipe_memory()
|
||||
src << 'sound/effects/ghost.ogg'
|
||||
SEND_SOUND(src, sound('sound/effects/ghost.ogg'))
|
||||
var/datum/objective/revenant/objective = new
|
||||
objective.owner = mind
|
||||
mind.objectives += objective
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
SSticker.mode.traitors |= player_mind
|
||||
to_chat(S, S.playstyle_string)
|
||||
to_chat(S, "<B>You are currently not currently in the same plane of existence as the station. Blood Crawl near a blood pool to manifest.</B>")
|
||||
S << 'sound/magic/demon_dies.ogg'
|
||||
SEND_SOUND(S, 'sound/magic/demon_dies.ogg')
|
||||
message_admins("[key_name_admin(S)] has been made into a slaughter demon by an event.")
|
||||
log_game("[key_name(S)] was spawned as a slaughter demon by an event.")
|
||||
spawned_mobs += S
|
||||
|
||||
@@ -421,8 +421,7 @@
|
||||
yes_code = FALSE
|
||||
safety = TRUE
|
||||
update_icon()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << 'sound/machines/alarm.ogg'
|
||||
sound_to_playing_players('sound/machines/alarm.ogg')
|
||||
if(SSticker && SSticker.mode)
|
||||
SSticker.mode.explosion_in_progress = 1
|
||||
sleep(100)
|
||||
|
||||
@@ -476,7 +476,7 @@
|
||||
GiveHint(target)
|
||||
else if(istype(I, /obj/item/weapon/bikehorn))
|
||||
to_chat(target, "<span class='userdanger'>HONK</span>")
|
||||
target << 'sound/items/airhorn.ogg'
|
||||
SEND_SOUND(target, 'sound/items/airhorn.ogg')
|
||||
target.adjustEarDamage(0,3)
|
||||
GiveHint(target)
|
||||
cooldown = world.time +cooldown_time
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
flash_color(mob_occupant, flash_color="#960000", flash_time=100)
|
||||
to_chat(mob_occupant, "<span class='warning'><b>Agony blazes across your consciousness as your body is torn apart.</b><br><i>Is this what dying is like? Yes it is.</i></span>")
|
||||
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
|
||||
mob_occupant << sound('sound/hallucinations/veryfar_noise.ogg',0,1,50)
|
||||
SEND_SOUND(mob_occupant, sound('sound/hallucinations/veryfar_noise.ogg',0,1,50))
|
||||
QDEL_IN(mob_occupant, 40)
|
||||
|
||||
/obj/machinery/clonepod/relaymove(mob/user)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 25, 0)
|
||||
if(prob(25))
|
||||
for(var/mob/living/silicon/ai/AI in active_ais())
|
||||
AI << sound('sound/machines/terminal_alert.ogg', volume = 10) //Very quiet for balance reasons
|
||||
SEND_SOUND(AI, sound('sound/machines/terminal_alert.ogg', volume = 10)) //Very quiet for balance reasons
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 50, 0)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
return
|
||||
|
||||
if(!connected)
|
||||
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
|
||||
say("Cannot locate mass driver connector. Cancelling firing sequence!")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in range(range, src))
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
new /obj/effect/temp_visual/cult/sac(loc)
|
||||
var/atom/throwtarget
|
||||
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
||||
L << pick(sound('sound/hallucinations/turn_around1.ogg',0,1,50), sound('sound/hallucinations/turn_around2.ogg',0,1,50))
|
||||
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
|
||||
flash_color(L, flash_color="#960000", flash_time=20)
|
||||
L.Knockdown(40)
|
||||
L.throw_at(throwtarget, 5, 1,src)
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
src.update_chassis_page()
|
||||
chassis.occupant_message("<span class='danger'>The [src] is destroyed!</span>")
|
||||
chassis.log_append_to_last("[src] is destroyed.",1)
|
||||
if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon))
|
||||
chassis.occupant << sound('sound/mecha/weapdestr.ogg',volume=50)
|
||||
else
|
||||
chassis.occupant << sound('sound/mecha/critdestr.ogg',volume=50)
|
||||
SEND_SOUND(chassis.occupant, sound(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon) ? 'sound/mecha/weapdestr.ogg' : 'sound/mecha/critdestr.ogg', volume=50))
|
||||
chassis = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -596,7 +596,7 @@
|
||||
/obj/mecha/proc/setInternalDamage(int_dam_flag)
|
||||
internal_damage |= int_dam_flag
|
||||
log_append_to_last("Internal damage of type [int_dam_flag].",1)
|
||||
occupant << sound('sound/machines/warning-buzzer.ogg',wait=0)
|
||||
SEND_SOUND(occupant, sound('sound/machines/warning-buzzer.ogg',wait=0))
|
||||
diag_hud_set_mechstat()
|
||||
return
|
||||
|
||||
@@ -707,7 +707,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
if(!internal_damage)
|
||||
occupant << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
AI.cancel_camera()
|
||||
AI.controlled_mech = src
|
||||
AI.remote_control = src
|
||||
@@ -860,7 +860,7 @@
|
||||
setDir(dir_in)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
if(!internal_damage)
|
||||
occupant << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -914,7 +914,7 @@
|
||||
setDir(dir_in)
|
||||
log_message("[mmi_as_oc] moved in as pilot.")
|
||||
if(!internal_damage)
|
||||
occupant << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
GrantActions(brainmob)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
chassis.occupant_message("<font color='[chassis.zoom_mode?"blue":"red"]'>Zoom mode [chassis.zoom_mode?"en":"dis"]abled.</font>")
|
||||
if(chassis.zoom_mode)
|
||||
owner.client.change_view(12)
|
||||
owner << sound('sound/mecha/imag_enh.ogg',volume=50)
|
||||
SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50))
|
||||
else
|
||||
owner.client.change_view(world.view) //world.view - default mob view size
|
||||
UpdateButtonIcon()
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
||||
victim << 'sound/misc/e1m1.ogg'
|
||||
SEND_SOUND(victim, sound('sound/misc/e1m1.ogg'))
|
||||
var/old_color = victim.client.color
|
||||
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||
|
||||
+3
-3
@@ -78,7 +78,7 @@
|
||||
S.y = 1
|
||||
S.falloff = (falloff ? falloff : FALLOFF_SOUNDS)
|
||||
|
||||
src << S
|
||||
SEND_SOUND(src, S)
|
||||
|
||||
/proc/sound_to_playing_players(sound, volume = 100, vary)
|
||||
sound = get_sfx(sound)
|
||||
@@ -94,13 +94,13 @@
|
||||
next_channel = 1
|
||||
|
||||
/mob/proc/stop_sound_channel(chan)
|
||||
src << sound(null, repeat = 0, wait = 0, channel = chan)
|
||||
SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = chan))
|
||||
|
||||
/client/proc/playtitlemusic()
|
||||
UNTIL(SSticker.login_music) //wait for SSticker init to set the login music
|
||||
|
||||
if(prefs && (prefs.toggles & SOUND_LOBBY))
|
||||
src << sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBYMUSIC) // MAD JAMS
|
||||
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBYMUSIC) // MAD JAMS)
|
||||
|
||||
/proc/get_rand_frequency()
|
||||
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
diff a/code/game/sound.dm b/code/game/sound.dm (rejected hunks)
|
||||
@@ -145,7 +145,3 @@
|
||||
if ("can_open")
|
||||
soundin = pick('sound/effects/can_open1.ogg', 'sound/effects/can_open2.ogg', 'sound/effects/can_open3.ogg')
|
||||
return soundin
|
||||
-
|
||||
-/proc/playsound_global(file, repeat = 0, wait, channel, volume)
|
||||
- for(var/V in GLOB.clients)
|
||||
- V << sound(file, repeat, wait, channel, volume)
|
||||
Reference in New Issue
Block a user