[1.1.27] Way to detect type of fast transfer

User avatar
wasmoo
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Apr 27, 2020 11:57 am
Contact:

[1.1.27] Way to detect type of fast transfer

Post by wasmoo »

I am making a mod that implements a burner-powered roboport. I do this by forcing buildings on the same location (a roboport, a power pole, and a burner-generator.) I want to allow the user to fast-transfer fuel into the generator.

Currently, I have code that detects when the user attempts to fast-transfer fuel into the roboport. This triggers an on_player_fast_transferred event, and I manually move the fuel from the cursor's stack to the generator (including the text and sound.)

However, this only works for full-stack transfers (e.g. ctrl-left-click). Half-stack transfers (e.g. ctrl-right-click) triggers the same event, so still performs the full-stack transfer. If I knew which type of transfer was attempted, I could forward that to the generator.
Bilka
Factorio Staff
Factorio Staff
Posts: 3634
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [1.1.27] Way to detect type of fast transfer

Post by Bilka »

This was added as the is_split parameter in on_player_fast_transferred.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Implemented mod requests”