mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +01:00
Alter playsound paradigm
This commit is contained in:
@@ -330,7 +330,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/ai/attack_self(mob/user as mob)
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
return
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
scanmode = 4
|
||||
if("Honk")
|
||||
if ( !(last_honk && world.time < last_honk + 20) )
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
last_honk = world.time
|
||||
if("Gas Scan")
|
||||
if(scanmode == 5)
|
||||
@@ -983,7 +983,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
|
||||
return 1 // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
@@ -1020,14 +1020,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
|
||||
S.attach(P.loc)
|
||||
S.set_up(P, 10, 0, P.loc)
|
||||
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
S.start()
|
||||
message += "Large clouds of smoke billow forth from your [P]!"
|
||||
if(i>=40 && i<=45) //Bad smoke
|
||||
var/datum/effect/effect/system/smoke_spread/bad/B = new /datum/effect/effect/system/smoke_spread/bad
|
||||
B.attach(P.loc)
|
||||
B.set_up(P, 10, 0, P.loc)
|
||||
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
B.start()
|
||||
message += "Large clouds of noxious smoke billow forth from your [P]!"
|
||||
if(i>=65 && i<=75) //Weaken
|
||||
@@ -1064,7 +1064,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(id)
|
||||
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
|
||||
playsound(loc, 'sound/machines/id_swipe.ogg', 100, 1)
|
||||
playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
|
||||
else
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
@@ -1151,7 +1151,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/proc/new_info(var/beep_silent, var/message_tone, var/reception_message)
|
||||
if (!beep_silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(2, loc))
|
||||
O.show_message(text("[bicon(src)] *[message_tone]*"))
|
||||
//Search for holder of the PDA.
|
||||
@@ -1280,7 +1280,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
to_chat(usr, "<span class='notice'>You remove \the [cartridge] from the [name].</span>")
|
||||
playsound(loc, 'sound/machines/id_swipe.ogg', 100, 1)
|
||||
playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
|
||||
cartridge = null
|
||||
|
||||
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if(!proximity) return
|
||||
if(!active_dummy)
|
||||
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||
playsound(src, 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
||||
saved_item = target.type
|
||||
saved_icon = target.icon
|
||||
@@ -42,7 +42,7 @@
|
||||
if(!can_use || !saved_item) return
|
||||
if(active_dummy)
|
||||
eject_all()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
qdel(active_dummy)
|
||||
active_dummy = null
|
||||
to_chat(usr, "<span class='notice'>You deactivate the [src].</span>")
|
||||
@@ -51,7 +51,7 @@
|
||||
flick("emppulse",T)
|
||||
spawn(8) qdel(T)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
var/obj/O = new saved_item(src)
|
||||
if(!O) return
|
||||
var/obj/effect/dummy/chameleon/C = new /obj/effect/dummy/chameleon(usr.loc)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
return
|
||||
|
||||
if(ringer)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(2, loc))
|
||||
O.show_message(text("[bicon(src)] *beep*"))
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
voice_requests |= candidate
|
||||
|
||||
if(ringer)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(2, loc))
|
||||
O.show_message(text("[bicon(src)] *beep*"))
|
||||
|
||||
|
||||
@@ -395,12 +395,12 @@
|
||||
if(!do_after(user, 30, H))
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
|
||||
|
||||
var/error = can_defib(H)
|
||||
if(error)
|
||||
make_announcement(error, "warning")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
|
||||
if(check_blood_level(H))
|
||||
@@ -413,18 +413,18 @@
|
||||
//deduct charge here, in case the base unit was EMPed or something during the delay time
|
||||
if(!checked_use(chargecost))
|
||||
make_announcement("buzzes, \"Insufficient charge.\"", "warning")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
|
||||
H.visible_message("<span class='warning'>\The [H]'s body convulses a bit.</span>")
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
playsound(src, "bodyfall", 50, 1)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
set_cooldown(cooldowntime)
|
||||
|
||||
error = can_revive(H)
|
||||
if(error)
|
||||
make_announcement(error, "warning")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
|
||||
H.apply_damage(burn_damage_amt, BURN, BP_TORSO)
|
||||
@@ -438,7 +438,7 @@
|
||||
H.adjustToxLoss(-H.getToxLoss())
|
||||
|
||||
make_announcement("pings, \"Resuscitation successful.\"", "notice")
|
||||
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_success.ogg', 50, 0)
|
||||
|
||||
make_alive(H)
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
to_chat(user, "<span class='warning'>You can't do that while the safety is enabled.</span>")
|
||||
return
|
||||
|
||||
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
|
||||
audible_message("<span class='warning'>\The [src] lets out a steadily rising hum...</span>")
|
||||
|
||||
if(!do_after(user, chargetime, H))
|
||||
@@ -468,12 +468,12 @@
|
||||
//deduct charge here, in case the base unit was EMPed or something during the delay time
|
||||
if(!checked_use(chargecost))
|
||||
make_announcement("buzzes, \"Insufficient charge.\"", "warning")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'><i>\The [user] shocks [H] with \the [src]!</i></span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 100, 1, -1)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 100, 1, -1)
|
||||
playsound(src, 'sound/weapons/Egloves.ogg', 100, 1, -1)
|
||||
set_cooldown(cooldowntime)
|
||||
|
||||
H.stun_effect_act(2, 120, target_zone)
|
||||
@@ -547,10 +547,10 @@
|
||||
safety = new_safety
|
||||
if(safety)
|
||||
make_announcement("beeps, \"Safety protocols enabled!\"", "notice")
|
||||
playsound(get_turf(src), 'sound/machines/defib_safetyon.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_safetyon.ogg', 50, 0)
|
||||
else
|
||||
make_announcement("beeps, \"Safety protocols disabled!\"", "warning")
|
||||
playsound(get_turf(src), 'sound/machines/defib_safetyoff.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/defib_safetyoff.ogg', 50, 0)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>")
|
||||
broken = FALSE
|
||||
update_icon()
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] fails to repair \the [src].</span>")
|
||||
repairing = FALSE
|
||||
@@ -138,7 +138,7 @@
|
||||
if(user)
|
||||
update_icon()
|
||||
to_chat(user, "<span class='warning'><i>click</i></span>")
|
||||
playsound(src.loc, 'sound/weapons/empty.ogg', 80, 1)
|
||||
playsound(src, 'sound/weapons/empty.ogg', 80, 1)
|
||||
return FALSE
|
||||
else if(battery && battery.checked_use(charge_cost + (round(charge_cost / 4) * max(0, times_used - max_flashes)))) // Using over your maximum flashes starts taking more charge per added flash.
|
||||
times_used++
|
||||
@@ -164,7 +164,7 @@
|
||||
if(!check_capacitor(user))
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
playsound(src, 'sound/weapons/flash.ogg', 100, 1)
|
||||
var/flashfail = 0
|
||||
|
||||
//VOREStation Add - NIF
|
||||
@@ -253,7 +253,7 @@
|
||||
if(!check_capacitor(user))
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
playsound(src, 'sound/weapons/flash.ogg', 100, 1)
|
||||
flick("flash2", src)
|
||||
if(user && isrobot(user))
|
||||
spawn(0)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(cell.use(power_usage) != power_usage) // we weren't able to use our full power_usage amount!
|
||||
visible_message("<span class='warning'>\The [src] flickers before going dull.</span>")
|
||||
set_light(0)
|
||||
playsound(src.loc, 'sound/effects/sparks3.ogg', 10, 1, -3) //Small cue that your light went dull in your pocket.
|
||||
playsound(src, 'sound/effects/sparks3.ogg', 10, 1, -3) //Small cue that your light went dull in your pocket.
|
||||
on = 0
|
||||
update_icon()
|
||||
return PROCESS_KILL
|
||||
@@ -109,7 +109,7 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(power_use)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
playsound(src.loc, 'sound/weapons/empty.ogg', 15, 1, -3)
|
||||
playsound(src, 'sound/weapons/empty.ogg', 15, 1, -3)
|
||||
update_icon()
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.is_screwdriver())
|
||||
in_hack_mode = !in_hack_mode
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
new_bulbs += AddShards(1)
|
||||
qdel(L)
|
||||
if(new_bulbs != 0)
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/ding.ogg', 50, 1)
|
||||
to_chat(user, "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining.")
|
||||
return
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(var/mob/user)
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
add_uses(-1)
|
||||
return 1
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
var/new_bulbs = AddShards(1)
|
||||
if(new_bulbs != 0)
|
||||
to_chat(U, "<span class='notice'>\The [src] has fabricated a new bulb from the broken bulbs it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/ding.ogg', 50, 1)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
playsound(src, "sparks", 100, 1)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
user.audible_message("<B>[user.GetVoice()]</B>[user.GetAltName()] broadcasts, <FONT size=[broadcast_size] face='[broadcast_font]' color='[broadcast_color]'>\"[pick(insultmsg)]\"</FONT>")
|
||||
if(broadcast_size >= 11)
|
||||
var/turf/T = get_turf(user)
|
||||
playsound(T, 'sound/items/AirHorn.ogg', 100, 1)
|
||||
playsound(src, 'sound/items/AirHorn.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/M in oviewers(4, T))
|
||||
if(M.get_ear_protection() >= 2)
|
||||
continue
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
to_chat(user, "<span class='warning'>[O] must be safely placed on the ground for modification.</span>")
|
||||
return
|
||||
|
||||
playsound(src.loc, O.usesound, 100, 1)
|
||||
playsound(src, O.usesound, 100, 1)
|
||||
|
||||
user.visible_message("<span class='notice'>\The [user] opens \the [src] and modifies \the [O].</span>","<span class='notice'>You open \the [src] and modify \the [O].</span>")
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ effective or pretty fucking useless.
|
||||
|
||||
add_attack_logs(user,affected,"Used a [name]")
|
||||
|
||||
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
|
||||
playsound(src, 'sound/misc/interference.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You trigger [src].</span>")
|
||||
times_used += 1
|
||||
if(times_used >= max_uses)
|
||||
|
||||
@@ -506,7 +506,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac
|
||||
while(recharging)
|
||||
if(!do_after(user, 10, src))
|
||||
break
|
||||
playsound(get_turf(src),'sound/items/change_drill.ogg',25,1)
|
||||
playsound(src,'sound/items/change_drill.ogg',25,1)
|
||||
if(power_source.give(phase_power) < phase_power)
|
||||
break
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
return
|
||||
|
||||
if(isnull(insults))
|
||||
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
|
||||
playsound(src, 'sound/voice/halt.ogg', 100, 1, vary = 0)
|
||||
user.audible_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
|
||||
else
|
||||
if(insults > 0)
|
||||
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)
|
||||
playsound(src, 'sound/voice/binsult.ogg', 100, 1, vary = 0)
|
||||
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
|
||||
user.audible_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
|
||||
insults--
|
||||
|
||||
Reference in New Issue
Block a user