Files
Citadel-Station-13-RP/code/modules/client/preference_setup/global/setting_datums.dm
nevimer 5814661f08 [TEST ONLY PLEASE]Floating Messages 2, the sequel. (#3781)
* Squashed commit of the following:

commit d249b39f27
Author: nevimer <foxmail@protonmail.com>
Date:   Tue Sep 14 17:52:17 2021 -0400

    lil patch

commit d93d156cdc
Merge: c369a1f16 579f026e4
Author: nevimer <foxmail@protonmail.com>
Date:   Tue Sep 14 17:41:34 2021 -0400

    Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13-RP into atom_say

    # Conflicts:
    #	code/game/atoms.dm
    #	code/modules/mob/typing_indicator.dm

commit c369a1f16d
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 16 19:54:57 2021 -0400

    fixes whispers returning oopsie

commit 479e1fcb3f
Merge: 2185394be 3dfc5a831
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 16 01:40:25 2021 -0400

    Merge branch 'master' into atom_say

commit 2185394bea
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 16 00:05:01 2021 -0400

    might fix aghost and adds tts devices

commit f51e4c9e39
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 20:41:09 2021 -0700

    fmissed this

commit cee32f19f6
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 20:34:10 2021 -0700

    finally?

commit 434bca6725
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 22:54:47 2021 -0400

    trying again

commit ac8a1e90f7
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 22:11:55 2021 -0400

    scream

commit 12f528519d
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 21:38:18 2021 -0400

    e? maybe

commit 3003ba9c8a
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 21:14:57 2021 -0400

    ok this should fix it

    grr

commit 24cc8a48ca
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed Jun 9 00:40:09 2021 -0400

    update, fixes

commit 284823424f
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu May 27 18:22:57 2021 -0400

    fixes whispers and emphasis

commit 676f1fdee9
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu May 27 05:02:37 2021 -0400

    Update floating_message.dm

commit a6a56bd33e
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu May 27 04:35:12 2021 -0400

    bugfix

commit 940869f9b8
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu May 27 04:07:57 2021 -0400

    Update floating_message.dm

commit ee5bc05014
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed May 26 21:12:22 2021 -0400

    Working preference toggle & chat message parsing. Ready for testing.

    Let's goooo

commit dcdf68ffe2
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed May 26 07:16:48 2021 -0400

    disables the say portion for the sake of the PR

    not ready yet, but the rest if fine for testing.

commit 0fbbede014
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Wed May 26 07:15:08 2021 -0400

    atom_say, working runechat checkpoint

    a lot of work, ports from both vorestation and nebula

commit 0fa68bcc9d
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Tue May 25 07:51:35 2021 -0400

    adds atom_say

    starting point, working build

commit 60c64ba49e
Author: Changelogs <action@github.com>
Date:   Sat May 22 00:38:31 2021 +0000

    Automatic changelog compile [ci skip]

commit a252c25d08
Merge: f050edf05 edd16301d
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu May 20 22:09:18 2021 -0400

    Merge remote-tracking branch 'upstream/master'

commit f050edf052
Author: Changelogs <action@github.com>
Date:   Fri May 21 00:38:27 2021 +0000

    Automatic changelog compile [ci skip]

commit ad49b8a353
Merge: 3fa931fe8 eb7cc7495
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu May 20 18:59:13 2021 -0400

    Merge remote-tracking branch 'upstream/master'

commit 3fa931fe88
Author: Changelogs <action@github.com>
Date:   Thu May 20 00:35:02 2021 +0000

    Automatic changelog compile [ci skip]

commit ed4f37002e
Author: Changelogs <action@github.com>
Date:   Tue May 18 00:40:36 2021 +0000

    Automatic changelog compile [ci skip]

commit 02ce64268a
Author: Changelogs <action@github.com>
Date:   Mon May 17 00:36:31 2021 +0000

    Automatic changelog compile [ci skip]

commit dfe942dee2
Author: Changelogs <action@github.com>
Date:   Sun May 16 00:40:06 2021 +0000

    Automatic changelog compile [ci skip]

commit 283aa9bbf3
Merge: 18e1bc317 74e4ac2ae
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Sat May 15 18:11:30 2021 -0400

    Merge remote-tracking branch 'upstream/master'

commit 18e1bc317d
Author: Changelogs <action@github.com>
Date:   Sat May 15 00:36:18 2021 +0000

    Automatic changelog compile [ci skip]

commit 45f1758215
Merge: 0ee283079 524c9bf09
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Fri May 14 09:25:57 2021 -0700

    Merge branch 'master' of https://github.com/nevimer/Citadel-Station-13-RP

commit 0ee283079c
Merge: 731b6c840 7e78914de
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Fri May 14 09:21:27 2021 -0700

    Merge remote-tracking branch 'upstream/master'

commit 524c9bf090
Author: Changelogs <action@github.com>
Date:   Fri May 14 00:38:42 2021 +0000

    Automatic changelog compile [ci skip]

commit b49c70a2e4
Author: Changelogs <action@github.com>
Date:   Thu May 13 00:38:08 2021 +0000

    Automatic changelog compile [ci skip]

commit f7c2793d48
Author: Changelogs <action@github.com>
Date:   Tue May 11 00:27:49 2021 +0000

    Automatic changelog compile [ci skip]

commit 731b6c840a
Merge: f5118623b b08a4592c
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Mon May 10 11:04:15 2021 -0700

    Merge remote-tracking branch 'upstream/master'

commit f5118623b3
Author: Changelogs <action@github.com>
Date:   Mon May 10 00:28:54 2021 +0000

    Automatic changelog compile [ci skip]

commit 845d763f73
Author: Changelogs <action@github.com>
Date:   Sun May 9 00:29:28 2021 +0000

    Automatic changelog compile [ci skip]

commit 8ce38a567f
Author: Changelogs <action@github.com>
Date:   Sat May 8 00:27:15 2021 +0000

    Automatic changelog compile [ci skip]

commit df14298791
Author: Changelogs <action@github.com>
Date:   Fri May 7 00:27:26 2021 +0000

    Automatic changelog compile [ci skip]

commit fa9e0c269c
Author: Changelogs <action@github.com>
Date:   Thu May 6 00:25:25 2021 +0000

    Automatic changelog compile [ci skip]

commit f3213a4081
Author: Changelogs <action@github.com>
Date:   Wed May 5 00:26:22 2021 +0000

    Automatic changelog compile [ci skip]

commit dab545149e
Author: Changelogs <action@github.com>
Date:   Tue May 4 00:31:19 2021 +0000

    Automatic changelog compile [ci skip]

commit d8145b94a5
Merge: c432f8e2c 8c6505935
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Mon May 3 03:44:34 2021 -0400

    Merge branch 'master' of https://github.com/nevimer/Citadel-Station-13-RP

commit c432f8e2c9
Merge: befa94c8d 1a6d61529
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Mon May 3 03:44:28 2021 -0400

    Merge remote-tracking branch 'upstream/master'

commit 8c6505935f
Author: Changelogs <action@github.com>
Date:   Mon May 3 00:36:22 2021 +0000

    Automatic changelog compile [ci skip]

commit ff0770b3cb
Author: Changelogs <action@github.com>
Date:   Sun May 2 00:39:51 2021 +0000

    Automatic changelog compile [ci skip]

commit befa94c8df
Merge: ad4f7d275 7e50e720f
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Sat May 1 00:06:38 2021 -0400

    Merge remote-tracking branch 'upstream/master'

commit ad4f7d275d
Author: Changelogs <action@github.com>
Date:   Sat May 1 00:35:51 2021 +0000

    Automatic changelog compile [ci skip]

commit 162d19bf12
Author: Changelogs <action@github.com>
Date:   Fri Apr 30 00:34:16 2021 +0000

    Automatic changelog compile [ci skip]

commit 08a4966a5d
Merge: fa900f273 bc9f6a34c
Author: nevimer <77420409+nevimer@users.noreply.github.com>
Date:   Thu Apr 29 04:32:54 2021 -0400

    Merge remote-tracking branch 'upstream/master'

commit fa900f2737
Author: Changelogs <action@github.com>
Date:   Thu Apr 29 00:41:22 2021 +0000

    Automatic changelog compile [ci skip]

commit 3a3731d7e6
Author: Changelogs <action@github.com>
Date:   Tue Apr 27 00:41:26 2021 +0000

    Automatic changelog compile [ci skip]

commit 6ea1b5ae9d
Author: Changelogs <action@github.com>
Date:   Sun Apr 25 00:44:15 2021 +0000

    Automatic changelog compile [ci skip]

commit 0bf27d747b
Author: Changelogs <action@github.com>
Date:   Sat Apr 24 00:42:50 2021 +0000

    Automatic changelog compile [ci skip]

commit 6cf2219f4a
Author: Changelogs <action@github.com>
Date:   Thu Apr 22 00:42:36 2021 +0000

    Automatic changelog compile [ci skip]

commit 1c7d64ce99
Author: Changelogs <action@github.com>
Date:   Wed Apr 21 00:41:04 2021 +0000

    Automatic changelog compile [ci skip]

commit c3e79344b8
Author: Changelogs <action@github.com>
Date:   Tue Apr 20 00:42:12 2021 +0000

    Automatic changelog compile [ci skip]

commit c3af5cbdf4
Author: Changelogs <action@github.com>
Date:   Sat Apr 17 00:40:41 2021 +0000

    Automatic changelog compile [ci skip]

commit 1473c88d4a
Author: Changelogs <action@github.com>
Date:   Fri Apr 16 00:40:07 2021 +0000

    Automatic changelog compile [ci skip]

commit 2421830491
Author: Changelogs <action@github.com>
Date:   Thu Apr 15 00:41:58 2021 +0000

    Automatic changelog compile [ci skip]

commit dae8a74fb8
Author: Changelogs <action@github.com>
Date:   Mon Apr 12 00:43:34 2021 +0000

    Automatic changelog compile [ci skip]

commit 49b4245638
Author: Changelogs <action@github.com>
Date:   Sun Apr 11 00:44:26 2021 +0000

    Automatic changelog compile [ci skip]

* Yeah....?

* ok we're good, colour bug remains

* Update commit, need help
2022-09-21 04:35:03 -07:00

382 lines
11 KiB
Plaintext

var/list/_client_preferences
var/list/_client_preferences_by_key
var/list/_client_preferences_by_type
/proc/get_client_preferences()
if(!_client_preferences)
_client_preferences = list()
for(var/ct in subtypesof(/datum/client_preference))
var/datum/client_preference/client_type = ct
if(initial(client_type.description))
_client_preferences += new client_type()
return _client_preferences
/proc/get_client_preference(var/datum/client_preference/preference)
if(istype(preference))
return preference
if(ispath(preference))
return get_client_preference_by_type(preference)
return get_client_preference_by_key(preference)
/proc/get_client_preference_by_key(var/preference)
if(!_client_preferences_by_key)
_client_preferences_by_key = list()
for(var/ct in get_client_preferences())
var/datum/client_preference/client_pref = ct
_client_preferences_by_key[client_pref.key] = client_pref
return _client_preferences_by_key[preference]
/proc/get_client_preference_by_type(var/preference)
if(!_client_preferences_by_type)
_client_preferences_by_type = list()
for(var/ct in get_client_preferences())
var/datum/client_preference/client_pref = ct
_client_preferences_by_type[client_pref.type] = client_pref
return _client_preferences_by_type[preference]
/datum/client_preference
var/description
var/key
var/enabled_by_default = TRUE
var/enabled_description = "Yes"
var/disabled_description = "No"
/datum/client_preference/proc/may_toggle(var/mob/preference_mob)
return TRUE
/datum/client_preference/proc/toggled(var/mob/preference_mob, var/enabled)
return
/*********************
* Player Preferences *
*********************/
/datum/client_preference/play_admin_midis
description ="Play admin midis"
key = "SOUND_MIDI"
/datum/client_preference/play_lobby_music
description ="Play lobby music"
key = "SOUND_LOBBY"
/datum/client_preference/play_lobby_music/toggled(var/mob/preference_mob, var/enabled)
if(!preference_mob.client || !preference_mob.client.media)
return
if(enabled)
preference_mob.client.playtitlemusic()
else
preference_mob.client.media.stop_music()
/datum/client_preference/play_ambiance
description ="Play ambience"
key = "SOUND_AMBIENCE"
/datum/client_preference/play_ambiance/toggled(var/mob/preference_mob, var/enabled)
if(!enabled)
SEND_SOUND(preference_mob, sound(null, repeat = 0, wait = 0, volume = 0, channel = 1))
SEND_SOUND(preference_mob, sound(null, repeat = 0, wait = 0, volume = 0, channel = 2))
// Need to put it here because it should be ordered riiiight here.
/datum/client_preference/play_jukebox
description ="Play jukebox music"
key = "SOUND_JUKEBOX"
/datum/client_preference/play_jukebox/toggled(var/mob/preference_mob, var/enabled)
if(!enabled)
preference_mob.stop_all_music()
else
preference_mob.update_music()
/datum/client_preference/eating_noises
description = "Eating Noises"
key = "EATING_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
/datum/client_preference/digestion_noises
description = "Digestion Noises"
key = "DIGEST_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
/datum/client_preference/weather_sounds
description ="Weather sounds"
key = "SOUND_WEATHER"
enabled_description = "Audible"
disabled_description = "Silent"
/datum/client_preference/supermatter_hum
description ="Supermatter hum"
key = "SOUND_SUPERMATTER"
enabled_description = "Audible"
disabled_description = "Silent"
/datum/client_preference/ghost_ears
description ="Ghost ears"
key = "CHAT_GHOSTEARS"
enabled_description = "All Speech"
disabled_description = "Nearby"
/datum/client_preference/ghost_sight
description ="Ghost sight"
key = "CHAT_GHOSTSIGHT"
enabled_description = "All Emotes"
disabled_description = "Nearby"
/datum/client_preference/ghost_radio
description ="Ghost radio"
key = "CHAT_GHOSTRADIO"
enabled_description = "All Chatter"
disabled_description = "Nearby"
/datum/client_preference/chat_tags
description ="Chat tags"
key = "CHAT_SHOWICONS"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/air_pump_noise
description ="Air Pump Ambient Noise"
key = "SOUND_AIRPUMP"
enabled_description = "Audible"
disabled_description = "Silent"
/datum/client_preference/mob_tooltips
description ="Mob tooltips"
key = "MOB_TOOLTIPS"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/attack_icons
description ="Attack icons"
key = "ATTACK_ICONS"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/pickup_sounds
description = "Picked Up Item Sounds"
key = "SOUND_PICKED"
enabled_description = "Enabled"
disabled_description = "Disabled"
/datum/client_preference/drop_sounds
description = "Dropped Item Sounds"
key = "SOUND_DROPPED"
enabled_description = "Enabled"
disabled_description = "Disabled"
/datum/client_preference/hotkeys_default
description ="Hotkeys Default"
key = "HUD_HOTKEYS"
enabled_description = "Enabled"
disabled_description = "Disabled"
enabled_by_default = FALSE // Backwards compatibility
/datum/client_preference/show_typing_indicator
description ="Typing indicator"
key = "SHOW_TYPING"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/show_typing_indicator/toggled(var/mob/preference_mob, var/enabled)
if(!enabled)
preference_mob.set_typing_indicator(FALSE)
/datum/client_preference/show_ooc
description ="OOC chat"
key = "CHAT_OOC"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/show_looc
description ="LOOC chat"
key = "CHAT_LOOC"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/show_dsay
description ="Dead chat"
key = "CHAT_DEAD"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/check_mention
description ="Emphasize Name Mention"
key = "CHAT_MENTION"
enabled_description = "Emphasize"
disabled_description = "Normal"
/datum/client_preference/show_progress_bar
description ="Progress Bar"
key = "SHOW_PROGRESS"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/browser_style
description = "Fake NanoUI Browser Style"
key = "BROWSER_STYLED"
enabled_description = "Fancy"
disabled_description = "Plain"
/datum/client_preference/ambient_occlusion
description = "Fake Ambient Occlusion"
key = "AMBIENT_OCCLUSION_PREF"
enabled_by_default = FALSE
enabled_description = "On"
disabled_description = "Off"
/datum/client_preference/ambient_occlusion/toggled(var/mob/preference_mob, var/enabled)
. = ..()
if(preference_mob && preference_mob.plane_holder)
var/datum/plane_holder/PH = preference_mob.plane_holder
PH.set_ao(VIS_OBJS, enabled)
PH.set_ao(VIS_MOBS, enabled)
/datum/client_preference/instrument_toggle
description ="Hear In-game Instruments"
key = "SOUND_INSTRUMENT"
/datum/client_preference/anonymous_ghost_chat
description = "Anonymous Ghost Chat"
key = "ANON_GHOST_CHAT"
enabled_by_default = FALSE
enabled_description = "Hide ckey"
disabled_description = "Show ckey"
/datum/client_preference/show_in_advanced_who
description = "Show my status in advanced who"
key = "SHOW_IN_ADVANCED_WHO"
enabled_by_default = TRUE
enabled_description = "Visible"
disabled_description = "Hidden"
/datum/client_preference/announce_ghost_joinleave
description = "Announce joining/leaving as a ghost/observer"
key = "ANNOUNCE_GHOST_JOINLEAVE"
enabled_by_default = TRUE
enabled_description = "Announce"
disabled_description = "Silent"
/datum/client_preference/help_intent_firing
description = "Allow firing on help intent"
key = "HELP_INTENT_SAFETY"
enabled_by_default = FALSE
enabled_description = "Allow"
disabled_description = "Forbid"
/datum/client_preference/status_indicators
description = "Status Indicators"
key = "SHOW_STATUS"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/status_indicators/toggled(mob/preference_mob, enabled)
. = ..()
if(preference_mob && preference_mob.plane_holder)
var/datum/plane_holder/PH = preference_mob.plane_holder
PH.set_vis(VIS_STATUS, enabled)
/datum/client_preference/parallax
description = "Parallax (fancy space, disable for FPS issues"
key = "PARALLAX_ENABLED"
enabled_description = "Enabled"
disabled_description = "Disabled"
/datum/client_preference/parallax/toggled(mob/preference_mob, enabled)
. = ..()
preference_mob?.client?.parallax_holder?.Reset()
/datum/client_preference/overhead_chat
description = "Overhead Chat"
key = "OVERHEAD_CHAT"
enabled_description = "Show"
disabled_description = "Hide"
enabled_by_default = TRUE
/********************
* Staff Preferences *
********************/
/datum/client_preference/admin/may_toggle(var/mob/preference_mob)
return check_rights(R_ADMIN, 0, preference_mob)
/datum/client_preference/mod/may_toggle(var/mob/preference_mob)
return check_rights(R_MOD|R_ADMIN, 0, preference_mob)
/datum/client_preference/debug/may_toggle(var/mob/preference_mob)
return check_rights(R_DEBUG|R_ADMIN, 0, preference_mob)
/datum/client_preference/mod/show_attack_logs
description = "Attack Log Messages"
key = "CHAT_ATTACKLOGS"
enabled_description = "Show"
disabled_description = "Hide"
enabled_by_default = FALSE
/datum/client_preference/debug/show_debug_logs
description = "Debug Log Messages"
key = "CHAT_DEBUGLOGS"
enabled_description = "Show"
disabled_description = "Hide"
enabled_by_default = FALSE
/datum/client_preference/admin/show_chat_prayers
description = "Chat Prayers"
key = "CHAT_PRAYER"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/holder/may_toggle(var/mob/preference_mob)
return preference_mob && preference_mob.client && preference_mob.client.holder
/datum/client_preference/holder/play_adminhelp_ping
description = "Adminhelps"
key = "SOUND_ADMINHELP"
enabled_description = "Hear"
disabled_description = "Silent"
/datum/client_preference/holder/hear_radio
description = "Radio chatter"
key = "CHAT_RADIO"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/holder/show_rlooc
description ="Remote LOOC chat"
key = "CHAT_RLOOC"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/holder/obfuscate_stealth_dsay
description = "Obfuscate Stealthmin Dsay"
key = "OBFUSCATE_STEALTH_DSAY"
enabled_by_default = FALSE
enabled_description = "On"
disabled_description = "Off"
/datum/client_preference/holder/stealth_ghost_mode
description = "Stealthmin Ghost Mode"
key = "STEALTH_GHOST_MODE"
enabled_by_default = FALSE
enabled_description = "Obfuscate Ghost"
disabled_description = "Normal Ghost"
datum/client_preference/debug/age_verified
description = "(Debug) Age Verified Status"
key = "AGE_VERIFIED"
enabled_description = "TRUE"
disabled_description = "FALSE"
enabled_by_default = FALSE
/datum/client_preference/autocorrect
description = "Autocorrect"
key = "AUTOCORRECT"
enabled_description = "Enabled"
disabled_description = "Disabled"
/datum/client_preference/examine_look
description = "Examine Messages"
key = "EXAMINE_LOOK"
enabled_description = "Show"
disabled_description = "Hide"