LANTERN purge B1: delete the automation chain (Harvester/Conveyor/Fabricator)
Deletes the M7 production systems, automation components/math, authoring, 3 machine prefabs, and 6 test files (-43 tests, 459 green). Trims the automation paths out of BaseRestoreSystem/SaveStructureScan/BuildPlaceSystem/BuildSendSystem/ HudSystem/HudTheme/StructureCatalogAuthoring/Tuning. RuntimePlacedTag (save marker, a keeper) re-homed into StructureComponents.cs. StructureType byte codes stay reserved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,9 +29,8 @@ namespace ProjectM.Client
|
||||
{
|
||||
(UnityEngine.InputSystem.Key.B, StructureType.Turret),
|
||||
(UnityEngine.InputSystem.Key.V, StructureType.Wall),
|
||||
(UnityEngine.InputSystem.Key.F, StructureType.Fabricator),
|
||||
// DR-042 C6d: Pylon/Harvester/Conveyor are dead (unwired automation) — dropped from the hotkey fallback
|
||||
// to match the hidden build palette; their PlaceStructure execute_code statics remain for dev.
|
||||
// LANTERN purge: the automation buildables (Fabricator/Harvester/Conveyor) are deleted; Pylon stays
|
||||
// hidden from the hotkey fallback to match the build palette. PlaceStructure execute_code statics remain.
|
||||
};
|
||||
|
||||
UnityEngine.Camera _camera; // cursor -> ground re-raycast for click-to-place (resolved lazily)
|
||||
@@ -61,9 +60,6 @@ namespace ProjectM.Client
|
||||
/// <summary>EDITOR / execute_code hook: queue a wall placement at a specific cell.</summary>
|
||||
public static void PlaceWall(int cellX, int cellZ) => PlaceStructure(StructureType.Wall, cellX, cellZ);
|
||||
|
||||
/// <summary>EDITOR / execute_code hook: queue a fabricator placement at a specific cell.</summary>
|
||||
public static void PlaceFabricator(int cellX, int cellZ) => PlaceStructure(StructureType.Fabricator, cellX, cellZ);
|
||||
|
||||
#endif
|
||||
|
||||
protected override void OnCreate()
|
||||
|
||||
@@ -96,8 +96,8 @@ namespace ProjectM.Client
|
||||
Label _aetherNum, _oreNum, _bioNum, _chargeNum;
|
||||
|
||||
// build palette + hints
|
||||
VisualElement _paletteRow, _hintBar, _facingArrow, _buildDiscoveryChip;
|
||||
bool _paletteBuilt, _hintBuilt, _hintConveyor;
|
||||
VisualElement _paletteRow, _hintBar, _buildDiscoveryChip;
|
||||
bool _paletteBuilt, _hintBuilt;
|
||||
byte _hintScheme = 255;
|
||||
readonly Dictionary<byte, PaletteItem> _palette = new();
|
||||
|
||||
@@ -520,10 +520,7 @@ namespace ProjectM.Client
|
||||
if (buildActive)
|
||||
{
|
||||
byte scheme = AimPresentation.Scheme;
|
||||
bool conv = BuildPaletteState.Selected == StructureType.Conveyor;
|
||||
if (!_hintBuilt || _hintScheme != scheme || _hintConveyor != conv) RebuildHints(scheme, conv);
|
||||
if (conv && _facingArrow != null)
|
||||
_facingArrow.style.rotate = new StyleRotate(new Rotate(new Angle(FacingDegrees(BuildPaletteState.Direction))));
|
||||
if (!_hintBuilt || _hintScheme != scheme) RebuildHints(scheme);
|
||||
_hintBar.style.display = DisplayStyle.Flex;
|
||||
}
|
||||
else
|
||||
@@ -678,10 +675,8 @@ namespace ProjectM.Client
|
||||
}
|
||||
}
|
||||
|
||||
// DR-042 C6d: Harvester/Conveyor/Pylon are dead (unwired automation) -> hidden from the build palette
|
||||
// (catalog + prefabs stay baked, code-intact per DR-020). Only Turret/Wall/Fabricator are buildable in the UI.
|
||||
static bool IsPaletteType(byte type) =>
|
||||
type != StructureType.Pylon && type != StructureType.Harvester && type != StructureType.Conveyor;
|
||||
// LANTERN purge: the automation buildables are deleted; Pylon stays hidden from the build palette (cosmetic-only).
|
||||
static bool IsPaletteType(byte type) => type != StructureType.Pylon;
|
||||
|
||||
void UpdatePalette(int aether, int ore, int bio, bool onExpedition)
|
||||
{
|
||||
@@ -769,30 +764,15 @@ namespace ProjectM.Client
|
||||
_palette[type] = new PaletteItem { Root = root, Cost = costLabel, CostAmount = cost, CostRes = costRes, Glow = glow, Icon = iconEl };
|
||||
}
|
||||
|
||||
void RebuildHints(byte scheme, bool conveyor)
|
||||
void RebuildHints(byte scheme)
|
||||
{
|
||||
_hintBar.Clear();
|
||||
_facingArrow = null;
|
||||
var theme = HudTheme.Get();
|
||||
bool pad = scheme == InputSchemeId.Gamepad;
|
||||
AddHint(pad ? theme?.PadPlace : theme?.KbmPlace, pad ? "A" : "LMB", "PLACE");
|
||||
AddHint(pad ? theme?.PadCancel : theme?.KbmCancel, pad ? "B" : "RMB", "CANCEL");
|
||||
if (conveyor)
|
||||
{
|
||||
// Rotate hint + a LIVE facing arrow (resolves the DR-021 conveyor-facing indicator). Only conveyors
|
||||
// rotate, so this chip is gated to them — the other buildables don't show a meaningless ROTATE.
|
||||
var chip = MakeChip();
|
||||
chip.Add(HudUi.Glyph(pad ? theme?.PadRotate : null, pad ? "LB" : "R", 26));
|
||||
var lbl = HudUi.Text("FACING", 12, MenuUi.SubCol, TextAnchor.MiddleLeft);
|
||||
lbl.style.marginLeft = 5; lbl.style.marginRight = 6;
|
||||
chip.Add(lbl);
|
||||
_facingArrow = HudUi.Icon(theme != null ? theme.ConveyorIcon : null, 24, AetherCyan);
|
||||
chip.Add(_facingArrow);
|
||||
_hintBar.Add(chip);
|
||||
}
|
||||
AddHint(pad ? theme?.PadExit : null, pad ? "MENU" : "ESC", "EXIT");
|
||||
_hintScheme = scheme;
|
||||
_hintConveyor = conveyor;
|
||||
_hintBuilt = true;
|
||||
}
|
||||
|
||||
@@ -1313,17 +1293,6 @@ namespace ProjectM.Client
|
||||
return resId == ResourceId.Aether ? t.AetherIcon : resId == ResourceId.Biomass ? t.BioIcon : t.OreIcon;
|
||||
}
|
||||
|
||||
// Conveyor facing (BuildPaletteState.Direction 0=+X,1=-X,2=+Z,3=-Z) → arrow rotation; the arrow art points up (+Z).
|
||||
static float FacingDegrees(byte dir)
|
||||
{
|
||||
switch (dir)
|
||||
{
|
||||
case 0: return 90f; // +X
|
||||
case 1: return 270f; // -X
|
||||
case 3: return 180f; // -Z
|
||||
default: return 0f; // +Z
|
||||
}
|
||||
}
|
||||
|
||||
static Color PhaseColor(byte phase)
|
||||
{
|
||||
@@ -1352,9 +1321,6 @@ namespace ProjectM.Client
|
||||
case StructureType.Turret: return "Turret";
|
||||
case StructureType.Wall: return "Wall";
|
||||
case StructureType.Pylon: return "Pylon";
|
||||
case StructureType.Harvester: return "Harvester";
|
||||
case StructureType.Fabricator: return "Fabricator";
|
||||
case StructureType.Conveyor: return "Conveyor";
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,14 +51,10 @@ namespace ProjectM.Client
|
||||
public Sprite TurretIcon;
|
||||
public Sprite WallIcon;
|
||||
public Sprite PylonIcon;
|
||||
public Sprite HarvesterIcon;
|
||||
public Sprite FabricatorIcon;
|
||||
public Sprite ConveyorIcon;
|
||||
|
||||
[Header("Build-ghost preview meshes (authored real-size, ground pivot — BuildSendSystem)")]
|
||||
public Mesh TurretGhostMesh;
|
||||
public Mesh WallGhostMesh;
|
||||
public Mesh FabricatorGhostMesh;
|
||||
|
||||
[Header("Build-mode control glyphs")]
|
||||
public Sprite KbmPlace; // LMB
|
||||
@@ -89,9 +85,6 @@ namespace ProjectM.Client
|
||||
case StructureType.Turret: return TurretIcon;
|
||||
case StructureType.Wall: return WallIcon;
|
||||
case StructureType.Pylon: return PylonIcon;
|
||||
case StructureType.Harvester: return HarvesterIcon;
|
||||
case StructureType.Fabricator: return FabricatorIcon;
|
||||
case StructureType.Conveyor: return ConveyorIcon;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
@@ -103,7 +96,6 @@ namespace ProjectM.Client
|
||||
{
|
||||
case StructureType.Turret: return TurretGhostMesh;
|
||||
case StructureType.Wall: return WallGhostMesh;
|
||||
case StructureType.Fabricator: return FabricatorGhostMesh;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user