Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a preference to show your tag as Queen #7190

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
var/xeno_name_ban = FALSE
var/xeno_vision_level_pref = XENO_VISION_LEVEL_MID_NVG
var/playtime_perks = TRUE
var/show_queen_name = FALSE

var/stylesheet = "Modern"

Expand Down Expand Up @@ -448,6 +449,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
dat += "<b>Xeno postfix:</b> <a href='?_src_=prefs;preference=xeno_postfix;task=input'><b>[display_postfix]</b></a><br>"

dat += "<b>Enable Playtime Perks:</b> <a href='?_src_=prefs;preference=playtime_perks'><b>[playtime_perks? "Yes" : "No"]</b></a><br>"
dat += "<b>Show Queen Name:</b> <a href='?_src_=prefs;preference=show_queen_name'><b>[show_queen_name? "Yes" : "No"]</b></a><br>"
dat += "<b>Default Xeno Night Vision Level:</b> <a href='?_src_=prefs;preference=xeno_vision_level_pref;task=input'><b>[xeno_vision_level_pref]</b></a><br>"

var/tempnumber = rand(1, 999)
Expand Down Expand Up @@ -1857,6 +1859,9 @@ GLOBAL_LIST_INIT(bgstate_options, list(
if("playtime_perks")
playtime_perks = !playtime_perks

if("show_queen_name")
show_queen_name = !show_queen_name

if("be_special")
var/num = text2num(href_list["num"])
be_special ^= (1<<num)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
S["xeno_postfix"] >> xeno_postfix
S["xeno_name_ban"] >> xeno_name_ban
S["playtime_perks"] >> playtime_perks
S["show_queen_name"] >> show_queen_name
S["xeno_vision_level_pref"] >> xeno_vision_level_pref
S["view_controller"] >> View_MC
S["observer_huds"] >> observer_huds
Expand Down Expand Up @@ -310,6 +311,7 @@
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
auto_observe = sanitize_integer(auto_observe, 0, 1, 1)
playtime_perks = sanitize_integer(playtime_perks, 0, 1, 1)
show_queen_name = sanitize_integer(show_queen_name, 0, 1, 1)
Git-Nivrak marked this conversation as resolved.
Show resolved Hide resolved
xeno_vision_level_pref = sanitize_inlist(xeno_vision_level_pref, list(XENO_VISION_LEVEL_NO_NVG, XENO_VISION_LEVEL_MID_NVG, XENO_VISION_LEVEL_FULL_NVG), XENO_VISION_LEVEL_MID_NVG)
hear_vox = sanitize_integer(hear_vox, FALSE, TRUE, TRUE)
hide_statusbar = sanitize_integer(hide_statusbar, FALSE, TRUE, FALSE)
Expand Down Expand Up @@ -428,6 +430,7 @@
S["xeno_name_ban"] << xeno_name_ban
S["xeno_vision_level_pref"] << xeno_vision_level_pref
S["playtime_perks"] << playtime_perks
S["show_queen_name"] << show_queen_name

S["view_controller"] << View_MC
S["observer_huds"] << observer_huds
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Queen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@
if(client)
name_client_prefix = "[(client.xeno_prefix||client.xeno_postfix) ? client.xeno_prefix : "XX"]-"
name_client_postfix = client.xeno_postfix ? ("-"+client.xeno_postfix) : ""
if(client?.prefs?.show_queen_name)
name += " (" + replacetext((name_client_prefix + name_client_postfix), "-","") + ")"


full_designation = "[name_client_prefix][nicknumber][name_client_postfix]"
color = hive.color

Expand Down
Loading