Phobos-developers / Phobos

Ares-compatible C&C Red Alert 2: Yuri's Revenge engine extension
GNU Lesser General Public License v3.0
298 stars 96 forks source link

If the unit uses BuildLimitGroup, the construction progress will be reset when placing the production building #1414

Open WhiteFeather127 opened 5 days ago

WhiteFeather127 commented 5 days ago

Description

If the unit uses BuildLimitGroup, the construction progress will be reset when placing the production building

Phobos Version

https://github.com/Phobos-developers/Phobos/releases/tag/build-44

Conditions to reproduce

No response

INI code

[HTK]
BuildLimitGroup.Types=HTK
BuildLimitGroup.Nums=1
BuildLimitGroup.Factor=1
BuildLimitGroup.ContentIfAnyMatch=true

Steps to reproduce

Build a FlakTrackGun and place a factory when it hasn't been built yet.

Expected behaviour

The FlakTrackGun should be built.

Actual behaviour

The construction process of FlakTrackGun has been reset to zero and is in a holding state.

Additional context

No response

Checklist

Starkku commented 5 days ago

It is possible to work around this issue by simply not listing the type itself in BuildLimitGroup.Types and using BuildLimit in conjunction for controlling the max limit for a single unit. This may be addressed in future on Phobos's side but it is a conflict with how the existence checking and factory queues work which is somewhat complicated to fully fix AFAIK.