[2.0.47] copy-pasted offshore-pump ghost is missing fluid information

This subforum contains all the issues which we already resolved.
SWeini
Inserter
Inserter
Posts: 42
Joined: Mon Apr 04, 2022 6:43 am
Contact:

[2.0.47] copy-pasted offshore-pump ghost is missing fluid information

Post by SWeini »

05-03-2025, 17-44-46.png
05-03-2025, 17-44-46.png (402.67 KiB) Viewed 617 times
The left ghost was created using pipette
The right ghost was created using copy&paste (or by undoing a deconstruction)

The issue: In my mod I can't find a way to know which fluid the right ghost will pump
LuaFluidBox.get_locked_fluid(1) returns nil (returns correct fluid for right ghost)
OffshorePumpPrototype.fluid_source_offset is not accessible from control stage (or is it?)

Aside from modding, having consistency and a water icon on top of the ghost is probably the correct behavior.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3883
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.47] copy-pasted offshore-pump ghost is missing fluid information

Post by boskid »

This is not so obvious to handle as you are trying to make it look like.

Actual bug here is that the manually placed ghost has a fluid filter set - it was supposed to be set when real offshore pump is placed (or when a ghost is revived). There is however a tiny simplification in the code where ghost is temporarily setup due to buildability checks as an offshore pump built manually goes through fluid mixing checks (entities from blueprint are not checked against fluid mixing). As part of this buildability check, the filter is set but it is not cleared after buildability check and so there is that leftover icon set on the offshore pump. A fix for this would be quite simple: offshore pump would reset fluid filter when destroyed, but that would make both offshore pumps not have filters which i see is against your expectations.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15545
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.47] copy-pasted offshore-pump ghost is missing fluid information

Post by Rseding91 »

This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
SWeini
Inserter
Inserter
Posts: 42
Joined: Mon Apr 04, 2022 6:43 am
Contact:

Re: [2.0.47] copy-pasted offshore-pump ghost is missing fluid information

Post by SWeini »

Rseding91 wrote: Wed May 07, 2025 9:22 pm This is now fixed for the next release.
Thanks a lot for fixing. Regarding OffshorePumpPrototype.fluid_source_offset, was I just blind or is this really missing from runtime stage API?
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3883
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.47] copy-pasted offshore-pump ghost is missing fluid information

Post by boskid »

SWeini wrote: Thu May 08, 2025 4:50 am Regarding OffshorePumpPrototype.fluid_source_offset, was I just blind or is this really missing from runtime stage API?
For 2.0.48 i added LuaEntityPrototype::fluid_source_offset read.
Post Reply

Return to “Resolved Problems and Bugs”