OpGetCaster returns null if the caster is null.
This commit is contained in:
parent
e7cac1e30d
commit
544fa2ac3c
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue