Page 1 of 1

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

Posted: Sat May 03, 2025 3:54 pm
by SWeini
05-03-2025, 17-44-46.png
05-03-2025, 17-44-46.png (402.67 KiB) Viewed 1445 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.

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

Posted: Sun May 04, 2025 10:38 am
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.

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

Posted: Wed May 07, 2025 9:22 pm
by Rseding91
This is now fixed for the next release.

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

Posted: Thu May 08, 2025 4:50 am
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?

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

Posted: Sat May 10, 2025 5:51 pm
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.