mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Communicator visibility is now on a per-character basis, rather than global
This commit is contained in:
@@ -11,12 +11,14 @@
|
||||
S["all_underwear_metadata"] >> pref.all_underwear_metadata
|
||||
S["backbag"] >> pref.backbag
|
||||
S["pdachoice"] >> pref.pdachoice
|
||||
S["communicator_visibility"] >> pref.communicator_visibility
|
||||
|
||||
/datum/category_item/player_setup_item/general/equipment/save_character(var/savefile/S)
|
||||
S["all_underwear"] << pref.all_underwear
|
||||
S["all_underwear_metadata"] << pref.all_underwear_metadata
|
||||
S["backbag"] << pref.backbag
|
||||
S["pdachoice"] << pref.pdachoice
|
||||
S["communicator_visibility"] << pref.communicator_visibility
|
||||
|
||||
// Moved from /datum/preferences/proc/copy_to()
|
||||
/datum/category_item/player_setup_item/general/equipment/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
@@ -86,6 +88,7 @@
|
||||
. += "<br>"
|
||||
. += "Backpack Type: <a href='?src=\ref[src];change_backpack=1'><b>[backbaglist[pref.backbag]]</b></a><br>"
|
||||
. += "PDA Type: <a href='?src=\ref[src];change_pda=1'><b>[pdachoicelist[pref.pdachoice]]</b></a><br>"
|
||||
. += "Communicator Visibility: <a href='?src=\ref[src];toggle_comm_visibility=1'><b>[(pref.communicator_visibility) ? "Yes" : "No"]</b></a><br>"
|
||||
|
||||
return jointext(.,null)
|
||||
|
||||
@@ -139,5 +142,10 @@
|
||||
if(new_metadata)
|
||||
set_metadata(underwear, gt, new_metadata)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
else if(href_list["toggle_comm_visibility"])
|
||||
if(CanUseTopic(user))
|
||||
pref.communicator_visibility = !pref.communicator_visibility
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
return ..()
|
||||
@@ -1,26 +0,0 @@
|
||||
/datum/category_item/player_setup_item/player_global/communicators
|
||||
name = "Communicators"
|
||||
sort_order = 4
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/communicators/load_preferences(var/savefile/S)
|
||||
S["communicator_visibility"] >> pref.communicator_visibility
|
||||
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/communicators/save_preferences(var/savefile/S)
|
||||
S["communicator_visibility"] << pref.communicator_visibility
|
||||
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/communicators/sanitize_preferences()
|
||||
pref.communicator_visibility = sanitize_integer(pref.communicator_visibility, 0, 1, initial(pref.communicator_visibility))
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/communicators/content(var/mob/user)
|
||||
. += "<b>Communicator Identity:</b><br>"
|
||||
. += "Visibility: <a href='?src=\ref[src];toggle_comm_visibility=1'><b>[(pref.communicator_visibility) ? "Yes" : "No"]</b></a><br>"
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/communicators/OnTopic(var/href,var/list/href_list, var/mob/user)
|
||||
if(href_list["toggle_comm_visibility"])
|
||||
if(CanUseTopic(user))
|
||||
pref.communicator_visibility = !pref.communicator_visibility
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/category_item/player_setup_item/player_global/ooc
|
||||
name = "OOC"
|
||||
sort_order = 5
|
||||
sort_order = 4
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ooc/load_preferences(var/savefile/S)
|
||||
S["ignored_players"] >> pref.ignored_players
|
||||
36
html/changelogs/Anewbe - Communicators.yml
Normal file
36
html/changelogs/Anewbe - Communicators.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Anewbe
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Communicator visibility (the thing that lets people see your communicator when you're a ghost) is now saved to character slots, rather than globally."
|
||||
@@ -1318,8 +1318,7 @@
|
||||
#include "code\modules\client\preference_setup\global\01_ui.dm"
|
||||
#include "code\modules\client\preference_setup\global\02_settings.dm"
|
||||
#include "code\modules\client\preference_setup\global\03_pai.dm"
|
||||
#include "code\modules\client\preference_setup\global\04_communicators.dm"
|
||||
#include "code\modules\client\preference_setup\global\05_ooc.dm"
|
||||
#include "code\modules\client\preference_setup\global\04_ooc.dm"
|
||||
#include "code\modules\client\preference_setup\global\setting_datums.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\gear_tweaks.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\loadout.dm"
|
||||
|
||||
Reference in New Issue
Block a user