diff --git a/code/modules/mob/living/carbon/human/examine_tgui.dm b/code/modules/mob/living/carbon/human/examine_tgui.dm index a5a3e00172c..b69f7bab543 100644 --- a/code/modules/mob/living/carbon/human/examine_tgui.dm +++ b/code/modules/mob/living/carbon/human/examine_tgui.dm @@ -1,5 +1,5 @@ /datum/examine_panel - var/mob/living/carbon/human/holder //client of whoever is using this datum + var/mob/living/holder //client of whoever is using this datum var/mob/living/carbon/human/dummy/dummy_holder var/atom/movable/screen/examine_panel_dummy/examine_panel_screen @@ -14,12 +14,17 @@ /datum/examine_panel/ui_interact(mob/user, datum/tgui/ui) if(!examine_panel_screen) - dummy_holder = generate_dummy_lookalike(REF(holder), holder) - var/datum/job/job_ref = SSjob.GetJob(holder.job) - if(job_ref && job_ref.outfit) - var/datum/outfit/outfit_ref = new() - outfit_ref.copy_outfit_from_target(holder) - outfit_ref.equip(dummy_holder, visualsOnly=TRUE) + if(ishuman(holder)) + dummy_holder = generate_dummy_lookalike(REF(holder), holder) + var/datum/job/job_ref = SSjob.GetJob(holder.job) + if(job_ref && job_ref.outfit) + var/datum/outfit/outfit_ref = new() + outfit_ref.copy_outfit_from_target(holder) + outfit_ref.equip(dummy_holder, visualsOnly=TRUE) + /* + else if(issilicon(holder)) + dummy_holder = image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH) // this doesn't work and just shows a black screen, idk a solution though feel free to pitch in + */ examine_panel_screen = new examine_panel_screen.vis_contents += dummy_holder examine_panel_screen.name = "screen" @@ -37,14 +42,13 @@ var/datum/preferences/preferences = holder.client?.prefs - var/obscured = (holder.wear_mask && (holder.wear_mask.flags_inv & HIDEFACE)) || (holder.head && (holder.head.flags_inv & HIDEFACE)) - var/name = obscured ? "Unknown" : holder.name - var/flavor_text = obscured ? "Obscured" : holder.dna.features["flavor_text"] - var/custom_species = obscured ? "Obscured" : holder.dna.features["custom_species"] - var/custom_species_lore = obscured ? "Obscured" : holder.dna.features["custom_species_lore"] - + var/flavor_text + var/custom_species + var/custom_species_lore + var/obscured var/ooc_notes = "" + // Handle OOC notes first if(preferences && preferences.read_preference(/datum/preference/toggle/master_erp_preferences)) var/e_prefs = preferences.read_preference(/datum/preference/choiced/erp_status) var/e_prefs_nc = preferences.read_preference(/datum/preference/choiced/erp_status_nc) @@ -54,7 +58,23 @@ ooc_notes += "Vore: [e_prefs_v]\n" ooc_notes += "\n" - ooc_notes += holder.dna.features["ooc_notes"] + // Now we handle silicon and/or human, order doesn't really matter + // If other variants of mob/living need to be handled at some point, put them here + if(issilicon(holder)) + flavor_text = preferences.read_preference(/datum/preference/text/silicon_flavor_text) + custom_species = "Silicon" + custom_species_lore = "A cyborg unit." + ooc_notes += preferences.read_preference(/datum/preference/text/ooc_notes) + + if(ishuman(holder)) + var/mob/living/carbon/human/holder_human = holder + obscured = (holder_human.wear_mask && (holder_human.wear_mask.flags_inv & HIDEFACE)) || (holder_human.head && (holder_human.head.flags_inv & HIDEFACE)) + custom_species = obscured ? "Obscured" : holder_human.dna.features["custom_species"] + flavor_text = obscured ? "Obscured" : holder_human.dna.features["flavor_text"] + custom_species_lore = obscured ? "Obscured" : holder_human.dna.features["custom_species_lore"] + ooc_notes += holder_human.dna.features["ooc_notes"] + + var/name = obscured ? "Unknown" : holder.name data["obscured"] = obscured ? TRUE : FALSE data["character_name"] = name diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 4c633d9b209..4dc0ed4d591 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -44,6 +44,13 @@ if(DEAD) . += "It looks like its system is corrupted and requires a reset." //SKYRAT EDIT ADDITION BEGIN - CUSTOMIZATION + var/line = span_notice("Examine closely...") + if(line) + . += line + if(client) + var/erp_status_pref = client.prefs.read_preference(/datum/preference/choiced/erp_status) + if(erp_status_pref && erp_status_pref != "disabled") + . += span_notice("ERP STATUS: [erp_status_pref]") if(temporary_flavor_text) if(length_char(temporary_flavor_text) <= 40) . += "[temporary_flavor_text]" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a1b0c059f72..ac8c398b1cd 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -158,6 +158,12 @@ //Show alerts window if user clicked on "Show alerts" in chat if(href_list["showalerts"]) alert_control.ui_interact(src) + // SKYRAT EDIT ADDITION -- Customization + if(href_list["lookup_info"]) + tgui.holder = src + tgui.ui_interact(usr) //datum has a tgui component, here we open the window + // SKYRAT EDIT END + /mob/living/silicon/robot/get_cell() return cell diff --git a/modular_skyrat/master_files/code/modules/client/preferences/flavor_text.dm b/modular_skyrat/master_files/code/modules/client/preferences/flavor_text.dm index 8a344d4991f..2359d51975e 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/flavor_text.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/flavor_text.dm @@ -6,6 +6,15 @@ /datum/preference/text/flavor_text/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) target.dna.features["flavor_text"] = value +/datum/preference/text/silicon_flavor_text + category = PREFERENCE_CATEGORY_NON_CONTEXTUAL + savefile_identifier = PREFERENCE_CHARACTER + savefile_key = "silicon_flavor_text" + // This does not get a apply_to_human proc, this is read directly in silicon/robot/examine.dm + +/datum/preference/text/silicon_flavor_text/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) + return FALSE // To prevent the not-implemented runtime + /datum/preference/text/ooc_notes category = PREFERENCE_CATEGORY_NON_CONTEXTUAL savefile_identifier = PREFERENCE_CHARACTER diff --git a/modular_skyrat/modules/altborgs/code/modules/mob/living/silicon/robot/robot_defines.dm b/modular_skyrat/modules/altborgs/code/modules/mob/living/silicon/robot/robot_defines.dm index 1f93a0716d4..787ce32e563 100644 --- a/modular_skyrat/modules/altborgs/code/modules/mob/living/silicon/robot/robot_defines.dm +++ b/modular_skyrat/modules/altborgs/code/modules/mob/living/silicon/robot/robot_defines.dm @@ -1,6 +1,7 @@ /mob/living/silicon/robot var/robot_resting = FALSE var/robot_rest_style = ROBOT_REST_NORMAL + var/datum/examine_panel/tgui = new() //create the datum /mob/living/silicon/robot/model/miner/skyrat set_model = /obj/item/robot_model/miner/skyrat diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/species_features.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/species_features.tsx index e4b41814c33..83a4cb3a58f 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/species_features.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/skyrat/species_features.tsx @@ -20,6 +20,12 @@ export const flavor_text: Feature = { component: FeatureTextInput, }; +export const silicon_flavor_text: Feature = { + name: "Flavor Text (Silicon)", + description: "Describe your cyborg/AI shell!", + component: FeatureTextInput, +}; + export const ooc_notes: Feature = { name: "OOC Notes", description: "Talk about your character OOCly!",