Raise events when train stop limits are changed

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
notnotatschool
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Feb 17, 2021 1:01 am
Contact:

Raise events when train stop limits are changed

Post by notnotatschool »

I'd like it if it were possible for mods to react to train stop limits changing. I imagine this would raise an event with the associated train stop, the old limit, and the new limit. This would be useful for a mod that I am working on but have not yet released.
spam38
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jun 07, 2024 4:07 am
Contact:

Re: Raise events when train stop limits are changed

Post by spam38 »

I second this suggestion. I've been playing around with a train scheduling mod myself, and it would be useful to be able to have an event handler trigger when a stop "requests" that a train be sent to it by increasing its trains_limit property.
ILLISIS
Inserter
Inserter
Posts: 45
Joined: Wed Feb 09, 2022 10:49 am
Contact:

Re: Raise events when train stop limits are changed

Post by ILLISIS »

+1
User avatar
EvilPLa
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Sat Nov 14, 2020 7:26 am
Contact:

Re: Raise events when train stop limits are changed

Post by EvilPLa »

I was just about to make that request myself.

on_train_stop_changed() when Limit (incl. deactivate) or priority changes.

The vanilla train system is almost complete, the one thing I miss is that requests get fulfilled in the order they appear. This would be possible with this kind of event via a simple mod.
I haven't lost my mind, it's backed up on tape somewhere.
Post Reply

Return to “Modding interface requests”