Page 1 of 1

AddRecordData rail_direction documentation issue

Posted: Wed Mar 05, 2025 1:45 am
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

Re: AddRecordData rail_direction documentation issue

Posted: Wed Mar 05, 2025 8:33 am
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.

Re: AddRecordData rail_direction documentation issue

Posted: Thu Mar 06, 2025 5:58 am
by hgschmie
Thanks for adding that explanation. I will update my code accordingly.