Delete IPopulationAssignment, Entity.PopulationAssignments and AssignedPopulation: no implementer, no reader (cut habitation-gear)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9e3f16ecb9
commit
725d8235c3
2 changed files with 0 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -153,8 +153,6 @@ public abstract class Entity
|
|||
|
||||
public (List<Weapon> weapons, List<EquippedItem> items)[] WeaponGroups;
|
||||
|
||||
public List<IPopulationAssignment> PopulationAssignments = new List<IPopulationAssignment>();
|
||||
|
||||
// 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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue