rr
This commit is contained in:
parent
2636d580a8
commit
d14550dad6
78 changed files with 2827 additions and 563 deletions
|
|
@ -112,14 +112,14 @@ function inheritedChampionPersonality(seed = "", parents = [], opts = {}) {
|
|||
if (d <= limit && d < bestD) { best = t; bestD = d; }
|
||||
}
|
||||
if (!best) return null;
|
||||
const nameLine = String(best.name || "たりない");
|
||||
const nameLine = String(best.name || "\u305f\u308a\u306a\u3044");
|
||||
const behavior = (typeof behaviorText === "function" ? behaviorText(best) : "")
|
||||
|| window.TEXT_CATALOG?.stateLabel?.(best.state, best)
|
||||
|| best.thought
|
||||
|| "様子を見ている";
|
||||
|| "\u69d8\u5b50\u3092\u898b\u3066\u3044\u308b";
|
||||
const maxEnergy = typeof tarinaiMaxEnergy === "function" ? tarinaiMaxEnergy(best) : (Number(best.maxEnergy) || 100);
|
||||
const statusLine = `体力: ${Math.round(best.energy || 0)}/${Math.round(maxEnergy)} 空腹: ${Math.round(best.hunger || 0)} ストレス: ${Math.round(best.stress || 0)}`;
|
||||
const tempLine = worldRef.temperatureTooltipLineFor(best, "体感気温") || "体感気温: --℃";
|
||||
const statusLine = `\u4f53\u529b: ${Math.round(best.energy || 0)}/${Math.round(maxEnergy)}\u3000\u7a7a\u8179: ${Math.round(best.hunger || 0)}\u3000\u30b9\u30c8\u30ec\u30b9: ${Math.round(best.stress || 0)}`;
|
||||
const tempLine = worldRef.temperatureTooltipLineFor(best, "\u4f53\u611f\u6c17\u6e29") || "\u4f53\u611f\u6c17\u6e29: --\u2103";
|
||||
return { target: best, lines: [nameLine, String(behavior), statusLine, tempLine], kind: "tarinai" };
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ function inheritedChampionPersonality(seed = "", parents = [], opts = {}) {
|
|||
function ownedBedTooltipLinesLocal(worldRef, bed) {
|
||||
if (!bed || bed.dead || bed.type !== "grass_bed") return [];
|
||||
const owner = worldRef.liveTarinaiById?.(bed.ownerId) || null;
|
||||
return ["かんたんベッド", `持ち主: ${owner?.name || "不明"}`, worldRef.temperatureTooltipLineFor?.(bed, "周辺気温")].filter(Boolean);
|
||||
return ["\u304b\u3093\u305f\u3093\u30d9\u30c3\u30c9", `\u6301\u3061\u4e3b: ${owner?.name || "\u4e0d\u660e"}`, worldRef.temperatureTooltipLineFor?.(bed, "\u5468\u8fba\u6c17\u6e29")].filter(Boolean);
|
||||
}
|
||||
|
||||
Object.defineProperties(World.prototype, Object.getOwnPropertyDescriptors({
|
||||
|
|
@ -620,14 +620,14 @@ function inheritedChampionPersonality(seed = "", parents = [], opts = {}) {
|
|||
occupants = this.nestBoxOccupants(box, Infinity);
|
||||
}
|
||||
const names = occupants.map(t => t?.name).filter(Boolean).slice(0, isPipe ? 8 : 5);
|
||||
const more = occupants.length > names.length ? `、ほか${occupants.length - names.length}匹` : "";
|
||||
const label = isPipe ? "土管" : "巣箱";
|
||||
const insideLabel = isPipe ? "土管に入ってる子" : "入ってる子";
|
||||
return [label, names.length ? `${insideLabel}: ${names.join("、")}${more}` : `${insideLabel}: なし`, this.temperatureTooltipLineFor?.(box, "内部気温")].filter(Boolean);
|
||||
const more = occupants.length > names.length ? `\u3001\u307b\u304b${occupants.length - names.length}\u5339` : "";
|
||||
const label = isPipe ? "\u571f\u7ba1" : "\u5de3\u7bb1";
|
||||
const insideLabel = isPipe ? "\u571f\u7ba1\u306b\u5165\u3063\u3066\u308b\u5b50" : "\u5165\u3063\u3066\u308b\u5b50";
|
||||
return [label, names.length ? `${insideLabel}: ${names.join("\u3001")}${more}` : `${insideLabel}: \u306a\u3057`, this.temperatureTooltipLineFor?.(box, "\u5185\u90e8\u6c17\u6e29")].filter(Boolean);
|
||||
},
|
||||
|
||||
|
||||
temperatureTooltipLineFor(target, label = "体感気温") {
|
||||
temperatureTooltipLineFor(target, label = "\u4f53\u611f\u6c17\u6e29") {
|
||||
if (!target || !this.temperatureAt) return "";
|
||||
const isActor = Array.isArray(this.tarinai) && this.tarinai.includes(target);
|
||||
const temp = isActor
|
||||
|
|
@ -637,8 +637,8 @@ function inheritedChampionPersonality(seed = "", parents = [], opts = {}) {
|
|||
: this.temperatureAt(target.x, target.y));
|
||||
if (!Number.isFinite(Number(temp))) return "";
|
||||
const status = this.temperatureStatusFor?.(temp, isActor ? target : null) || null;
|
||||
const suffix = status?.label ? `(${status.label})` : "";
|
||||
return `${label}: ${Number(temp).toFixed(1)}℃${suffix}`;
|
||||
const suffix = status?.label ? `\uff08${status.label}\uff09` : "";
|
||||
return `${label}: ${Number(temp).toFixed(1)}\u2103${suffix}`;
|
||||
},
|
||||
|
||||
pointerItemTooltipInfo() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue