From 2fdfee8375c49595b6967fdc450c30d004b2870f Mon Sep 17 00:00:00 2001 From: EgorDinamit <53223414+EgorDinamit@users.noreply.github.com> Date: Sat, 17 Feb 2024 12:18:35 +0300 Subject: [PATCH] Fixes missing arguments in ability master creation (#552) --- code/_onclick/hud/ability_screen_objects.dm | 5 +++-- code/modules/spells/_spell_procs.dm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm index e8a76ac4662..da4fa8a547f 100644 --- a/code/_onclick/hud/ability_screen_objects.dm +++ b/code/_onclick/hud/ability_screen_objects.dm @@ -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 diff --git a/code/modules/spells/_spell_procs.dm b/code/modules/spells/_spell_procs.dm index 56b3c20455e..76617b0716c 100644 --- a/code/modules/spells/_spell_procs.dm +++ b/code/modules/spells/_spell_procs.dm @@ -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)