Expose LuaEntityPrototype.rocket_entity

Post Reply
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 232
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Expose LuaEntityPrototype.rocket_entity

Post 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.

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 232
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Expose LuaEntityPrototype.rocket_entity

Post 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.

Post Reply

Return to “Implemented mod requests”