[1.1.5] Why you banned custom sprite?
Posted: Sat Dec 05, 2020 11:32 am
I have no idea whether you know this detail.
In order to display a custom sprite in game, there seems a lot of methods which would work.
According to your docs, function rendering.draw_sprite needs a parameter named sprite . It's type is SpritePath. SpritePath accepts 2 forms, first is "type.name"., So I have 2 intuitive ways, one is type==entity, the other is type == sprite. But type = "entity"doesn't compile inside data.lua, while type = "sprite" is not accepted by the rendering.draw_sprite.
Then what should I do? A custom recipe with custom sprite only for a sprite?
In my opinion, the rendering.draw_sprite function shall receive anything with type == sprite.
Update: I deepcopied and modified a prototype from achievement. The lovely achievement of "so long and thanks for all the fish". Then call rendering.draw_sprite with this AcHiEvEmEnT. Fancy and Fantastic. Anyway, it works now.
Would you modify the function so that people could all it with real sprites?
In order to display a custom sprite in game, there seems a lot of methods which would work.
According to your docs, function rendering.draw_sprite needs a parameter named sprite . It's type is SpritePath. SpritePath accepts 2 forms, first is "type.name"., So I have 2 intuitive ways, one is type==entity, the other is type == sprite. But type = "entity"doesn't compile inside data.lua, while type = "sprite" is not accepted by the rendering.draw_sprite.
Then what should I do? A custom recipe with custom sprite only for a sprite?
In my opinion, the rendering.draw_sprite function shall receive anything with type == sprite.
Update: I deepcopied and modified a prototype from achievement. The lovely achievement of "so long and thanks for all the fish". Then call rendering.draw_sprite with this AcHiEvEmEnT. Fancy and Fantastic. Anyway, it works now.
Would you modify the function so that people could all it with real sprites?