diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index a8e6e7f67f..5385d6f9ed 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -292,6 +292,7 @@ #define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" //Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted) #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() // /datum/species signals #define COMSIG_SPECIES_GAIN "species_gain" //from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species) diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm index 41e9820640..904a314beb 100644 --- a/code/datums/elements/flavor_text.dm +++ b/code/datums/elements/flavor_text.dm @@ -125,10 +125,11 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code 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) /datum/element/flavor_text/carbon/Detach(mob/living/carbon/C) . = ..() - UnregisterSignal(C, list(COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, COMSIG_HUMAN_PREFS_COPIED_TO, COMSIG_HUMAN_HARDSET_DNA)) + UnregisterSignal(C, list(COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, COMSIG_HUMAN_PREFS_COPIED_TO, COMSIG_HUMAN_HARDSET_DNA, COMSIG_HUMAN_ON_RANDOMIZE)) /datum/element/flavor_text/carbon/proc/update_dna_flavor_text(mob/living/carbon/C) texts_by_atom[C] = C.dna.features["flavor_text"] @@ -140,3 +141,6 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code . = ..() if(. && user.dna) user.dna.features["flavor_text"] = texts_by_atom[user] + +/datum/element/flavor_text/carbon/unset_flavor(mob/living/carbon/user) + texts_by_atom[user] = "" \ No newline at end of file diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index 9784aa7cd1..4d1cb1a7de 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -40,6 +40,9 @@ H.dna.features["insect_wings"] = pick(GLOB.insect_wings_list) H.dna.features["deco_wings"] = pick(GLOB.deco_wings_list) H.dna.features["insect_fluff"] = pick(GLOB.insect_fluffs_list) + H.dna.features["flavor_text"] = "" //Oh no. + + SEND_SIGNAL(H, COMSIG_HUMAN_ON_RANDOMIZE) H.update_body() H.update_hair()