Belt Speed Read Access

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 884
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Belt Speed Read Access

Post by Impatient »

hi devs,

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
Motivation

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
solely because of that i think it is necessary, to be able to find out what the speed value of a transport-belt entity is. imagine the following: even if a modder creates 3 entities for the 3 different stock speeds, the entity they need to interact with, may run with non stock speeds.
Post Reply

Return to “Implemented mod requests”