Page 1 of 1
[2.0.76] Could sprite and animation prototypes be added to prototypes?
Posted: Fri Mar 06, 2026 2:16 am
by Honktown
I don't have a good reason but they are missing.
Edit: It does affect on thing: LuaRendering.draw_animation requires the name of an animation prototype, but they're not iterable. draw_sprite is similar.
Re: [2.0.76] Could sprite and animation prototypes be added to prototypes?
Posted: Fri Mar 06, 2026 2:20 am
by PennyJim
What fields would even be on the LuaPrototypes? Graphics definitions aren't readable an other other prototype.
On the other hand, we need a is_valid_animation_path to match the is_valid_sprite_path because we can't currently validate random strings as valid animations. (Validating data from ModData)
Re: [2.0.76] Could sprite and animation prototypes be added to prototypes?
Posted: Fri Mar 06, 2026 1:27 pm
by Rseding91
PennyJim wrote: Fri Mar 06, 2026 2:20 am
What fields would even be on the LuaPrototypes? Graphics definitions aren't readable an other other prototype.
On the other hand, we need a is_valid_animation_path to match the is_valid_sprite_path because we can't currently validate random strings as valid animations. (Validating data from ModData)
I added LuaHelpers::is_valid_animation_path(...) for 2.1.