|
|
|
|
@@ -28,7 +28,7 @@
|
|
|
|
|
var/list/markings = null
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/New(
|
|
|
|
|
var/host,
|
|
|
|
|
host,
|
|
|
|
|
mob/living/carbon/human/H,
|
|
|
|
|
check_species_whitelist = 1,
|
|
|
|
|
list/species_whitelist = list(),
|
|
|
|
|
@@ -57,309 +57,323 @@
|
|
|
|
|
local_skybox.screen_loc = "[map_name]:CENTER,CENTER"
|
|
|
|
|
cam_plane_masters += local_skybox
|
|
|
|
|
|
|
|
|
|
owner = H
|
|
|
|
|
cam_background = new
|
|
|
|
|
cam_background.assigned_map = map_name
|
|
|
|
|
cam_background.del_on_map_removal = FALSE
|
|
|
|
|
update_active_camera_screen()
|
|
|
|
|
|
|
|
|
|
if(customize_usr)
|
|
|
|
|
if(ishuman(usr))
|
|
|
|
|
H = usr
|
|
|
|
|
owner = H
|
|
|
|
|
if(owner)
|
|
|
|
|
owner.AddComponent(/datum/component/recursive_move)
|
|
|
|
|
RegisterSignal(owner, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen))
|
|
|
|
|
check_whitelist = check_species_whitelist
|
|
|
|
|
whitelist = species_whitelist
|
|
|
|
|
blacklist = species_blacklist
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/Destroy()
|
|
|
|
|
/datum/tgui_module/appearance_changer/tgui_close(mob/user)
|
|
|
|
|
. = ..()
|
|
|
|
|
if(owner == user || !customize_usr)
|
|
|
|
|
close_ui()
|
|
|
|
|
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
|
|
|
|
|
owner = null
|
|
|
|
|
last_camera_turf = null
|
|
|
|
|
cut_data()
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/Destroy()
|
|
|
|
|
qdel(cam_screen)
|
|
|
|
|
QDEL_LIST(cam_plane_masters)
|
|
|
|
|
qdel(cam_background)
|
|
|
|
|
cut_data()
|
|
|
|
|
return ..()
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
|
|
|
|
if(..())
|
|
|
|
|
return TRUE
|
|
|
|
|
|
|
|
|
|
var/mob/living/carbon/human/target = owner
|
|
|
|
|
if(customize_usr)
|
|
|
|
|
if(!ishuman(ui.user))
|
|
|
|
|
return TRUE
|
|
|
|
|
target = ui.user
|
|
|
|
|
|
|
|
|
|
switch(action)
|
|
|
|
|
if("race")
|
|
|
|
|
if(can_change(target, APPEARANCE_RACE) && (params["race"] in valid_species))
|
|
|
|
|
if(target.change_species(params["race"]))
|
|
|
|
|
if(can_change(owner, APPEARANCE_RACE) && (params["race"] in valid_species))
|
|
|
|
|
if(owner.change_species(params["race"]))
|
|
|
|
|
if(params["race"] == "Custom Species")
|
|
|
|
|
target.custom_species = sanitize(tgui_input_text(target, "Input custom species name:",
|
|
|
|
|
owner.custom_species = sanitize(tgui_input_text(ui.user, "Input custom species name:",
|
|
|
|
|
"Custom Species Name", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
|
|
|
|
cut_data()
|
|
|
|
|
generate_data(target)
|
|
|
|
|
generate_data(ui.user, owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_RACE)
|
|
|
|
|
return 1
|
|
|
|
|
if("gender")
|
|
|
|
|
if(can_change(target, APPEARANCE_GENDER) && (params["gender"] in get_genders(target)))
|
|
|
|
|
if(target.change_gender(params["gender"]))
|
|
|
|
|
if(can_change(owner, APPEARANCE_GENDER) && (params["gender"] in get_genders(owner)))
|
|
|
|
|
if(owner.change_gender(params["gender"]))
|
|
|
|
|
cut_data()
|
|
|
|
|
generate_data(target)
|
|
|
|
|
generate_data(ui.user, owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_GENDER)
|
|
|
|
|
return 1
|
|
|
|
|
if("gender_id")
|
|
|
|
|
if(can_change(target, APPEARANCE_GENDER) && (params["gender_id"] in all_genders_define_list))
|
|
|
|
|
target.identifying_gender = params["gender_id"]
|
|
|
|
|
if(can_change(owner, APPEARANCE_GENDER) && (params["gender_id"] in all_genders_define_list))
|
|
|
|
|
owner.identifying_gender = params["gender_id"]
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_GENDER_ID)
|
|
|
|
|
return 1
|
|
|
|
|
if("skin_tone")
|
|
|
|
|
if(can_change_skin_tone(target))
|
|
|
|
|
var/new_s_tone = tgui_input_number(target, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -target.s_tone + 35, 220, 1)
|
|
|
|
|
if(isnum(new_s_tone) && can_still_topic(target, state))
|
|
|
|
|
if(can_change_skin_tone(owner))
|
|
|
|
|
var/new_s_tone = tgui_input_number(ui.user, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -owner.s_tone + 35, 220, 1)
|
|
|
|
|
if(isnum(new_s_tone) && can_still_topic(owner, state))
|
|
|
|
|
new_s_tone = 35 - max(min( round(new_s_tone), 220),1)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_SKINTONE)
|
|
|
|
|
return target.change_skin_tone(new_s_tone)
|
|
|
|
|
return owner.change_skin_tone(new_s_tone)
|
|
|
|
|
if("skin_color")
|
|
|
|
|
if(can_change_skin_color(target))
|
|
|
|
|
var/new_skin = input(target, "Choose your character's skin colour: ", "Skin Color", rgb(target.r_skin, target.g_skin, target.b_skin)) as color|null
|
|
|
|
|
if(new_skin && can_still_topic(target, state))
|
|
|
|
|
if(can_change_skin_color(owner))
|
|
|
|
|
var/new_skin = input(ui.user, "Choose your character's skin colour: ", "Skin Color", rgb(owner.r_skin, owner.g_skin, owner.b_skin)) as color|null
|
|
|
|
|
if(new_skin && can_still_topic(owner, state))
|
|
|
|
|
var/r_skin = hex2num(copytext(new_skin, 2, 4))
|
|
|
|
|
var/g_skin = hex2num(copytext(new_skin, 4, 6))
|
|
|
|
|
var/b_skin = hex2num(copytext(new_skin, 6, 8))
|
|
|
|
|
if(target.change_skin_color(r_skin, g_skin, b_skin))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
if(owner.change_skin_color(r_skin, g_skin, b_skin))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_SKINCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("hair")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR) && (params["hair"] in valid_hairstyles))
|
|
|
|
|
if(target.change_hair(params["hair"]))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR) && (params["hair"] in valid_hairstyles))
|
|
|
|
|
if(owner.change_hair(params["hair"]))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return 1
|
|
|
|
|
if("hair_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select hair color.", "Hair Color", rgb(target.r_hair, target.g_hair, target.b_hair)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select hair color.", "Hair Color", rgb(owner.r_hair, owner.g_hair, owner.b_hair)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
var/r_hair = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
var/g_hair = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
var/b_hair = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
if(target.change_hair_color(r_hair, g_hair, b_hair))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
if(owner.change_hair_color(r_hair, g_hair, b_hair))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("facial_hair")
|
|
|
|
|
if(can_change(target, APPEARANCE_FACIAL_HAIR) && (params["facial_hair"] in valid_facial_hairstyles))
|
|
|
|
|
if(target.change_facial_hair(params["facial_hair"]))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
if(can_change(owner, APPEARANCE_FACIAL_HAIR) && (params["facial_hair"] in valid_facial_hairstyles))
|
|
|
|
|
if(owner.change_facial_hair(params["facial_hair"]))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_F_HAIRSTYLE)
|
|
|
|
|
return 1
|
|
|
|
|
if("facial_hair_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_FACIAL_HAIR_COLOR))
|
|
|
|
|
var/new_facial = input(target, "Please select facial hair color.", "Facial Hair Color", rgb(target.r_facial, target.g_facial, target.b_facial)) as color|null
|
|
|
|
|
if(new_facial && can_still_topic(target, state))
|
|
|
|
|
if(can_change(owner, APPEARANCE_FACIAL_HAIR_COLOR))
|
|
|
|
|
var/new_facial = input(ui.user, "Please select facial hair color.", "Facial Hair Color", rgb(owner.r_facial, owner.g_facial, owner.b_facial)) as color|null
|
|
|
|
|
if(new_facial && can_still_topic(owner, state))
|
|
|
|
|
var/r_facial = hex2num(copytext(new_facial, 2, 4))
|
|
|
|
|
var/g_facial = hex2num(copytext(new_facial, 4, 6))
|
|
|
|
|
var/b_facial = hex2num(copytext(new_facial, 6, 8))
|
|
|
|
|
if(target.change_facial_hair_color(r_facial, g_facial, b_facial))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
if(owner.change_facial_hair_color(r_facial, g_facial, b_facial))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_F_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("eye_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_EYE_COLOR))
|
|
|
|
|
var/new_eyes = input(target, "Please select eye color.", "Eye Color", rgb(target.r_eyes, target.g_eyes, target.b_eyes)) as color|null
|
|
|
|
|
if(new_eyes && can_still_topic(target, state))
|
|
|
|
|
if(can_change(owner, APPEARANCE_EYE_COLOR))
|
|
|
|
|
var/new_eyes = input(ui.user, "Please select eye color.", "Eye Color", rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes)) as color|null
|
|
|
|
|
if(new_eyes && can_still_topic(owner, state))
|
|
|
|
|
var/r_eyes = hex2num(copytext(new_eyes, 2, 4))
|
|
|
|
|
var/g_eyes = hex2num(copytext(new_eyes, 4, 6))
|
|
|
|
|
var/b_eyes = hex2num(copytext(new_eyes, 6, 8))
|
|
|
|
|
if(target.change_eye_color(r_eyes, g_eyes, b_eyes))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
if(owner.change_eye_color(r_eyes, g_eyes, b_eyes))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_EYES)
|
|
|
|
|
return 1
|
|
|
|
|
// VOREStation Add - Ears/Tails/Wings/Markings
|
|
|
|
|
if("ear")
|
|
|
|
|
if(can_change(target, APPEARANCE_ALL_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
|
|
|
|
var/datum/sprite_accessory/ears/instance = locate(params["ref"])
|
|
|
|
|
if(params["clear"])
|
|
|
|
|
instance = null
|
|
|
|
|
if(!istype(instance) && !params["clear"])
|
|
|
|
|
return FALSE
|
|
|
|
|
target.ear_style = instance
|
|
|
|
|
target.update_hair()
|
|
|
|
|
update_dna(target)
|
|
|
|
|
owner.ear_style = instance
|
|
|
|
|
owner.update_hair()
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return TRUE
|
|
|
|
|
if("ear_secondary")
|
|
|
|
|
if(can_change(target, APPEARANCE_ALL_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
|
|
|
|
var/datum/sprite_accessory/ears/instance = locate(params["ref"])
|
|
|
|
|
if(params["clear"])
|
|
|
|
|
instance = null
|
|
|
|
|
if(!istype(instance) && !params["clear"])
|
|
|
|
|
return FALSE
|
|
|
|
|
target.ear_secondary_style = instance
|
|
|
|
|
if(!islist(target.ear_secondary_colors))
|
|
|
|
|
target.ear_secondary_colors = list()
|
|
|
|
|
if(length(target.ear_secondary_colors) < instance.get_color_channel_count())
|
|
|
|
|
target.ear_secondary_colors.len = instance.get_color_channel_count()
|
|
|
|
|
target.update_hair()
|
|
|
|
|
update_dna(target)
|
|
|
|
|
owner.ear_secondary_style = instance
|
|
|
|
|
if(!islist(owner.ear_secondary_colors))
|
|
|
|
|
owner.ear_secondary_colors = list()
|
|
|
|
|
if(instance && length(owner.ear_secondary_colors) < instance.get_color_channel_count())
|
|
|
|
|
owner.ear_secondary_colors.len = instance.get_color_channel_count()
|
|
|
|
|
owner.update_hair()
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return TRUE
|
|
|
|
|
if("ears_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select ear color.", "Ear Color", rgb(target.r_ears, target.g_ears, target.b_ears)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
target.r_ears = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
target.g_ears = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
target.b_ears = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_hair()
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select ear color.", "Ear Color", rgb(owner.r_ears, owner.g_ears, owner.b_ears)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_ears = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_ears = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_ears = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_hair()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("ears2_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select secondary ear color.", "2nd Ear Color", rgb(target.r_ears2, target.g_ears2, target.b_ears2)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
target.r_ears2 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
target.g_ears2 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
target.b_ears2 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_hair()
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select secondary ear color.", "2nd Ear Color", rgb(owner.r_ears2, owner.g_ears2, owner.b_ears2)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_ears2 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_ears2 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_ears2 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_hair()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("ears_secondary_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/channel = params["channel"]
|
|
|
|
|
if(channel > length(target.ear_secondary_colors))
|
|
|
|
|
if(channel > length(owner.ear_secondary_colors))
|
|
|
|
|
return TRUE
|
|
|
|
|
var/existing = LAZYACCESS(target.ear_secondary_colors, channel) || "#ffffff"
|
|
|
|
|
var/new_color = input(target, "Please select ear color.", "2nd Ear Color", existing) as color|null
|
|
|
|
|
if(new_color && can_still_topic(target, state))
|
|
|
|
|
target.ear_secondary_colors[channel] = new_color
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_hair()
|
|
|
|
|
var/existing = LAZYACCESS(owner.ear_secondary_colors, channel) || "#ffffff"
|
|
|
|
|
var/new_color = input(ui.user, "Please select ear color.", "2nd Ear Color", existing) as color|null
|
|
|
|
|
if(new_color && can_still_topic(owner, state))
|
|
|
|
|
owner.ear_secondary_colors[channel] = new_color
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_hair()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return TRUE
|
|
|
|
|
if("tail")
|
|
|
|
|
if(can_change(target, APPEARANCE_ALL_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
|
|
|
|
var/datum/sprite_accessory/tail/instance = locate(params["ref"])
|
|
|
|
|
if(params["clear"])
|
|
|
|
|
instance = null
|
|
|
|
|
if(!istype(instance) && !params["clear"])
|
|
|
|
|
return FALSE
|
|
|
|
|
target.tail_style = instance
|
|
|
|
|
target.update_tail_showing()
|
|
|
|
|
update_dna(target)
|
|
|
|
|
owner.tail_style = instance
|
|
|
|
|
owner.update_tail_showing()
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return TRUE
|
|
|
|
|
if("tail_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select tail color.", "Tail Color", rgb(target.r_tail, target.g_tail, target.b_tail)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
target.r_tail = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
target.g_tail = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
target.b_tail = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_tail_showing()
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select tail color.", "Tail Color", rgb(owner.r_tail, owner.g_tail, owner.b_tail)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_tail = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_tail = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_tail = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_tail_showing()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("tail2_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select secondary tail color.", "2nd Tail Color", rgb(target.r_tail2, target.g_tail2, target.b_tail2)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
target.r_tail2 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
target.g_tail2 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
target.b_tail2 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_tail_showing()
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select secondary tail color.", "2nd Tail Color", rgb(owner.r_tail2, owner.g_tail2, owner.b_tail2)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_tail2 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_tail2 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_tail2 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_tail_showing()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("tail3_color")
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select secondary tail color.", "3rd Tail Color", rgb(owner.r_tail3, owner.g_tail3, owner.b_tail3)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_tail3 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_tail3 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_tail3 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_tail_showing()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("wing")
|
|
|
|
|
if(can_change(target, APPEARANCE_ALL_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
|
|
|
|
var/datum/sprite_accessory/wing/instance = locate(params["ref"])
|
|
|
|
|
if(params["clear"])
|
|
|
|
|
instance = null
|
|
|
|
|
if(!istype(instance) && !params["clear"])
|
|
|
|
|
return FALSE
|
|
|
|
|
target.wing_style = instance
|
|
|
|
|
target.update_wing_showing()
|
|
|
|
|
update_dna(target)
|
|
|
|
|
owner.wing_style = instance
|
|
|
|
|
owner.update_wing_showing()
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return TRUE
|
|
|
|
|
if("wing_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select wing color.", "Wing Color", rgb(target.r_wing, target.g_wing, target.b_wing)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
target.r_wing = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
target.g_wing = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
target.b_wing = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_wing_showing()
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select wing color.", "Wing Color", rgb(owner.r_wing, owner.g_wing, owner.b_wing)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_wing = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_wing = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_wing = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_wing_showing()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("wing2_color")
|
|
|
|
|
if(can_change(target, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(target, "Please select secondary wing color.", "2nd Wing Color", rgb(target.r_wing2, target.g_wing2, target.b_wing2)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(target, state))
|
|
|
|
|
target.r_wing2 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
target.g_wing2 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
target.b_wing2 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(target)
|
|
|
|
|
target.update_wing_showing()
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select secondary wing color.", "2nd Wing Color", rgb(owner.r_wing2, owner.g_wing2, owner.b_wing2)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_wing2 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_wing2 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_wing2 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_wing_showing()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("wing3_color")
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
|
|
|
|
var/new_hair = input(ui.user, "Please select secondary wing color.", "3rd Wing Color", rgb(owner.r_wing3, owner.g_wing3, owner.b_wing3)) as color|null
|
|
|
|
|
if(new_hair && can_still_topic(owner, state))
|
|
|
|
|
owner.r_wing3 = hex2num(copytext(new_hair, 2, 4))
|
|
|
|
|
owner.g_wing3 = hex2num(copytext(new_hair, 4, 6))
|
|
|
|
|
owner.b_wing3 = hex2num(copytext(new_hair, 6, 8))
|
|
|
|
|
update_dna(owner)
|
|
|
|
|
owner.update_wing_showing()
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
|
|
|
|
return 1
|
|
|
|
|
if("marking")
|
|
|
|
|
if(can_change(target, APPEARANCE_ALL_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
|
|
|
|
var/todo = params["todo"]
|
|
|
|
|
var/name_marking = params["name"]
|
|
|
|
|
switch (todo)
|
|
|
|
|
if (0) //delete
|
|
|
|
|
if (name_marking)
|
|
|
|
|
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking]
|
|
|
|
|
if (target.remove_marking(mark_datum))
|
|
|
|
|
if (owner.remove_marking(mark_datum))
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return TRUE
|
|
|
|
|
if (1) //add
|
|
|
|
|
var/list/usable_markings = markings.Copy() ^ body_marking_styles_list.Copy()
|
|
|
|
|
var/new_marking = tgui_input_list(target, "Choose a body marking:", "New Body Marking", usable_markings)
|
|
|
|
|
if(new_marking && can_still_topic(target, state))
|
|
|
|
|
var/new_marking = tgui_input_list(ui.user, "Choose a body marking:", "New Body Marking", usable_markings)
|
|
|
|
|
if(new_marking && can_still_topic(owner, state))
|
|
|
|
|
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[new_marking]
|
|
|
|
|
if (target.add_marking(mark_datum))
|
|
|
|
|
if (owner.add_marking(mark_datum))
|
|
|
|
|
changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE)
|
|
|
|
|
return TRUE
|
|
|
|
|
if (2) //move up
|
|
|
|
|
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking]
|
|
|
|
|
if (target.change_priority_of_marking(mark_datum, FALSE))
|
|
|
|
|
if (owner.change_priority_of_marking(mark_datum, FALSE))
|
|
|
|
|
return TRUE
|
|
|
|
|
if (3) //move down
|
|
|
|
|
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking]
|
|
|
|
|
if (target.change_priority_of_marking(mark_datum, TRUE))
|
|
|
|
|
if (owner.change_priority_of_marking(mark_datum, TRUE))
|
|
|
|
|
return TRUE
|
|
|
|
|
if (4) //color
|
|
|
|
|
var/current = markings[name_marking] ? markings[name_marking] : "#000000"
|
|
|
|
|
var/marking_color = input(target, "Please select marking color", "Marking color", current) as color|null
|
|
|
|
|
if(marking_color && can_still_topic(target, state))
|
|
|
|
|
var/marking_color = input(ui.user, "Please select marking color", "Marking color", current) as color|null
|
|
|
|
|
if(marking_color && can_still_topic(owner, state))
|
|
|
|
|
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking]
|
|
|
|
|
if (target.change_marking_color(mark_datum, marking_color))
|
|
|
|
|
if (owner.change_marking_color(mark_datum, marking_color))
|
|
|
|
|
return TRUE
|
|
|
|
|
// VOREStation Add End
|
|
|
|
|
return FALSE
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/tgui_interact(mob/user, datum/tgui/ui = null, datum/tgui/parent_ui = null, datum/tgui_state/custom_state)
|
|
|
|
|
var/mob/living/carbon/human/target = owner
|
|
|
|
|
if(customize_usr)
|
|
|
|
|
if(customize_usr && !owner)
|
|
|
|
|
if(!ishuman(user))
|
|
|
|
|
return TRUE
|
|
|
|
|
target = user
|
|
|
|
|
owner = user
|
|
|
|
|
|
|
|
|
|
if(!target || !target.species)
|
|
|
|
|
if(!owner || !owner.species)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
|
|
|
update_active_camera_screen()
|
|
|
|
|
if(!ui)
|
|
|
|
|
owner.AddComponent(/datum/component/recursive_move)
|
|
|
|
|
RegisterSignal(owner, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen))
|
|
|
|
|
// Register map objects
|
|
|
|
|
user.client.register_map_obj(cam_screen)
|
|
|
|
|
for(var/plane in cam_plane_masters)
|
|
|
|
|
@@ -370,19 +384,20 @@
|
|
|
|
|
ui.open()
|
|
|
|
|
if(custom_state)
|
|
|
|
|
ui.set_state(custom_state)
|
|
|
|
|
update_active_camera_screen()
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/tgui_static_data(mob/user)
|
|
|
|
|
var/list/data = ..()
|
|
|
|
|
|
|
|
|
|
generate_data(user)
|
|
|
|
|
generate_data(user, owner)
|
|
|
|
|
|
|
|
|
|
if(can_change(user, APPEARANCE_RACE))
|
|
|
|
|
if(can_change(owner, APPEARANCE_RACE))
|
|
|
|
|
var/species[0]
|
|
|
|
|
for(var/specimen in valid_species)
|
|
|
|
|
species[++species.len] = list("specimen" = specimen)
|
|
|
|
|
data["species"] = species
|
|
|
|
|
|
|
|
|
|
if(can_change(user, APPEARANCE_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_HAIR))
|
|
|
|
|
var/hair_styles[0]
|
|
|
|
|
for(var/hair_style in valid_hairstyles)
|
|
|
|
|
hair_styles[++hair_styles.len] = list("hairstyle" = hair_style)
|
|
|
|
|
@@ -393,7 +408,7 @@
|
|
|
|
|
data["wing_styles"] = valid_wingstyles
|
|
|
|
|
// VOREStation Add End
|
|
|
|
|
|
|
|
|
|
if(can_change(user, APPEARANCE_FACIAL_HAIR))
|
|
|
|
|
if(can_change(owner, APPEARANCE_FACIAL_HAIR))
|
|
|
|
|
var/facial_hair_styles[0]
|
|
|
|
|
for(var/facial_hair_style in valid_facial_hairstyles)
|
|
|
|
|
facial_hair_styles[++facial_hair_styles.len] = list("facialhairstyle" = facial_hair_style)
|
|
|
|
|
@@ -404,24 +419,18 @@
|
|
|
|
|
/datum/tgui_module/appearance_changer/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
|
|
|
|
var/list/data = ..()
|
|
|
|
|
|
|
|
|
|
generate_data(user)
|
|
|
|
|
generate_data(user, owner)
|
|
|
|
|
|
|
|
|
|
var/mob/living/carbon/human/target = owner
|
|
|
|
|
if(customize_usr)
|
|
|
|
|
if(!ishuman(ui.user))
|
|
|
|
|
return TRUE
|
|
|
|
|
target = ui.user
|
|
|
|
|
data["name"] = owner.name
|
|
|
|
|
data["specimen"] = owner.species.name
|
|
|
|
|
data["gender"] = owner.gender
|
|
|
|
|
data["gender_id"] = owner.identifying_gender
|
|
|
|
|
data["change_race"] = can_change(owner, APPEARANCE_RACE)
|
|
|
|
|
|
|
|
|
|
data["name"] = target.name
|
|
|
|
|
data["specimen"] = target.species.name
|
|
|
|
|
data["gender"] = target.gender
|
|
|
|
|
data["gender_id"] = target.identifying_gender
|
|
|
|
|
data["change_race"] = can_change(target, APPEARANCE_RACE)
|
|
|
|
|
|
|
|
|
|
data["change_gender"] = can_change(target, APPEARANCE_GENDER)
|
|
|
|
|
data["change_gender"] = can_change(owner, APPEARANCE_GENDER)
|
|
|
|
|
if(data["change_gender"])
|
|
|
|
|
var/genders[0]
|
|
|
|
|
for(var/gender in get_genders(target))
|
|
|
|
|
for(var/gender in get_genders(owner))
|
|
|
|
|
genders[++genders.len] = list("gender_name" = gender2text(gender), "gender_key" = gender)
|
|
|
|
|
data["genders"] = genders
|
|
|
|
|
var/id_genders[0]
|
|
|
|
|
@@ -429,56 +438,58 @@
|
|
|
|
|
id_genders[++id_genders.len] = list("gender_name" = gender2text(gender), "gender_key" = gender)
|
|
|
|
|
data["id_genders"] = id_genders
|
|
|
|
|
|
|
|
|
|
data["change_hair"] = can_change(target, APPEARANCE_HAIR)
|
|
|
|
|
data["change_hair"] = can_change(owner, APPEARANCE_HAIR)
|
|
|
|
|
if(data["change_hair"])
|
|
|
|
|
data["hair_style"] = target.h_style
|
|
|
|
|
data["hair_style"] = owner.h_style
|
|
|
|
|
|
|
|
|
|
// VOREStation Add - Ears/Tails/Wings
|
|
|
|
|
data["ear_style"] = target.ear_style
|
|
|
|
|
data["ear_secondary_style"] = target.ear_secondary_style?.name
|
|
|
|
|
data["tail_style"] = target.tail_style
|
|
|
|
|
data["wing_style"] = target.wing_style
|
|
|
|
|
data["ear_style"] = owner.ear_style
|
|
|
|
|
data["ear_secondary_style"] = owner.ear_secondary_style?.name
|
|
|
|
|
data["tail_style"] = owner.tail_style
|
|
|
|
|
data["wing_style"] = owner.wing_style
|
|
|
|
|
var/list/markings_data[0]
|
|
|
|
|
markings = target.get_prioritised_markings()
|
|
|
|
|
markings = owner.get_prioritised_markings()
|
|
|
|
|
for (var/marking in markings)
|
|
|
|
|
markings_data[++markings_data.len] = list("marking_name" = marking, "marking_color" = markings[marking]["color"] ? markings[marking]["color"] : "#000000") //too tired to add in another submenu for bodyparts here
|
|
|
|
|
data["markings"] = markings_data
|
|
|
|
|
// VOREStation Add End
|
|
|
|
|
|
|
|
|
|
data["change_facial_hair"] = can_change(target, APPEARANCE_FACIAL_HAIR)
|
|
|
|
|
data["change_facial_hair"] = can_change(owner, APPEARANCE_FACIAL_HAIR)
|
|
|
|
|
if(data["change_facial_hair"])
|
|
|
|
|
data["facial_hair_style"] = target.f_style
|
|
|
|
|
data["facial_hair_style"] = owner.f_style
|
|
|
|
|
|
|
|
|
|
data["change_skin_tone"] = can_change_skin_tone(target)
|
|
|
|
|
data["change_skin_color"] = can_change_skin_color(target)
|
|
|
|
|
data["change_skin_tone"] = can_change_skin_tone(owner)
|
|
|
|
|
data["change_skin_color"] = can_change_skin_color(owner)
|
|
|
|
|
if(data["change_skin_color"])
|
|
|
|
|
data["skin_color"] = rgb(target.r_skin, target.g_skin, target.b_skin)
|
|
|
|
|
data["skin_color"] = rgb(owner.r_skin, owner.g_skin, owner.b_skin)
|
|
|
|
|
|
|
|
|
|
data["change_eye_color"] = can_change(target, APPEARANCE_EYE_COLOR)
|
|
|
|
|
data["change_eye_color"] = can_change(owner, APPEARANCE_EYE_COLOR)
|
|
|
|
|
if(data["change_eye_color"])
|
|
|
|
|
data["eye_color"] = rgb(target.r_eyes, target.g_eyes, target.b_eyes)
|
|
|
|
|
data["eye_color"] = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes)
|
|
|
|
|
|
|
|
|
|
data["change_hair_color"] = can_change(target, APPEARANCE_HAIR_COLOR)
|
|
|
|
|
data["change_hair_color"] = can_change(owner, APPEARANCE_HAIR_COLOR)
|
|
|
|
|
if(data["change_hair_color"])
|
|
|
|
|
data["hair_color"] = rgb(target.r_hair, target.g_hair, target.b_hair)
|
|
|
|
|
data["hair_color"] = rgb(owner.r_hair, owner.g_hair, owner.b_hair)
|
|
|
|
|
// VOREStation Add - Ears/Tails/Wings
|
|
|
|
|
data["ears_color"] = rgb(target.r_ears, target.g_ears, target.b_ears)
|
|
|
|
|
data["ears2_color"] = rgb(target.r_ears2, target.g_ears2, target.b_ears2)
|
|
|
|
|
data["ears_color"] = rgb(owner.r_ears, owner.g_ears, owner.b_ears)
|
|
|
|
|
data["ears2_color"] = rgb(owner.r_ears2, owner.g_ears2, owner.b_ears2)
|
|
|
|
|
|
|
|
|
|
// secondary ear colors
|
|
|
|
|
var/list/ear_secondary_color_channels = target.ear_secondary_colors || list()
|
|
|
|
|
ear_secondary_color_channels.len = target.ear_secondary_style?.get_color_channel_count() || 0
|
|
|
|
|
var/list/ear_secondary_color_channels = owner.ear_secondary_colors || list()
|
|
|
|
|
ear_secondary_color_channels.len = owner.ear_secondary_style?.get_color_channel_count() || 0
|
|
|
|
|
data["ear_secondary_colors"] = ear_secondary_color_channels
|
|
|
|
|
|
|
|
|
|
data["tail_color"] = rgb(target.r_tail, target.g_tail, target.b_tail)
|
|
|
|
|
data["tail2_color"] = rgb(target.r_tail2, target.g_tail2, target.b_tail2)
|
|
|
|
|
data["wing_color"] = rgb(target.r_wing, target.g_wing, target.b_wing)
|
|
|
|
|
data["wing2_color"] = rgb(target.r_wing2, target.g_wing2, target.b_wing2)
|
|
|
|
|
data["tail_color"] = rgb(owner.r_tail, owner.g_tail, owner.b_tail)
|
|
|
|
|
data["tail2_color"] = rgb(owner.r_tail2, owner.g_tail2, owner.b_tail2)
|
|
|
|
|
data["tail3_color"] = rgb(owner.r_tail3, owner.g_tail3, owner.b_tail3)
|
|
|
|
|
data["wing_color"] = rgb(owner.r_wing, owner.g_wing, owner.b_wing)
|
|
|
|
|
data["wing2_color"] = rgb(owner.r_wing2, owner.g_wing2, owner.b_wing2)
|
|
|
|
|
data["wing3_color"] = rgb(owner.r_wing3, owner.g_wing3, owner.b_wing3)
|
|
|
|
|
// VOREStation Add End
|
|
|
|
|
|
|
|
|
|
data["change_facial_hair_color"] = can_change(target, APPEARANCE_FACIAL_HAIR_COLOR)
|
|
|
|
|
data["change_facial_hair_color"] = can_change(owner, APPEARANCE_FACIAL_HAIR_COLOR)
|
|
|
|
|
if(data["change_facial_hair_color"])
|
|
|
|
|
data["facial_hair_color"] = rgb(target.r_facial, target.g_facial, target.b_facial)
|
|
|
|
|
data["facial_hair_color"] = rgb(owner.r_facial, owner.g_facial, owner.b_facial)
|
|
|
|
|
return data
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/tgui_static_data(mob/user)
|
|
|
|
|
@@ -512,30 +523,18 @@
|
|
|
|
|
local_skybox.set_position("CENTER", "CENTER", (world.maxx>>1) - newturf.x, (world.maxy>>1) - newturf.y)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/update_dna(mob/target)
|
|
|
|
|
if(customize_usr && !ishuman(target))
|
|
|
|
|
return TRUE
|
|
|
|
|
var/mob/living/carbon/human/H = target
|
|
|
|
|
if(H && (flags & APPEARANCE_UPDATE_DNA))
|
|
|
|
|
H.update_dna()
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/update_dna(mob/living/carbon/human/target)
|
|
|
|
|
if(target && (flags & APPEARANCE_UPDATE_DNA))
|
|
|
|
|
target.update_dna()
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_change(mob/target, var/flag)
|
|
|
|
|
if(customize_usr && !ishuman(target))
|
|
|
|
|
return TRUE
|
|
|
|
|
var/mob/living/carbon/human/H = target
|
|
|
|
|
return H && (flags & flag)
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_change(mob/living/carbon/human/target, var/flag)
|
|
|
|
|
return target && (flags & flag)
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_change_skin_tone(mob/target)
|
|
|
|
|
if(customize_usr && !ishuman(target))
|
|
|
|
|
return TRUE
|
|
|
|
|
var/mob/living/carbon/human/H = target
|
|
|
|
|
return H && (flags & APPEARANCE_SKIN) && H.species.appearance_flags & HAS_SKIN_TONE
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_change_skin_tone(mob/living/carbon/human/target)
|
|
|
|
|
return target && (flags & APPEARANCE_SKIN) &&target.species.appearance_flags & HAS_SKIN_TONE
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_change_skin_color(mob/target)
|
|
|
|
|
if(customize_usr && !ishuman(target))
|
|
|
|
|
return TRUE
|
|
|
|
|
var/mob/living/carbon/human/H = target
|
|
|
|
|
return H && (flags & APPEARANCE_SKIN) && H.species.appearance_flags & HAS_SKIN_COLOR
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_change_skin_color(mob/living/carbon/human/target)
|
|
|
|
|
return target && (flags & APPEARANCE_SKIN) && target.species.appearance_flags & HAS_SKIN_COLOR
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/cut_data()
|
|
|
|
|
// Making the assumption that the available species remain constant
|
|
|
|
|
@@ -547,14 +546,9 @@
|
|
|
|
|
valid_wingstyles.Cut()
|
|
|
|
|
// VOREStation Add End
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/generate_data(mob/user)
|
|
|
|
|
var/mob/living/carbon/human/target = owner
|
|
|
|
|
if(customize_usr)
|
|
|
|
|
if(!ishuman(user))
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/generate_data(mob/user, mob/living/carbon/human/target)
|
|
|
|
|
if(!ishuman(target))
|
|
|
|
|
return TRUE
|
|
|
|
|
target = user
|
|
|
|
|
if(!target)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
if(!LAZYLEN(valid_species))
|
|
|
|
|
valid_species = target.generate_valid_species(check_whitelist, whitelist, blacklist)
|
|
|
|
|
@@ -598,13 +592,10 @@
|
|
|
|
|
)))
|
|
|
|
|
// VOREStation Add End
|
|
|
|
|
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/get_genders(mob/target)
|
|
|
|
|
if(customize_usr && !ishuman(target))
|
|
|
|
|
return TRUE
|
|
|
|
|
var/mob/living/carbon/human/H = target
|
|
|
|
|
var/datum/species/S = H.species
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/get_genders(mob/living/carbon/human/target)
|
|
|
|
|
var/datum/species/S = target.species
|
|
|
|
|
var/list/possible_genders = S.genders
|
|
|
|
|
if(!H.internal_organs_by_name["cell"])
|
|
|
|
|
if(!target.internal_organs_by_name["cell"])
|
|
|
|
|
return possible_genders
|
|
|
|
|
possible_genders = possible_genders.Copy()
|
|
|
|
|
possible_genders |= NEUTER
|
|
|
|
|
@@ -616,6 +607,8 @@
|
|
|
|
|
|
|
|
|
|
// VOREStation Add - Ears/Tails/Wings
|
|
|
|
|
/datum/tgui_module/appearance_changer/proc/can_use_sprite(datum/sprite_accessory/X, mob/living/carbon/human/target, mob/user)
|
|
|
|
|
if(X.name == DEVELOPER_WARNING_NAME)
|
|
|
|
|
return FALSE
|
|
|
|
|
if(!isnull(X.species_allowed) && !(target.species.name in X.species_allowed) && (!istype(target.species, /datum/species/custom))) // Letting custom species access wings/ears/tails.
|
|
|
|
|
return FALSE
|
|
|
|
|
|
|
|
|
|
|