mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:40:43 +00:00
fixed
This commit is contained in:
@@ -9,15 +9,15 @@
|
||||
},
|
||||
"pattern": {
|
||||
"stripes_v": {
|
||||
"pattern": "ARAIBQ==",
|
||||
"pattern": "ASQQVVU=",
|
||||
"role_group": ["all"]
|
||||
},
|
||||
"stripes_h": {
|
||||
"pattern": "ARAIAw==",
|
||||
"pattern": "ASQQDw8=",
|
||||
"role_group": ["all"]
|
||||
},
|
||||
"checkerboard": {
|
||||
"pattern": "ARAICQ==",
|
||||
"pattern": "ASQQpaU=",
|
||||
"role_group": ["all"]
|
||||
},
|
||||
"diagonal": {
|
||||
|
||||
@@ -51,7 +51,7 @@ export class PatternDecoder {
|
||||
height > 63
|
||||
) {
|
||||
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 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`
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user