[2.0.47] copy-pasted offshore-pump ghost is missing fluid information
[2.0.47] copy-pasted offshore-pump ghost is missing fluid information
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
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.
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
This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.47] copy-pasted offshore-pump ghost is missing fluid information
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
For 2.0.48 i added LuaEntityPrototype::fluid_source_offset read.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?