Magical fixes.

The wizard den is no longer pitch black.
Fixes targeted spells using the wrong caster/source.
Adds some missing checks using the caster source above.
Re-logging should no longer cause a loss of spell UI icons.
Mind transfer should no longer cause unintended spell loss.
This commit is contained in:
PsiOmegaDelta
2015-07-21 11:34:25 +02:00
parent bfe21b66c6
commit 616b4b60e4
12 changed files with 351 additions and 268 deletions
+14 -5
View File
@@ -4,17 +4,26 @@
for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
spell_master.update_spells(0, src)
/mob/Stat()
/mob/Login()
..()
if(spell_list && spell_list.len && statpanel("Spells"))
if(spell_masters)
for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
spell_master.toggle_open(1)
client.screen -= spell_master
/mob/Stat()
. = ..()
if(. && spell_list && spell_list.len)
for(var/spell/S in spell_list)
if((!S.connected_button) || !statpanel(S.panel))
continue //Not showing the noclothes spell
switch(S.charge_type)
if(Sp_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.connected_button)
if(Sp_CHARGES)
statpanel("Spells","[S.charge_counter]/[S.charge_max]",S)
statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S.connected_button)
if(Sp_HOLDVAR)
statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S)
statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S.connected_button)
/mob/proc/add_spell(var/spell/spell_to_add, var/spell_base = "wiz_spell_ready", var/master_type = /obj/screen/movable/spell_master)
if(!spell_masters)