Fix cast() parameters (#48997)

About The Pull Request

Working on detecting type mismatches of parameters for SpacemanDMM and discovered these.

I also checked by hand that all uses of cast() provide a list as the first argument.
This commit is contained in:
spookydonut
2020-01-27 09:48:42 +13:00
committed by oranges
parent 64b2edfa22
commit 01b4d9e811
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -552,7 +552,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
school = "restoration"
sound = 'sound/magic/staff_healing.ogg'
/obj/effect/proc_holder/spell/self/basic_heal/cast(mob/living/carbon/human/user) //Note the lack of "list/targets" here. Instead, use a "user" var depending on mob requirements.
/obj/effect/proc_holder/spell/self/basic_heal/cast(list/targets, mob/living/carbon/human/user) //Note the lack of "list/targets" here. Instead, use a "user" var depending on mob requirements.
//Also, notice the lack of a "for()" statement that looks through the targets. This is, again, because the spell can only have a single target.
user.visible_message("<span class='warning'>A wreath of gentle light passes over [user]!</span>", "<span class='notice'>You wreath yourself in healing light!</span>")
user.adjustBruteLoss(-10)
+1 -1
View File
@@ -17,7 +17,7 @@
action_icon = 'icons/mob/actions/actions_spells.dmi'
action_icon_state = "soultap"
/obj/effect/proc_holder/spell/self/tap/cast(mob/living/user = usr)
/obj/effect/proc_holder/spell/self/tap/cast(list/targets, mob/living/user = usr)
if(!user.mind.hasSoul)
to_chat(user, "<span class='warning'>You do not possess a soul to tap into!</span>")
return