From b90abb31a4ea18ff7d4432f0c4fd3da03fdbea74 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 12 Jul 2026 00:11:03 +0200 Subject: [PATCH] Tourismustal: Mega nur fuer sinnvolle Gebaeude Panoramaweg aus der Merge-Liste entfernt (Linien-Bauwerk). MERGEABLE exportiert; Editor sperrt die Mega-Checkbox fuer alle nicht merge- faehigen Typen (Bahnen, Bus, Bikepark, Rodelbahn, Panoramaweg, Rettungsstation, Aufforsten, Plattform). Co-Authored-By: Claude Opus 4.8 (1M context) --- App/sims/tourismustal/js/editor-tune.js | 6 +++++- App/sims/tourismustal/js/model.js | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/App/sims/tourismustal/js/editor-tune.js b/App/sims/tourismustal/js/editor-tune.js index 601a965..99b6a3e 100644 --- a/App/sims/tourismustal/js/editor-tune.js +++ b/App/sims/tourismustal/js/editor-tune.js @@ -5,7 +5,7 @@ // Werte wirken live (localStorage tt_sprite_tuning); der Export wird von // Atlas fest in iso.js übernommen. -import { createState, place } from './model.js'; +import { createState, place, MERGEABLE } from './model.js'; import { IsoRenderer, SPRITE_DEFS, SOLAR_POS } from './iso.js'; import { BUILDINGS } from './data.js'; @@ -87,6 +87,10 @@ function spriteDef() { // ---------- Bühne ---------- function rebuild() { + // Mega gibt es nur für merge-fähige Gebäude (keine Bahnen/Sonderbauwerke) + const megaChk = $('edMega'); + megaChk.disabled = !MERGEABLE.includes(sel.value); + if (megaChk.disabled) megaChk.checked = false; for (const row of state.map) { for (const t of row) { t.building = null; t.level = null; diff --git a/App/sims/tourismustal/js/model.js b/App/sims/tourismustal/js/model.js index 184b75c..934b5e5 100644 --- a/App/sims/tourismustal/js/model.js +++ b/App/sims/tourismustal/js/model.js @@ -432,9 +432,10 @@ function effVal(b, key) { } // Verschmelzen: liegen 4 gleiche 1×1-Gebäude im 2×2-Quadrat, werden sie zu -// EINEM Megabauwerk (size 2, mega). Bahnen, Bus & Bikepark ausgenommen. -const MERGEABLE = ['restaurant', 'hotel', 'staffhouse', 'snow', - 'badesee', 'ropes', 'playground', 'bikerental', 'trail']; +// EINEM Megabauwerk (size 2, mega). Ausgenommen: Bahnen, Bus, Bikepark, +// Rodelbahn, Panoramaweg, Rettungsstation (Linien-/Sonderbauwerke). +export const MERGEABLE = ['restaurant', 'hotel', 'staffhouse', 'snow', + 'badesee', 'ropes', 'playground', 'bikerental']; function tryMerge(state, c, r) { const type = state.map[r]?.[c]?.building; if (!type || !MERGEABLE.includes(type)) return null;