Clash Blueprint Engine API
    Preparing search index...

    Function parseRulePack

    • Parameters

      • json: unknown
      • source: string = "rule-pack"

      Returns Result<
          {
              buildings: { id: string; maxCount: number }[];
              gridSize: number;
              required: { id: string; max?: number; min: number }[];
              spatial: (
                  | {
                      metric: "chebyshev"
                      | "manhattan"
                      | "euclidean";
                      minDistance: number;
                      severity: "error" | "warning" | "suggestion";
                      target: { id: string } | { category: string };
                      type: "minSpacing";
                  }
                  | {
                      buffer: number;
                      severity: "error"
                      | "warning"
                      | "suggestion";
                      target?: { id: string } | { category: string };
                      type: "edgeBuffer";
                  }
                  | {
                      severity: "error"
                      | "warning"
                      | "suggestion";
                      target: { id: string } | { category: string };
                      tolerance: number;
                      type: "centered";
                  }
                  | {
                      maxDistance: number;
                      metric: "chebyshev"
                      | "manhattan"
                      | "euclidean";
                      near: { id: string } | { category: string };
                      severity: "error" | "warning" | "suggestion";
                      target: { id: string } | { category: string };
                      type: "proximity";
                  }
              )[];
              tier: number;
              walls: number;
          },
          ParseError,
      >