Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Sep 20, 2024
1 parent f8196ee commit e49758f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
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)
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

0 comments on commit e49758f

Please sign in to comment.