mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-23 12:47:13 +01:00
Adds custom blood color!
This commit is contained in:
@@ -232,6 +232,10 @@
|
||||
dat += "<BR>"
|
||||
dat += "<b>Species:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
|
||||
dat += "<b>Custom Species Name:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=custom_species;task=input'>[custom_species ? custom_species : "None"]</a><BR>"
|
||||
dat += "<b>Custom Blood Color:</b>"
|
||||
dat += "<a href='?_src_=prefs;preference=custom_blood_color'>[custom_blood_color ? "Enabled" : "Disabled"]</a><BR>"
|
||||
if(custom_blood_color)
|
||||
dat += "<b>Blood Color:</b> <span style='border:1px solid #161616; background-color: [blood_color];'><font color='[color_hex2num(blood_color) < 200 ? "FFFFFF" : "000000"]'>[blood_color]</font></span> <a href='?_src_=prefs;preference=blood_color;task=input'>Change</a><BR>"
|
||||
dat += "<b>Random Body:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=all;task=random'>Randomize!</A><BR>"
|
||||
dat += "<b>Always Random Body:</b><a href='?_src_=prefs;preference=all'>[be_random_body ? "Yes" : "No"]</A><BR>"
|
||||
dat += "<br><b>Cycle background:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cycle_bg;task=input'>[bgstate]</a><BR>"
|
||||
|
||||
@@ -8,9 +8,13 @@
|
||||
// Get stomping preferences.
|
||||
S["stomp_pref"] >> stomppref
|
||||
|
||||
//Fuzzy scaling
|
||||
// Fuzzy scaling
|
||||
S["feature_fuzzy"] >> fuzzy
|
||||
|
||||
// Custom blood color
|
||||
S["custom_blood_color"] >> custom_blood_color // TRUE/FALSE - If custom blood color is enabled
|
||||
S["blood_color"] >> blood_color // The custom blood color itself
|
||||
|
||||
//sanitize data
|
||||
show_in_directory = sanitize_integer(show_in_directory, 0, 1, initial(show_in_directory))
|
||||
directory_tag = sanitize_inlist(directory_tag, GLOB.char_directory_tags, initial(directory_tag))
|
||||
@@ -18,6 +22,8 @@
|
||||
directory_ad = strip_html_simple(directory_ad, MAX_FLAVOR_LEN)
|
||||
stomppref = sanitize_integer(stomppref, 0, 1, initial(stomppref))
|
||||
fuzzy = sanitize_integer(fuzzy, 0, 1, initial(fuzzy))
|
||||
custom_blood_color = sanitize_integer(custom_blood_color, 0, 1, initial(custom_blood_color))
|
||||
blood_color = sanitize_hexcolor(blood_color, 6, 1, initial(blood_color))
|
||||
|
||||
/datum/preferences/proc/splurt_character_pref_save(savefile/S) //TODO: modularize our other savefile edits... maybe?
|
||||
//Character directory
|
||||
@@ -29,9 +35,13 @@
|
||||
// Stomping preferences.
|
||||
WRITE_FILE(S["stomp_pref"], stomppref)
|
||||
|
||||
//Fuzzy scaling
|
||||
// Fuzzy scaling
|
||||
WRITE_FILE(S["feature_fuzzy"] , fuzzy)
|
||||
|
||||
// Custom blood color
|
||||
WRITE_FILE(S["custom_blood_color"], custom_blood_color)
|
||||
WRITE_FILE(S["blood_color"], blood_color)
|
||||
|
||||
/datum/preferences/update_preferences(current_version, savefile/S)
|
||||
. = ..()
|
||||
if(current_version < 57.01) //a
|
||||
|
||||
Reference in New Issue
Block a user