Editor/Tool/ArchToolSettings.cs
using Editor;

namespace Sunless.Architecture;

// Which subtools this author has taken off their shelves. A tool nobody wants used to be a library nobody
// installed; with one library it is a setting, so a map with no roads on it need not carry the road column.
public static class ArchToolSettings {
	public static bool Hidden( string ident ) => EditorCookie.Get( Key( ident ), false );

	public static void Hide( string ident, bool hidden ) => EditorCookie.Set( Key( ident ), hidden );

	public static void ShowEverything() {
		foreach ( var shell in ArchShelves.Shells ) {
			foreach ( var entry in ArchShelves.All( shell ) ) {
				Hide( entry.Ident, false );
			}
		}
	}

	static string Key( string ident ) => $"arch.shelf.hidden.{ident}";
}