using UnityEngine; namespace ProjectM.Client { /// /// Live-tunable knobs for the client-only DECALS slice (Phase 1.5b bundle 2: explosion scorch pool, cover /// damage cracks, room-arena scars). A static bridge (mirrors / ) /// so values can be poked at runtime via MCP execute_code without a recompile /// (e.g. ProjectM.Client.DecalConfig.ScorchColor = ...;). Read ONLY by the decal presentation systems /// (, ) and — all /// managed, main-thread. NEVER read from a [BurstCompile] system (managed-static + Color-in-Burst hazards). /// re-stamps on play-enter via [RuntimeInitializeOnLoadMethod] because statics survive /// fast-enter-playmode reloads (else a poked value leaks across play-enters). /// public static class DecalConfig { /// Master gate for every decal (scorch pool + cover cracks + room scars). public static bool Enabled; // ---- explosion scorch pool (ScorchDecalSystem) ---- /// Scorch disc radius as a multiple of the explosion radius passed to RequestScorch. public static float ScorchRadiusMul; /// Seconds a fresh scorch holds at full strength before it starts fading. public static float ScorchHoldSec; /// Seconds a scorch fades from full to gone (then returns to the pool). public static float ScorchFadeSec; /// Peak scorch tint (dark char); the alpha is the peak opacity it fades from. public static Color ScorchColor; /// Max live scorch decals; the oldest is recycled past this. public static int ScorchPoolCap; // ---- cover damage cracks (CoverDamageSystem) ---- /// Crack-decal tint (dark). public static Color CoverCrackColor; /// Max crack decals accreted around one cover rock as it is carved to 0. public static int CoverCrackMaxCount; /// Drop a small ground scorch/debris mark where a cover rock shattered. public static bool CoverShatterScorch; // ---- room-arena scars (RoomDressingSystem) ---- /// Persistent crack/scorch detail decals laid at the room arena centre (0 = off). public static int RoomArenaDecalCount; /// Room-arena scar tint (dark, subtle). public static Color RoomDecalColor; [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] public static void ResetDefaults() { Enabled = true; // scorch pool — slightly inside the blast radius so it reads as the burn, not the danger ring ScorchRadiusMul = 0.85f; ScorchHoldSec = 4f; ScorchFadeSec = 6f; ScorchColor = new Color(0.05f, 0.04f, 0.03f, 0.85f); // near-black char, mostly opaque at peak ScorchPoolCap = 24; // cover cracks CoverCrackColor = new Color(0.06f, 0.05f, 0.05f, 0.8f); CoverCrackMaxCount = 3; CoverShatterScorch = true; // room-arena scars RoomArenaDecalCount = 3; RoomDecalColor = new Color(0.08f, 0.07f, 0.06f, 0.5f); // subtle } } }