mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-26 01:11:54 +00:00
Merge pull request #1272 from tigercat2000/intercomusic
New admin sound verb; Play a sound originating at every radio.
This commit is contained in:
@@ -75,7 +75,8 @@ var/list/admin_verbs_ban = list(
|
||||
var/list/admin_verbs_sounds = list(
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/play_server_sound
|
||||
/client/proc/play_server_sound,
|
||||
/client/proc/play_intercomm_sound
|
||||
)
|
||||
var/list/admin_verbs_event = list(
|
||||
/client/proc/object_talk,
|
||||
|
||||
@@ -38,16 +38,45 @@ var/list/sounds_cache = list()
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
var/list/sounds = file2list("sound/serversound_list.txt");
|
||||
sounds += "--CANCEL--"
|
||||
sounds += sounds_cache
|
||||
|
||||
var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds
|
||||
|
||||
if(melody == "--CANCEL--") return
|
||||
var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds
|
||||
if(!melody) return
|
||||
|
||||
play_sound(melody)
|
||||
feedback_add_details("admin_verb","PSS") //If you are copy-pasting this, ensure the 2nd paramter is unique to the new proc!
|
||||
|
||||
/client/proc/play_intercomm_sound()
|
||||
set category = "Event"
|
||||
set name = "Play Sound via Intercomms"
|
||||
set desc = "Plays a sound at every intercomm on the station z level. Works best with small sounds."
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
var/A = alert("This will play a sound at every intercomm on the station Z, are you sure you want to continue? This works best with short sounds, beware.","Warning","Yep","Nope")
|
||||
if(A != "Yep") return
|
||||
|
||||
var/list/sounds = file2list("sound/serversound_list.txt");
|
||||
sounds += sounds_cache
|
||||
|
||||
var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds
|
||||
if(!melody) return
|
||||
|
||||
var/cvol = 35
|
||||
var/inputvol = input("How loud would you like this to be? (1-70)", "Volume", "35") as num | null
|
||||
if(!inputvol) return
|
||||
if(inputvol && inputvol >= 1 && inputvol <= 70)
|
||||
cvol = inputvol
|
||||
|
||||
var/list/intercomms = list()
|
||||
|
||||
for(var/obj/item/device/radio/intercom/I in world)
|
||||
if(I.z != ZLEVEL_STATION) continue
|
||||
intercomms += I
|
||||
|
||||
if(intercomms.len)
|
||||
for(var/obj/item/device/radio/intercom/I in intercomms)
|
||||
playsound(I, melody, cvol)
|
||||
|
||||
/*
|
||||
/client/proc/cuban_pete()
|
||||
set category = "Event"
|
||||
|
||||
Reference in New Issue
Block a user