[MIRROR] Update clothing appearance following species change [MDB IGNORE] (#23619)

* Update clothing appearance following species change (#78185)

## About The Pull Request

Fixes #78179
Monkey clothes didn't fit following black charged slime transformation
(I hate xenobiology)
Moved the proc call which updated the clothing appearance from turning
into or returning from being a monkey into generic `on_species_gain` on
the basis that this would effect any species with weird clothing offsets
(such as transforming into a golem from the same source) and we don't
want a bunch of specific checks against it.

Also I just tidied up that proc a little bit.

## Changelog

🆑
fix: Your clothes and such should correctly reposition themselves if a
black charged slime extract turns you into a monkey.
/🆑

* Update clothing appearance following species change

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
SkyratBot
2023-09-10 21:43:09 -04:00
committed by GitHub
co-authored by Jacquerel
parent c23b29a275
commit 71ae83df92
4 changed files with 12 additions and 12 deletions
@@ -40,7 +40,6 @@
user.humanize(species = chosen_species, instant = transform_instantly)
changeling.transform(user, chosen_form)
user.regenerate_icons()
return TRUE
/// Returns the form to transform back into, automatically selects your only profile if you only have one
@@ -511,6 +511,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
C.grant_language(language, SPOKEN_LANGUAGE, LANGUAGE_SPECIES)
for(var/language in gaining_holder.blocked_languages)
C.add_blocked_language(language, LANGUAGE_SPECIES)
C.regenerate_icons()
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
-2
View File
@@ -36,7 +36,6 @@
set_name()
SEND_SIGNAL(src, COMSIG_HUMAN_MONKEYIZE)
uncuff()
regenerate_icons()
return src
////////////////////////// Humanize //////////////////////////////
@@ -71,7 +70,6 @@
invisibility = 0
set_species(species)
SEND_SIGNAL(src, COMSIG_MONKEY_HUMANIZE)
regenerate_icons()
return src
/mob/proc/AIize(client/preference_source, move = TRUE)
@@ -235,21 +235,23 @@ Charged extracts:
effect_desc = "Randomizes the user's species."
/obj/item/slimecross/charged/black/do_effect(mob/user)
var/mob/living/carbon/human/H = user
if(!istype(H))
to_chat(user, span_warning("You have to be able to have a species to get your species changed."))
var/mob/living/carbon/human/experiment_subject = user
if(!istype(experiment_subject))
balloon_alert(experiment_subject, "incompatible biology!")
return
var/list/allowed_species = list()
for(var/stype in subtypesof(/datum/species))
var/datum/species/X = stype
if(initial(X.changesource_flags) & SLIME_EXTRACT)
var/datum/species/try_species = stype
if(initial(try_species.changesource_flags) & SLIME_EXTRACT)
allowed_species += stype
var/datum/species/changed = pick(allowed_species)
if(changed)
H.set_species(changed, icon_update = 1)
to_chat(H, span_danger("You feel very different!"))
..()
if(isnull(changed))
visible_message(span_notice("[src] fizzes uselessly."))
return
experiment_subject.set_species(changed, icon_update = TRUE)
to_chat(experiment_subject, span_danger("You feel very different!"))
return ..()
/obj/item/slimecross/charged/lightpink
colour = SLIME_TYPE_LIGHT_PINK