using UnityEngine;
namespace ProjectM.Client
{
///
/// Live-tunable knobs for the client-only AMBIENT LIFE slice (Phase 1.5b bundle 4: fleeing critters +
/// weather beats — cloud-shadow drifts + Blight lightning). Static bridge (mirrors /
/// ) so values can be poked at runtime via MCP execute_code without a recompile.
/// Read ONLY by (managed, main-thread). NEVER read from a [BurstCompile] system.
/// re-stamps on play-enter via [RuntimeInitializeOnLoadMethod] (statics survive
/// fast-enter-playmode reloads). All effects are cosmetic + observe-only — zero netcode.
///
public static class AmbientLifeConfig
{
/// Master gate for every ambient-life effect.
public static bool Enabled;
// ---- fleeing critters (ground bugs + a few birds) ----
/// Master gate for the critter pool.
public static bool CrittersEnabled;
/// Live critters maintained near the camera.
public static int CritterCount;
/// Radius (world u) around the camera critters live in; past it they recycle to the ring edge.
public static float CritterRadius;
/// A critter within this distance of the local player DARTS away (the scatter beat).
public static float CritterFleeRadius;
/// Idle wander speed (u/s).
public static float CritterIdleSpeed;
/// Flee dart speed (u/s) when the player is close.
public static float CritterFleeSpeed;
/// Fraction of the pool that are BIRDS (airborne, faster, flee upward) vs ground bugs.
public static float BirdFraction;
// ---- cloud-shadow drifts ----
/// Master gate for drifting cloud shadows.
public static bool CloudsEnabled;
/// Number of soft dark shadow discs drifting across the ground near the camera.
public static int CloudCount;
/// Shadow disc radius (world u).
public static float CloudSize;
/// Peak shadow opacity (alpha).
public static float CloudAlpha;
/// Drift speed (u/s) across the ground.
public static float CloudDriftSpeed;
// ---- Blight lightning flicker (Blight-biome only) ----
/// Master gate for the Blight lightning beat.
public static bool LightningEnabled;
/// Min / max seconds between lightning strikes.
public static float LightningMinInterval;
public static float LightningMaxInterval;
/// Peak flash directional-light intensity.
public static float LightningIntensity;
/// Flash tint (cool blight white-purple).
public static Color LightningColor;
/// Thunder SFX volume (delayed after the flash).
public static float ThunderVolume;
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
public static void ResetDefaults()
{
Enabled = true;
CrittersEnabled = true;
CritterCount = 10;
CritterRadius = 22f;
CritterFleeRadius = 4f;
CritterIdleSpeed = 0.6f;
CritterFleeSpeed = 6f;
BirdFraction = 0.25f;
CloudsEnabled = true;
CloudCount = 3;
CloudSize = 18f;
CloudAlpha = 0.20f;
CloudDriftSpeed = 1.6f;
LightningEnabled = true;
LightningMinInterval = 6f;
LightningMaxInterval = 16f;
LightningIntensity = 2.4f;
LightningColor = new Color(0.75f, 0.7f, 1f);
ThunderVolume = 0.45f;
}
}
}