qqq
This commit is contained in:
parent
acf93ec6df
commit
ee22e1a929
49 changed files with 1380 additions and 338 deletions
|
|
@ -115,7 +115,8 @@
|
|||
target.singleUsePending = true;
|
||||
target.singleUseConsumedById = this.id || target.singleUseConsumedById || "";
|
||||
}
|
||||
if (target && target.type !== "nest_box") {
|
||||
const targetIsNestContainer = Boolean(target && (typeof global.isNestContainerType === "function" ? global.isNestContainerType(target.type) : (target.type === "nest_box" || target.type === "pipe")));
|
||||
if (target && !targetIsNestContainer) {
|
||||
this._sleepExternalMotionUntil = 0;
|
||||
this._sleepExternalWakeSuppressUntil = Math.max(Number(this._sleepExternalWakeSuppressUntil || 0) || 0, now + 2.4);
|
||||
this.vx = 0;
|
||||
|
|
@ -123,7 +124,7 @@
|
|||
this.impulseVx = 0;
|
||||
this.impulseVy = 0;
|
||||
}
|
||||
const text = reason || (target?.type === "nest_box" ? "\u5de3\u7bb1\u306e\u4e2d\u3067\u7720\u3063\u3066\u3044\u308b" : "\u7720\u3063\u3066\u3044\u308b");
|
||||
const text = reason || (target?.type === "pipe" ? "\u571f\u7ba1\u306e\u4e2d\u3067\u7720\u3063\u3066\u3044\u308b" : (target?.type === "nest_box" ? "\u5de3\u7bb1\u306e\u4e2d\u3067\u7720\u3063\u3066\u3044\u308b" : "\u7720\u3063\u3066\u3044\u308b"));
|
||||
setBehaviorText(this, { need: "sleep", actionId: target ? "sleep_in_bed" : "sleep_anywhere", actionLabel: "\u7720\u3063\u3066\u3044\u308b", reasonText: text, target, phase: "perform", source: "behavior" });
|
||||
return this.setActionState("sleep", { target, reason: text, sleeping: true });
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue