diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 40db286226..1585576e55 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -457,3 +457,6 @@ #define VISIBLE_GENDER_FORCE_PLURAL 1 // Used by get_visible_gender to return PLURAL #define VISIBLE_GENDER_FORCE_IDENTIFYING 2 // Used by get_visible_gender to return the mob's identifying gender #define VISIBLE_GENDER_FORCE_BIOLOGICAL 3 // Used by get_visible_gender to return the mob's biological gender + +// Default name for accesories +#define DEVELOPER_WARNING_NAME "you should not see this..." diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm index 0fd6e7862a..471905484f 100644 --- a/code/game/machinery/air_alarm.dm +++ b/code/game/machinery/air_alarm.dm @@ -813,7 +813,7 @@ apply_danger_level(0) update_icon() -/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob) +/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user) add_fingerprint(user) if(alarm_deconstruction_screwdriver(user, W)) return @@ -821,10 +821,10 @@ return if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card - togglelock() + togglelock(user) return ..() -/obj/machinery/alarm/verb/togglelock(mob/user as mob) +/obj/machinery/alarm/proc/togglelock(mob/user) if(stat & (NOPOWER|BROKEN)) to_chat(user, "It does nothing.") return @@ -836,9 +836,9 @@ to_chat(user, span_warning("Access denied.")) return -/obj/machinery/alarm/AltClick() +/obj/machinery/alarm/AltClick(mob/user) ..() - togglelock() + togglelock(user) /obj/machinery/alarm/power_change() ..() diff --git a/code/game/objects/items/devices/personal_shield_generator_vr.dm b/code/game/objects/items/devices/personal_shield_generator_vr.dm index 1bb0e01042..c9bd593405 100644 --- a/code/game/objects/items/devices/personal_shield_generator_vr.dm +++ b/code/game/objects/items/devices/personal_shield_generator_vr.dm @@ -542,7 +542,7 @@ //Misc belts. Admin-spawn only atm. /obj/item/personal_shield_generator/belt/adminbus - desc = "You should not see this. You REALLY should not see this. If you do, you have either been blessed or are about to be the target of some sick prank." + desc = DEVELOPER_WARNING_NAME + " You REALLY should not see this. If you do, you have either been blessed or are about to be the target of some sick prank." modifier_type = /datum/modifier/shield_projection/admin generator_hit_cost = 0 generator_active_cost = 0 diff --git a/code/game/objects/items/falling_object_vr.dm b/code/game/objects/items/falling_object_vr.dm index fdc140b6b4..c8583db3c6 100644 --- a/code/game/objects/items/falling_object_vr.dm +++ b/code/game/objects/items/falling_object_vr.dm @@ -1,5 +1,5 @@ /obj/effect/falling_effect - name = "you should not see this" + name = DEVELOPER_WARNING_NAME desc = "no data" invisibility = 101 anchored = TRUE diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index d12fd1a65f..8336d0f373 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -26,6 +26,14 @@ toggle() ..() +/obj/structure/curtain/attack_ai(mob/user) + if(!Adjacent(user)) + return + if(!isrobot((user))) + return + playsound(src, "rustle", 15, 1, -5) + toggle() + /obj/structure/curtain/proc/toggle() set_opacity(!opacity) if(opacity) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index d3caa34c3e..447f02eeeb 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -11,7 +11,7 @@ var/glass = 1 var/datum/tgui_module/appearance_changer/mirror/M -/obj/structure/mirror/Initialize(mapload, var/dir, var/building = 0, mob/user as mob) +/obj/structure/mirror/Initialize(mapload, var/dir, var/building = 0) M = new(src, null) if(building) glass = 0 @@ -24,12 +24,18 @@ QDEL_NULL(M) . = ..() -/obj/structure/mirror/attack_hand(mob/user as mob) +/obj/structure/mirror/attack_hand(mob/user) if(!glass) return if(shattered) return - if(ishuman(user)) - M.tgui_interact(user) + M.tgui_interact(user) + +/obj/structure/mirror/attack_ai(mob/user) + if(!glass) return + if(shattered) return + if(!Adjacent(user)) return + + M.tgui_interact(user) /obj/structure/mirror/proc/shatter() if(!glass) return diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index f34a959b3e..f90fc29a2c 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -92,6 +92,13 @@ toggle_open(user) return 0 +/turf/simulated/wall/attack_ai(var/mob/user) + if(!Adjacent(user)) + return + if(!isrobot((user))) + return + var/rotting = (locate(/obj/effect/overlay/wallrot) in src) + try_touch(user, rotting) /turf/simulated/wall/attack_hand(var/mob/user) diff --git a/code/modules/env_message/env_message.dm b/code/modules/env_message/env_message.dm index ac1a65600d..256b877492 100644 --- a/code/modules/env_message/env_message.dm +++ b/code/modules/env_message/env_message.dm @@ -8,7 +8,7 @@ var/global/list/env_messages = list() mouse_opacity = TRUE anchored = TRUE var/list/message_list = list() - var/combined_message = "You should not see this" + var/combined_message = DEVELOPER_WARNING_NAME /obj/effect/env_message/Initialize(mapload) .=..() diff --git a/code/modules/mob/new_player/sprite_accessories_ear.dm b/code/modules/mob/new_player/sprite_accessories_ear.dm index 75003300b6..9b44707f4f 100644 --- a/code/modules/mob/new_player/sprite_accessories_ear.dm +++ b/code/modules/mob/new_player/sprite_accessories_ear.dm @@ -6,14 +6,14 @@ //////////////////////////// */ /datum/sprite_accessory/ears - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/human_races/sprite_accessories/ears.dmi' do_colouration = 0 // Set to 1 to blend (ICON_ADD) hair color color_blend_mode = ICON_ADD // Only appliciable if do_coloration = 1 var/extra_overlay // Icon state of an additional overlay to blend in. var/extra_overlay2 - var/desc = "You should not see this..." + var/desc = DEVELOPER_WARNING_NAME em_block = TRUE //species_allowed = list(SPECIES_EVENT1, SPECIES_EVENT2, SPECIES_EVENT3) //Removing Polaris whitelits, ones we need are defined in our files diff --git a/code/modules/mob/new_player/sprite_accessories_ear_vr.dm b/code/modules/mob/new_player/sprite_accessories_ear_vr.dm index 72ac824ee2..638688330d 100644 --- a/code/modules/mob/new_player/sprite_accessories_ear_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_ear_vr.dm @@ -6,7 +6,7 @@ //////////////////////////// */ /datum/sprite_accessory/ears - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/ears_vr.dmi' do_colouration = 0 // Set to 1 to blend (ICON_ADD) hair color species_allowed = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_TESHARI, SPECIES_NEVREAN, SPECIES_AKULA, SPECIES_SERGAL, SPECIES_FENNEC, SPECIES_ZORREN_HIGH, SPECIES_VULPKANIN, SPECIES_XENOCHIMERA, SPECIES_XENOHYBRID, SPECIES_VASILISSAN, SPECIES_RAPALA, SPECIES_PROTEAN, SPECIES_ALRAUNE, SPECIES_WEREBEAST, SPECIES_SHADEKIN, SPECIES_SHADEKIN_CREW, SPECIES_ALTEVIAN, SPECIES_LLEILL, SPECIES_HANNER) //This lets all races use diff --git a/code/modules/mob/new_player/sprite_accessories_tail.dm b/code/modules/mob/new_player/sprite_accessories_tail.dm index 6d088418d5..26a7e3486b 100644 --- a/code/modules/mob/new_player/sprite_accessories_tail.dm +++ b/code/modules/mob/new_player/sprite_accessories_tail.dm @@ -6,7 +6,7 @@ //////////////////////////// */ /datum/sprite_accessory/tail - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/human_races/sprite_accessories/tails.dmi' do_colouration = 0 //Set to 1 to enable coloration using the tail color. @@ -16,7 +16,7 @@ var/extra_overlay2 //Tertiary. var/show_species_tail = 0 // If false, do not render species' tail. var/clothing_can_hide = 1 // If true, clothing with HIDETAIL hides it - var/desc = "You should not see this..." + var/desc = DEVELOPER_WARNING_NAME var/ani_state // State when wagging/animated var/extra_overlay_w // Wagging state for extra overlay var/extra_overlay2_w // Tertiary wagging. diff --git a/code/modules/mob/new_player/sprite_accessories_tail_vr.dm b/code/modules/mob/new_player/sprite_accessories_tail_vr.dm index b6e8357b2f..13c45649f0 100644 --- a/code/modules/mob/new_player/sprite_accessories_tail_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_tail_vr.dm @@ -6,7 +6,7 @@ //////////////////////////// */ /datum/sprite_accessory/tail - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/tails_vr.dmi' var/offset_x = 0 var/offset_y = 0 @@ -1449,7 +1449,7 @@ //LONG TAILS ARE NOT TAUR BUTTS >:O /datum/sprite_accessory/tail/longtail - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/taurs_vr.dmi' offset_x = -16 do_colouration = 1 // Yes color, using tail color diff --git a/code/modules/mob/new_player/sprite_accessories_taur.dm b/code/modules/mob/new_player/sprite_accessories_taur.dm index aa6cfe7ebf..1c34bf29ae 100644 --- a/code/modules/mob/new_player/sprite_accessories_taur.dm +++ b/code/modules/mob/new_player/sprite_accessories_taur.dm @@ -128,7 +128,7 @@ // Taur sprites are now a subtype of tail since they are mutually exclusive anyway. /datum/sprite_accessory/tail/taur - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/human_races/sprite_accessories/taurs.dmi' do_colouration = 1 // Yes color, using tail color color_blend_mode = ICON_MULTIPLY // The sprites for taurs are designed for ICON_MULTIPLY diff --git a/code/modules/mob/new_player/sprite_accessories_taur_vr.dm b/code/modules/mob/new_player/sprite_accessories_taur_vr.dm index aa8ef2f83d..b8ace28774 100644 --- a/code/modules/mob/new_player/sprite_accessories_taur_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_taur_vr.dm @@ -9,7 +9,7 @@ // Taur sprites are now a subtype of tail since they are mutually exclusive anyway. /datum/sprite_accessory/tail/taur - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/taurs_vr.dmi' do_colouration = 1 // Yes color, using tail color color_blend_mode = ICON_MULTIPLY // The sprites for taurs are designed for ICON_MULTIPLY diff --git a/code/modules/mob/new_player/sprite_accessories_vr.dm b/code/modules/mob/new_player/sprite_accessories_vr.dm index add504167c..4b27e23765 100644 --- a/code/modules/mob/new_player/sprite_accessories_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_vr.dm @@ -576,13 +576,13 @@ // No, this isn't a character creation option, but... I guess in the future it could be, if anyone wants that? /datum/sprite_accessory/hair_accessory - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/hair_accessories_vr.dmi' do_colouration = 0 // Set to 1 to blend (ICON_ADD) hair color var/ignores_lighting = 0 // Whether or not this hair accessory will ignore lighting and glow in the dark. color_blend_mode = ICON_ADD // Only appliciable if do_coloration = 1 - var/desc = "You should not see this..." + var/desc = DEVELOPER_WARNING_NAME /* //Chomp REMOVE - No ckeys_allowed allowed /datum/sprite_accessory/hair_accessory/verie_hair_glow name = "veries hair glow" diff --git a/code/modules/mob/new_player/sprite_accessories_wing.dm b/code/modules/mob/new_player/sprite_accessories_wing.dm index b13bb8fbde..3d42ff5f9a 100644 --- a/code/modules/mob/new_player/sprite_accessories_wing.dm +++ b/code/modules/mob/new_player/sprite_accessories_wing.dm @@ -6,7 +6,7 @@ //////////////////////////// */ /datum/sprite_accessory/wing - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/human_races/sprite_accessories/wings.dmi' do_colouration = 0 //Set to 1 to enable coloration using the tail color. @@ -16,7 +16,7 @@ var/extra_overlay2 //Tertiary. var/clothing_can_hide = 1 // If true, clothing with HIDETAIL hides it. If the clothing is bulky enough to hide a tail, it should also hide wings. // var/show_species_tail = 1 // Just so // TODO - Seems not needed ~Leshana - var/desc = "You should not see this..." + var/desc = DEVELOPER_WARNING_NAME var/ani_state // State when flapping/animated var/extra_overlay_w // Flapping state for extra overlay var/extra_overlay2_w diff --git a/code/modules/mob/new_player/sprite_accessories_wing_large_vr.dm b/code/modules/mob/new_player/sprite_accessories_wing_large_vr.dm index e516d6b085..66263ad850 100644 --- a/code/modules/mob/new_player/sprite_accessories_wing_large_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_wing_large_vr.dm @@ -2,7 +2,7 @@ /datum/sprite_accessory/wing/large - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/wings96_vr.dmi' wing_offset = 32 diff --git a/code/modules/mob/new_player/sprite_accessories_wing_vr.dm b/code/modules/mob/new_player/sprite_accessories_wing_vr.dm index 24ffea527c..4e0de81f78 100644 --- a/code/modules/mob/new_player/sprite_accessories_wing_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_wing_vr.dm @@ -6,7 +6,7 @@ //////////////////////////// */ /datum/sprite_accessory/wing - name = "You should not see this..." + name = DEVELOPER_WARNING_NAME icon = 'icons/mob/vore/wings_vr.dmi' do_colouration = 0 //Set to 1 to enable coloration using the tail color. species_allowed = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_TESHARI, SPECIES_NEVREAN, SPECIES_AKULA, SPECIES_SERGAL, SPECIES_FENNEC, SPECIES_ZORREN_HIGH, SPECIES_VULPKANIN, SPECIES_XENOCHIMERA, SPECIES_XENOHYBRID, SPECIES_VASILISSAN, SPECIES_RAPALA, SPECIES_PROTEAN, SPECIES_ALRAUNE, SPECIES_WEREBEAST, SPECIES_SHADEKIN, SPECIES_SHADEKIN_CREW, SPECIES_ALTEVIAN, SPECIES_LLEILL, SPECIES_HANNER) //This lets all races use diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index c54878e792..3f6d70f431 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -684,7 +684,8 @@ GLOBAL_LIST_EMPTY(apcs) to_chat(user, span_notice("The [name] looks too sturdy to bash open with \the [W.name].")) // attack with hand - remove cell (if cover open) or interact with the APC -/obj/machinery/power/apc/verb/togglelock(mob/user as mob) + +/obj/machinery/power/apc/proc/togglelock(mob/user) if(emagged) to_chat(user, "The panel is unresponsive.") else if(opened) @@ -872,7 +873,7 @@ GLOBAL_LIST_EMPTY(apcs) // to_world("[area.power_equip]") area.power_change() -/obj/machinery/power/apc/proc/can_use(mob/user as mob, var/loud = 0) //used by attack_hand() and Topic() +/obj/machinery/power/apc/proc/can_use(mob/user, var/loud = 0) //used by attack_hand() and Topic() if(!user.client) return 0 if(isobserver(user) && is_admin(user)) //This is to allow nanoUI interaction by ghost admins. diff --git a/code/modules/research/prosfab_designs.dm b/code/modules/research/prosfab_designs.dm index 03a9dd60c6..d8b16d7038 100644 --- a/code/modules/research/prosfab_designs.dm +++ b/code/modules/research/prosfab_designs.dm @@ -83,6 +83,7 @@ H.b_skin = 255 // CHOMP Edit H.dna.ResetUIFrom(H) + H.allow_spontaneous_tf = TRUE // Allows vore customization of synthmorphs H.real_name = "Synthmorph #[rand(100,999)]" H.name = H.real_name H.dir = 2 diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 3a07f583e4..3ffd787f42 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -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/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() - UnregisterSignal(owner, COMSIG_OBSERVER_MOVED) - last_camera_turf = null 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)) - return TRUE - target = user - if(!target) - return +/datum/tgui_module/appearance_changer/proc/generate_data(mob/user, mob/living/carbon/human/target) + if(!ishuman(target)) + return TRUE 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 diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 3fcd894ac8..8048788518 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -1457,6 +1457,9 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", if(!istype(H)) return + if(!H.allow_spontaneous_tf) + return + var/datum/tgui_module/appearance_changer/vore/V = new(host, H) V.tgui_interact(user) return TRUE diff --git a/tgui/packages/common/string.ts b/tgui/packages/common/string.ts index d6f328750c..29dee190f0 100644 --- a/tgui/packages/common/string.ts +++ b/tgui/packages/common/string.ts @@ -130,7 +130,7 @@ export function toTitleCase(str: string): string { return currentStr; } -const TRANSLATE_REGEX = /&(nbsp|amp|quot|lt|gt|apos);/g; +const TRANSLATE_REGEX = /&(nbsp|amp|quot|lt|gt|apos|trade);/g; const TRANSLATIONS = { amp: '&', apos: "'", @@ -138,6 +138,7 @@ const TRANSLATIONS = { lt: '<', nbsp: ' ', quot: '"', + trade: '™', } as const; /** diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx index e9e3472a18..8785a46960 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx @@ -19,8 +19,11 @@ export const AppearanceChangerColors = (props) => { ears2_color, tail_color, tail2_color, + tail3_color, wing_color, wing2_color, + wing3_color, + ear_secondary_colors, } = data; return ( @@ -67,13 +70,17 @@ export const AppearanceChangerColors = (props) => { {data.ear_secondary_colors.map((color, index) => ( - + + + + ))} @@ -85,6 +92,12 @@ export const AppearanceChangerColors = (props) => { Change Secondary Tail Color + + + + @@ -95,6 +108,12 @@ export const AppearanceChangerColors = (props) => { Change Secondary Wing Color + + + + ) : null} {change_facial_hair_color ? ( diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/types.ts b/tgui/packages/tgui/interfaces/AppearanceChanger/types.ts index aae93386f1..2140148772 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/types.ts +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/types.ts @@ -42,8 +42,10 @@ export type Data = { ears2_color: string; tail_color: string; tail2_color: string; + tail3_color: string; wing_color: string; wing2_color: string; + wing3_color: string; facial_hair_styles: { facialhairstyle: string }[]; hair_styles: { hairstyle: string }[]; ear_secondary_style: string;