OpGetCaster returns null if the caster is null.

This commit is contained in:
Talia-12 2023-04-05 15:25:56 +10:00
parent e7cac1e30d
commit 544fa2ac3c
2 changed files with 4 additions and 1 deletions

View file

@ -9,6 +9,9 @@ object OpGetCaster : ConstMediaAction {
override val argc = 0
override fun execute(args: List<Iota>, ctx: CastingEnvironment): List<Iota> {
if (ctx.caster == null)
return null.asActionResult
ctx.assertEntityInRange(ctx.caster)
return ctx.caster.asActionResult
}

View file

@ -11,7 +11,7 @@
"op_id": "hexcasting:get_caster",
"anchor": "hexcasting:get_caster",
"input": "",
"output": "entity",
"output": "entity | null",
"text": "hexcasting.page.basics_pattern.get_caster"
},
{