Reason: Allows mods to create niche stops that aren't in the base game, like "no filtered cargo slot is empty"
Possible API:
Adding conditions:
Code: Select all
script.add_train_stop(handler)
Handler:
Code: Select all
function handler(train, current_stop)
// Do stuff
return {
complete: boolean, -- Determines if the stop is satisfied; required.
progress: float [0, 1] -- For displaying progress bar on stop condition; optional, defaults to 0
}
end
If the API ends up looking different, that's fine - I just wanted to show what it could look like.
Edit:
Ideally, you could also include item/circuit signal selectors, like the Item Count condition has. But even basic stops, similar to Full Cargo, would be helpful.