Remember a hostile's stance with its sighting; pin the lapse, claim and distance rules
RememberedHostiles read the stance the freshest reveal was made under (Reveal.Hostile, surfaced as Contact.Hostile) instead of IsHostileTo now, so a hostile held by the observer's override keeps its marker and the music after it dies or warps, until the bearing lapses. The departure test no longer re-sets the override. New tests: the Detected clause for an in-zone lapsed hostile, position independence for far hostiles on three sides, a within-category lie in ClaimedClasses, and the stale warning of a docked ship. The HUD no longer collects sweeps for a docked ship, and a sweep flash resets the pooled lock indicator's motion. Untested here: the Unity-side changes (ActionGameManager) have no headless test and no compile has run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2b726a998b
commit
2ea329e6f1
5 changed files with 110 additions and 11 deletions
|
|
@ -1375,8 +1375,10 @@ public class ActionGameManager : MonoBehaviour
|
|||
{
|
||||
if (Zone != steppedZone) return;
|
||||
steppedZone.Update(delta);
|
||||
// A warning lives one tick, so sweeps are collected per tick, never read per frame.
|
||||
if (CurrentEntity != null && CurrentEntity.Zone == steppedZone)
|
||||
// A warning lives one tick, so sweeps are collected per tick, never read per frame. A docked ship is out of the
|
||||
// zone's updates, so its published warnings go stale and are not collected (UpdateTargetIndicators drains only
|
||||
// while it is free).
|
||||
if (CurrentEntity != null && CurrentEntity.Zone == steppedZone && CurrentEntity.Parent == null)
|
||||
foreach (var warning in CurrentEntity.IncomingPaints)
|
||||
if (warning.Mode == PaintMode.Search) _pendingSweeps.Add((warning.Bearing, steppedZone.Time));
|
||||
});
|
||||
|
|
@ -1563,6 +1565,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
foreach (var (bearing, time) in _pendingSweeps)
|
||||
{
|
||||
var indicator = LockIndicator.Instantiate<PlaceUIElementWorldspace>();
|
||||
ApplyLockProgress(indicator, indicator.GetComponent<Rotate>(), 0); // a pooled lock indicator keeps its last tightening
|
||||
_sweepFlashes.Add((indicator, indicator.GetComponentInChildren<Image>(), bearing, time));
|
||||
}
|
||||
_pendingSweeps.Clear();
|
||||
|
|
|
|||
Loading…
Reference in a new issue