There is several things that seems unanswered on the wiki and Lua API documentation about inserters.
- What are the units for energy_per_movement and energy_per_rotation ?
- What does energy_per_movement and energy_per_rotation means ?
- What are the units for extension_speed and rotation_speed ?
- What does extension_speed and rotation_speed means ?
- Is it possible to control the inserter movement from Lua or is a full re-implementation the only way ?
I couldn't find any explaination on how these are used, though. Nor any official statement saying the units are what I could read on the forum (Except for the Joule, maybe ? But it was written back in 2014). After reading several forum posts from modders, I can only guess energy_per_movement really means "energy consumed per tiles extentions" and energy_per_rotation "energy consumed per full rotation", thus, assuming energy_source.drain is a passive energy consumption:
Is it right ?
Code: Select all
movement_consumption_per_tick = energy_source.drain + extension_speed * energy_per_movement rotation_consumption_per_tick = energy_source.drain + rotation_speed * energy_per_rotation
About controlling the inserter movement, I couldn't find anything. I guess it's handled game-engine-side. The only way I can think of is replacing the inserters prototypes entirely with a type that the game-engine doesn't interpret as an internal inserter implementation, at the cost of preventing other mods from tinkering with the fresh inserter implementation when they're using type filtering to get entities...