now i want to officially request read access to the value of the speed of a belt.
it was discussed here:
viewtopic.php?f=25&t=21862
and i already requested it here together with other suggestions:
viewtopic.php?f=28&t=22104
but with this thread it got its own request thread now, to follow the guidelines for requests.
Access could be either as property of LuaTransportLine or LuaEntity.
like this:
Code: Select all
local speed = myBeltPiece.belt_speed
or
local speed = myTransportLine.speed
1. i would like to implement modded entities which can adapt their behavior to the speed of the connected belts. imagine any modded entity, which interacts with belts and then imagine it knows how fast the belts are. then eg i could create a mod, for say a buffer, which integrates seamlessly, no matter if connected to a basic, fast or express belt. the adaptation would not be limited to how fast the modded entity works. it would have programmatic benefits and benfits regarding performance as well. i can program the mod to run its algorithm only every n-th tick if i know the speed of the connected entities.
2. the speed value for modded entities which are based on the type transport-belt can be set in the entities definition. also to a non stock speed value. (stock speed values i call the speed values which come with the basic-, the fast- and the express-belt in vanilla factorio.
Code: Select all
...
fast_replaceable_group = "transport-belt",
speed = 0.03125