From 3a7e06960a5c7138e88281aa2bb694d286da4fee Mon Sep 17 00:00:00 2001 From: Joe Schmoe Date: Wed, 12 Dec 2018 22:40:45 +0100 Subject: [PATCH] fixes lightning --- code/datums/action.dm | 3 +++ code/datums/spell.dm | 1 + code/datums/spells/lightning.dm | 1 + 3 files changed, 5 insertions(+) diff --git a/code/datums/action.dm b/code/datums/action.dm index a9c895f3482..8ed8879174e 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -443,6 +443,9 @@ return 0 var/obj/effect/proc_holder/spell/spell = target + if(spell.special_availability_check) + return 1 + if(owner) return spell.can_cast(owner) return 0 diff --git a/code/datums/spell.dm b/code/datums/spell.dm index dee057c5568..21c0c3e5bce 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -100,6 +100,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin var/action_icon = 'icons/mob/actions/actions.dmi' var/action_icon_state = "spell_default" var/action_background_icon_state = "bg_spell" + var/special_availability_check = 0//Whether the spell needs to bypass the action button's IsAvailable() var/sound = null //The sound the spell makes when it is cast diff --git a/code/datums/spells/lightning.dm b/code/datums/spells/lightning.dm index 257e98346d2..9567f48368f 100644 --- a/code/datums/spells/lightning.dm +++ b/code/datums/spells/lightning.dm @@ -10,6 +10,7 @@ cooldown_min = 30 selection_type = "view" random_target = 1 + special_availability_check = 1 var/start_time = 0 var/ready = 0 var/image/halo = null