namespace ProjectM.Client { /// /// Client-local build-mode state shared between the HUD build palette (sets the selected buildable), the /// build placement input (ground ghost preview + click-to-place + conveyor rotation), and the input gather /// (suppresses Fire while a build is selected, so a left-click places instead of firing). Pure UI state — /// never replicated, never touches the sim. Reset on play-enter (statics survive fast-enter domain reloads). /// public static class BuildPaletteState { /// Selected structure type (StructureType.*); 0 = none / build mode off. public static byte Selected; /// Pending conveyor facing (0=+X,1=-X,2=+Z,3=-Z); rotated by [ / ] or R. public static byte Direction; /// True while a buildable is selected (build mode active). public static bool Active => Selected != 0; /// Select a type (or 0 to leave build mode), resetting the pending conveyor facing. public static void Select(byte type) { Selected = type; Direction = 0; } /// Leave build mode. public static void Clear() { Selected = 0; Direction = 0; } [UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)] static void ResetStatics() { Selected = 0; Direction = 0; } } }