Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion code/__DEFINES/__globals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
/// Create a list global with an initializer expression
#define GLOBAL_LIST_INIT(X, InitValue) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, InitValue)

/// Create a list global that is initialized as an empty list
#define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list())

/// Create a typed list global with an initializer expression
Expand All @@ -60,3 +59,9 @@

/// Create a typed null global
#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_UNMANAGED(X)

/// Create an alist global with an initializer expression
#define GLOBAL_ALIST_INIT(X, InitValue) GLOBAL_RAW(/alist/##X); GLOBAL_MANAGED(X, InitValue)

// Create an alist global that is initialized as an empty list
#define GLOBAL_ALIST_EMPTY(X) GLOBAL_ALIST_INIT(X, alist())
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#define COMSIG_MOB_CLIENT_MOVE_NOGRAV "mob_client_move_nograv"
/// From base of /client/Move(): (direction, old_dir)
#define COMSIG_MOB_CLIENT_MOVED "mob_client_moved"
/// From base of /client/Move(): but sent to the client over mob
#define COMSIG_MOB_CLIENT_MOVED_CLIENT_SEND "client_moved"
/// From base of /client/proc/change_view() (mob/source, new_size)
#define COMSIG_MOB_CLIENT_CHANGE_VIEW "mob_client_change_view"
/// From base of /mob/proc/reset_perspective() : ()
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
#define LOG_CATEGORY_FILTER "filter"
#define LOG_CATEGORY_MANIFEST "manifest"
#define LOG_CATEGORY_MECHA "mecha"
#define LOG_CATEGORY_MUSIC "music" // DopplerShift add
#define LOG_CATEGORY_PAPER "paper"
#define LOG_CATEGORY_QDEL "qdel"
#define LOG_CATEGORY_RUNTIME "runtime"
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
#define CHANNEL_ELEVATOR 1014
#define CHANNEL_ESCAPEMENU 1013
#define CHANNEL_WEATHER 1012
#define CHANNEL_WALKMAN 1011 // Doppler edit
#define CHANNEL_MASTER_VOLUME 1010 // Doppler edit
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED
#define CHANNEL_HIGHEST_AVAILABLE 1011
#define CHANNEL_HIGHEST_AVAILABLE 1009

#define MAX_INSTRUMENT_CHANNELS (128 * 6)

Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/~doppler_defines/admin.dm
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
#define MUTE_LOOC (1<<6)

/// Sends all admins the chosen sound
#define SEND_ADMINS_NOTIFICATION_SOUND(sound_to_play) for(var/client/X in GLOB.admins){X.mob.playsound_local(null, sound_to_play, 100, vary = FALSE, channel = CHANNEL_ADMIN_SOUNDS, pressure_affected = FALSE, use_reverb = FALSE);}

/// Sends a message in adminchat
#define SEND_ADMINCHAT_MESSAGE(message) to_chat(GLOB.admins, type = MESSAGE_TYPE_ADMINCHAT, html = message, confidential = TRUE)

/// Sends a message in adminchat with the chosen notification sound
#define SEND_NOTIFIED_ADMIN_MESSAGE(sound, message) SEND_ADMINS_NOTIFICATION_SOUND(sound); SEND_ADMINCHAT_MESSAGE(message)
22 changes: 22 additions & 0 deletions code/__DEFINES/~doppler_defines/cassettes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef CASSETTE_BASE_DIR
/// Path to the base directory for cassette stuff
#define CASSETTE_BASE_DIR "data/cassette_storage/"
#endif
/// Path to the file containing a list of cassette IDs.
#define CASSETTE_ID_FILE (CASSETTE_BASE_DIR + "ids.json")
/// Path to the data for the cassette of the given ID.
#define CASSETTE_FILE(id) (CASSETTE_BASE_DIR + "[id].json")

/// This cassette is unapproved, and has not been submitted for review.
#define CASSETTE_STATUS_UNAPPROVED 0
/// This cassette is under review.
#define CASSETTE_STATUS_REVIEWING 1
/// This cassette has been approved.
#define CASSETTE_STATUS_APPROVED 2
/// This cassette has been denied.
#define CASSETTE_STATUS_DENIED 3

/// The maximum amount of songs one side of a cassette tape can hold.
#define MAX_SONGS_PER_CASSETTE_SIDE 7

#define PLAY_CASSETTE_SOUND(sfx) playsound(src, ##sfx, vol = 90, vary = FALSE, mixer_channel = CHANNEL_MACHINERY)
12 changes: 12 additions & 0 deletions code/__DEFINES/~doppler_defines/floxy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#define FLOXY_STATUS_PENDING "pending"
#define FLOXY_STATUS_DOWNLOADING "downloading"
#define FLOXY_STATUS_METADATA "metadata"
#define FLOXY_STATUS_COMPLETED "completed"
#define FLOXY_STATUS_FAILED "failed"

/// File is on disk and available in the cache
#define MEDIA_ENTRY_AVAILABLE (1 << 0)
/// File is on disk but marked as deleted
#define MEDIA_ENTRY_DELETED (1 << 1)
/// Neither the output file nor the deleted file is present on disk
#define MEDIA_ENTRY_MISSING (1 << 2)
1 change: 1 addition & 0 deletions code/__DEFINES/~doppler_defines/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

// Game categories
#define LOG_CATEGORY_GAME_SUBTLE "game-subtle"
#define LOG_CATEGORY_FLOXY "floxy"
4 changes: 4 additions & 0 deletions code/__DEFINES/~doppler_defines/misc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//world/proc/shelleo
#define SHELLEO_ERRORLEVEL 1
#define SHELLEO_STDOUT 2
#define SHELLEO_STDERR 3
4 changes: 4 additions & 0 deletions code/__DEFINES/~doppler_defines/radio.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define RADIO_CHANNEL_RADIO "Radio"
#define RADIO_KEY_RADIO ":="

#define FREQ_RADIO 1443 // the frequency for the radio host broadcast
37 changes: 37 additions & 0 deletions code/__DEFINES/~doppler_defines/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,40 @@
#define COMSIG_SOULCATCHER_UPDATE_JOINABILITY "soulcatcher_update_joinability"
/// For modifying a mob holder based on what it's holding
#define COMSIG_ADDING_MOB_HOLDER_SPECIALS "adding_mob_holder_specials"

/*

CARBON SIGNALS

*/
#define COMSIG_CARBON_EQUIP_EARS "carbon_ears_equip"
#define COMSIG_CARBON_UNEQUIP_EARS "carbon_ears_unequip"

/*

GLOBAL SIGNALS

*/

/// Sent whenever a mob becomes capable of hearing DJ music: (mob/listener)
#define COMSIG_GLOB_ADD_MUSIC_LISTENER "!add_music_listener"
/// Sent whenever a mob becomes no longer capable of hearing DJ music: (mob/listener)
#define COMSIG_GLOB_REMOVE_MUSIC_LISTENER "!remove_music_listener"

/*

STORAGE SIGNALS

*/

/// Sent after dumping out the contents: (atom/dest_object, mob/user)
#define COMSIG_STORAGE_DUMP_ONTO_POST_TRANSFER "storage_dump_onto_post_transfer"

/*

TGUI SIGNALS

*/

/// TGUI panel is ready. Sent to both client and mob.
#define COMSIG_TGUI_PANEL_READY "tgui_panel_ready"
13 changes: 13 additions & 0 deletions code/__DEFINES/~doppler_defines/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@
#define SFX_BRICK_PICKUP "brick_pickup"
#define SFX_JINGLEBELL "jingle_bell"
#define SFX_SKATER "skater"

#define SFX_DJSTATION_OPENTAKEOUT "djstation_opentakeout"
#define SFX_DJSTATION_PUTINANDCLOSE "djstation_putinandclose"
#define SFX_DJSTATION_OPENPUTINANDCLOSE "djstation_openputinandclose"
#define SFX_DJSTATION_OPENTAKEOUTANDCLOSE "djstation_opentakeoutandclose"
#define SFX_DJSTATION_PLAY "djstation_play"
#define SFX_DJSTATION_STOP "djstation_stop"
#define SFX_DJSTATION_TRACKSWITCH "djstation_trackswitch"

#define SFX_CASSETTE_PUT_IN "cassette_tape_put_in"
#define SFX_CASSETTE_TAKE_OUT "cassette_tape_take_out"
#define SFX_CASSETTE_DUMP "cassette_tape_dump"
#define SFX_CASSETTE_ASMR "cassette_tape_asmr"
8 changes: 8 additions & 0 deletions code/__DEFINES/~doppler_defines/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@
// makes it so held items float by their head
#define TRAIT_FLOATING_HELD "held_items_float"

/// This mob can hear the music from the DJ station.
#define TRAIT_CAN_HEAR_MUSIC "can_hear_radio"

/// This mob is currently listening to a walkman.
#define TRAIT_LISTENING_TO_WALKMAN "listening_to_walkman"

/// Prevents the affected object from opening a loot window via alt click. See atom/AltClick()
#define TRAIT_ALT_CLICK_BLOCKER "no_alt_click"
3 changes: 3 additions & 0 deletions code/__HELPERS/logging/_logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,6 @@ GLOBAL_LIST_INIT(testing_global_profiler, list("_PROFILE_NAME" = "Global"))
return "([AREACOORD(T)])"
else if(A.loc)
return "(UNKNOWN (?, ?, ?))"

/proc/log_music(text, list/data)
logger.Log(LOG_CATEGORY_MUSIC, text, data)
3 changes: 3 additions & 0 deletions code/__HELPERS/~doppler_helpers/logging.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// This logs subtle emotes in game.log
/proc/log_subtle(text, list/data)
logger.Log(LOG_CATEGORY_GAME_SUBTLE, text, data)

/proc/log_floxy(text, list/data)
logger.Log(LOG_CATEGORY_FLOXY, text, data)
20 changes: 20 additions & 0 deletions code/__HELPERS/~doppler_helpers/text.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// Checks to see if a string starts with http:// or https://
/proc/is_http_protocol(text)
var/static/regex/http_regex
if(isnull(http_regex))
http_regex = new("^https?://")
return findtext(text, http_regex)

/// Parses a JWT payload, returning it as a list.
/// This doesn't do signature verification or anything, I'm just using this to get the expiry time.
/proc/parse_jwt_payload(jwt) as /list
var/list/split = splittext(jwt, ".")
if(length(split) != 3)
return null
var/payload_base64 = split[2]
// rust-g fucking segfaults if you pass base64 without padding ;)
var/padding_needed = length(payload_base64) % 4
if(padding_needed != 0)
for(var/i = 1 to (4 - padding_needed))
payload_base64 += "="
return json_decode(rustg_decode_base64(payload_base64))
1 change: 0 additions & 1 deletion code/_globalvars/_regexes.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//These are a bunch of regex datums for use /((any|every|no|some|head|foot)where(wolf)?\sand\s)+(\.[\.\s]+\s?where\?)?/i
GLOBAL_DATUM_INIT(is_http_protocol, /regex, regex("^https?://"))

GLOBAL_DATUM_INIT(is_website, /regex, regex("http|www.|\[a-z0-9_-]+.(com|org|net|mil|edu)+", "i"))
GLOBAL_DATUM_INIT(is_email, /regex, regex("\[a-z0-9_-]+@\[a-z0-9_-]+.\[a-z0-9_-]+", "i"))
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CANNOT_OPEN_PRESENTS" = TRAIT_CANNOT_OPEN_PRESENTS,
"TRAIT_CANT_RIDE" = TRAIT_CANT_RIDE,
"TRAIT_CAN_GET_AI_TRACKING_MESSAGE" = TRAIT_CAN_GET_AI_TRACKING_MESSAGE,
"TRAIT_CAN_HEAR_MUSIC" = TRAIT_CAN_HEAR_MUSIC,
"TRAIT_CAN_HOLD_ITEMS" = TRAIT_CAN_HOLD_ITEMS,
"TRAIT_CAN_MOUNT_CYBORGS" = TRAIT_CAN_MOUNT_CYBORGS,
"TRAIT_CAN_MOUNT_HUMANS" = TRAIT_CAN_MOUNT_HUMANS,
Expand Down Expand Up @@ -368,6 +369,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_LIGHT_DRINKER" = TRAIT_LIGHT_DRINKER,
"TRAIT_LIGHT_STEP" = TRAIT_LIGHT_STEP,
"TRAIT_LIMBATTACHMENT" = TRAIT_LIMBATTACHMENT,
"TRAIT_LISTENING_TO_WALKMAN" = TRAIT_LISTENING_TO_WALKMAN,
"TRAIT_LITERATE" = TRAIT_LITERATE,
"TRAIT_LIVERLESS_METABOLISM" = TRAIT_LIVERLESS_METABOLISM,
"TRAIT_LOUD_BINARY" = TRAIT_LOUD_BINARY,
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@
/datum/config_entry/flag/allow_tracy_queue
protection = CONFIG_ENTRY_LOCKED

/datum/config_entry/flag/cassettes_in_db

/**
* Tgui ui_act payloads larger than 2kb are split into chunks a maximum of 1kb in size.
* This flag represents the maximum chunk count the server is willing to receive.
Expand Down
1 change: 1 addition & 0 deletions code/datums/looping_sounds/_looping_sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
var/use_reverb = TRUE
/// Are we ignoring walls? Defaults to TRUE.
var/ignore_walls = TRUE
var/channel // Dopplerstation addition: The sound channel to play on, random if not provided. If using this, you should probably also set direct to TRUE.

// State stuff
/// The source of the sound, or the recipient of the sound.
Expand Down
2 changes: 2 additions & 0 deletions code/game/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ GLOBAL_LIST_INIT(default_radio_channels, list(
RADIO_CHANNEL_CTF_GREEN = FREQ_CTF_GREEN,
RADIO_CHANNEL_CTF_RED = FREQ_CTF_RED,
RADIO_CHANNEL_CTF_YELLOW = FREQ_CTF_YELLOW,
RADIO_CHANNEL_RADIO = RADIO_KEY_RADIO, // doppler add: radio host channel
STATUS_DISPLAY_RELAY = FREQ_STATUS_DISPLAYS,
))

Expand All @@ -120,6 +121,7 @@ GLOBAL_LIST_INIT(reserved_radio_frequencies, list(
"[FREQ_CTF_BLUE]" = RADIO_CHANNEL_CTF_BLUE,
"[FREQ_CTF_GREEN]" = RADIO_CHANNEL_CTF_GREEN,
"[FREQ_CTF_YELLOW]" = RADIO_CHANNEL_CTF_YELLOW,
"[FREQ_RADIO]" = RADIO_CHANNEL_RADIO, // doppler add: radio host channel
"[FREQ_STATUS_DISPLAYS]" = STATUS_DISPLAY_RELAY,
))

Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
RADIO_CHANNEL_SERVICE = RADIO_TOKEN_SERVICE,
MODE_BINARY = MODE_TOKEN_BINARY,
RADIO_CHANNEL_AI_PRIVATE = RADIO_TOKEN_AI_PRIVATE,
RADIO_CHANNEL_RADIO = RADIO_KEY_RADIO,
RADIO_CHANNEL_ENTERTAINMENT = RADIO_TOKEN_ENTERTAINMENT,
))

Expand Down Expand Up @@ -141,10 +142,12 @@ GLOBAL_LIST_INIT(channel_tokens, list(
if(!(slot_flags & slot))
return

ADD_TRAIT(user, TRAIT_CAN_HEAR_MUSIC, REF(src))
grant_headset_languages(user)

/obj/item/radio/headset/dropped(mob/user, silent)
. = ..()
REMOVE_TRAIT(user, TRAIT_CAN_HEAR_MUSIC, REF(src))
remove_headset_languages(user)

// Headsets do not become hearing sensitive as broadcasting instead controls their talk_into capabilities
Expand Down
21 changes: 21 additions & 0 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@
/// If TRUE, will set the icon in initializations.
VAR_PRIVATE/should_update_icon = FALSE

// Doppler add START

/// radio host frequency handle: if TRUE, the radio can receive and broadcast on the radio host frequency
var/radio_host = FALSE

/// If TRUE, then this message will always be received intact, regardless of exospheric anomalies / processor issues.
var/lossless = FALSE
/// If TRUE, then this radio will always use universal_transmission, bypassing tcomms servers, allowing everyone on connected z-levels to hear it.
/// Implies `lossless = TRUE` too.
var/universal = FALSE
// Doppler add END

/// A very brief cooldown to prevent regular radio sounds from overlapping.
COOLDOWN_DECLARE(audio_cooldown)
/// A very brief cooldown to prevent "important" radio sounds from overlapping.
Expand Down Expand Up @@ -172,6 +184,7 @@
add_radio(src, GLOB.default_radio_channels[channel_name])

add_radio(src, frequency)
add_radio(src, FREQ_RADIO) // doppler add: radio host frequency

/obj/item/radio/proc/make_syndie() // Turns normal radios into Syndicate radios!
qdel(keyslot)
Expand Down Expand Up @@ -299,6 +312,10 @@
if(!talking_movable.try_speak(message, ignore_spam = TRUE, filterproof = TRUE))
return

// doppler add: radio host frequency handle
if(channel == FREQ_RADIO && !radio_host)
return

if(use_command)
spans |= SPAN_COMMAND

Expand Down Expand Up @@ -420,6 +437,10 @@
// allow checks: are we listening on that frequency?
if (input_frequency == frequency)
return TRUE
// doppler add: radio host frequency
if (input_frequency == FREQ_RADIO)
return TRUE

for(var/ch_name in channels)
if(channels[ch_name] & FREQ_LISTENING)
if(GLOB.default_radio_channels[ch_name] == text2num(input_frequency) || special_channels & RADIO_SPECIAL_SYNDIE)
Expand Down
1 change: 1 addition & 0 deletions code/game/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
"[FREQ_CTF_BLUE]" = "blueteamradio",
"[FREQ_CTF_GREEN]" = "greenteamradio",
"[FREQ_CTF_YELLOW]" = "yellowteamradio",
"[FREQ_RADIO]" = "radioradio",
"[FREQ_STATUS_DISPLAYS]" = "captaincast",
))

Expand Down
9 changes: 9 additions & 0 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1438,3 +1438,12 @@

else if(href_list["debug_z_levels"])
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/debug_z_levels)

// doppler add START
var/id = text2num(href_list["open_music_review"])

Check failure on line 1443 in code/modules/admin/topic.dm

View workflow job for this annotation

GitHub Actions / Run Linters / linters

possible unreachable code here
var/datum/cassette_review/cassette_review = GLOB.cassette_reviews[id]
if(cassette_review)
cassette_review.ui_interact(usr)
else
to_chat(usr, span_warning("Cassette review not found!"), type = MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
// doppler add END
Loading
Loading