From c86063c27180b2780837af25df7ecc8d52c4ce3e Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Wed, 5 Feb 2014 21:11:05 -0800 Subject: [PATCH] Fix genetics spells not working. GG for not using panel variable, nerds. --- code/datums/spell.dm | 1 + code/game/dna/genes/goon_powers.dm | 8 ++++++-- code/modules/mob/mob.dm | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index b80ca1e4bed..f82f654a2d4 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -6,6 +6,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell name = "Spell" desc = "A wizard spell" + panel = "Spells"//What panel the proc holder needs to go on. density = 0 opacity = 0 diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 6e6b3346858..50de8fb85de 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -81,12 +81,16 @@ activate(var/mob/M, var/connected, var/flags) ..() - M.spell_list += spelltype + M.spell_list += new spelltype(M) return 1 deactivate(var/mob/M, var/connected, var/flags) ..() - M.spell_list -= spelltype + for(var/obj/effect/proc_holder/spell/S in M.spell_list) + if(istype(S,spelltype)) + M.spell_list.Remove(S) + return 1 + /datum/dna/gene/basic/grant_verb var/verbtype diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 17876180ba9..befa4b23a87 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -909,11 +909,11 @@ note dizziness decrements automatically in the mob's Life() proc. for(var/obj/effect/proc_holder/spell/S in spell_list) switch(S.charge_type) if("recharge") - statpanel("Spells","[S.charge_counter/10.0]/[S.charge_max/10]",S) + statpanel(S.panel,"[S.charge_counter/10.0]/[S.charge_max/10]",S) if("charges") - statpanel("Spells","[S.charge_counter]/[S.charge_max]",S) + statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S) if("holdervar") - statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S) + statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S) if(listed_turf) if(get_dist(listed_turf,src) > 1)