Skip to content

Commit

Permalink
SynthCommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Steelpoint committed Oct 15, 2023
1 parent 681e3ff commit f4795b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ var/const/MAX_SAVE_SLOTS = 10
//Synthetic specific preferences
var/synthetic_name = "Undefined"
var/synthetic_type = SYNTH_GEN_THREE
var/synth_manufacturer = "Weyland-Yutani"
var/new_manufacturer = "Weyland-Yutani"
//Predator specific preferences.
var/predator_name = "Undefined"
var/predator_gender = MALE
Expand Down Expand Up @@ -498,6 +500,7 @@ var/const/MAX_SAVE_SLOTS = 10
dat += "<b>Synthetic Name:</b> <a href='?_src_=prefs;preference=synth_name;task=input'><b>[synthetic_name]</b></a><br>"
dat += "<b>Synthetic Type:</b> <a href='?_src_=prefs;preference=synth_type;task=input'><b>[synthetic_type]</b></a><br>"
dat += "<b>Synthetic Whitelist Status:</b> <a href='?_src_=prefs;preference=synth_status;task=input'><b>[synth_status]</b></a><br>"
dat += "<b>Manufacturer:</b> <a href ='?_src_=prefs;preference=synth_manufacturer;task=input'><b>[new_manufacturer]</b></a><br>"
dat += "</div>"
else
dat += "<b>You do not have the whitelist for this role.</b>"
Expand Down Expand Up @@ -1611,6 +1614,11 @@ var/const/MAX_SAVE_SLOTS = 10
if(new_relation)
nanotrasen_relation = new_relation

if("synth_manufacturer")
var/synth_builder = input(user, "Choose your manufacturer.") as null|anything in list("Weyland-Yutani", "Borgia Industries", "Hyperdyne Systems", "Lasalle Bionational", "Sieg and Son", "Independent Manufacturer")
if(synth_builder)
new_manufacturer = synth_builder

if("prefsquad")
var/new_pref_squad = input(user, "Choose your preferred squad.", "Character Preference") as null|anything in list("Alpha", "Bravo", "Charlie", "Delta", "None")
if(new_pref_squad)
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 @@ -165,6 +165,7 @@

S["synth_name"] >> synthetic_name
S["synth_type"] >> synthetic_type
S["synth_manufacturer"] >> synth_manufacturer
S["pred_name"] >> predator_name
S["pred_gender"] >> predator_gender
S["pred_age"] >> predator_age
Expand Down Expand Up @@ -242,6 +243,7 @@
adaptive_zoom = sanitize_integer(adaptive_zoom, 0, 2, 0)
tooltips = sanitize_integer(tooltips, FALSE, TRUE, TRUE)

if(isnull(synth_manufacturer)) synth_manufacturer = initial(synth_manufacturer)
synthetic_name = synthetic_name ? sanitize_text(synthetic_name, initial(synthetic_name)) : initial(synthetic_name)
synthetic_type = sanitize_inlist(synthetic_type, PLAYER_SYNTHS, initial(synthetic_type))
predator_name = predator_name ? sanitize_text(predator_name, initial(predator_name)) : initial(predator_name)
Expand Down Expand Up @@ -353,6 +355,7 @@

S["synth_name"] << synthetic_name
S["synth_type"] << synthetic_type
S["synth_manufacturer"] << synth_manufacturer
S["pred_name"] << predator_name
S["pred_gender"] << predator_gender
S["pred_age"] << predator_age
Expand Down

0 comments on commit f4795b8

Please sign in to comment.