Page 1 of 1

[1.1.110] SpriteParameters.shift only accepts dict version of Vector

Posted: Sun Sep 22, 2024 3:39 pm
by sparr

Code: Select all

   1.161 Mods to disable:Failed to load mods: Error while loading entity prototype "foo" (simple-entity-with-owner): Value must be a dictionary in property tree at ROOT.simple-entity-with-owner.foo.picture.east.shift
The error happens when shift looks like {1,0} and does not happen when it looks like {x=1,y=0}

Re: [1.1.110] SpriteParameters.shift only accepts dict version of Vector

Posted: Sun Sep 22, 2024 5:04 pm
by sparr
It seems like this only applies in some scenarios?

I think Sprite.layers[1].shift accepts both versions, but Sprite4Way.north.shift accepts only the dict? Sorry for not exhaustively testing variations. I can do that if necessary.

Re: [1.1.110] SpriteParameters.shift only accepts dict version of Vector

Posted: Sun Sep 22, 2024 6:02 pm
by Bilka
Likely something else is going wrong, shift always allows the array and dictionary form. Probably another type is trying to load what's in shift. Could you provide the source code of the entity for the error?

Re: [1.1.110] SpriteParameters.shift only accepts dict version of Vector

Posted: Sun Sep 22, 2024 9:46 pm
by sparr
I am sorry. I neglected to preserve the source that caused these errors, and I am unable to reproduce it by modifying my current source.

It is very likely that the cause was something else referencing the shift table, although I am curious that the error message would give the path to the shift table rather than to the thing referencing it, in that case.