Tool-specific selectors in Circle Spell Bullets in Tools produce nulls
fnuecke opened this issue ยท 0 comments
Using tool context sensitive selectors (e.g. Selector: Block Broken Side
, Selector: Attack Target
) in spells programmed into Circle Spell Bullets installed in tools produces null-vector/null-target errors.
To reproduce with Selector: Block Broken Side
, program the following spell into a Circle Spell Bullet, then install the bullet in a Psimetal Pickaxe. Breaking a block with the pickaxe will log null-vector errors.
{spellName:"Test",uuidMost:-8668815499064883129L,validSpell:1b,spellList:[0:{spellPosX:3,spellData:{spellKey:"selectorBlockSideBroken",params:{}},spellPosY:4},1:{spellPosX:4,spellData:{spellKey:"trickDebug",params:{psi.spellparam.number:0,psi.spellparam.target:3}},spellPosY:4}],uuidLeast:-8187599907286692382L}
Equivalently, using Selector: Attack Target
in a Circle Spell installed in a Psimetal Sword causes null-target errors (with the attacked entity surviving the attack; tested on a horse, animals were potentially harmed in this experiment).
From my understanding that's because the spell context of circle spells is recreated for each iteration, but the tool specific information is only set once on the context created for the initial cast.