`on_undo_applied` does not fire until after the operation is complete. I need an event that fires before. Event tracing reveals no such ordinary game event.
The custom input event does in fact fire at the needed time, but only if CTRL+Z is pressed. If the undo GUI button is pressed, it does not ...
Search found 9 matches
- Sun Oct 05, 2025 9:37 pm
- Forum: Not a bug
- Topic: [2.0.69] Custom input linked to `undo` game action doesn't fire on undo GUI shortcut
- Replies: 3
- Views: 309
- Sat Oct 04, 2025 5:46 pm
- Forum: Not a bug
- Topic: [2.0.69] Custom input linked to `undo` game action doesn't fire on undo GUI shortcut
- Replies: 3
- Views: 309
[2.0.69] Custom input linked to `undo` game action doesn't fire on undo GUI shortcut
Reproduction steps:
1) Add the following prototype in data phase:
data:extend({
{
type = "custom-input",
name = "things-linked-undo",
key_sequence = "",
linked_game_control = "undo",
},
})
2) In control phase, monitor when the above custom input fires, e.g.
script.on_event("things ...
1) Add the following prototype in data phase:
data:extend({
{
type = "custom-input",
name = "things-linked-undo",
key_sequence = "",
linked_game_control = "undo",
},
})
2) In control phase, monitor when the above custom input fires, e.g.
script.on_event("things ...
- Fri Sep 19, 2025 1:46 am
- Forum: Modding interface requests
- Topic: `LuaEntity::supports_mirroring` and `on_player_flipped_entity`
- Replies: 0
- Views: 300
`LuaEntity::supports_mirroring` and `on_player_flipped_entity`
(Spawned from a discord discussion beginning here: https://discord.com/channels/139677590393716737/306402592265732098/1418345907954515989 )
In order of difficulty level:
1) By analogy with https://lua-api.factorio.com/latest/classes/LuaEntity.html#supports_direction I would like to request that ...
In order of difficulty level:
1) By analogy with https://lua-api.factorio.com/latest/classes/LuaEntity.html#supports_direction I would like to request that ...
- Thu Sep 11, 2025 9:39 pm
- Forum: Resolved Problems and Bugs
- Topic: [raiguard] `LuaRecord.is_preview` and the `on_pre_build` event.
- Replies: 3
- Views: 1417
[raiguard] `LuaRecord.is_preview` and the `on_pre_build` event.
(In the #mod-dev-help discord channel, Bilka asked for a forum post to be made about this issue. Link to the original discord discussion: here )
We received the following multiplayer crash report:
09-11-2025, 14-34-14.png
Upon analysis, we found the crash is occurring in the `on_pre_build ...
We received the following multiplayer crash report:
09-11-2025, 14-34-14.png
Upon analysis, we found the crash is occurring in the `on_pre_build ...
- Thu May 01, 2025 7:21 am
- Forum: Modding interface requests
- Topic: Reduce overhead of LuaEntity::get_signals with parameter if_modified_since
- Replies: 2
- Views: 415
Re: Reduce overhead of LuaEntity::get_signals with parameter if_modified_since
Seconded. This could save considerably Lua time in any mod that uses combinators for gathering input.
- Tue Apr 01, 2025 1:19 am
- Forum: Modding interface requests
- Topic: Routing trains to specific stops
- Replies: 8
- Views: 1543
Re: [2.0.43+] Routing trains to specific stops
For Project Cybersyn we have considered various workarounds, up to and including just forcing the priorities of all same-named stops to 50. Ultimately we settled on issueing a warning when a controlled train lands at a stop with priority not equal to 50.
We have simply been telling people not to ...
We have simply been telling people not to ...
- Mon Mar 31, 2025 9:18 pm
- Forum: Modding interface requests
- Topic: Routing trains to specific stops
- Replies: 8
- Views: 1543
Re: [2.0.43+] Routing trains to specific stops
With the addition of the new and very helpful LuaSchedule API, I thought it would be a good time to raise this issue again. Having to use intermediating rail stops causes fundamental issues with the builtin priority and train limits systems.
Being able to schedule a train directly to a specific ...
Being able to schedule a train directly to a specific ...
- Mon Nov 11, 2024 6:17 pm
- Forum: Modding interface requests
- Topic: Routing trains to specific stops
- Replies: 8
- Views: 1543
Re: [2.0] Routing trains to specific stops
Changed the title.
I don't think it's a duplicate, though. All of the information and developer responses in that thread are no longer valid due to the introduction of train priority. This is a new issue that was solvable in 1.1 but isn't in 2.0.
I don't think it's a duplicate, though. All of the information and developer responses in that thread are no longer valid due to the introduction of train priority. This is a new issue that was solvable in 1.1 but isn't in 2.0.
- Sun Nov 10, 2024 5:43 pm
- Forum: Modding interface requests
- Topic: Routing trains to specific stops
- Replies: 8
- Views: 1543
Routing trains to specific stops
Mods that generate train schedules often want to send trains to particular stations, even in the absence of unique station names. However, train schedules send trains by station name and can't target particular stations.
In 1.x, mods like LTN would work around this by adding the coordinates of a ...
In 1.x, mods like LTN would work around this by adding the coordinates of a ...