Weltkueche: 6 Zutaten mit fest verdrahteter Herkunft (Thomas-Vorgaben)

Kein Automatismus mehr - Zutat hat feste Laenderliste (correct) + feste
Distraktoren, die das Spiel 1:1 ausliest. Vorrang vor Consumer/Heimat.
- greyerzer (NEU, "Greyerzer & Vacherin"): Schweiz+Frankreich -> ersetzt den
  mozzarella-Hack im Fondue (Signatur entfernt, Rezept nannte Gruyere+Vacherin
  schon korrekt).
- hefe: Oesterreich+Frankreich | lamm: Neuseeland+UK (Import, nicht Griechenland)
  tomaten: Niederlande+Spanien | schmand: Oesterreich+Deutschland
  fischsauce: Thailand+Vietnam (nicht Italien).
game.html: schlanker Auslese-Zweig fuer `correct`/`distractors` (isWorldIngredient
+ ING-Build + Aufloesungstext). admin spiegelt als "Feste Herkunft".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 00:35:24 +02:00
parent d7dd3f9de5
commit 13f14c26a8
4 changed files with 116 additions and 7 deletions
+23 -2
View File
@@ -538,7 +538,8 @@ async function loadWeltkuecheData() {
more: v.more || '',
heimisch: v.heimisch || null, // Teil B: Länder mit Eigenanteil ≥ ⅓ (Consumer-Anker)
market: v.market || null, // Teil B: kuratierte Markt-Zweitlieferanten
distractors: v.distractors || null // Teil B: explizite Distraktor-Länder
distractors: v.distractors || null, // explizite Distraktor-Länder
correct: v.correct || null // fest verdrahtete Herkunft (feste Länderliste)
};
});
DISHES = Object.entries(dishesJ)
@@ -979,6 +980,7 @@ function worldIngCount(dish){
* wird im Game als "lokal verfügbar" angezeigt, aber nicht erforscht. */
function isWorldIngredient(key) {
const ing = ING[key]; if (!ing) return false;
if (ing.correct && ing.correct.length) return true; // fest verdrahtete Herkunft: wird abgefragt
if (ing.heimisch && ing.heimisch.length) return true; // Consumer-Grundzutat (Teil B): wird immer abgefragt
const real = Object.values(ing.producers || {}).filter(p => p.t && p.t > 0);
return real.length >= 3;
@@ -1068,6 +1070,22 @@ function buildTaskFor(ingKey) {
if (_taskCache[ingKey]) return _taskCache[ingKey];
const ing = ING[ingKey];
if (!ing) return null;
// ── FEST VERDRAHTETE HERKUNFT: Zutat hat eine feste Länderliste (`correct`)
// + feste Distraktoren (`distractors`). Gilt immer — kein Automatismus,
// einfach genau die vorgegebene Liste. Hat Vorrang vor allem anderen.
if (ing.correct && ing.correct.length) {
const correct = ing.correct.filter(c => C[c]);
let pool = (ing.distractors || []).filter(c => C[c] && !correct.includes(c));
if (pool.length < 5 - correct.length) {
pool = pool.concat(impossibleCountries(correct, [...pool, ...Object.keys(ing.producers || {})]));
}
shuffleInPlace(pool);
const distr = pool.slice(0, Math.max(0, 5 - correct.length));
const choices = [...correct, ...distr];
shuffleInPlace(choices);
_taskCache[ingKey] = { correct, choices, possible: new Set(), fixed: true };
return _taskCache[ingKey];
}
// ── CONSUMER-REGEL (Teil B): Eine Grundzutat, die im Land des USERS heimisch
// ist (Eigenanteil ≥ ~⅓), kauft man dort, wo man einkauft — im eigenen Land,
// UNABHÄNGIG davon, aus welchem Land das Gericht stammt. (Das Ei in der
@@ -1588,7 +1606,10 @@ function showSolved(ing,pts,bonus){
const factLine = ing.fact ? `<div class="more-line"><b>Wusstest du?</b> ${esc(ing.fact)}</div>` : '';
// Heimat-Regel: erklären, warum die Region die Antwort ist (nicht der größte Produzent)
const _userN = task.user && C[task.user] ? (C[task.user].f + ' ' + C[task.user].n) : 'bei uns';
const sigLine = task.consumer
const _fixN = task.fixed ? task.correct.map(k => C[k] ? (C[k].f + ' ' + C[k].n) : k).join(' & ') : '';
const sigLine = task.fixed
? `<div class="more-line" style="background:#eef5ec;border-left:3px solid #4a7c4e">🌍 <b>${esc(ing.nm)}</b> kommt bei uns typisch aus <b>${_fixN}</b>.</div>`
: task.consumer
? `<div class="more-line" style="background:#eef5ec;border-left:3px solid #4a7c4e">🛒 Eine <b>Grundzutat</b> — die kaufst du <b>dort, wo du einkaufst</b>: im eigenen Land (${_userN}). Reicht die heimische Menge nicht, kommt ein naher Nachbar dazu. Nur was bei uns gar nicht wächst, reist von weit her — und was ein Gericht <b>besonders</b> macht, holt man aus der Herkunftsregion.</div>`
: (task.signature && C[task.heimat])
? (task.label