This commit is contained in:
33333-33333 2026-06-30 10:57:06 +09:00
commit f941200504
70 changed files with 1856 additions and 429 deletions

View file

@ -69,6 +69,7 @@ TEXT_CATALOG.stateLabels = Object.freeze({
seek_water: "\u6c34\u3092\u63a2\u3059",
seek_material: "\u6750\u6599\u3092\u63a2\u3059",
seek_enemy: "\u76f8\u624b\u3078\u5411\u304b\u3046",
seek_temperature: "\u907f\u6691\u30fb\u907f\u5bd2\u4e2d",
wander: "\u79fb\u52d5\u4e2d",
build: "\u4f5c\u6210\u4e2d",
zunchi_sick: "\u305a\u3093\u3061\u75c5",
@ -103,6 +104,7 @@ TEXT_CATALOG.behaviorLabels = Object.freeze({
sleep_anywhere: "\u4f11\u3093\u3067\u3044\u308b",
intimidate_enemy: "\u5a01\u5687\u3057\u3066\u3044\u308b",
panic_escape: "\u9003\u3052\u3066\u3044\u308b",
seek_comfort_temperature: "\u5feb\u9069\u306a\u6e29\u5ea6\u5e2f\u3078\u79fb\u52d5\u3057\u3066\u3044\u308b",
});
TEXT_CATALOG.behaviorLabel = function behaviorLabelFromCatalog(value = "") {
@ -137,6 +139,14 @@ TEXT_CATALOG.stateLabel = function stateLabelFromCatalog(s, t = null) {
return TEXT_CATALOG.stateLabels?.[s] || s || "";
};
TEXT_CATALOG.temperatureEndureText = function temperatureEndureText(t = null) {
if (!t || !t.world) return "";
const status = t.temperatureStatus || t.world.temperatureStatusFor?.(t.feltTemperature ?? t.tempComfort ?? t.world.temperatureAt?.(t.x, t.y) ?? (CONFIG.standardTemperature ?? 15));
if (!status || status.comfortable || (status.discomfort || 0) <= 0.5) return "";
if (t.world.hasReachableComfortTemperatureSpot?.(t)) return "";
return status.direction === "cold" ? "寒さに耐えている。" : "暑さに耐えている。";
};
TEXT_CATALOG.targetLabel = function targetLabelFromCatalog(target) {
if (!target) return "\u306a\u3057";
if (target.name) return target.name;
@ -158,6 +168,7 @@ TEXT_CATALOG.reasonLabel = function reasonLabelFromCatalog(t) {
const behaviorState = currentTarinaiBehavior(t);
const behaviorLabel = behaviorText(t);
const cleanedBehaviorLabel = TEXT_CATALOG.cleanBehaviorText(behaviorLabel, behaviorState?.actionId || t.state || "");
if (["\u5f85\u6a5f", "\u5f85\u3063\u3066\u3044\u308b", "\u5f85\u3063\u3066\u3044\u308b\u3002", "\u307c\u30fc\u3063\u3068\u3057\u3066\u3044\u308b", "\u307c\u30fc\u3063\u3068\u3057\u3066\u3044\u308b\u3002", "\u5468\u56f2\u3092\u898b\u3066\u3044\u308b"].includes(cleanedBehaviorLabel)) return TEXT_CATALOG.temperatureEndureText(t) || TEXT_CATALOG.idleGroundText(t);
if (cleanedBehaviorLabel) return cleanedBehaviorLabel;
const target = TEXT_CATALOG.targetLabel(t.target);
if (t.state === "eat") return target !== "\u306a\u3057" ? `${target}\u3092\u98df\u3079\u3066\u3044\u308b` : "\u98df\u3079\u3066\u3044\u308b";
@ -186,9 +197,9 @@ TEXT_CATALOG.reasonLabel = function reasonLabelFromCatalog(t) {
if ((t.grassEatTimer || 0) > 0.04) return "\u8349\u3092\u98df\u3079\u3066\u3044\u308b";
const thought = String(t.thought || "").trim();
const cleanedThought = TEXT_CATALOG.cleanBehaviorText(thought, t.state || "");
if (["\u5f85\u6a5f", "\u5f85\u3063\u3066\u3044\u308b", "\u5f85\u3063\u3066\u3044\u308b\u3002", "\u307c\u30fc\u3063\u3068\u3057\u3066\u3044\u308b", "\u307c\u30fc\u3063\u3068\u3057\u3066\u3044\u308b\u3002", "\u5468\u56f2\u3092\u898b\u3066\u3044\u308b"].includes(cleanedThought)) return TEXT_CATALOG.idleGroundText(t);
if (["\u5f85\u6a5f", "\u5f85\u3063\u3066\u3044\u308b", "\u5f85\u3063\u3066\u3044\u308b\u3002", "\u307c\u30fc\u3063\u3068\u3057\u3066\u3044\u308b", "\u307c\u30fc\u3063\u3068\u3057\u3066\u3044\u308b\u3002", "\u5468\u56f2\u3092\u898b\u3066\u3044\u308b"].includes(cleanedThought)) return TEXT_CATALOG.temperatureEndureText(t) || TEXT_CATALOG.idleGroundText(t);
if (thought) return thought;
if (t.state === "idle" || !t.state) return TEXT_CATALOG.idleGroundText(t);
if (t.state === "idle" || !t.state) return TEXT_CATALOG.temperatureEndureText(t) || TEXT_CATALOG.idleGroundText(t);
return "\u5468\u56f2\u3092\u898b\u3066\u3044\u308b";
};