[1.1.27] Way to detect type of fast transfer

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
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.

Post Reply

Return to “Modding interface requests”