Pickup is a capability: PickupData/Pickup run a timed grab through Zone's hold API and TryPickUp (group A, sim)
GrabEvent carries a FloatingBodyId; Zone gains TryHold/SetHeldProgress/Free and places a held item instead of integrating it; Entity.TractorPower is derived from Pickup.Power and TractorCommand is the pilot's input (ActionGameManager writes it undamped, the Time.deltaTime ramp is deleted). Binder and FieldTester change the delegate type only. PickupTests and a save round-trip pin for the player's zone index. Group A builds; no beam is on any generated ship until group B. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e24d942b9d
commit
5aa989abbf
14 changed files with 736 additions and 27 deletions
|
|
@ -42,7 +42,8 @@ public struct KinematicBody
|
|||
}
|
||||
|
||||
// An item adrift in a zone: a death drop or jettisoned cargo. Zone.Release is its only adder; Zone's floating-item
|
||||
// step (expiry) and TryPickUp are its only removers. Runtime state, never saved.
|
||||
// step (expiry) and TryPickUp are its only removers. Zone.TryHold and Free are the only writers of Holder, the
|
||||
// entity grabbing it with a tractor beam; a held item is placed by Zone, not drifted. Runtime state, never saved.
|
||||
public sealed class FloatingItem
|
||||
{
|
||||
public FloatingBodyId Id;
|
||||
|
|
@ -50,4 +51,9 @@ public sealed class FloatingItem
|
|||
public KinematicBody Body;
|
||||
public double ReleasedAt;
|
||||
public float Lifetime;
|
||||
// The entity holding it, or null when it floats free; HeldFrom is where it was claimed and HeldProgress how far
|
||||
// along its pull to the holder (0..1).
|
||||
public Entity Holder;
|
||||
public float2 HeldFrom;
|
||||
public float HeldProgress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue