mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user