Game Scene Split up

This commit is contained in:
2026-06-04 13:45:46 -07:00
parent dbc4a92a86
commit 16b01bec38
49 changed files with 11976 additions and 188 deletions
@@ -15,6 +15,22 @@ namespace ProjectM.Authoring
/// </summary>
public class CycleDirectorAuthoring : MonoBehaviour
{
[Header("Threat — post-expedition retaliation")]
[Tooltip("A completed expedition (a player returning to base) can draw a retaliation siege.")]
public bool PostExpeditionEnabled = true;
[Tooltip("Telegraph/arming delay (server ticks @60) between the return and the siege spawning.")]
public uint PostExpeditionDelayTicks = 300;
[Tooltip("Siege size floor (Husk count) for a post-expedition retaliation.")]
public int SiegeSizeBase = 5;
[Tooltip("Extra Husks per unit of resources hauled back this run (0 = flat SiegeSizeBase).")]
public int SiegeSizePerResource = 0;
[Tooltip("Max server ticks a siege may run before it auto-collapses (no soft-lock). 0 = no cap.")]
public uint SiegeTimeoutTicks = 3600;
private class CycleDirectorBaker : Baker<CycleDirectorAuthoring>
{
public override void Bake(CycleDirectorAuthoring authoring)
@@ -22,13 +38,22 @@ namespace ProjectM.Authoring
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
AddComponent(entity, new CycleState
{
Phase = CyclePhase.Expedition,
Phase = CyclePhase.Calm,
CycleNumber = 1,
PhaseEndTick = 0u,
});
AddComponent<ResourceLedger>(entity);
AddBuffer<StorageEntry>(entity);
AddComponent(entity, new GoalProgress { Charge = 0, Target = 10 });
AddComponent(entity, new ThreatConfig
{
PostExpeditionEnabled = (byte)(authoring.PostExpeditionEnabled ? 1 : 0),
PostExpeditionDelayTicks = authoring.PostExpeditionDelayTicks,
SizeBase = authoring.SiegeSizeBase,
SizePerExpeditionResource = authoring.SiegeSizePerResource,
StartCondition = ThreatStartCondition.Immediate,
SiegeTimeoutTicks = authoring.SiegeTimeoutTicks,
});
}
}
}