mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-27 06:37:07 +01:00
Adds custom blood color!
This commit is contained in:
@@ -55,6 +55,10 @@
|
||||
destination.dna.features = features.Copy()
|
||||
destination.set_species(species.type, icon_update=0)
|
||||
destination.dna.species.say_mod = species.say_mod
|
||||
// Added by SPLURT (Custom Blood Color)
|
||||
destination.dna.species.exotic_blood_color = species.exotic_blood_color
|
||||
destination.dna.species.exotic_blood_blend_mode = species.exotic_blood_blend_mode
|
||||
// SPLURT Edit end
|
||||
destination.dna.real_name = real_name
|
||||
destination.dna.nameless = nameless
|
||||
destination.dna.custom_species = custom_species
|
||||
|
||||
@@ -668,6 +668,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
if(!L.ckey)
|
||||
return
|
||||
|
||||
if(!L.client)
|
||||
return
|
||||
|
||||
// Ambience goes down here -- make sure to list each area separately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
if(L.client && !L.client.ambience_playing && L.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
|
||||
L.client.ambience_playing = 1
|
||||
|
||||
@@ -108,6 +108,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/pda_color = "#808000"
|
||||
var/pda_skin = PDA_SKIN_ALT
|
||||
|
||||
// Added by SPLURT (Custom Blood Color)
|
||||
var/custom_blood_color = FALSE
|
||||
var/blood_color = BLOOD_COLOR_HUMAN
|
||||
///
|
||||
|
||||
var/uses_glasses_colour = 0
|
||||
|
||||
@@ -702,6 +706,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
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>"
|
||||
//Added by SPLURT (Custom Blood Color)
|
||||
dat += "<b>Custom Blood Color:</b>"
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=toggle_custom_blood_color;task=input'>[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>"
|
||||
@@ -3239,6 +3249,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
QDEL_NULL(parent.mob.hud_used)
|
||||
parent.mob.create_mob_hud()
|
||||
parent.mob.hud_used.show_hud(1, parent.mob)
|
||||
//Added by SPLURT (Custom Blood Color)
|
||||
if("toggle_custom_blood_color")
|
||||
custom_blood_color = !custom_blood_color
|
||||
if("blood_color")
|
||||
var/pickedBloodColor = input(user, "Choose your blood color.", "Character Preference", blood_color) as color|null
|
||||
if(!pickedBloodColor)
|
||||
return
|
||||
if(pickedBloodColor)
|
||||
blood_color = sanitize_hexcolor(pickedBloodColor, 6, 1, initial(blood_color))
|
||||
if(!custom_blood_color)
|
||||
custom_blood_color = TRUE
|
||||
///
|
||||
if("pda_style")
|
||||
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles
|
||||
if(pickedPDAStyle)
|
||||
@@ -4241,6 +4263,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.dna.real_name = character.real_name
|
||||
character.dna.nameless = character.nameless
|
||||
character.dna.custom_species = character.custom_species
|
||||
// Added by SPLURT (Custom Blood Color)
|
||||
if(custom_blood_color)
|
||||
character.dna.species.exotic_blood_color = blood_color
|
||||
|
||||
var/old_size = RESIZE_DEFAULT_SIZE
|
||||
if(isdwarf(character))
|
||||
|
||||
@@ -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