e
This commit is contained in:
parent
f657b6a4a4
commit
d163ceb291
76 changed files with 1385 additions and 524 deletions
|
|
@ -45,8 +45,10 @@
|
|||
global.TarinaiAchievements?.recordIntervention?.({ world: this, tool: "delete", x, y });
|
||||
const target = this.findDeleteToolTargetAt?.(x, y);
|
||||
if (!target) { showToast("\u6d88\u305b\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u305b\u3093\u3002"); return true; }
|
||||
if (isPinType(target.type) && target.pinState === "lodged") { showToast("\u523a\u3055\u3063\u305f\u92f2\u306f\u3001\u3064\u307e\u3093\u3067\u629c\u3044\u3066\u304f\u3060\u3055\u3044\u3002"); return true; }
|
||||
const label = toolLabel(target.type);
|
||||
if (isPinType(target.type) && target.pinState === "lodged") {
|
||||
global.TarinaiItemDynamicPinSystem?.detach?.(target, this, "pinch");
|
||||
}
|
||||
const removed = global.TarinaiStructureLifecycle.deleteItem(this, target, {
|
||||
reason: "delete-tool",
|
||||
userReason: target.type === "grass_bed" ? "\u30d9\u30c3\u30c9\u304c\u306a\u304f\u306a\u3063\u305f" : "\u7f6e\u304d\u3082\u306e\u304c\u306a\u304f\u306a\u3063\u305f",
|
||||
|
|
@ -58,7 +60,6 @@
|
|||
this.compactItems?.();
|
||||
this.updateItemCounts?.();
|
||||
this.rebuildSpatial?.();
|
||||
this.log?.(`${label}\u3092\u6d88\u3057\u305f\u3002`, "observe");
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
@ -116,7 +117,6 @@
|
|||
if (options.drag) this._areaDeleteDragRemoved = (this._areaDeleteDragRemoved || 0) + removedCount;
|
||||
if (!options.silentLog) {
|
||||
const detail = [...kindCounts.entries()].slice(0, 4).map(([label, count]) => `${label}${count > 1 ? `\u00d7${count}` : ""}`).join("\u3001");
|
||||
this.log?.(`\u7bc4\u56f2\u524a\u9664\u3067${removedCount}\u500b\u6d88\u3057\u305f${detail ? `\uff08${detail}\uff09` : ""}\u3002`, "observe");
|
||||
showToast(`${removedCount}\u500b\u6d88\u3057\u307e\u3057\u305f\u3002`);
|
||||
}
|
||||
return true;
|
||||
|
|
@ -256,7 +256,6 @@
|
|||
global.TarinaiAchievements?.recordLinkPlaced?.(constraintType, { world: this, item, type: constraintType });
|
||||
global.TarinaiPhysicsSoftClear.clearForItem(this, item, `${constraintType}-soft-overlap-clear`);
|
||||
this._forceImmediateToolVisualRefresh?.("tool-action");
|
||||
this.log?.(`${toolName}\u3092\u3064\u306a\u3044\u3060\u3002`, "observe");
|
||||
showToast(`${toolName}\u3092\u3064\u306a\u304e\u307e\u3057\u305f\u3002`);
|
||||
return true;
|
||||
},
|
||||
|
|
@ -405,8 +404,8 @@
|
|||
global.TarinaiAchievements?.recordIntervention?.({ world: this, tool: "shoot", x: aim.x, y: aim.y });
|
||||
const hit = this.findShootToolTargetAt?.(aim.x, aim.y);
|
||||
audio.shoot?.();
|
||||
this.effects?.push(new Effect("shoot_impact", aim.x, aim.y, { size: hit ? 22 : 16, life: hit ? 0.28 : 0.22, color: hit ? "rgba(255,208,116,0.96)" : "rgba(190,212,240,0.64)" }));
|
||||
this.effects?.push(new Effect("ring", aim.x, aim.y, { size: hit ? 20 : 14, life: hit ? 0.18 : 0.14, color: hit ? "rgba(255,246,206,0.74)" : "rgba(196,220,255,0.42)" }));
|
||||
this.queueEffect?.("shoot_impact", aim.x, aim.y, { size: hit ? 22 : 16, life: hit ? 0.28 : 0.22, color: hit ? "rgba(255,208,116,0.96)" : "rgba(190,212,240,0.64)" });
|
||||
this.queueEffect?.("ring", aim.x, aim.y, { size: hit ? 20 : 14, life: hit ? 0.18 : 0.14, color: hit ? "rgba(255,246,206,0.74)" : "rgba(196,220,255,0.42)" });
|
||||
let handled = false;
|
||||
if (hit?.kind === "tarinai") {
|
||||
const t = hit.target;
|
||||
|
|
@ -453,7 +452,7 @@
|
|||
target.noStickUntil = (this.time || 0) + 0.22;
|
||||
target.lastPokedAt = this.time || 0;
|
||||
}
|
||||
this.effects?.push(new Effect("ring", target.x || aim.x, target.y || aim.y, { size: Math.max(12, (target.r || 8) * 1.8), life: 0.18, color: "rgba(255,230,116,0.48)" }));
|
||||
this.queueEffect?.("ring", target.x || aim.x, target.y || aim.y, { size: Math.max(12, (target.r || 8) * 1.8), life: 0.18, color: "rgba(255,230,116,0.48)" });
|
||||
this.markSpatialDirty?.("shoot-pin-blast");
|
||||
this.drawListDirty = true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue