This commit is contained in:
33333-33333 2026-07-18 22:15:26 +09:00
commit d163ceb291
76 changed files with 1385 additions and 524 deletions

View file

@ -100,7 +100,6 @@
const commit = (value) => {
const next = sanitizeSignboardText(value);
sign.text = next;
worldRef?.log?.(sign.text ? `\u770b\u677f\u3092\u66f8\u304d\u63db\u3048\u305f\u3002` : `\u770b\u677f\u306e\u6587\u5b57\u3092\u6d88\u3057\u305f\u3002`, "observe");
worldRef.drawListDirty = true;
global.render?.();
close();
@ -210,7 +209,6 @@
robot.robotCleanerScanTimer = 0;
worldRef?.markItemBucketsDirty?.("robot-cleaner-settings");
if (worldRef) worldRef.drawListDirty = true;
worldRef?.log?.("\u30ed\u30dc\u6383\u9664\u6a5f\u306e\u5bfe\u8c61\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u3002", "observe");
global.TarinaiAchievements?.evaluateCleanFreak?.(worldRef, { robot, source: "robot-cleaner-settings" });
if (typeof showToast === "function") showToast("\u30ed\u30dc\u6383\u9664\u6a5f\u306e\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002");
global.render?.();
@ -308,7 +306,6 @@
item.angle = item.fanSwingCenter;
worldRef?.markSpatialDirty?.("fan-swing-settings");
if (worldRef) worldRef.drawListDirty = true;
worldRef?.log?.(item.fanSwingOn ? "\u6247\u98a8\u6a5f\u306e\u9996\u632f\u308a\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u3002" : "\u6247\u98a8\u6a5f\u3092\u56fa\u5b9a\u5411\u304d\u306b\u3057\u305f\u3002", "observe");
if (typeof showToast === "function") showToast(item.fanSwingOn ? "\u6247\u98a8\u6a5f: \u9996\u632f\u308aON" : "\u6247\u98a8\u6a5f: \u56fa\u5b9a\u5411\u304d");
global.render?.();
close();
@ -444,7 +441,6 @@
global.TarinaiLinkRuntime.remapLinksForEditedMechanicalItem(worldRef, item, isPoisonBlock ? "poison-block-link-remap" : "rotator-link-remap");
worldRef?.markSpatialDirty?.(isPoisonBlock ? "poison-block-edited" : "rotator-edited");
worldRef.drawListDirty = true;
worldRef?.log?.(isPoisonBlock ? "\u6bd2\u30d6\u30ed\u30c3\u30af\u306e\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u305f\u3002" : "\u56de\u8ee2\u4f53\u306e\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u305f\u3002", "observe");
global.render?.();
close();
};
@ -588,7 +584,6 @@
global.TarinaiLinkRuntime.remapLinksForEditedMechanicalItem(worldRef, item, "reciprocator-link-remap");
worldRef?.markSpatialDirty?.("reciprocator-edited");
worldRef.drawListDirty = true;
worldRef?.log?.("\u5f80\u5fa9\u4f53\u306e\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u305f\u3002", "observe");
global.render?.();
close();
};
@ -1062,7 +1057,6 @@
item.gateOpen = !item.gateOpen;
worldRef?.markSpatialDirty?.("gate-toggle");
worldRef.drawListDirty = true;
worldRef?.log?.(item.gateOpen ? "\u30b2\u30fc\u30c8\u67f5\u3092\u958b\u3051\u305f\u3002" : "\u30b2\u30fc\u30c8\u67f5\u3092\u9589\u3081\u305f\u3002", "observe");
if (typeof showToast === "function") showToast(item.gateOpen ? "\u30b2\u30fc\u30c8\u67f5: \u958b" : "\u30b2\u30fc\u30c8\u67f5: \u9589");
global.render?.();
return true;
@ -1170,6 +1164,9 @@
const search = placementSoftSearchRadius(item);
for (const soft of worldRef.nearbyItems?.(item.x, item.y, search, true) || worldRef.items || []) {
if (!soft || soft === item || soft.dead || !isSoftPlacementIgnoredItemType(soft.type)) continue;
// Easy beds are intentionally valid under a parasol. Placing the parasol
// after the bed must preserve the same layout that AI can build later.
if (item.type === "rain_shelter" && soft.type === "grass_bed") continue;
if (placementItemOverlapsSoftItem(worldRef, item, soft)) out.push(soft);
}
return out;
@ -1240,7 +1237,6 @@
}
this.copyBuffer = makeCopyBufferForItem(target);
showToast(`${toolLabel(target.type)}\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\u3002`);
this.log?.(`${toolLabel(target.type)}\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3002`, "observe");
return true;
}
const item = this.copyPreviewItemAt?.(x, y);
@ -1251,7 +1247,6 @@
if (placed.type === "grass" || placed.type === "trace" || placed.type === "splat") this.markTerrainDirtyAt?.(placed.x, placed.y, Math.max(placed.r || 24, 36), "copy-paste");
this._forceImmediateToolVisualRefresh?.("tool-change");
const label = toolLabel(item.type);
this.log?.(`${label}\u3092\u8cbc\u308a\u4ed8\u3051\u305f\u3002`, "observe");
showToast(`${label}\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3057\u305f\u3002`);
return true;
}
@ -1540,10 +1535,12 @@
if (!found && !this.findDeleteToolTargetAt?.(x, y)) {
global.TarinaiAchievements?.recordEmptyClick?.({ world: this, x, y });
}
const wasSelectionEmpty = !this.selected;
if (found && wasSelectionEmpty) this._scrollSelectedDataTopOnNextSelection = true;
else this._scrollSelectedDataTopOnNextSelection = false;
global.TarinaiCommands.setSelection(this, found) || (this.selected = found);
this._scrollSelectedDataTopOnNextSelection = Boolean(found);
const selectionResult = global.TarinaiCommands.setSelection(this, found);
if (!selectionResult) this.selected = found;
if (found && selectionResult?.changed === false) {
global.setTimeout?.(() => global.scrollToSelectedDataPanel?.(), 0);
}
return;
}
@ -1564,7 +1561,7 @@
const vx = dx / length * speed;
const vy = Math.min(dy / length * speed - 95, -145);
if (target.fling(this, x, y, { source: "poke", vx, vy, speed, life: 5.2, destroyOffscreen: true })) {
this.effects?.push(new Effect("ring", target.x, target.y, { size: 26, life: 0.20, color: "rgba(190,82,92,0.40)" }));
this.queueEffect?.("ring", target.x, target.y, { size: 26, life: 0.20, color: "rgba(190,82,92,0.40)" });
this.drawListDirty = true;
audio.poke?.();
global.TarinaiAchievements?.recordPlushiePokeFling?.({ world: this, item: target, owner });
@ -1579,16 +1576,14 @@
if (global.TarinaiMechanicalSystem.applyPokeImpulse(target, x, y, this)) {
const label = target.type === "rotator" ? "\u56de\u8ee2\u4f53" : (target.type === "poison_block" ? "\u6bd2\u30d6\u30ed\u30c3\u30af" : "\u5f80\u5fa9\u4f53");
const color = target.type === "rotator" ? "rgba(184,132,230,0.40)" : (target.type === "poison_block" ? "rgba(92,188,68,0.40)" : "rgba(90,150,214,0.40)");
this.effects?.push(new Effect("ring", x, y, { size: 22, life: 0.18, color }));
this.queueEffect?.("ring", x, y, { size: 22, life: 0.18, color });
this.drawListDirty = true;
audio.poke?.();
this.log(`${label}\u3092\u3064\u3064\u3044\u3066\u52d5\u304b\u3057\u305f\u3002`, "observe", { eventType: "mechanism_poke" });
}
return;
}
if (typeof target.poke === "function") {
target.poke();
if (!target.dead) this.log(`${target.name}\u306f\u3064\u3064\u304b\u308c\u3001\u305f\u308a\u306a\u3044\u3053\u3068\u3092\u899a\u3048\u305f\u3002`, "observe", { participants: [target] });
}
return;
}
@ -1599,7 +1594,6 @@
if (!t) { showToast(`\u305f\u308a\u306a\u3044\u500b\u4f53\u6570\u306f${this.tarinaiPopulationLimit}\u5339\u307e\u3067\u3067\u3059\u3002`); return; }
t.wanderAngle = spot.angle;
global.TarinaiAchievements?.recordManualTarinaiAdded?.({ world: this, tarinai: t, tool: "new" });
this.log(`${t.name}\u304c\u753b\u9762\u5916\u304b\u3089\u8ff7\u3044\u8fbc\u3093\u3067\u304d\u305f\u3002`);
return;
}