mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge branch 'master' of https://github.com/QuinnAggeler/Paradise into Paradise-drask
# Conflicts: # icons/mob/human_face.dmi
This commit is contained in:
@@ -204,6 +204,27 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
|
||||
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
|
||||
)
|
||||
|
||||
/datum/asset/simple/chess
|
||||
assets = list(
|
||||
"bishop_black.png" = 'icons/chess_pieces/bishop_black.png',
|
||||
"bishop_white.png" = 'icons/chess_pieces/bishop_white.png',
|
||||
"king_black.png" = 'icons/chess_pieces/king_black.png',
|
||||
"king_white.png" = 'icons/chess_pieces/king_white.png',
|
||||
"knight_black.png" = 'icons/chess_pieces/knight_black.png',
|
||||
"knight_white.png" = 'icons/chess_pieces/knight_white.png',
|
||||
"pawn_black.png" = 'icons/chess_pieces/pawn_black.png',
|
||||
"pawn_white.png" = 'icons/chess_pieces/pawn_white.png',
|
||||
"queen_black.png" = 'icons/chess_pieces/queen_black.png',
|
||||
"queen_white.png" = 'icons/chess_pieces/queen_white.png',
|
||||
"rook_black.png" = 'icons/chess_pieces/rook_black.png',
|
||||
"rook_white.png" = 'icons/chess_pieces/rook_white.png',
|
||||
"sprites.png" = 'icons/chess_pieces/sprites.png',
|
||||
"blank.gif" = 'icons/chess_pieces/blank.gif',
|
||||
"background.png" = 'nano/images/uiBackground.png',
|
||||
"garbochess.js" = 'html/browser/garbochess.js',
|
||||
"boardui.js" = 'html/browser/boardui.js'
|
||||
)
|
||||
|
||||
/datum/asset/nanoui
|
||||
var/list/common = list()
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/nanoui_fancy = TRUE
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
var/sound = SOUND_DEFAULT
|
||||
var/show_ghostitem_attack = TRUE
|
||||
var/UI_style_color = "#ffffff"
|
||||
var/UI_style_alpha = 255
|
||||
|
||||
@@ -397,6 +398,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<h2>General Settings</h2>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
|
||||
dat += "<b>Fancy NanoUI:</b> <a href='?_src_=prefs;preference=nanoui'>[(nanoui_fancy) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Ghost-Item Attack Animation:</b> <a href='?_src_=prefs;preference=ghost_att_anim'>[(show_ghostitem_attack) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Custom UI settings:</b><br>"
|
||||
dat += "<b>Color:</b> <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <table style='display:inline;' bgcolor='[UI_style_color]'><tr><td>__</td></tr></table><br>"
|
||||
dat += "<b>Alpha (transparency):</b> <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
|
||||
@@ -1187,8 +1189,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("hair")
|
||||
if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Vulpkanin")
|
||||
var/input = "Choose your character's hair colour:"
|
||||
if(species == "Machine" && !("head" in rlimb_data))
|
||||
input = "Choose your character's frame colour:"
|
||||
var/new_hair = input(user, input, "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null
|
||||
if(new_hair)
|
||||
r_hair = hex2num(copytext(new_hair, 2, 4))
|
||||
@@ -1200,18 +1200,25 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
for(var/hairstyle in hair_styles_list)
|
||||
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
|
||||
if(species == "Machine") //Species that can use prosthetic heads.
|
||||
if(species in S.species_allowed)
|
||||
if(!rlimb_data["head"])
|
||||
valid_hairstyles[hairstyle] = S
|
||||
continue
|
||||
else
|
||||
continue
|
||||
var/obj/item/organ/external/head/H = new()
|
||||
if(S.name == "Bald")
|
||||
valid_hairstyles[hairstyle] = S
|
||||
if(!rlimb_data["head"]) //Handle situations where the head is default.
|
||||
H.model = "Morpheus Cyberkinetics"
|
||||
else
|
||||
if(!rlimb_data["head"])
|
||||
H.model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[H.model]
|
||||
if(species in S.species_allowed)
|
||||
if(robohead.is_monitor && (robohead.company in S.models_allowed)) //If the Machine character has the default Morpheus screen head or another screen head
|
||||
//and said head is in the hair style's allowed models list...
|
||||
valid_hairstyles[hairstyle] = S //Allow them to select the hairstyle.
|
||||
continue
|
||||
else
|
||||
if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human hairstyles).
|
||||
continue
|
||||
else if("Human" in S.species_allowed)
|
||||
else if(!robohead.is_monitor && ("Human" in S.species_allowed))
|
||||
valid_hairstyles[hairstyle] = S
|
||||
continue
|
||||
continue
|
||||
else
|
||||
if(!(species in S.species_allowed))
|
||||
continue
|
||||
@@ -1223,7 +1230,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
h_style = new_h_style
|
||||
|
||||
if("headaccessory")
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) // Species with head accessories
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with head accessories.
|
||||
var/input = "Choose the colour of your your character's head accessory:"
|
||||
var/new_head_accessory = input(user, input, "Character Preference", rgb(r_headacc, g_headacc, b_headacc)) as color|null
|
||||
if(new_head_accessory)
|
||||
@@ -1232,7 +1239,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_headacc = hex2num(copytext(new_head_accessory, 6, 8))
|
||||
|
||||
if("ha_style")
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) // Species with head accessories
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with head accessories.
|
||||
var/list/valid_head_accessory_styles = list()
|
||||
for(var/head_accessory_style in head_accessory_styles_list)
|
||||
var/datum/sprite_accessory/H = head_accessory_styles_list[head_accessory_style]
|
||||
@@ -1246,7 +1253,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
ha_style = new_head_accessory_style
|
||||
|
||||
if("markings")
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) // Species with markings
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings.
|
||||
var/input = "Choose the colour of your your character's markings:"
|
||||
var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null
|
||||
if(new_markings)
|
||||
@@ -1255,7 +1262,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_markings = hex2num(copytext(new_markings, 6, 8))
|
||||
|
||||
if("m_style")
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran")) // Species with markings
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings.
|
||||
var/list/valid_markings = list()
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
|
||||
@@ -1263,10 +1270,17 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
continue
|
||||
|
||||
if(species == "Machine") //Species that can use prosthetic heads.
|
||||
if(!("head" in rlimb_data) && M.name != "None") //If the character can have prosthetic heads and they have the default head (with screen), no optic markings.
|
||||
continue
|
||||
else if(("head" in rlimb_data) && M.name == "None") //Otherwise, if they DON'T have the default head and since they must have optics, give them a list of styles excluding the "None" option.
|
||||
var/obj/item/organ/external/head/H = new()
|
||||
if(!rlimb_data["head"]) //Handle situations where the head is default.
|
||||
H.model = "Morpheus Cyberkinetics"
|
||||
else
|
||||
H.model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[H.model]
|
||||
if(robohead.is_monitor && M.name != "None") //If the character can have prosthetic heads and they have the default Morpheus head (or another monitor-head), no optic markings.
|
||||
continue
|
||||
else if(!robohead.is_monitor && M.name != "None") //Otherwise, if they DON'T have the default head and the head's not a monitor but the head's not in the style's list of allowed models, skip.
|
||||
if(!(robohead.company in M.models_allowed))
|
||||
continue
|
||||
|
||||
valid_markings[markingstyle] = marking_styles_list[markingstyle]
|
||||
|
||||
@@ -1302,25 +1316,29 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/list/valid_facialhairstyles = list()
|
||||
for(var/facialhairstyle in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
|
||||
if(S.name == "Shaved")
|
||||
valid_facialhairstyles[facialhairstyle] = S
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
continue
|
||||
if(species == "Machine") //Species that can use prosthetic heads.
|
||||
if(species in S.species_allowed)
|
||||
if(!rlimb_data["head"])
|
||||
valid_facialhairstyles[facialhairstyle] = S
|
||||
continue
|
||||
else
|
||||
continue
|
||||
var/obj/item/organ/external/head/H = new()
|
||||
if(!rlimb_data["head"]) //Handle situations where the head is default.
|
||||
H.model = "Morpheus Cyberkinetics"
|
||||
else
|
||||
if(!rlimb_data["head"])
|
||||
continue
|
||||
else if("Human" in S.species_allowed)
|
||||
H.model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[H.model]
|
||||
if(species in S.species_allowed)
|
||||
if(robohead.is_monitor) //If the Machine character has the default Morpheus screen head or another screen head and they're allowed to have the style, let them have it.
|
||||
valid_facialhairstyles[facialhairstyle] = S
|
||||
continue
|
||||
else
|
||||
if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human facial hairstyles).
|
||||
continue
|
||||
else
|
||||
continue
|
||||
else if(!robohead.is_monitor && ("Human" in S.species_allowed))
|
||||
valid_facialhairstyles[facialhairstyle] = S
|
||||
continue
|
||||
else
|
||||
if(!(species in S.species_allowed))
|
||||
continue
|
||||
@@ -1491,18 +1509,51 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
organ_data[second_limb] = "amputated"
|
||||
rlimb_data[second_limb] = null
|
||||
if("Prosthesis")
|
||||
var/choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in chargen_robolimbs
|
||||
var/choice
|
||||
var/subchoice
|
||||
var/datum/robolimb/R = new()
|
||||
var/in_model
|
||||
var/robolimb_companies = list()
|
||||
for(var/limb_type in typesof(/datum/robolimb)) //This loop populates a list of companies that offer the limb the user selected previously as one of their cybernetic products.
|
||||
R = new limb_type()
|
||||
if(!R.unavailable_at_chargen && (limb in R.parts) && R.has_subtypes) //Ensures users can only choose companies that offer the parts they want, that singular models get added to the list as well companies that offer more than one model, and...
|
||||
robolimb_companies[R.company] = R //List only main brands that have the parts we're looking for.
|
||||
R = new() //Re-initialize R.
|
||||
|
||||
choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in robolimb_companies //Choose from a list of companies that offer the part the user wants.
|
||||
if(!choice)
|
||||
return
|
||||
R.company = choice
|
||||
R = all_robolimbs[R.company]
|
||||
if(R.has_subtypes == 1) //If the company the user selected provides more than just one base model, lets handle it.
|
||||
var/list/robolimb_models = list()
|
||||
for(var/limb_type in typesof(R)) //Handling the different models of parts that manufacturers can provide.
|
||||
var/datum/robolimb/L = new limb_type()
|
||||
if(limb in L.parts) //Make sure that only models that provide the parts the user needs populate the list.
|
||||
robolimb_models[L.company] = L
|
||||
if(robolimb_models.len == 1) //If there's only one model available in the list, autoselect it to avoid having to bother the user with a dialog that provides only one option.
|
||||
subchoice = L.company //If there ends up being more than one model populating the list, subchoice will be overwritten later anyway, so this isn't a problem.
|
||||
if(second_limb in L.parts) //If the child limb of the limb the user selected is also present in the model's parts list, state it's been found so the second limb can be set later.
|
||||
in_model = 1
|
||||
if(robolimb_models.len > 1) //If there's more than one model in the list that can provide the part the user wants, let them choose.
|
||||
subchoice = input(user, "Which model of [choice] [limb_name] do you wish to use?") as null|anything in robolimb_models
|
||||
if(subchoice)
|
||||
choice = subchoice
|
||||
if(limb == "head")
|
||||
m_style = "Humanoid Optics"
|
||||
ha_style = "None"
|
||||
h_style = hair_styles_list["Bald"]
|
||||
f_style = facial_hair_styles_list["Shaved"]
|
||||
m_style = "None"
|
||||
rlimb_data[limb] = choice
|
||||
organ_data[limb] = "cyborg"
|
||||
if(second_limb)
|
||||
rlimb_data[second_limb] = choice
|
||||
organ_data[second_limb] = "cyborg"
|
||||
if(subchoice)
|
||||
if(in_model)
|
||||
rlimb_data[second_limb] = choice
|
||||
organ_data[second_limb] = "cyborg"
|
||||
else
|
||||
rlimb_data[second_limb] = choice
|
||||
organ_data[second_limb] = "cyborg"
|
||||
|
||||
if("organs")
|
||||
var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes")
|
||||
@@ -1561,23 +1612,46 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("ui")
|
||||
switch(UI_style)
|
||||
if("Midnight")
|
||||
UI_style = "Plasmafire"
|
||||
if("Plasmafire")
|
||||
UI_style = "Retro"
|
||||
if("Retro")
|
||||
UI_style = "Slimecore"
|
||||
if("Slimecore")
|
||||
UI_style = "Operative"
|
||||
if("Operative")
|
||||
UI_style = "White"
|
||||
else
|
||||
UI_style = "Midnight"
|
||||
|
||||
if(ishuman(usr)) //mid-round preference changes, for aesthetics
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.remake_hud()
|
||||
|
||||
if("nanoui")
|
||||
nanoui_fancy = !nanoui_fancy
|
||||
|
||||
if("ghost_att_anim")
|
||||
show_ghostitem_attack = !show_ghostitem_attack
|
||||
|
||||
if("UIcolor")
|
||||
var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!", UI_style_color) as color|null
|
||||
if(!UI_style_color_new) return
|
||||
UI_style_color = UI_style_color_new
|
||||
|
||||
if(ishuman(usr)) //mid-round preference changes, for aesthetics
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.remake_hud()
|
||||
|
||||
if("UIalpha")
|
||||
var/UI_style_alpha_new = input(user, "Select a new alpha(transparence) parameter for UI, between 50 and 255", UI_style_alpha) as num
|
||||
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
UI_style_alpha = UI_style_alpha_new
|
||||
|
||||
if(ishuman(usr)) //mid-round preference changes, for aesthetics
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.remake_hud()
|
||||
|
||||
if("be_special")
|
||||
var/r = href_list["role"]
|
||||
if(!(r in special_roles))
|
||||
@@ -1666,9 +1740,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
character.name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
character.med_record = med_record
|
||||
character.sec_record = sec_record
|
||||
character.gen_record = gen_record
|
||||
if(character.ckey && !jobban_isbanned(character, "Records"))
|
||||
character.med_record = med_record
|
||||
character.sec_record = sec_record
|
||||
character.gen_record = gen_record
|
||||
|
||||
character.change_gender(gender)
|
||||
character.age = age
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
sound,
|
||||
randomslot,
|
||||
volume,
|
||||
nanoui_fancy
|
||||
nanoui_fancy,
|
||||
show_ghostitem_attack
|
||||
FROM [format_table_name("player")]
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
@@ -36,6 +37,7 @@
|
||||
randomslot = text2num(query.item[9])
|
||||
volume = text2num(query.item[10])
|
||||
nanoui_fancy = text2num(query.item[11])
|
||||
show_ghostitem_attack = text2num(query.item[12])
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
@@ -49,6 +51,7 @@
|
||||
randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot))
|
||||
volume = sanitize_integer(volume, 0, 100, initial(volume))
|
||||
nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy))
|
||||
show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_preferences(client/C)
|
||||
@@ -71,7 +74,8 @@
|
||||
sound='[sound]',
|
||||
randomslot='[randomslot]',
|
||||
volume='[volume]',
|
||||
nanoui_fancy='[nanoui_fancy]'
|
||||
nanoui_fancy='[nanoui_fancy]',
|
||||
show_ghostitem_attack='[show_ghostitem_attack]'
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user