AddRecordData rail_direction documentation issue

User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 113
Joined: Tue Feb 06, 2024 5:18 am
Contact:

AddRecordData rail_direction documentation issue

Post by hgschmie »

AddRecordData uses "RailDirection?" as the attribute definition, this should probably be defines.rail_direction as e.g. https://lua-api.factorio.com/latest/cla ... _direction
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3754
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: AddRecordData rail_direction documentation issue

Post by boskid »

Ok, for 2.0.39 i changed the type to be `defines.rail_direction`. Given that i saw 127270 where you also specify `station` + `rail_direction`, i also added this bit of explanation:
$field(rail_direction, defines.rail_direction, $optional) When `rail` is given, this can be provided to further narrow down direction from which that rail should be approached.
This is to highlight that rail_direction is only relevant if rail is given and is meaningless when station is given.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 113
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: AddRecordData rail_direction documentation issue

Post by hgschmie »

Thanks for adding that explanation. I will update my code accordingly.
Post Reply

Return to “Resolved Requests”