powergrid-viewer 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powergrid-viewer",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/boardgamers/powergrid.git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"vue": "^2.6.11",
|
|
19
19
|
"vue-class-component": "^7.2.3",
|
|
20
20
|
"vue-property-decorator": "^8.4.2",
|
|
21
|
-
"powergrid-engine": "1.13.
|
|
21
|
+
"powergrid-engine": "1.13.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/assert": "^1.4.7",
|
|
@@ -225,7 +225,17 @@ export default class Map extends Vue {
|
|
|
225
225
|
player.cities.forEach((cityPiece) => {
|
|
226
226
|
const city = gameState.map.cities.find((city) => city.name == cityPiece.name)!;
|
|
227
227
|
let offsetX, offsetY;
|
|
228
|
-
|
|
228
|
+
const is1520 = city.slotCosts?.length === 2 && city.slotCosts[0] === 15;
|
|
229
|
+
if (is1520) {
|
|
230
|
+
// [15,20] city: slot 0 (cost 15) → bottom-left, slot 1 (cost 20) → bottom-right
|
|
231
|
+
if (cityPiece.position == 0) {
|
|
232
|
+
offsetX = -15;
|
|
233
|
+
offsetY = -4;
|
|
234
|
+
} else {
|
|
235
|
+
offsetX = 1;
|
|
236
|
+
offsetY = -4;
|
|
237
|
+
}
|
|
238
|
+
} else if (cityPiece.position == 0) {
|
|
229
239
|
offsetX = -6;
|
|
230
240
|
offsetY = -18;
|
|
231
241
|
} else if (cityPiece.position == 1) {
|
package/src/self-contained.ts
CHANGED
|
@@ -10,11 +10,7 @@ function launchSelfContained(selector = '#app') {
|
|
|
10
10
|
|
|
11
11
|
const emitter = launch(selector);
|
|
12
12
|
|
|
13
|
-
let gameState = setup(
|
|
14
|
-
5,
|
|
15
|
-
{ map: 'Baden-Württemberg', variant: 'original', showMoney: true, randomizeMap: false },
|
|
16
|
-
'7'
|
|
17
|
-
);
|
|
13
|
+
let gameState = setup(5, { map: 'Japan', variant: 'recharged', showMoney: true, randomizeMap: false }, '7');
|
|
18
14
|
|
|
19
15
|
// Dev coord-picker example (commented; uncomment + drop a board photo into
|
|
20
16
|
// viewer/public/ to author city coordinates for a new map). See the picker
|