Game Scene Split up
This commit is contained in:
@@ -81,6 +81,10 @@ namespace ProjectM.Authoring
|
||||
// plus the server-only respawn timer.
|
||||
AddComponent<Dead>(entity);
|
||||
SetComponentEnabled<Dead>(entity, false);
|
||||
// Dev god-mode gate (enableable, server-only) baked DISABLED so toggling it is a bit flip, never structural.
|
||||
AddComponent<DebugGodMode>(entity);
|
||||
SetComponentEnabled<DebugGodMode>(entity, false);
|
||||
|
||||
AddComponent(entity, new RespawnState { RespawnTick = 0, DelayTicks = authoring.RespawnDelayTicks, InvulnTicks = authoring.RespawnInvulnTicks });
|
||||
AddComponent(entity, new RespawnInvuln { UntilTick = 0 });
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user