using UnityEditor;
using UnityEngine;
namespace NightclubArcadia.EditorTools
{
///
/// Gate for the one-shot scene builders under Assets/Editor.
///
/// Those menus were written when the whole game lived in a single scene. They find
/// or create the dialogue system, the UI canvases, the player and the camera rig,
/// and save the result into one scene. After the split into Bootstrap / Systems /
/// Level, that assumption is false, and running them does damage rather than work:
///
/// - Pointed at a level, they rebuild systems content that already exists in
/// Systems.unity, leaving duplicate UIStateControllers and dialogue runners.
/// - Pointed at Systems, PlayerControlSetup drags navigation in with it. The
/// baked NavMeshData is embedded rather than an asset, and NavMeshData prefers
/// binary serialization, so the whole scene silently turns binary — the exact
/// problem that took a bisection to find the first time (CLAUDE.md trap 1).
///
/// Both were observed, not theorised. So the builders are blocked rather than
/// retargeted, and deliberately not deleted: UILayerSetup alone is 818 lines that
/// still record how the UI layer is wired, and that record is worth keeping until
/// the prefabs replace it (docs/restructure-plan.md Phase 5).
///
/// Asset generators are unaffected. Regenerating SkillDefinitions or the candidate
/// registry from JSON touches no scene and stays available.
///
public static class LegacySceneSetup
{
///
/// Call at the top of any menu that builds scene content. Returns true if the
/// caller should stop, which is currently always.
///
public static bool Blocked(string menuName, string whatItWouldDo)
{
Debug.LogError(
$"'{menuName}' is disabled.\n\n" +
$"It was written for the single-scene layout and would {whatItWouldDo}. " +
"The game is now split across Bootstrap, Systems and a level scene, and the " +
"objects it builds already exist in Assets/Scenes/Systems/Systems.unity.\n\n" +
"To run the game: open Assets/Scenes/Bootstrap.unity and press Play.\n" +
"To verify it comes up: make test-play\n" +
"Rewriting these for the split is docs/restructure-plan.md Phase 5.");
return true;
}
}
}