Tourismustal: Editor-Export Runde 2 + Mega-Wachstum vom Zentrum

- Justier-Werte bis Badesee: Personalhaus (47/17), Mega-Personalhaus
  (101/32), Mega-Badesee (84/31) + 12 Solar-Positionen pro Stufe.
- Mega-Stufen-Skalierung waechst jetzt vom MOTIV-ZENTRUM aus statt vom
  Boden-Anker (centerScale in _sprite) - die Mitte bleibt fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 00:30:25 +02:00
parent cff7c11853
commit 24ad893dd5
+23 -7
View File
@@ -31,7 +31,7 @@ export const SPRITE_DEFS = {
restaurant: { w: 69, bottom: 17 },
hotel: { w: 88, bottom: 10 },
hotel2: { w: 104, bottom: 11 },
staffhouse: { w: 64, bottom: 9 },
staffhouse: { w: 47, bottom: 17 },
house: { w: 54, bottom: 8 },
church: { w: 66, bottom: 9 },
access: { w: 38, bottom: 15 },
@@ -41,9 +41,9 @@ export const SPRITE_DEFS = {
// Megabauwerke (2×2): eigene Motive, zentriert über den 4 Kacheln
mega_restaurant: { w: 122, bottom: 41 },
mega_hotel: { w: 102, bottom: 30 },
mega_staffhouse: { w: 114, bottom: 24 },
mega_staffhouse: { w: 101, bottom: 32 },
mega_snow: { w: 92, bottom: 30 },
mega_badesee: { w: 122, bottom: 26 },
mega_badesee: { w: 84, bottom: 31 },
mega_ropes: { w: 116, bottom: 22 },
mega_playground: { w: 121, bottom: 25 },
mega_bikerental: { w: 110, bottom: 24 },
@@ -109,6 +109,18 @@ export const SOLAR_POS = {
'access@L2': { dx: -1, dy: -11, s: 1 },
'access@L3': { dx: -2, dy: -13, s: 1 },
'access@L4': { dx: -2, dy: -14, s: 1 },
'staffhouse@L1': { dx: 2, dy: -16, s: 1 },
'staffhouse@L2': { dx: 0, dy: -21, s: 1 },
'staffhouse@L3': { dx: 0, dy: -23, s: 1 },
'staffhouse@L4': { dx: 0, dy: -23, s: 1 },
'mega_staffhouse@L1': { dx: -3, dy: -37, s: 1.6 },
'mega_staffhouse@L2': { dx: -3, dy: -43, s: 1.6 },
'mega_staffhouse@L3': { dx: -6, dy: -53, s: 1.6 },
'mega_staffhouse@L4': { dx: -7, dy: -60, s: 1.6 },
'mega_badesee@L1': { dx: -3, dy: -34, s: 1.6 },
'mega_badesee@L2': { dx: 52, dy: -6, s: 1.6 },
'mega_badesee@L3': { dx: 57, dy: -5, s: 1.6 },
'mega_badesee@L4': { dx: 57, dy: -4, s: 1.6 },
};
// Feinjustierung aus dem Editor (editor.html): überschreibt SPRITE_DEFS-
@@ -1755,7 +1767,7 @@ export class IsoRenderer {
}
// KI-Sprite zeichnen, falls geladen; sonst false (→ Vektor-Fallback)
_sprite(name, x, y, scale = 1, flip = false) {
_sprite(name, x, y, scale = 1, flip = false, centerScale = false) {
const s = this.sprites[name];
if (!s) return false;
// w/bottom IMMER live aus SPRITE_DEFS lesen so wirken Editor-
@@ -1763,8 +1775,12 @@ export class IsoRenderer {
const def = SPRITE_DEFS[name] || s;
const w = def.w * scale;
this._shadow(x, y + 2, w * 0.38, w * 0.16);
// Motiv endet im 1024er-Bild bei ~88 % der Höhe
const top = y + def.bottom - w * 0.88;
// Motiv endet im 1024er-Bild bei ~88 % der Höhe.
// centerScale (Megabauwerke): Stufen-Wachstum vom MOTIV-ZENTRUM aus
// die Mitte bleibt fix, statt dass der Fuß klebt und alles nach oben wächst.
const top = centerScale
? (y + def.bottom - 0.38 * def.w) - w / 2
: y + def.bottom - w * 0.88;
if (flip) {
const ctx = this.ctx;
ctx.save(); ctx.translate(x, 0); ctx.scale(-1, 1);
@@ -1948,7 +1964,7 @@ export class IsoRenderer {
}
}
if (type !== 'lift' && type !== 'gondola' && type !== 'sled'
&& this._sprite(spriteName, x, y, spriteScale)) {
&& this._sprite(spriteName, x, y, spriteScale, false, !!tile.mega)) {
this._badge(x + 18, y - 34, level);
if (type === 'badesee' && this.state.season === 'Sommer') {
// Schwimmer: wippende Köpfe + kleine Planscher im See