From 725d8235c34661945ca8ff7d4d28daedaa76d73a Mon Sep 17 00:00:00 2001 From: soul Date: Sat, 28 Nov 2026 23:10:35 +0100 Subject: [PATCH] Delete IPopulationAssignment, Entity.PopulationAssignments and AssignedPopulation: no implementer, no reader (cut habitation-gear) Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/Behaviors/Behaviors.cs | 5 ----- Assets/Scripts/ServerShared/Entity.cs | 9 --------- 2 files changed, 14 deletions(-) diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index 5034b6460..133de8e3a 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -124,11 +124,6 @@ public interface IProgressBehavior float Progress { get; } } -public interface IPopulationAssignment -{ - int AssignedPopulation { get; set; } -} - // Cut 3 (docs/stats-and-power-cut.md §1.2): a behaviour that wants to draw from its entity's PowerBus declares a // request instead of spending energy itself. PowerBus.Step calls this on every consumer once per tick, before // any behaviour's Execute runs, so PowerRequest must be computable from state that is already current at that diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index b8ac374d7..e51f7aae8 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -153,8 +153,6 @@ public abstract class Entity public (List weapons, List items)[] WeaponGroups; - public List PopulationAssignments = new List(); - // Cut 2 (docs/stats-and-power-cut.md): the sole owner of every resolved (item, stat) value for this entity. // Constructed with the entity and reachable only from it -- nothing on the catalog side ever points back -- // so it is collected with the entity instead of surviving it for the life of the process (§0.3, §1.1). @@ -227,7 +225,6 @@ public abstract class Entity public float MaxTemp { get; private set; } public float MinTemp { get; private set; } public ItemManager ItemManager { get; } - public int AssignedPopulation => PopulationAssignments.Sum(pa => pa.AssignedPopulation); public float Mass { get; private set; } public float Visibility => VisibilitySources.Values.Sum(s => s.Strength); @@ -2243,12 +2240,6 @@ public class EquippedItem : IStatContext Behaviors = g.ToArray() }); - foreach (var behavior in Behaviors) - { - if(behavior is IPopulationAssignment populationAssignment) - entity.PopulationAssignments.Add(populationAssignment); - } - // Cut 5 (docs/stats-and-power-cut.md §1.3, Q5 "defaulted per behaviour kind"): seed the stored tier // exactly once, the first time this unit is ever equipped. A unit the player has already assigned a // tier to (or one seeded on an earlier equip) keeps it -- this never runs again for that unit.