Page 1 of 1

[1.1.27] Way to detect type of fast transfer

Posted: Wed Mar 24, 2021 12:55 am
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.