mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-18 09:14:09 +00:00
fixed
This commit is contained in:
@@ -9,15 +9,15 @@
|
|||||||
},
|
},
|
||||||
"pattern": {
|
"pattern": {
|
||||||
"stripes_v": {
|
"stripes_v": {
|
||||||
"pattern": "ARAIBQ==",
|
"pattern": "ASQQVVU=",
|
||||||
"role_group": ["all"]
|
"role_group": ["all"]
|
||||||
},
|
},
|
||||||
"stripes_h": {
|
"stripes_h": {
|
||||||
"pattern": "ARAIAw==",
|
"pattern": "ASQQDw8=",
|
||||||
"role_group": ["all"]
|
"role_group": ["all"]
|
||||||
},
|
},
|
||||||
"checkerboard": {
|
"checkerboard": {
|
||||||
"pattern": "ARAICQ==",
|
"pattern": "ASQQpaU=",
|
||||||
"role_group": ["all"]
|
"role_group": ["all"]
|
||||||
},
|
},
|
||||||
"diagonal": {
|
"diagonal": {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export class PatternDecoder {
|
|||||||
height > 63
|
height > 63
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Scale must be 1–128, width must be 1–127, and height must be 1–63.",
|
`Invalid pattern metadata: scale (log₂)=${scale}, width=${width}, height=${height}. Expected: scale 0–7, width 1–127, height 1–63.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -219,7 +219,10 @@ export class TerritoryPatternsModal extends LitElement {
|
|||||||
const cellCountX = decoder.getTileWidth();
|
const cellCountX = decoder.getTileWidth();
|
||||||
const cellCountY = decoder.getTileHeight();
|
const cellCountY = decoder.getTileHeight();
|
||||||
|
|
||||||
const cellSize = Math.min(height / cellCountY, width / cellCountX);
|
const cellSize =
|
||||||
|
cellCountX > 0 && cellCountY > 0
|
||||||
|
? Math.min(height / cellCountY, width / cellCountX)
|
||||||
|
: 1;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user