From 54b5ad114dbc58fb5272a1f2ccacd23b7d5c23fc Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 19:20:01 +0100
Subject: [PATCH 01/19] user might not equal target
---
.../tgui/modules/appearance_changer.dm | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 3a07f583e4f..33d64697f0e 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -117,14 +117,14 @@
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)
+ var/new_s_tone = tgui_input_number(ui.user, "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))
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(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
+ var/new_skin = input(ui.user, "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))
var/r_skin = hex2num(copytext(new_skin, 2, 4))
var/g_skin = hex2num(copytext(new_skin, 4, 6))
@@ -141,7 +141,7 @@
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
+ var/new_hair = input(ui.user, "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))
var/r_hair = hex2num(copytext(new_hair, 2, 4))
var/g_hair = hex2num(copytext(new_hair, 4, 6))
@@ -158,7 +158,7 @@
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
+ var/new_facial = input(ui.user, "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))
var/r_facial = hex2num(copytext(new_facial, 2, 4))
var/g_facial = hex2num(copytext(new_facial, 4, 6))
@@ -169,7 +169,7 @@
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
+ var/new_eyes = input(ui.user, "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))
var/r_eyes = hex2num(copytext(new_eyes, 2, 4))
var/g_eyes = hex2num(copytext(new_eyes, 4, 6))
@@ -209,7 +209,7 @@
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
+ var/new_hair = input(ui.user, "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))
@@ -220,7 +220,7 @@
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
+ var/new_hair = input(ui.user, "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))
@@ -235,7 +235,7 @@
if(channel > length(target.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
+ var/new_color = input(ui.user, "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)
@@ -256,7 +256,7 @@
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
+ var/new_hair = input(ui.user, "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))
@@ -267,7 +267,7 @@
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
+ var/new_hair = input(ui.user, "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))
@@ -290,7 +290,7 @@
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
+ var/new_hair = input(ui.user, "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))
@@ -301,7 +301,7 @@
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
+ var/new_hair = input(ui.user, "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))
@@ -323,7 +323,7 @@
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)
+ var/new_marking = tgui_input_list(ui.user, "Choose a body marking:", "New Body Marking", usable_markings)
if(new_marking && can_still_topic(target, state))
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[new_marking]
if (target.add_marking(mark_datum))
@@ -339,7 +339,7 @@
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
+ var/marking_color = input(ui.user, "Please select marking color", "Marking color", current) as color|null
if(marking_color && can_still_topic(target, state))
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[name_marking]
if (target.change_marking_color(mark_datum, marking_color))
From 989f05b66808adb0b3037abcd519bdb2b104c210 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 19:28:06 +0100
Subject: [PATCH 02/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 33d64697f0e..21153bcf97f 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -97,7 +97,7 @@
if(can_change(target, APPEARANCE_RACE) && (params["race"] in valid_species))
if(target.change_species(params["race"]))
if(params["race"] == "Custom Species")
- target.custom_species = sanitize(tgui_input_text(target, "Input custom species name:",
+ target.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)
From f954089123809a14ce7486e9adb1692a7bbc4326 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 20:46:30 +0100
Subject: [PATCH 03/19] Update appearance_changer.dm
---
code/modules/tgui/modules/appearance_changer.dm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 21153bcf97f..6d8e90e4881 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -376,13 +376,13 @@
generate_data(user)
- 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 +393,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)
From 4f5a1acd94ce453a8db7627515cda96bd1d99f74 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 22:21:26 +0100
Subject: [PATCH 04/19] rework this
---
.../tgui/modules/appearance_changer.dm | 426 +++++++++---------
.../AppearanceChangerDetails.tsx | 14 +
.../interfaces/AppearanceChanger/types.ts | 2 +
3 files changed, 224 insertions(+), 218 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 6d8e90e4881..49276d2c7c0 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -60,21 +60,16 @@
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()
+ . = ..()
+ owner = null
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
+
+/datum/tgui_module/appearance_changer/Destroy()
last_camera_turf = null
qdel(cam_screen)
QDEL_LIST(cam_plane_masters)
@@ -86,280 +81,298 @@
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(ui.user, "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(ui.user, "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(ui.user, "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(ui.user, 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(ui.user, "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(ui.user, "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(ui.user, "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(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(ui.user, "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(ui.user, "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/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(target, state))
- target.ear_secondary_colors[channel] = new_color
- update_dna(target)
- target.update_hair()
+ 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(ui.user, "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(ui.user, "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(ui.user, "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(ui.user, "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(ui.user, "Choose a body marking:", "New Body Marking", usable_markings)
- if(new_marking && can_still_topic(target, state))
+ 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(ui.user, "Please select marking color", "Marking color", current) as color|null
- if(marking_color && can_still_topic(target, state))
+ 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(!ishuman(user))
return TRUE
- target = user
+ if(owner && owner != user)
+ close_ui()
+ 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,11 +383,12 @@
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(owner, APPEARANCE_RACE))
var/species[0]
@@ -404,24 +418,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 +437,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 +522,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 +545,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 +591,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
diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx
index e9e3472a18b..ba2730f0bb8 100644
--- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx
+++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx
@@ -19,8 +19,10 @@ export const AppearanceChangerColors = (props) => {
ears2_color,
tail_color,
tail2_color,
+ tail3_color,
wing_color,
wing2_color,
+ wing3_color,
} = data;
return (
@@ -85,6 +87,12 @@ export const AppearanceChangerColors = (props) => {
Change Secondary Tail Color
+
+
+
+
@@ -95,6 +103,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 aae93386f16..21401487721 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;
From b185147bbd02e834d558bb3c7c9bb4837042558c Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 22:23:38 +0100
Subject: [PATCH 05/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 49276d2c7c0..03af983836c 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -66,8 +66,8 @@
/datum/tgui_module/appearance_changer/tgui_close()
. = ..()
- owner = null
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
+ owner = null
/datum/tgui_module/appearance_changer/Destroy()
last_camera_turf = null
From 3fcc2285adb652181fcd4650392001a8b839e451 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 22:27:18 +0100
Subject: [PATCH 06/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 03af983836c..5cf8a74b836 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -616,9 +616,9 @@
// VOREStation Add End
/datum/tgui_module/appearance_changer/mirror
- name = "SalonPro Nano-Mirror™"
+ name = "SalonPro Nano-Mirror&trade"
flags = APPEARANCE_ALL_HAIR
customize_usr = TRUE
/datum/tgui_module/appearance_changer/mirror/coskit
- name = "SalonPro Porta-Makeover Deluxe™"
+ name = "SalonPro Porta-Makeover Deluxe&trade"
From ed1019c70a4fe49cfaed9c18270cfbf9116e6c9f Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 22:33:51 +0100
Subject: [PATCH 07/19] fix trademark sign
---
code/modules/tgui/modules/appearance_changer.dm | 4 ++--
tgui/packages/common/string.ts | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 5cf8a74b836..03af983836c 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -616,9 +616,9 @@
// VOREStation Add End
/datum/tgui_module/appearance_changer/mirror
- name = "SalonPro Nano-Mirror&trade"
+ name = "SalonPro Nano-Mirror™"
flags = APPEARANCE_ALL_HAIR
customize_usr = TRUE
/datum/tgui_module/appearance_changer/mirror/coskit
- name = "SalonPro Porta-Makeover Deluxe&trade"
+ name = "SalonPro Porta-Makeover Deluxe™"
diff --git a/tgui/packages/common/string.ts b/tgui/packages/common/string.ts
index d6f328750c4..29dee190f03 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;
/**
From 90c2d09e8e49e4790c62aaa4f10a277896837136 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 2 Dec 2024 23:22:21 +0100
Subject: [PATCH 08/19] also fix that
---
code/__defines/mobs.dm | 3 +++
.../objects/items/devices/personal_shield_generator_vr.dm | 2 +-
code/game/objects/items/falling_object_vr.dm | 2 +-
code/modules/env_message/env_message.dm | 2 +-
code/modules/mob/new_player/sprite_accessories_ear.dm | 4 ++--
code/modules/mob/new_player/sprite_accessories_ear_vr.dm | 2 +-
code/modules/mob/new_player/sprite_accessories_tail.dm | 4 ++--
code/modules/mob/new_player/sprite_accessories_tail_vr.dm | 4 ++--
code/modules/mob/new_player/sprite_accessories_taur.dm | 2 +-
code/modules/mob/new_player/sprite_accessories_taur_vr.dm | 2 +-
code/modules/mob/new_player/sprite_accessories_vr.dm | 4 ++--
code/modules/mob/new_player/sprite_accessories_wing.dm | 4 ++--
.../mob/new_player/sprite_accessories_wing_large_vr.dm | 2 +-
code/modules/mob/new_player/sprite_accessories_wing_vr.dm | 2 +-
code/modules/tgui/modules/appearance_changer.dm | 2 ++
15 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm
index 77e1e2d74ab..0cc7d1141a9 100644
--- a/code/__defines/mobs.dm
+++ b/code/__defines/mobs.dm
@@ -456,3 +456,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/objects/items/devices/personal_shield_generator_vr.dm b/code/game/objects/items/devices/personal_shield_generator_vr.dm
index f231ccebfea..35498064e35 100644
--- a/code/game/objects/items/devices/personal_shield_generator_vr.dm
+++ b/code/game/objects/items/devices/personal_shield_generator_vr.dm
@@ -539,7 +539,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 fdc140b6b4b..c8583db3c6c 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/modules/env_message/env_message.dm b/code/modules/env_message/env_message.dm
index fc5ea527b31..69e1364b7b4 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 6f7c3263787..2b5f60c892e 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 67cfbed5eb1..aacf98605f9 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 fd9ad113829..858fe01b106 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 e516eb2ac6e..8b510e65021 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
@@ -1439,7 +1439,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 6dc5cbb0116..b72a372b35c 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 f9525966645..cabb81bdc70 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 c9da7d34a22..0a440d4a23f 100644
--- a/code/modules/mob/new_player/sprite_accessories_vr.dm
+++ b/code/modules/mob/new_player/sprite_accessories_vr.dm
@@ -575,13 +575,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
/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 3b13156b9d2..3f2f2efd69f 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 e516d6b0853..66263ad850b 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 d26b57177bd..6610a2e8ea8 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/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 03af983836c..f11cf617838 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -606,6 +606,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
From aa01526a26c0cf30aaf2383404b3c15607f49968 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Tue, 3 Dec 2024 18:22:33 +0100
Subject: [PATCH 09/19] fix secondary ear options
---
.../tgui/modules/appearance_changer.dm | 9 ++-------
.../AppearanceChangerDetails.tsx | 19 ++++++++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index f11cf617838..51d1a077c18 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -64,12 +64,9 @@
whitelist = species_whitelist
blacklist = species_blacklist
-/datum/tgui_module/appearance_changer/tgui_close()
- . = ..()
+/datum/tgui_module/appearance_changer/Destroy()
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
owner = null
-
-/datum/tgui_module/appearance_changer/Destroy()
last_camera_turf = null
qdel(cam_screen)
QDEL_LIST(cam_plane_masters)
@@ -190,7 +187,7 @@
owner.ear_secondary_style = instance
if(!islist(owner.ear_secondary_colors))
owner.ear_secondary_colors = list()
- if(length(owner.ear_secondary_colors) < instance.get_color_channel_count())
+ 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)
@@ -362,8 +359,6 @@
if(customize_usr)
if(!ishuman(user))
return TRUE
- if(owner && owner != user)
- close_ui()
owner = user
if(!owner || !owner.species)
diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx
index ba2730f0bb8..8785a469602 100644
--- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx
+++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx
@@ -23,6 +23,7 @@ export const AppearanceChangerColors = (props) => {
wing_color,
wing2_color,
wing3_color,
+ ear_secondary_colors,
} = data;
return (
@@ -69,13 +70,17 @@ export const AppearanceChangerColors = (props) => {
{data.ear_secondary_colors.map((color, index) => (
-
+
+
+
+
))}
From 725689ad5517908672479f9865a183a75ac890b8 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Tue, 3 Dec 2024 20:33:49 +0100
Subject: [PATCH 10/19] fix that here too
---
code/game/machinery/air_alarm.dm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index 522a883efee..4a3b362db29 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -801,7 +801,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
@@ -809,10 +809,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
@@ -824,9 +824,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()
..()
From 0da06e773ca79e5746d7d0643debe8441a645cb3 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Tue, 3 Dec 2024 20:35:45 +0100
Subject: [PATCH 11/19] here too
---
code/modules/power/apc.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index f66a2afe203..16199e4b8c0 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -685,7 +685,7 @@ GLOBAL_LIST_EMPTY(apcs)
// 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)
@@ -873,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.
From a6571a4ab2473a0f7915429b5eeb4af5c17c69c4 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 00:59:55 +0100
Subject: [PATCH 12/19] reassign
---
code/modules/tgui/modules/appearance_changer.dm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 51d1a077c18..8244d7f243c 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,6 +57,7 @@
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
@@ -356,7 +357,7 @@
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)
- if(customize_usr)
+ if(customize_usr && !owner)
if(!ishuman(user))
return TRUE
owner = user
From e56d2c4712eb9f40f4faa710c08eda8af27c3726 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 01:09:29 +0100
Subject: [PATCH 13/19] fix the tf pref
---
code/modules/research/prosfab_designs.dm | 1 +
code/modules/vore/eating/vorepanel_vr.dm | 3 +++
2 files changed, 4 insertions(+)
diff --git a/code/modules/research/prosfab_designs.dm b/code/modules/research/prosfab_designs.dm
index 8bf0beb7429..0c88d946888 100644
--- a/code/modules/research/prosfab_designs.dm
+++ b/code/modules/research/prosfab_designs.dm
@@ -83,6 +83,7 @@
H.b_skin = 0
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/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm
index 3a44a1414b3..b690ab20f29 100644
--- a/code/modules/vore/eating/vorepanel_vr.dm
+++ b/code/modules/vore/eating/vorepanel_vr.dm
@@ -891,6 +891,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
From 9cb06747fbf6cdb57c113e636465a57a9f73952d Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 01:49:13 +0100
Subject: [PATCH 14/19] some robot interacts for closeby things
---
code/game/objects/structures/curtains.dm | 8 ++++++++
code/game/objects/structures/mirror.dm | 14 ++++++++++----
code/game/turfs/simulated/wall_attacks.dm | 7 +++++++
code/modules/tgui/modules/appearance_changer.dm | 7 +++++++
4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm
index 73a0beb8935..3ab4c032c21 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 d3caa34c3ed..447f02eeeba 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 cfc998f72a1..df6aa9320b6 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/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 8244d7f243c..fd916a1af20 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -65,6 +65,13 @@
whitelist = species_whitelist
blacklist = species_blacklist
+/datum/tgui_module/appearance_changer/tgui_close(mob/user)
+ . = ..()
+ if(owner == user)
+ UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
+ owner = null
+ close_ui()
+
/datum/tgui_module/appearance_changer/Destroy()
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
owner = null
From 37ad0acf01965b127dc7e00366132db9eaad6da9 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 02:03:07 +0100
Subject: [PATCH 15/19] that
---
code/modules/tgui/modules/appearance_changer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index fd916a1af20..5da17aa5463 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -67,7 +67,7 @@
/datum/tgui_module/appearance_changer/tgui_close(mob/user)
. = ..()
- if(owner == user)
+ if(owner == user || !customize_usr)
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
owner = null
close_ui()
From a99ea4f3d7d78ea48caad607828ff29a90ac2511 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 02:03:45 +0100
Subject: [PATCH 16/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 2 --
1 file changed, 2 deletions(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 5da17aa5463..5239379404d 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -73,8 +73,6 @@
close_ui()
/datum/tgui_module/appearance_changer/Destroy()
- UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
- owner = null
last_camera_turf = null
qdel(cam_screen)
QDEL_LIST(cam_plane_masters)
From 1d324ada51c7f8bac799f3d2467bd31b6f2dfbd7 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 02:05:46 +0100
Subject: [PATCH 17/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 5239379404d..b972daaeb21 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -70,10 +70,10 @@
if(owner == user || !customize_usr)
UnregisterSignal(owner, COMSIG_OBSERVER_MOVED)
owner = null
+ last_camera_turf = null
close_ui()
/datum/tgui_module/appearance_changer/Destroy()
- last_camera_turf = null
qdel(cam_screen)
QDEL_LIST(cam_plane_masters)
qdel(cam_background)
From 3835042996f11f411e30cba80045fa26538bbe86 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 02:07:46 +0100
Subject: [PATCH 18/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index b972daaeb21..ef250d6a45f 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -68,10 +68,10 @@
/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
- close_ui()
/datum/tgui_module/appearance_changer/Destroy()
qdel(cam_screen)
From 1c55054c6fb74b90fbb8f82e3df58d57355771f4 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Wed, 4 Dec 2024 02:10:37 +0100
Subject: [PATCH 19/19] .
---
code/modules/tgui/modules/appearance_changer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index ef250d6a45f..5e410b9e6c6 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -72,12 +72,12 @@
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)