mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Alter playsound paradigm
This commit is contained in:
@@ -156,7 +156,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
return 0 //You can't send faxes to "Unknown"
|
||||
|
||||
flick("faxreceive", src)
|
||||
playsound(loc, "sound/effects/printer.ogg", 50, 1)
|
||||
playsound(src, "sound/effects/printer.ogg", 50, 1)
|
||||
|
||||
|
||||
// give the sprite some time to flick
|
||||
|
||||
@@ -38,19 +38,19 @@
|
||||
P.loc = src
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
flick("[initial(icon_state)]-open",src)
|
||||
playsound(loc, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
sleep(40)
|
||||
icon_state = initial(icon_state)
|
||||
updateUsrDialog()
|
||||
else if(P.is_wrench())
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
else if(P.is_screwdriver())
|
||||
to_chat(user, "<span class='notice'>You begin taking the [name] apart.</span>")
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 10 * P.toolspeed))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You take the [name] apart.</span>")
|
||||
new /obj/item/stack/material/steel( src.loc, 4 )
|
||||
for(var/obj/item/I in contents)
|
||||
@@ -101,7 +101,7 @@
|
||||
usr.put_in_hands(P)
|
||||
updateUsrDialog()
|
||||
flick("[initial(icon_state)]-open",src)
|
||||
playsound(loc, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
spawn(0)
|
||||
sleep(20)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
if(rigged && (Holiday == "April Fool's Day"))
|
||||
if(spam_flag == 0)
|
||||
spam_flag = 1
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
spawn(20)
|
||||
spam_flag = 0
|
||||
return
|
||||
@@ -375,7 +375,7 @@
|
||||
|
||||
user.visible_message("<span class='[class]'>[user] holds \the [P] up to \the [src], it looks like [TU.hes] trying to burn it!</span>", \
|
||||
"<span class='[class]'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
playsound(src.loc, 'sound/bureaucracy/paperburn.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/paperburn.ogg', 50, 1)
|
||||
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit)
|
||||
|
||||
@@ -154,13 +154,13 @@
|
||||
insert_sheet_at(usr, page+1, in_hand)
|
||||
else if(page != pages.len)
|
||||
page++
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
playsound(src, "pageturn", 50, 1)
|
||||
if(href_list["prev_page"])
|
||||
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
|
||||
insert_sheet_at(usr, page, in_hand)
|
||||
else if(page > 1)
|
||||
page--
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
playsound(src, "pageturn", 50, 1)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/weapon/W = pages[page]
|
||||
usr.put_in_hands(W)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
paperamount += paper_result
|
||||
user.drop_from_inventory(W)
|
||||
qdel(W)
|
||||
playsound(src.loc, 'sound/items/pshred.ogg', 75, 1)
|
||||
playsound(src, 'sound/items/pshred.ogg', 75, 1)
|
||||
flick(shred_anim, src)
|
||||
if(paperamount > max_paper)
|
||||
to_chat(user,"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return
|
||||
user.setClickCooldown(1 SECOND)
|
||||
to_chat(user, "<span class='notice'>Click.</span>")
|
||||
playsound(loc, 'sound/items/penclick.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/penclick.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/pen/blue
|
||||
desc = "It's a normal blue ink pen."
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/item/weapon/pen/AltClick(mob/user)
|
||||
to_chat(user, "<span class='notice'>Click.</span>")
|
||||
playsound(loc, 'sound/items/penclick.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/penclick.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/multi/attack_self(mob/user)
|
||||
@@ -152,7 +152,7 @@
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = active_w_class
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 15, 1)
|
||||
playsound(src, 'sound/weapons/saberon.ogg', 15, 1)
|
||||
damtype = SEARING
|
||||
catchable = FALSE
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
/obj/item/weapon/pen/blade/proc/deactivate(mob/living/user)
|
||||
if(!active)
|
||||
return
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 15, 1)
|
||||
playsound(src, 'sound/weapons/saberoff.ogg', 15, 1)
|
||||
active = 0
|
||||
icon_state = default_icon_state
|
||||
embed_chance = initial(embed_chance)
|
||||
|
||||
@@ -70,35 +70,35 @@
|
||||
break
|
||||
|
||||
if (istype(copyitem, /obj/item/weapon/paper))
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
playsound(src, "sound/machines/copier.ogg", 100, 1)
|
||||
sleep(11)
|
||||
copy(copyitem)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
playsound(src, "sound/machines/buzzbeep.ogg", 30)
|
||||
else if (istype(copyitem, /obj/item/weapon/photo))
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
playsound(src, "sound/machines/copier.ogg", 100, 1)
|
||||
sleep(11)
|
||||
photocopy(copyitem)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
playsound(src, "sound/machines/buzzbeep.ogg", 30)
|
||||
else if (istype(copyitem, /obj/item/weapon/paper_bundle))
|
||||
sleep(11)
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
playsound(src, "sound/machines/copier.ogg", 100, 1)
|
||||
var/obj/item/weapon/paper_bundle/B = bundlecopy(copyitem)
|
||||
sleep(11*B.pages.len)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
playsound(src, "sound/machines/buzzbeep.ogg", 30)
|
||||
else if (has_buckled_mobs()) // VOREStation EDIT: For ass-copying.
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
playsound(src, "sound/machines/copier.ogg", 100, 1)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it attempts to scan.</span>")
|
||||
sleep(rand(20,45)) // Sit with your bare ass on the copier for a random time, feel like a fool, get stared at.
|
||||
copyass(user)
|
||||
sleep(15)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
playsound(src, "sound/machines/buzzbeep.ogg", 30)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [copyitem] can't be copied by [src].</span>")
|
||||
playsound(loc, "sound/machines/buzz-two.ogg", 100)
|
||||
playsound(src, "sound/machines/buzz-two.ogg", 100)
|
||||
break
|
||||
|
||||
use_power(active_power_usage)
|
||||
@@ -156,7 +156,7 @@
|
||||
copyitem = O
|
||||
O.loc = src
|
||||
to_chat(user, "<span class='notice'>You insert \the [O] into \the [src].</span>")
|
||||
playsound(loc, "sound/machines/click.ogg", 100, 1)
|
||||
playsound(src, "sound/machines/click.ogg", 100, 1)
|
||||
flick(insert_anim, src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is already something in \the [src].</span>")
|
||||
@@ -170,7 +170,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>")
|
||||
else if(O.is_wrench())
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
else if(default_deconstruction_screwdriver(user, O))
|
||||
@@ -232,7 +232,7 @@
|
||||
if(need_toner)
|
||||
toner--
|
||||
if(toner == 0)
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
playsound(src, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
return c
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
toner -= 5 //photos use a lot of ink!
|
||||
if(toner < 0)
|
||||
toner = 0
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
playsound(src, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
|
||||
return p
|
||||
@@ -339,7 +339,7 @@
|
||||
toner -= 10 // PHOTOCOPYING YOUR ASS IS EXPENSIVE (And so you can't just spam it a bunch).
|
||||
if(toner < 0)
|
||||
toner = 0
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
playsound(src, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
return p
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
for(var/obj/item/weapon/W in bundle.pages)
|
||||
if(toner <= 0 && need_toner)
|
||||
toner = 0
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
playsound(src, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
break
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ var/global/photo_count = 0
|
||||
var/mob/living/carbon/human/M = usr
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
playsound(src, "rustle", 50, 1, -5)
|
||||
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
@@ -242,7 +242,7 @@ var/global/photo_count = 0
|
||||
if(!on || !pictures_left || ismob(target.loc)) return
|
||||
captureimage(target, user, flag)
|
||||
|
||||
playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
|
||||
playsound(src, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
|
||||
|
||||
pictures_left--
|
||||
desc = "A polaroid camera. It has [pictures_left] photos left."
|
||||
|
||||
Reference in New Issue
Block a user