diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index 10aa54ee..a5d77983 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -570,12 +570,21 @@
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby"
///Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted)
#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit"
-#define COMSIG_HUMAN_PREFS_COPIED_TO "human_prefs_copied_to" //from datum/preferences/copy_to(): (datum/preferences, icon_updates, roundstart_checks)
-#define COMSIG_HUMAN_HARDSET_DNA "human_hardset_dna" //from mob/living/carbon/human/hardset_dna(): (ui, se, newreal_name, newblood_type, datum/species, newfeatures)
-#define COMSIG_HUMAN_ON_RANDOMIZE "humman_on_randomize" //from base of proc/randomize_human()
+///from datum/preferences/copy_to(): (datum/preferences, icon_updates, roundstart_checks)
+#define COMSIG_HUMAN_PREFS_COPIED_TO "human_prefs_copied_to"
+///from mob/living/carbon/human/hardset_dna(): (ui, se, newreal_name, newblood_type, datum/species, newfeatures)
+#define COMSIG_HUMAN_HARDSET_DNA "human_hardset_dna"
+///from base of proc/randomize_human()
+#define COMSIG_HUMAN_ON_RANDOMIZE "humman_on_randomize"
///Whenever EquipRanked is called, called after job is set
#define COMSIG_JOB_RECEIVED "job_received"
+// GS13: Silicon Examine Text
+// /mob/living/silicon signals
+
+//from datum/preferences/copy_to(): (datum/preferences, icon_updates, roundstart_checks)
+#define COMSIG_SILICON_PREFS_COPIED_TO "silicon_prefs_copied_to"
+
// /datum/species signals
///from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species)
@@ -732,10 +741,9 @@
///from datum/action/cyborg_small_sprite and sends when a cyborg changes modules
#define COMSIG_CYBORG_MODULE_CHANGE "cyborg_module_change"
-
/* Attack signals. They should share the returned flags, to standardize the attack chain. */
/// tool_act -> pre_attack -> target.attackby (item.attack) -> afterattack
///Ends the attack chain. If sent early might cause posterior attacks not to happen.
#define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0)
///Skips the specific attack step, continuing for the next one to happen.
- #define COMPONENT_SKIP_ATTACK (1<<1)
\ No newline at end of file
+ #define COMPONENT_SKIP_ATTACK (1<<1)
diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm
index 87dd0427..245f61a7 100644
--- a/code/datums/elements/flavor_text.dm
+++ b/code/datums/elements/flavor_text.dm
@@ -40,9 +40,6 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
LAZYOR(GLOB.mobs_with_editable_flavor_text[M], src)
M.verbs |= /mob/proc/manage_flavor_tests
- if(save_key && ishuman(target))
- RegisterSignal(target, COMSIG_HUMAN_PREFS_COPIED_TO, .proc/update_prefs_flavor_text)
-
/datum/element/flavor_text/Detach(atom/A)
. = ..()
UnregisterSignal(A, list(COMSIG_PARENT_EXAMINE, COMSIG_HUMAN_PREFS_COPIED_TO))
@@ -71,7 +68,7 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
if(examine_no_preview)
examine_list += "\[[flavor_name]\]"
return
- var/msg = replacetext(text, "\n", " ")
+ var/msg = replacetext(text, "\n", "
") // preserve newlines
if(length_char(msg) <= 40)
examine_list += "[msg]"
else
@@ -79,14 +76,22 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
//Examine Tab stuff - Hyperstation
examineTabOutput = "
"
+
if(ishuman(target)) //user just returned, y'know, the user's own species. dumb.
var/mob/living/carbon/human/L = target
if(L.gender)
examineTabOutput += "[icon2html('hyperstation/icons/chat/gender.dmi', world, L.gender)]"
-
examineTabOutput += "[L.name] "
examineTabOutput += "([L.dna.custom_species ? L.dna.custom_species : L.dna.species.name])"
+ // GS13: Silicon Examine Text
+ if(iscyborg(target))
+ var/mob/living/silicon/robot/R = target
+ if (R.gender)
+ examineTabOutput += "[icon2html('hyperstation/icons/chat/gender.dmi', world, R.gender)]"
+ examineTabOutput += "[R.name] "
+ examineTabOutput += "([R.get_standard_name()])"
+
/* if(L.client?.prefs?.pins) //character has pins
var/P = ""
for(P in L.client?.prefs?.pins)
@@ -94,11 +99,13 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
*/
examineTabOutput += ""
examineTabOutput += "
[url_encode(msg)]"
+
if(ismob(target))
var/mob/M = target
if(M.ooc_text)
examineTabOutput += "
OOC"
examineTabOutput += "
[url_encode(M.ooc_text)]"
+
user.client << output(examineTabOutput, "statbrowser:update_examine") //open the examine window
user.client << output(null, "statbrowser:create_mobexamine") //open the examine window
@@ -150,9 +157,9 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
return TRUE
return FALSE
-/datum/element/flavor_text/proc/update_prefs_flavor_text(mob/living/carbon/human/H, datum/preferences/P, icon_updates = TRUE, roundstart_checks = TRUE)
+/datum/element/flavor_text/proc/update_prefs_flavor_text(mob/M, datum/preferences/P, icon_updates = TRUE, roundstart_checks = TRUE)
if(P.features.Find(save_key))
- texts_by_atom[H] = P.features[save_key]
+ texts_by_atom[M] = P.features[save_key]
//subtypes with additional hooks for DNA and preferences.
/datum/element/flavor_text/carbon
@@ -169,6 +176,7 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
RegisterSignal(target, COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, .proc/update_dna_flavor_text)
RegisterSignal(target, COMSIG_MOB_ANTAG_ON_GAIN, .proc/on_antag_gain)
if(ishuman(target))
+ RegisterSignal(target, COMSIG_HUMAN_PREFS_COPIED_TO, .proc/update_prefs_flavor_text)
RegisterSignal(target, COMSIG_HUMAN_HARDSET_DNA, .proc/update_dna_flavor_text)
RegisterSignal(target, COMSIG_HUMAN_ON_RANDOMIZE, .proc/unset_flavor)
@@ -193,3 +201,18 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
texts_by_atom[user] = ""
if(user.dna)
user.dna.features[save_key] = ""
+
+// GS13: Silicon Examine Text
+/datum/element/flavor_text/silicon
+
+/datum/element/flavor_text/silicon/Attach(datum/target, text = "", _name = "Flavor Text", _addendum, _max_len = MAX_FLAVOR_LEN, _always_show = FALSE, _edit = TRUE, _save_key = "flavor_text", _examine_no_preview = FALSE)
+ if(!issilicon(target))
+ return ELEMENT_INCOMPATIBLE
+ . = ..()
+ if(. == ELEMENT_INCOMPATIBLE)
+ return
+ RegisterSignal(target, COMSIG_SILICON_PREFS_COPIED_TO, .proc/update_prefs_flavor_text)
+
+/datum/element/flavor_text/silicon/Detach(mob/living/carbon/C)
+ . = ..()
+ UnregisterSignal(C, list(COMSIG_SILICON_PREFS_COPIED_TO))
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 5cd171cc..675ef7be 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -3000,6 +3000,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
character.update_hair()
character.update_body_parts()
+// GS13: Silicon Examine Text
+/datum/preferences/proc/copy_to_robot(mob/living/silicon/robot/cyborg, icon_updates = 1, roundstart_checks = TRUE)
+ SEND_SIGNAL(cyborg, COMSIG_SILICON_PREFS_COPIED_TO, src, icon_updates, roundstart_checks)
+ cyborg.ooc_text = features["ooc_text"]
/datum/preferences/proc/get_default_name(name_id)
switch(name_id)
diff --git a/code/modules/jobs/job_types/silicon.dm b/code/modules/jobs/job_types/silicon.dm
index 42136f1f..c21268ac 100644
--- a/code/modules/jobs/job_types/silicon.dm
+++ b/code/modules/jobs/job_types/silicon.dm
@@ -88,3 +88,5 @@ Cyborg
/datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M)
R.updatename(M.client)
R.gender = NEUTER
+ // GS13: Silicon Examine Text
+ M.client?.prefs?.copy_to_robot(R)
diff --git a/code/modules/mob/living/silicon/examine.dm b/code/modules/mob/living/silicon/examine.dm
index 37107f2d..b0cae459 100644
--- a/code/modules/mob/living/silicon/examine.dm
+++ b/code/modules/mob/living/silicon/examine.dm
@@ -1,6 +1,10 @@
-/mob/living/silicon/examine(mob/user) //Displays a silicon's laws to ghosts
- . = ..()
+/mob/living/silicon/examine(mob/user)
+ // GS13: Silicon Examine Text
+ // COMSIG_PARENT_EXAMINE is called in /mob/living/silicon/robot/examine instead of /atom/proc/examine
+ // to display flavour_text in the examine text span similar to /mob/living/carbon/human/examine
+
+ //Display a silicon's laws to ghosts
if(laws && isobserver(user))
. += "[src] has the following laws:"
for(var/law in laws.get_law_list(include_zeroth = TRUE))
- . += law
\ No newline at end of file
+ . += law
diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm
index c49ee6cc..67616460 100644
--- a/code/modules/mob/living/silicon/robot/examine.dm
+++ b/code/modules/mob/living/silicon/robot/examine.dm
@@ -48,5 +48,9 @@
. += "It doesn't seem to be responding."
if(DEAD)
. += "It looks like its system is corrupted and requires a reset."
+
+ // GS13: Silicon Examine Text
+ SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
+
. += "*---------*"
. += ..()
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 9e519a53..4212d263 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -57,7 +57,8 @@
/mob/living/silicon/ComponentInitialize()
. = ..()
- AddElement(/datum/element/flavor_text, "", "Silicon Flavor Text", "", MAX_FLAVOR_LEN, FALSE, TRUE, "silicon_flavor_text")
+ // GS13: Silicon Examine Text
+ AddElement(/datum/element/flavor_text/silicon, "", "Silicon Flavor Text", "", MAX_FLAVOR_LEN, FALSE, TRUE, "silicon_flavor_text")
AddElement(/datum/element/flavor_text, "", "Temporary Flavor Text", "This should be used only for things pertaining to the current round!")
/mob/living/silicon/med_hud_set_health()
diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm
index 6b8c846b..68ca7640 100644
--- a/modular_citadel/code/modules/client/preferences.dm
+++ b/modular_citadel/code/modules/client/preferences.dm
@@ -57,7 +57,7 @@
if(L[slot_to_string(slot)] < DEFAULT_SLOT_AMT)
return TRUE
-datum/preferences/copy_to(mob/living/carbon/human/character, icon_updates = 1)
+/datum/preferences/copy_to(mob/living/carbon/human/character, icon_updates = 1)
..()
character.give_genitals(TRUE)
character.ooc_text = features["ooc_text"] //Let's update their flavor_text at least initially