From 8492e325c0bcfb1aa9f32a8350d7da9e29d7d41f Mon Sep 17 00:00:00 2001 From: mikomyazaki <47489928+mikomyazaki@users.noreply.github.com> Date: Sat, 29 Aug 2020 19:27:54 +0100 Subject: [PATCH] Species inherent spells now get properly removed when changing away from that species. (#9821) --- code/modules/mob/living/carbon/human/species/species.dm | 4 +++- html/changelogs/remove_inherent_spells.yml | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/remove_inherent_spells.yml diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 323d382d05a..9da63b908e6 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -394,7 +394,9 @@ if(inherent_spells) for(var/spell_path in inherent_spells) - H.remove_spell(spell_path) + for(var/spell/spell in H.spell_list) + if(istype(spell, spell_path)) + H.remove_spell(spell) return /datum/species/proc/add_inherent_verbs(var/mob/living/carbon/human/H) diff --git a/html/changelogs/remove_inherent_spells.yml b/html/changelogs/remove_inherent_spells.yml new file mode 100644 index 00000000000..15006902662 --- /dev/null +++ b/html/changelogs/remove_inherent_spells.yml @@ -0,0 +1,7 @@ +author: mikomyazaki + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +changes: + - bugfix: "Inherent spells are now properly removed when you change species away from that species, e.g. when Golems would change using a plastic surgery machine." \ No newline at end of file