Issue with Action Grant/Remove #15932
-
Whenever a Species changes it will call on_species_loss and on_species_gain which is also called in that species DM file. When ever on_species_lost is called for something like slimes, it remove the actions recolor and regrow limbs
However if you transform back into that species it will call on_species_gain and readd those actions
So at this point, the mob has both the grow and recolor actions(and the icons), however when the mob transforms back into a different species again, on_species_loss is once again called, HOWEVER, it fails the if checks for both actions even though they were granted back to the mob. I checked the variables and it appears that the mob loses the action |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When transforming as a changeling, we end up here: /mob/living/carbon/human/proc/change_dna(datum/dna/new_dna, include_species_change = FALSE, keep_flavor_text = FALSE)
if(include_species_change)
set_species(new_dna.species.type, retain_damage = TRUE)
dna = new_dna.Clone()
[...] The /datum/dna/proc/Clone()
var/datum/dna/new_dna = new()
new_dna.unique_enzymes = unique_enzymes
new_dna.struc_enzymes_original = struc_enzymes_original // will make clone's SE the same as the original, do we want this?
new_dna.blood_type = blood_type
new_dna.real_name = real_name
new_dna.species = new species.type // fix me
[...] That line creates a freshly When we finally return to the I suspect #15085 was the PR which created this bug. |
Beta Was this translation helpful? Give feedback.
When transforming as a changeling, we end up here:
The
set_species()
call here works fine, just as you suspect, the slime gets theirgrow
andrecolor
becauseon_species_gain()
was called. However the issue happens inside theClone()
proc, specifically the line:new_dna.species = new species.type