(Warning: I am a spring / zero-k code newbie)
I am trying to understand how it would work to prevent reclaiming what a friendly unit is resurrecting but it is a bit difficult to dive into the code.
I stumbled upon that though:
https://github.com/spring/spring/blob/develop/rts/Sim/Units/CommandAI/BuilderCAI.cpp#L1004-L1013AFAIKT it should prevent an internal order (which should apply to area reclaim and patrol) from reclaiming something that is being resurrected unless the control key is pressed (and I think this behaviour can be reversed in the configuration).
(I am not sure this behaviour is documented)
Also this:
https://github.com/spring/spring/blob/develop/rts/Sim/Units/CommandAI/BuilderCAI.cpp#L1569-L1570This should prevent taking a resurrected unit as target for reclaim.
Could someone else please check if it is supposed to do part of what is asked in this thread?
Is it possible that this kind of reclaim is already prevented?
If so, is there a bug hidden? Are the players having control pressed thus overriding the logic?
The other part about preventing reclaiming if the unit is partially resurrected even if not being resurrected at the moment does not seem to be handled at the moment looking at this code:
https://github.com/spring/spring/blob/develop/rts/Sim/Units/CommandAI/BuilderCAI.cpp#L1440-L1472Maybe it would require a list of units being resurrected (and units would be removed from it ).
Allowing to stop reclaim if already started seems quite different and not attempted at all (that looks quite tricky unless the unit wakes up periodically to check or if the resurrecting unit can notify the reclaiming units).