diff --git a/Assets/Scripts/ServerShared/CargoTransfer.cs b/Assets/Scripts/ServerShared/CargoTransfer.cs index 6484bace8..45208d948 100644 --- a/Assets/Scripts/ServerShared/CargoTransfer.cs +++ b/Assets/Scripts/ServerShared/CargoTransfer.cs @@ -15,7 +15,8 @@ public enum GiveEnd ReceiverGone, ReceiverFull, NothingLeft, - GiverDocked + GiverDocked, + GiverGone } // A pilot's standing offer of goods to a ship alongside. Runtime only: nothing about a give is saved. diff --git a/Assets/Scripts/ServerShared/Zone.cs b/Assets/Scripts/ServerShared/Zone.cs index 8bc152eaa..d395f722a 100644 --- a/Assets/Scripts/ServerShared/Zone.cs +++ b/Assets/Scripts/ServerShared/Zone.cs @@ -299,11 +299,13 @@ public class Zone if (piloted) Agents.Add(CreateAgent((Ship) entity, task)); } - // The one removal from this zone (death, dock, jump): membership and its death watch leave together. False, and - // nothing changes, when the entity is not a member. The caller deactivates; Remove does not. + // The one removal from this zone (death, dock, jump): membership and its death watch leave together, and so does the + // entity's give, which ends GiverGone unless a dock already ended it. False, and nothing changes, when the entity is + // not a member. The caller deactivates; Remove does not. public bool Remove(Entity entity) { if (!_entities.Remove(entity)) return false; + CargoTransfer.End(entity, GiveEnd.GiverGone); _deathWatches.Remove(entity, out var watch); watch.Dispose(); foreach (var floating in FloatingItems)