Page 1 of 1

Expose LuaEntityPrototype.rocket_entity

Posted: Sun Aug 02, 2020 1:30 pm
by Therenas
Every rocket silo has an associated rocket silo rocket. This rocket is actually relevant to figure out some things about what the rocket silo produces and how long the launch animation takes. I'd need this information at runtime for Factory Planner.

So, I'm asking for rocket_entity to be added to LuaEntityPrototype. Preferably a direct reference to the prototype, called 'rocket_entity_prototype' or something.

I just noticed that there isn't a 'LuaRocketPrototype' at runtime at all currently, so that'd have to be created too. I'm not 100% sure which attributes would need to be exposed, but I'd benefit from engine_starting_speed, flying_acceleration, flying_speed, rising_speed, and especially result_items.

Re: Expose LuaEntityPrototype.rocket_entity

Posted: Mon Aug 03, 2020 8:24 am
by Therenas
The reference to the prototype has been added with 0.18.41, which is amazingly fast, thanks! I seems like the requested attributes were not added though, making the reference rather less useful. Is it possible to have reads to those added as well?

Edit: Oh also, the rocket silo prototype itself would also need the door_opening_speed attribute, and maybe active_energy_usage, even though I'm not 100% sure what that one does.