Page 1 of 1

LuaEntity::get_fluid_source_fluid should work with tile ghosts

Posted: Tue Jun 09, 2026 3:48 pm
by SWeini
When using waterfill mod to build some water tile ghosts and add an offshore pump ghost, get_fluid_source_fluid returns nil.

I'd prefer to to have a way to make this work with tile ghosts (maybe optionally), otherwise I have to resort to use get_fluid_source_tile and do all the calculations myself (and the idea behind get_fluid_source_fluid probably was that mods don't have to do that).

I discovered this because of a crash report of my mod. I can fix the crash of my mod as is, but I'd still prefer an extended API. https://mods.factorio.com/mod/sw-rates- ... aefff63cc7

small save attached for reproduction. topmost offshore pump is the one that isn't working, all the others are fine.
06-09-2026, 17-45-45.png
06-09-2026, 17-45-45.png (1.55 MiB) Viewed 102 times