From 41944548fc6b2331e8fa536d3c05084cf1ed35a4 Mon Sep 17 00:00:00 2001 From: ShadowLarkens Date: Wed, 7 Oct 2020 00:02:38 -0700 Subject: [PATCH 01/53] Completely nuke transform digest modes --- code/__defines/belly_modes_vr.dm | 14 - code/_helpers/global_lists.dm | 2 +- code/modules/vore/eating/belly_dat_vr.dm | 3 +- code/modules/vore/eating/belly_obj_vr.dm | 4 +- .../vore/eating/bellymodes_datum_vr.dm | 129 +-------- code/modules/vore/eating/transforming_vr.dm | 247 ------------------ code/modules/vore/eating/vorepanel_vr.dm | 11 - 7 files changed, 8 insertions(+), 402 deletions(-) diff --git a/code/__defines/belly_modes_vr.dm b/code/__defines/belly_modes_vr.dm index ccffcf4341..e7853f7059 100644 --- a/code/__defines/belly_modes_vr.dm +++ b/code/__defines/belly_modes_vr.dm @@ -9,25 +9,11 @@ #define DM_SIZE_STEAL "Size Steal" #define DM_HEAL "Heal" #define DM_EGG "Encase In Egg" -#define DM_TRANSFORM "Transform" //#define DM_ITEMWEAK "Digest (Item Friendly)" //#define DM_STRIPDIGEST "Strip Digest (Items Only)" //#define DM_DIGEST_NUMB "Digest (Numbing)" -//TF modes -#define DM_TRANSFORM_HAIR_AND_EYES "Transform (Hair and eyes)" -#define DM_TRANSFORM_MALE "Transform (Male)" -#define DM_TRANSFORM_FEMALE "Transform (Female)" -#define DM_TRANSFORM_KEEP_GENDER "Transform (Keep Gender)" -#define DM_TRANSFORM_REPLICA "Transform (Replica Of Self)" -#define DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR "Transform (Change Species and Taur)" -#define DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG "Transform (Change Species and Taur) (EGG)" -#define DM_TRANSFORM_REPLICA_EGG "Transform (Replica Of Self) (EGG)" -#define DM_TRANSFORM_KEEP_GENDER_EGG "Transform (Keep Gender) (EGG)" -#define DM_TRANSFORM_MALE_EGG "Transform (Male) (EGG)" -#define DM_TRANSFORM_FEMALE_EGG "Transform (Female) (EGG)" - //Addon mode flags #define DM_FLAG_NUMBING 0x1 #define DM_FLAG_STRIPPING 0x2 diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 371f35b051..855decff39 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -215,7 +215,7 @@ var/global/list/string_slot_flags = list( GLOB.closet_appearances[T] = app // VOREStation Add - Vore Modes! - paths = typesof(/datum/digest_mode) - /datum/digest_mode/transform + paths = typesof(/datum/digest_mode) for(var/T in paths) var/datum/digest_mode/DM = new T GLOB.digest_modes[DM.id] = DM diff --git a/code/modules/vore/eating/belly_dat_vr.dm b/code/modules/vore/eating/belly_dat_vr.dm index 01bda55389..2beec27ad6 100644 --- a/code/modules/vore/eating/belly_dat_vr.dm +++ b/code/modules/vore/eating/belly_dat_vr.dm @@ -31,8 +31,7 @@ var/datum/belly/transferlocation = null // Location that the prey is released if they struggle and get dropped off. var/tmp/digest_mode = DM_HOLD // Whether or not to digest. Default to not digest. - var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_SHRINK,DM_GROW,DM_SIZE_STEAL) // Possible digest modes - var/tmp/list/transform_modes = list(DM_TRANSFORM_MALE,DM_TRANSFORM_FEMALE,DM_TRANSFORM_KEEP_GENDER,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG,DM_TRANSFORM_REPLICA,DM_TRANSFORM_REPLICA_EGG,DM_TRANSFORM_KEEP_GENDER_EGG,DM_TRANSFORM_MALE_EGG,DM_TRANSFORM_FEMALE_EGG, DM_EGG) + var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_SHRINK,DM_GROW,DM_SIZE_STEAL,DM_EGG) // Possible digest modes var/tmp/mob/living/owner // The mob whose belly this is. var/tmp/list/internal_contents = list() // People/Things you've eaten into this belly! var/tmp/emotePend = FALSE // If there's already a spawned thing counting for the next emote diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index fab6af6fca..b1d5cb1417 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -41,11 +41,9 @@ //I don't think we've ever altered these lists. making them static until someone actually overrides them somewhere. //Actual full digest modes - var/tmp/static/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_HEAL,DM_SHRINK,DM_GROW,DM_SIZE_STEAL) + var/tmp/static/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_HEAL,DM_SHRINK,DM_GROW,DM_SIZE_STEAL,DM_EGG) //Digest mode addon flags var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Stripping" = DM_FLAG_STRIPPING, "Leave Remains" = DM_FLAG_LEAVEREMAINS, "Muffles" = DM_FLAG_THICKBELLY) - //Transformation modes - var/tmp/static/list/transform_modes = list(DM_TRANSFORM_MALE,DM_TRANSFORM_FEMALE,DM_TRANSFORM_KEEP_GENDER,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG,DM_TRANSFORM_REPLICA,DM_TRANSFORM_REPLICA_EGG,DM_TRANSFORM_KEEP_GENDER_EGG,DM_TRANSFORM_MALE_EGG,DM_TRANSFORM_FEMALE_EGG, DM_EGG) //Item related modes var/tmp/static/list/item_digest_modes = list(IM_HOLD,IM_DIGEST_FOOD,IM_DIGEST) diff --git a/code/modules/vore/eating/bellymodes_datum_vr.dm b/code/modules/vore/eating/bellymodes_datum_vr.dm index 04f96becd4..8b230dbd14 100644 --- a/code/modules/vore/eating/bellymodes_datum_vr.dm +++ b/code/modules/vore/eating/bellymodes_datum_vr.dm @@ -129,130 +129,11 @@ GLOBAL_LIST_INIT(digest_modes, list()) B.owner.adjust_nutrition(-1) L.adjust_nutrition(1) -// TRANSFORM MODES -/datum/digest_mode/transform - var/stabilize_nutrition = FALSE - var/changes_eyes = FALSE - var/changes_hair_solo = FALSE - var/changes_hairandskin = FALSE - var/changes_gender = FALSE - var/changes_gender_to = null - var/changes_species = FALSE - var/changes_ears_tail_wing_nocolor = FALSE - var/changes_ears_tail_wing_color = FALSE - var/eggs = FALSE - -/datum/digest_mode/transform/process_mob(obj/belly/B, mob/living/carbon/human/H) - if(!istype(H) || H.stat == DEAD) - return null - if(stabilize_nutrition) - if(B.owner.nutrition > 400 && H.nutrition < 400) - B.owner.adjust_nutrition(-2) - H.adjust_nutrition(1.5) - if(changes_eyes && B.check_eyes(H)) - B.change_eyes(H, 1) - return null - if(changes_hair_solo && B.check_hair(H)) - B.change_hair(H) - return null - if(changes_hairandskin && (B.check_hair(H) || B.check_skin(H))) - B.change_hair(H) - B.change_skin(H, 1) - return null - if(changes_species) - if(changes_ears_tail_wing_nocolor && (B.check_ears(H) || B.check_tail_nocolor(H) || B.check_wing_nocolor(H) || B.check_species(H))) - B.change_ears(H) - B.change_tail_nocolor(H) - B.change_wing_nocolor(H) - B.change_species(H, 1, 1) // ,1) preserves coloring - H.species.create_organs(H) - H.sync_organ_dna() - return null - if(changes_ears_tail_wing_color && (B.check_ears(H) || B.check_tail(H) || B.check_wing(H) || B.check_species(H))) - B.change_ears(H) - B.change_tail(H) - B.change_wing(H) - B.change_species(H, 1, 2) // ,2) does not preserve coloring. - H.species.create_organs(H) - H.sync_organ_dna() - return null - if(changes_gender && B.check_gender(H, changes_gender_to)) - B.change_gender(H, changes_gender_to, 1) - return null - if(eggs && (!H.absorbed)) - B.put_in_egg(H, 1) - return null - -// Regular TF Modes -/datum/digest_mode/transform/hairandeyes - id = DM_TRANSFORM_HAIR_AND_EYES - stabilize_nutrition = TRUE - changes_eyes = TRUE - changes_hair_solo = TRUE - -/datum/digest_mode/transform/gender - id = DM_TRANSFORM_FEMALE - changes_eyes = TRUE - changes_hairandskin = TRUE - changes_gender = TRUE - changes_gender_to = FEMALE - stabilize_nutrition = TRUE - -/datum/digest_mode/transform/gender/male - id = DM_TRANSFORM_FEMALE - changes_gender_to = MALE - -/datum/digest_mode/transform/keepgender - id = DM_TRANSFORM_KEEP_GENDER - changes_eyes = TRUE - changes_hairandskin = TRUE - stabilize_nutrition = TRUE - -/datum/digest_mode/transform/speciesandtaur - id = DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR - changes_species = TRUE - changes_ears_tail_wing_nocolor = TRUE - stabilize_nutrition = TRUE - -/datum/digest_mode/transform/replica - id = DM_TRANSFORM_REPLICA - changes_eyes = TRUE - changes_hairandskin = TRUE - changes_species = TRUE - changes_ears_tail_wing_color = TRUE - // E G G -/datum/digest_mode/transform/egg +/datum/digest_mode/egg id = DM_EGG - eggs = TRUE -/datum/digest_mode/transform/egg/gender - id = DM_TRANSFORM_FEMALE_EGG - changes_eyes = TRUE - changes_hairandskin = TRUE - changes_gender = TRUE - changes_gender_to = FEMALE - stabilize_nutrition = TRUE - -/datum/digest_mode/transform/egg/gender/male - id = DM_TRANSFORM_MALE_EGG - changes_gender_to = MALE - -/datum/digest_mode/transform/egg/nogender - id = DM_TRANSFORM_KEEP_GENDER_EGG - changes_eyes = TRUE - changes_hairandskin = TRUE - stabilize_nutrition = TRUE - -/datum/digest_mode/transform/egg/speciesandtaur - id = DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG - changes_species = TRUE - changes_ears_tail_wing_nocolor = TRUE - stabilize_nutrition = TRUE - -/datum/digest_mode/transform/egg/replica - id = DM_TRANSFORM_REPLICA_EGG - changes_eyes = TRUE - changes_hairandskin = TRUE - changes_species = TRUE - changes_ears_tail_wing_color = TRUE \ No newline at end of file +/datum/digest_mode/egg/process_mob(obj/belly/B, mob/living/carbon/human/H) + if(!istype(H) || H.stat == DEAD || H.absorbed) + return null + B.put_in_egg(H, 1) diff --git a/code/modules/vore/eating/transforming_vr.dm b/code/modules/vore/eating/transforming_vr.dm index 8f9eea2371..e8de8d466b 100644 --- a/code/modules/vore/eating/transforming_vr.dm +++ b/code/modules/vore/eating/transforming_vr.dm @@ -1,250 +1,3 @@ -/obj/belly/proc/check_eyes(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - return (M.r_eyes != O.r_eyes || M.g_eyes != O.g_eyes || M.b_eyes != O.b_eyes) - -/obj/belly/proc/change_eyes(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.r_eyes = O.r_eyes - M.g_eyes = O.g_eyes - M.b_eyes = O.b_eyes - M.update_eyes() - M.update_icons_body() - if(message) - to_chat(M, "You feel lightheaded and drowsy...") - to_chat(O, "You feel warm as you make subtle changes to your captive's body.") - -/obj/belly/proc/check_hair(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - if(M.r_hair != O.r_hair || M.g_hair != O.g_hair || M.b_hair != O.b_hair) - return 1 - if(M.r_facial != O.r_facial || M.g_facial != O.g_facial || M.b_facial != O.b_facial) - return 1 - if(M.h_style != O.h_style || M.f_style != O.f_style) - return 1 - return 0 - -/obj/belly/proc/change_hair(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.r_hair = O.r_hair - M.g_hair = O.g_hair - M.b_hair = O.b_hair - M.r_facial = O.r_facial - M.g_facial = O.g_facial - M.b_facial = O.b_facial - M.h_style = O.h_style - M.f_style = O.f_style - M.update_hair() - if(message) - to_chat(M, "Your body tingles all over...") - to_chat(O, "You tingle as you make noticeable changes to your captive's body.") - -/obj/belly/proc/check_skin(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - return (M.r_skin != O.r_skin || M.g_skin != O.g_skin || M.b_skin != O.b_skin) - -/obj/belly/proc/change_skin(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.r_skin = O.r_skin - M.g_skin = O.g_skin - M.b_skin = O.b_skin - for(var/obj/item/organ/external/Z in M.organs) - Z.sync_colour_to_human(M) - M.update_icons_body() - if(message) - to_chat(M, "Your body tingles all over...") - to_chat(O, "You tingle as you make noticeable changes to your captive's body.") - -/obj/belly/proc/check_gender(var/mob/living/carbon/human/M, target_gender) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - if(!target_gender) - target_gender = O.gender - - return (M.gender != target_gender || M.identifying_gender != target_gender) - -/obj/belly/proc/change_gender(var/mob/living/carbon/human/M, target_gender, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - if(!target_gender) - target_gender = O.gender - - M.gender = target_gender - M.identifying_gender = target_gender - if(target_gender == FEMALE) - M.f_style = "Shaved" - M.dna.SetUIState(DNA_UI_GENDER,M.gender!=MALE,1) - M.sync_organ_dna() - M.update_icons_body() - if(message) - to_chat(M, "Your body feels very strange...") - to_chat(O, "You feel strange as you alter your captive's gender.") - -/obj/belly/proc/check_tail(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - if(M.tail_style != O.tail_style) - return 1 - if(M.r_tail != O.r_tail || M.g_tail != O.g_tail || M.b_tail != O.b_tail) - return 1 - return 0 - -/obj/belly/proc/change_tail(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.r_tail = O.r_tail - M.g_tail = O.g_tail - M.b_tail = O.b_tail - M.tail_style = O.tail_style - M.update_tail_showing() - if(message) - to_chat(M, "Your body tingles all over...") - to_chat(O, "You tingle as you make noticeable changes to your captive's body.") - -/obj/belly/proc/check_tail_nocolor(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - return (M.tail_style != O.tail_style) - -/obj/belly/proc/change_tail_nocolor(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.tail_style = O.tail_style - M.update_tail_showing() - if(message) - to_chat(M, "Your body tingles all over...") - to_chat(O, "You tingle as you make noticeable changes to your captive's body.") - -/obj/belly/proc/check_wing(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - if(M.wing_style != O.wing_style) - return 1 - if(M.r_wing != O.r_wing || M.g_wing != O.g_wing || M.b_wing != O.b_wing) - return 1 - return 0 - -/obj/belly/proc/change_wing(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.r_wing = O.r_wing - M.g_wing = O.g_wing - M.b_wing = O.b_wing - M.wing_style = O.wing_style - M.update_wing_showing() - if(message) - to_chat(M, "Your body tingles all over...") - to_chat(O, "You tingle as you make noticeable changes to your captive's body.") - -/obj/belly/proc/check_wing_nocolor(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - return (M.wing_style != O.wing_style) - -/obj/belly/proc/change_wing_nocolor(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.wing_style = O.wing_style - M.update_wing_showing() - if(message) - to_chat(M, "Your body tingles all over...") - to_chat(O, "You tingle as you make noticeable changes to your captive's body.") - -/obj/belly/proc/check_ears(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - return (M.ear_style != O.ear_style) - -/obj/belly/proc/change_ears(var/mob/living/carbon/human/M, message=0) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.ear_style = O.ear_style - M.update_hair() - -/obj/belly/proc/check_species(var/mob/living/carbon/human/M) - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return 0 - - if(M.species.name != O.species.name || M.custom_species != O.custom_species) - return 1 - return 0 - -/obj/belly/proc/change_species(var/mob/living/carbon/human/M, message=0, color_action = 0) //color_action: 0 for default species, 1 to preserve, 2 to transfer from pred - var/mob/living/carbon/human/O = owner - if(!istype(M) || !istype(O)) - return - - M.verbs -= M.species.inherent_verbs //Take away their unique stuff - - var/list/backup_implants = list() - for(var/obj/item/organ/I in M.organs) - for(var/obj/item/weapon/implant/backup/BI in I.contents) - backup_implants += BI - if(backup_implants.len) - for(var/obj/item/weapon/implant/backup/BI in backup_implants) - BI.forceMove(src) - if(color_action == 1) - M.set_species(O.species.name,0,1,M) - else if(color_action == 2) - M.species = O.species - else - M.set_species(O.species.name) - M.custom_species = O.custom_species - - M.update_icons_body() - M.update_tail_showing() - - if(backup_implants.len) - var/obj/item/organ/external/torso = M.get_organ(BP_TORSO) - for(var/obj/item/weapon/implant/backup/BI in backup_implants) - BI.forceMove(torso) - torso.implants += BI - - if(message) - to_chat(M, "You lose sensation of your body, feeling only the warmth of everything around you... ") - to_chat(O, "Your body shifts as you make dramatic changes to your captive's body.") - /obj/belly/proc/put_in_egg(var/atom/movable/M, message=0) var/mob/living/carbon/human/O = owner var/egg_path = /obj/structure/closet/secure_closet/egg diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 00b4ac3c87..5d2891df52 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -573,21 +573,10 @@ . = TRUE if("b_mode") var/list/menu_list = host.vore_selected.digest_modes.Copy() - if(istype(usr,/mob/living/carbon/human)) - menu_list += DM_TRANSFORM - var/new_mode = input("Choose Mode (currently [host.vore_selected.digest_mode])") as null|anything in menu_list if(!new_mode) return FALSE - if(new_mode == DM_TRANSFORM) //Snowflek submenu - var/list/tf_list = host.vore_selected.transform_modes - var/new_tf_mode = input("Choose TF Mode (currently [host.vore_selected.digest_mode])") as null|anything in tf_list - if(!new_tf_mode) - return FALSE - host.vore_selected.digest_mode = new_tf_mode - return - host.vore_selected.digest_mode = new_mode . = TRUE if("b_addons") From 364124c077ee8773f9afa8538577b80af43338b2 Mon Sep 17 00:00:00 2001 From: ShadowLarkens Date: Wed, 7 Oct 2020 03:00:34 -0700 Subject: [PATCH 02/53] Add vorestation sprites to appearance changer, add vore appearance changer to vore panel --- code/__defines/misc.dm | 13 +- .../tgui/modules/appearance_changer.dm | 263 ++++++++++++++++-- .../tgui/modules/appearance_changer_vr.dm | 45 +++ code/modules/vore/eating/vorepanel_vr.dm | 21 +- .../tgui/interfaces/AppearanceChanger.js | 157 ++++++++++- tgui/packages/tgui/interfaces/VorePanel.js | 24 -- tgui/packages/tgui/public/tgui.bundle.js | 2 +- vorestation.dme | 1 + 8 files changed, 463 insertions(+), 63 deletions(-) create mode 100644 code/modules/tgui/modules/appearance_changer_vr.dm diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 9469867e3b..2df590ada2 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -478,4 +478,15 @@ GLOBAL_LIST_INIT(all_volume_channels, list( VOLUME_CHANNEL_ALARMS, VOLUME_CHANNEL_VORE, VOLUME_CHANNEL_DOORS, -)) \ No newline at end of file +)) + +#define APPEARANCECHANGER_CHANGED_RACE "Race" +#define APPEARANCECHANGER_CHANGED_GENDER "Gender" +#define APPEARANCECHANGER_CHANGED_GENDER_ID "Gender Identity" +#define APPEARANCECHANGER_CHANGED_SKINTONE "Skin Tone" +#define APPEARANCECHANGER_CHANGED_SKINCOLOR "Skin Color" +#define APPEARANCECHANGER_CHANGED_HAIRSTYLE "Hair Style" +#define APPEARANCECHANGER_CHANGED_HAIRCOLOR "Hair Color" +#define APPEARANCECHANGER_CHANGED_F_HAIRSTYLE "Facial Hair Style" +#define APPEARANCECHANGER_CHANGED_F_HAIRCOLOR "Facial Hair Color" +#define APPEARANCECHANGER_CHANGED_EYES "Eye Color" diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 667fe7e0a0..ab75e1d67c 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -1,3 +1,4 @@ + /datum/tgui_module/appearance_changer name = "Appearance Editor" tgui_id = "AppearanceChanger" @@ -24,6 +25,10 @@ var/camera_diff_y = -1 var/camera_diff_z = -1 + var/list/valid_earstyles = list() + var/list/valid_tailstyles = list() + var/list/valid_wingstyles = list() + /datum/tgui_module/appearance_changer/New( var/host, mob/living/carbon/human/H, @@ -68,6 +73,7 @@ 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) @@ -84,22 +90,28 @@ if("race") if(can_change(APPEARANCE_RACE) && (params["race"] in valid_species)) if(target.change_species(params["race"])) - cut_and_generate_data() + cut_data() + generate_data(usr) + changed_hook(APPEARANCECHANGER_CHANGED_RACE) return 1 if("gender") if(can_change(APPEARANCE_GENDER) && (params["gender"] in get_genders())) if(target.change_gender(params["gender"])) - cut_and_generate_data() + cut_data() + generate_data(usr) + changed_hook(APPEARANCECHANGER_CHANGED_GENDER) return 1 if("gender_id") if(can_change(APPEARANCE_GENDER) && (params["gender_id"] in all_genders_define_list)) target.identifying_gender = params["gender_id"] + changed_hook(APPEARANCECHANGER_CHANGED_GENDER_ID) return 1 if("skin_tone") if(can_change_skin_tone()) var/new_s_tone = input(usr, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -target.s_tone + 35) as num|null if(isnum(new_s_tone) && can_still_topic(usr, 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) if("skin_color") if(can_change_skin_color()) @@ -110,11 +122,13 @@ var/b_skin = hex2num(copytext(new_skin, 6, 8)) if(target.change_skin_color(r_skin, g_skin, b_skin)) update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_SKINCOLOR) return 1 if("hair") if(can_change(APPEARANCE_HAIR) && (params["hair"] in valid_hairstyles)) if(target.change_hair(params["hair"])) update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) return 1 if("hair_color") if(can_change(APPEARANCE_HAIR_COLOR)) @@ -125,11 +139,13 @@ var/b_hair = hex2num(copytext(new_hair, 6, 8)) if(target.change_hair_color(r_hair, g_hair, b_hair)) update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) return 1 if("facial_hair") if(can_change(APPEARANCE_FACIAL_HAIR) && (params["facial_hair"] in valid_facial_hairstyles)) if(target.change_facial_hair(params["facial_hair"])) update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_F_HAIRSTYLE) return 1 if("facial_hair_color") if(can_change(APPEARANCE_FACIAL_HAIR_COLOR)) @@ -140,6 +156,7 @@ var/b_facial = hex2num(copytext(new_facial, 6, 8)) if(target.change_facial_hair_color(r_facial, g_facial, b_facial)) update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_F_HAIRCOLOR) return 1 if("eye_color") if(can_change(APPEARANCE_EYE_COLOR)) @@ -150,10 +167,115 @@ var/b_eyes = hex2num(copytext(new_eyes, 6, 8)) if(target.change_eye_color(r_eyes, g_eyes, b_eyes)) update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_EYES) return 1 + // VOREStation Add - Ears/Tails/Wings + if("ear") + if(can_change(APPEARANCE_ALL_HAIR)) + var/datum/sprite_accessory/ears/instance = locate(params["ref"]) + if(params["clear"]) + instance = null + if(!istype(instance) && !params["clear"]) + return FALSE + owner.ear_style = instance + owner.update_hair() + update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) + return TRUE + if("ears_color") + if(can_change(APPEARANCE_HAIR_COLOR)) + var/new_hair = input("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(usr, 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() + owner.update_hair() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) + return 1 + if("ears2_color") + if(can_change(APPEARANCE_HAIR_COLOR)) + var/new_hair = input("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(usr, 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() + owner.update_hair() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) + return 1 + if("tail") + if(can_change(APPEARANCE_ALL_HAIR)) + var/datum/sprite_accessory/tail/instance = locate(params["ref"]) + if(params["clear"]) + instance = null + if(!istype(instance) && !params["clear"]) + return FALSE + owner.tail_style = instance + owner.update_tail_showing() + update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) + return TRUE + if("tail_color") + if(can_change(APPEARANCE_HAIR_COLOR)) + var/new_hair = input("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(usr, 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() + owner.update_tail_showing() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) + return 1 + if("tail2_color") + if(can_change(APPEARANCE_HAIR_COLOR)) + var/new_hair = input("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(usr, 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() + owner.update_tail_showing() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) + return 1 + if("wing") + if(can_change(APPEARANCE_ALL_HAIR)) + var/datum/sprite_accessory/wing/instance = locate(params["ref"]) + if(params["clear"]) + instance = null + if(!istype(instance) && !params["clear"]) + return FALSE + owner.wing_style = instance + owner.update_wing_showing() + update_dna() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRSTYLE) + return TRUE + if("wing_color") + if(can_change(APPEARANCE_HAIR_COLOR)) + var/new_hair = input("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(usr, 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() + owner.update_wing_showing() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) + return 1 + if("wing2_color") + if(can_change(APPEARANCE_HAIR_COLOR)) + var/new_hair = input("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(usr, 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() + owner.update_wing_showing() + changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR) + return 1 + // 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 = GLOB.tgui_default_state) +/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(!ishuman(user)) @@ -177,10 +299,39 @@ if(custom_state) ui.set_state(custom_state) +/datum/tgui_module/appearance_changer/tgui_static_data(mob/user) + var/list/data = ..() + + generate_data(usr) + + if(can_change(APPEARANCE_RACE)) + var/species[0] + for(var/specimen in valid_species) + species[++species.len] = list("specimen" = specimen) + data["species"] = species + + if(can_change(APPEARANCE_HAIR)) + var/hair_styles[0] + for(var/hair_style in valid_hairstyles) + hair_styles[++hair_styles.len] = list("hairstyle" = hair_style) + data["hair_styles"] = hair_styles + // VOREStation Add - Ears/Tails/Wings + data["ear_styles"] = valid_earstyles + data["tail_styles"] = valid_tailstyles + data["wing_styles"] = valid_wingstyles + // VOREStation Add End + + if(can_change(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) + data["facial_hair_styles"] = facial_hair_styles + + return data + /datum/tgui_module/appearance_changer/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() - generate_data(check_whitelist, whitelist, blacklist) differential_check() var/mob/living/carbon/human/target = owner @@ -194,11 +345,6 @@ data["gender"] = target.gender data["gender_id"] = target.identifying_gender data["change_race"] = can_change(APPEARANCE_RACE) - if(data["change_race"]) - var/species[0] - for(var/specimen in valid_species) - species[++species.len] = list("specimen" = specimen) - data["species"] = species data["change_gender"] = can_change(APPEARANCE_GENDER) if(data["change_gender"]) @@ -213,30 +359,39 @@ data["change_hair"] = can_change(APPEARANCE_HAIR) if(data["change_hair"]) - var/hair_styles[0] - for(var/hair_style in valid_hairstyles) - hair_styles[++hair_styles.len] = list("hairstyle" = hair_style) - data["hair_styles"] = hair_styles data["hair_style"] = target.h_style + // VOREStation Add - Ears/Tails/Wings + data["ear_style"] = target.ear_style + data["tail_style"] = target.tail_style + data["wing_style"] = target.wing_style + // VOREStation Add End + data["change_facial_hair"] = can_change(APPEARANCE_FACIAL_HAIR) if(data["change_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) - data["facial_hair_styles"] = facial_hair_styles data["facial_hair_style"] = target.f_style data["change_skin_tone"] = can_change_skin_tone() data["change_skin_color"] = can_change_skin_color() if(data["change_skin_color"]) data["skin_color"] = rgb(target.r_skin, target.g_skin, target.b_skin) + data["change_eye_color"] = can_change(APPEARANCE_EYE_COLOR) if(data["change_eye_color"]) data["eye_color"] = rgb(target.r_eyes, target.g_eyes, target.b_eyes) + data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR) if(data["change_hair_color"]) data["hair_color"] = rgb(target.r_hair, target.g_hair, target.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["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) + // VOREStation Add End + data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR) if(data["change_facial_hair_color"]) data["facial_hair_color"] = rgb(target.r_facial, target.g_facial, target.b_facial) @@ -315,26 +470,67 @@ return target && (flags & APPEARANCE_SKIN) && target.species.appearance_flags & HAS_SKIN_COLOR -/datum/tgui_module/appearance_changer/proc/cut_and_generate_data() +/datum/tgui_module/appearance_changer/proc/cut_data() // Making the assumption that the available species remain constant + valid_hairstyles.Cut() valid_facial_hairstyles.Cut() - valid_facial_hairstyles.Cut() - generate_data() + // VOREStation Add - Ears/Tails/Wings + valid_earstyles.Cut() + valid_tailstyles.Cut() + valid_wingstyles.Cut() + // VOREStation Add End -/datum/tgui_module/appearance_changer/proc/generate_data() +/datum/tgui_module/appearance_changer/proc/generate_data(mob/user) var/mob/living/carbon/human/target = owner if(customize_usr) - if(!ishuman(usr)) + if(!ishuman(user)) return TRUE - target = usr + target = user if(!target) return - if(!valid_species.len) + + if(!LAZYLEN(valid_species)) valid_species = target.generate_valid_species(check_whitelist, whitelist, blacklist) - if(!valid_hairstyles.len || !valid_facial_hairstyles.len) + + if(!LAZYLEN(valid_hairstyles) || !LAZYLEN(valid_facial_hairstyles)) valid_hairstyles = target.generate_valid_hairstyles(check_gender = 0) valid_facial_hairstyles = target.generate_valid_facial_hairstyles() + // VOREStation Add - Ears/Tails/Wings + if(!LAZYLEN(valid_earstyles)) + for(var/path in ear_styles_list) + var/datum/sprite_accessory/ears/instance = ear_styles_list[path] + if(can_use_sprite(instance, target, user)) + valid_earstyles.Add(list(list( + "name" = instance.name, + "instance" = REF(instance), + "color" = !!instance.do_colouration, + "second_color" = !!instance.extra_overlay, + ))) + + if(!LAZYLEN(valid_tailstyles)) + for(var/path in tail_styles_list) + var/datum/sprite_accessory/tail/instance = tail_styles_list[path] + if(can_use_sprite(instance, target, user)) + valid_tailstyles.Add(list(list( + "name" = instance.name, + "instance" = REF(instance), + "color" = !!instance.do_colouration, + "second_color" = !!instance.extra_overlay, + ))) + + if(!LAZYLEN(valid_wingstyles)) + for(var/path in wing_styles_list) + var/datum/sprite_accessory/wing/instance = wing_styles_list[path] + if(can_use_sprite(instance, target, user)) + valid_wingstyles.Add(list(list( + "name" = instance.name, + "instance" = REF(instance), + "color" = !!instance.do_colouration, + "second_color" = !!instance.extra_overlay, + ))) + // VOREStation Add End + /datum/tgui_module/appearance_changer/proc/get_genders() var/mob/living/carbon/human/target = owner if(customize_usr) @@ -349,10 +545,25 @@ possible_genders |= NEUTER return possible_genders +// Used for subtypes to handle messaging or whatever. +/datum/tgui_module/appearance_changer/proc/changed_hook(flag) + return + +// 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.apply_restrictions && !(target.species.name in X.species_allowed)) + return FALSE + + if(LAZYLEN(X.ckeys_allowed) && !(user?.ckey in X.ckeys_allowed) && !(target.ckey in X.ckeys_allowed)) + return FALSE + + return TRUE +// VOREStation Add End + /datum/tgui_module/appearance_changer/mirror name = "SalonPro Nano-Mirror™" flags = APPEARANCE_ALL_HAIR customize_usr = TRUE /datum/tgui_module/appearance_changer/mirror/coskit - name = "SalonPro Porta-Makeover Deluxe™" \ No newline at end of file + name = "SalonPro Porta-Makeover Deluxe™" diff --git a/code/modules/tgui/modules/appearance_changer_vr.dm b/code/modules/tgui/modules/appearance_changer_vr.dm new file mode 100644 index 0000000000..93ee4cfdf2 --- /dev/null +++ b/code/modules/tgui/modules/appearance_changer_vr.dm @@ -0,0 +1,45 @@ +/datum/tgui_module/appearance_changer/vore + name = "Appearance Editor (Vore)" + flags = APPEARANCE_ALL + +/datum/tgui_module/appearance_changer/vore/tgui_state(mob/user) + return GLOB.tgui_conscious_state + +/datum/tgui_module/appearance_changer/vore/tgui_status(mob/user, datum/tgui_state/state) + if(!isbelly(owner.loc)) + return STATUS_CLOSE + return ..() + +/datum/tgui_module/appearance_changer/vore/reload_cameraview() + cam_screen.vis_contents = list(owner) + cam_background.icon_state = "clear" + cam_background.fill_rect(1, 1, 1, 1) + local_skybox.cut_overlays() + +/datum/tgui_module/appearance_changer/vore/tgui_close(mob/user) + . = ..() + QDEL_IN(src, 1) + +/datum/tgui_module/appearance_changer/vore/changed_hook(flag) + var/mob/living/carbon/human/M = owner + var/mob/living/O = usr + + switch(flag) + if(APPEARANCECHANGER_CHANGED_RACE) + to_chat(M, "You lose sensation of your body, feeling only the warmth of everything around you... ") + to_chat(O, "Your body shifts as you make dramatic changes to your captive's body.") + if(APPEARANCECHANGER_CHANGED_GENDER) + to_chat(M, "Your body feels very strange...") + to_chat(O, "You feel strange as you alter your captive's gender.") + if(APPEARANCECHANGER_CHANGED_GENDER_ID) + to_chat(M, "You start to feel... [capitalize(M.gender)]?") + to_chat(O, "You feel strange as you alter your captive's gender identity.") + if(APPEARANCECHANGER_CHANGED_SKINTONE, APPEARANCECHANGER_CHANGED_SKINCOLOR) + to_chat(M, "Your body tingles all over...") + to_chat(O, "You tingle as you make noticeable changes to your captive's body.") + if(APPEARANCECHANGER_CHANGED_HAIRSTYLE, APPEARANCECHANGER_CHANGED_HAIRCOLOR, APPEARANCECHANGER_CHANGED_F_HAIRSTYLE, APPEARANCECHANGER_CHANGED_F_HAIRCOLOR) + to_chat(M, "Your body tingles all over...") + to_chat(O, "You tingle as you make noticeable changes to your captive's body.") + if(APPEARANCECHANGER_CHANGED_EYES) + to_chat(M, "You feel lightheaded and drowsy...") + to_chat(O, "You feel warm as you make subtle changes to your captive's body.") \ No newline at end of file diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 5d2891df52..f654009726 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -509,8 +509,10 @@ var/atom/movable/target = locate(params["pick"]) if(!(target in host.vore_selected)) return TRUE // Not in our X anymore, update UI - intent = "Examine" - intent = alert("Examine, Eject, Move? Examine if you want to leave this box.","Query","Examine","Eject","Move") + var/list/available_options = list("Examine", "Eject", "Move") + if(ishuman(target)) + available_options += "Transform" + intent = input(user, "What would you like to do with [target]?", "Vore Pick", "Examine") as null|anything in available_options switch(intent) if("Examine") var/list/results = target.examine(host) @@ -525,6 +527,7 @@ return TRUE host.vore_selected.release_specific_contents(target) + return TRUE if("Move") if(host.stat) @@ -537,6 +540,20 @@ to_chat(target,"You're squished from [host]'s [lowertext(host.vore_selected.name)] to their [lowertext(choice.name)]!") host.vore_selected.transfer_contents(target, choice) + return TRUE + + if("Transform") + if(host.stat) + to_chat(user,"You can't do that in your state!") + return TRUE + + var/mob/living/carbon/human/H = target + if(!istype(H)) + return + + var/datum/tgui_module/appearance_changer/vore/V = new(host, H) + V.tgui_interact(user) + return TRUE /datum/vore_look/proc/set_attr(mob/user, params) if(!host.vore_selected) diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger.js b/tgui/packages/tgui/interfaces/AppearanceChanger.js index ca2d7b4952..647e6f66ff 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger.js +++ b/tgui/packages/tgui/interfaces/AppearanceChanger.js @@ -15,6 +15,9 @@ export const AppearanceChanger = (props, context) => { gender_id, hair_style, facial_hair_style, + ear_style, + tail_style, + wing_style, change_race, change_gender, change_eye_color, @@ -77,6 +80,15 @@ export const AppearanceChanger = (props, context) => { {facial_hair_style ? capitalize(facial_hair_style) : "Not Set"} + + {ear_style ? capitalize(ear_style) : "Not Set"} + + + {tail_style ? capitalize(tail_style) : "Not Set"} + + + {wing_style ? capitalize(wing_style) : "Not Set"} + @@ -115,11 +127,28 @@ export const AppearanceChanger = (props, context) => { ) : null} {change_hair ? ( - setTabIndex(3)}> - Hair - + + setTabIndex(3)}> + Hair + + setTabIndex(5)}> + Ear + + setTabIndex(6)}> + Tail + + setTabIndex(7)}> + Wing + + ) : null} {change_facial_hair ? ( { {(change_color && tabIndex === 2) ? : null} {(change_hair && tabIndex === 3) ? : null} {(change_facial_hair && tabIndex === 4) ? : null} + {(change_hair && tabIndex === 5) ? : null} + {(change_hair && tabIndex === 6) ? : null} + {(change_hair && tabIndex === 7) ? : null} @@ -212,6 +244,12 @@ const AppearanceChangerColors = (props, context) => { skin_color, hair_color, facial_hair_color, + ears_color, + ears2_color, + tail_color, + tail2_color, + wing_color, + wing2_color, } = data; return ( @@ -234,10 +272,36 @@ const AppearanceChangerColors = (props, context) => { ) : null} {change_hair_color ? ( - - -