Tourismustal: Editor v2 (Ziehen statt Slider, Solar pro Stufe) + Bikepark-Vorschau
- Editor: Zieh-Modi direkt auf der Karte (Gebaeude: horizontal=Breite, vertikal=Boden-Anker; Solar: frei ziehen) + Pixel-Feinjustage per Plus/Minus-Tasten, grosse Live-Wertanzeige, Footprint-Hilfslinien. - Solar-Position wird PRO AUSBAUSTUFE gespeichert (<key>@L<stufe>, Vererbung Stufe -> Sprite -> Default) - Renderer-Lookup erweitert. - Bikepark zeigt beim Bauen die komplette Strecke talwaerts (5 Felder, pro Kachel gruen/rot je nach Belegbarkeit) - wie die Lift-Piste. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1995,7 +1995,7 @@ export class IsoRenderer {
|
||||
ctx.fill();
|
||||
}
|
||||
}
|
||||
if (tile.eco) this._drawSolar(spriteName, x, y, !!tile.mega || (BUILDINGS[type]?.size || 1) > 1);
|
||||
if (tile.eco) this._drawSolar(spriteName, x, y, !!tile.mega || (BUILDINGS[type]?.size || 1) > 1, level);
|
||||
return;
|
||||
}
|
||||
switch (type) {
|
||||
@@ -2199,14 +2199,16 @@ export class IsoRenderer {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (tile.eco) this._drawSolar(type, x, y, !!tile.mega);
|
||||
if (tile.eco) this._drawSolar(type, x, y, !!tile.mega, level);
|
||||
}
|
||||
|
||||
// Solardach: Zeichen des Öko-Umbaus – dunkles Panel mit weißen Stegen
|
||||
// und kleinem Glanzpunkt. Position pro Sprite-Key justierbar (SOLAR_POS).
|
||||
_drawSolar(key, x, y, big = false) {
|
||||
// und kleinem Glanzpunkt. Position pro Sprite-Key UND Ausbaustufe
|
||||
// justierbar: erst "<key>@L<stufe>", dann "<key>", dann Default.
|
||||
_drawSolar(key, x, y, big = false, level = 1) {
|
||||
const ctx = this.ctx;
|
||||
const pos = SOLAR_POS[key] || (big ? SOLAR_POS.defaultBig : SOLAR_POS.default);
|
||||
const pos = SOLAR_POS[`${key}@L${level}`] || SOLAR_POS[key]
|
||||
|| (big ? SOLAR_POS.defaultBig : SOLAR_POS.default);
|
||||
const s = pos.s ?? 1;
|
||||
ctx.save();
|
||||
ctx.translate(x + (pos.dx ?? 0), y + (pos.dy ?? 0));
|
||||
@@ -2371,6 +2373,19 @@ export class IsoRenderer {
|
||||
this.ctx.fillStyle = fill;
|
||||
this.ctx.fill();
|
||||
}
|
||||
} else if (def?.trailLen) {
|
||||
// Bikepark: die ganze reservierte Strecke talwärts zeigen –
|
||||
// pro Kachel grün/rot, je nachdem ob sie frei ist
|
||||
for (let i = 1; i <= def.trailLen; i++) {
|
||||
const tt = this.state.map[t.r + i]?.[t.c];
|
||||
if (!tt) break;
|
||||
const free = !tt.building && !tt.bikeTrail && !tt.road
|
||||
&& !['water', 'rock', 'village'].includes(tt.terrain);
|
||||
const p = this.tileToWorld(t.c, t.r + i, tt.elev);
|
||||
this._diamond(p.x, p.y);
|
||||
this.ctx.fillStyle = free ? fill : 'rgba(200,60,50,0.4)';
|
||||
this.ctx.fill();
|
||||
}
|
||||
}
|
||||
|
||||
this._diamond(x, y);
|
||||
|
||||
Reference in New Issue
Block a user