This commit is contained in:
33333-33333 2026-07-20 14:36:59 +09:00
commit f6d7412744
94 changed files with 3836 additions and 1226 deletions

View file

@ -25,7 +25,7 @@
const ROUTE_STATES = new Set([
"seek_food", "seek_water", "seek_bed", "seek_material", "build", "follow_parent",
"seek_friend", "seek_enemy", "fight", "play_ball", "play_seesaw", "ant_attack", "seek_temperature",
"wander", "panic",
"wander", "panic", "bell_call", "build_memorial", "visit_grave",
]);
function isNestContainerItem(item) {
@ -429,6 +429,8 @@
move(dt) {
if (!(this.burning || (this.burnTimer || 0) > 0.02) && this.freezeSleepDiseaseMotion(dt)) return;
const specialMotion = global.TarinaiMemorialBellSystem?.updateMotion?.(this, dt);
if (specialMotion?.handled) return;
let ax = 0, ay = 0;
const itemSpeedMul = this.itemSpeedMultiplier ? this.itemSpeedMultiplier() : 1;
const baseSpeed = 46.5 * 1.5 * this.trait.speed * itemSpeedMul * (this.zunchiDisease ? 0.5 : 1) * (this.energy < 20 ? 0.42 : 1) * (this.fallTimer > 0 ? 0.35 : 1);
@ -831,6 +833,7 @@
const finalReason = this.normalizeDeathReason ? this.normalizeDeathReason(reason, opts) : (reason || "\u4e8b\u6545");
this.dead = true;
this.deathReason = finalReason;
this.deathTime = Number(this.world?.time || 0) || 0;
this.world.syncTarinaiCountEntry?.(this);
this.world.deadCount += 1;
globalThis.TarinaiAchievements?.evaluateEvent?.(this.world, "population", { tarinai: this, delta: -1, reason: finalReason });
@ -850,8 +853,11 @@
this.world.drawListDirty = true;
this.world.markItemBucketsDirty?.("tarinai-death-plushie-cleanup");
this.world.markSpatialDirty?.("tarinai-death-plushie-cleanup");
this.world.addItem?.(new Item("trace", this.x, this.y), "tarinai-death-trace");
this.world.addItem?.(new Item("splat", this.x, this.y), "tarinai-death-splat");
this.world.addResidue?.("trace", this.x, this.y, { reason: "tarinai-death-trace" });
// Favorite Tarinai are memorialized immediately and therefore do not leave
// the splat resource that normal graves are built from.
if (!this.favorite) this.world.addResidue?.("splat", this.x, this.y, { reason: "tarinai-death-splat" });
this.world.markTerrainDirtyAt?.(this.x, this.y, Math.max(42, (this.radius || 22) * 2.1), "tarinai-death-remains");
if (deterministicChance(this.world, "death-grass-spawn", 0.55, this, finalReason)) {
const spot = this.world.findGrassPlantingSpot(this.x, this.y, { allowOriginal: false, minRadius: 26, maxRadius: 76 });
if (spot) {