Skip to content

Commit

Permalink
Fixes missing arguments in ability master creation (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit authored Feb 17, 2024
1 parent 8e6f4ba commit 2fdfee8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions code/_onclick/hud/ability_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@
active_overlay = null
return ..()

/obj/screen/movable/ability_master/proc/add_spell(var/datum/spell/spell)
if(!spell) return
/obj/screen/movable/ability_master/proc/add_spell(datum/spell/spell)
if(!spell)
return

if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one
return
Expand Down
2 changes: 1 addition & 1 deletion code/modules/spells/_spell_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

/mob/proc/add_spell(datum/spell/spell_to_add, spell_base = "wiz_spell_ready")
if(!ability_master)
ability_master = new()
ability_master = new(null, src)
spell_to_add.holder = src
if(mind)
if(!mind.learned_spells)
Expand Down

0 comments on commit 2fdfee8

Please sign in to comment.