hmm
This commit is contained in:
parent
10fbeb2327
commit
c6ba3e38a2
21 changed files with 1565 additions and 898 deletions
|
|
@ -64,8 +64,6 @@ function stableUnit(seed, salt = "") {
|
|||
return ((h >>> 0) % 100000) / 100000;
|
||||
}
|
||||
|
||||
// Legacy named personalities were removed. Keep these stubs only so old save data
|
||||
// and old UI fallback references cannot revive the pre-four-axis personality model.
|
||||
const PERSONALITIES = Object.freeze({});
|
||||
const PERSONALITY_IDS = [];
|
||||
|
||||
|
|
@ -255,12 +253,14 @@ function relationDefaults() {
|
|||
|
||||
function isParentChild(a, b) {
|
||||
if (!a || !b) return false;
|
||||
return Boolean(a.parents?.includes(b.id) || b.parents?.includes(a.id));
|
||||
const aKey = a.familyKey || a.id;
|
||||
const bKey = b.familyKey || b.id;
|
||||
return Boolean(a.parents?.includes(bKey) || b.parents?.includes(aKey));
|
||||
}
|
||||
|
||||
function relationDisplayName(worldRef, id) {
|
||||
if (!id) return "\u306a\u3057";
|
||||
const live = worldRef?.tarinai?.find(t => t.id === id);
|
||||
const live = worldRef?.tarinai?.find(t => t.id === id || t.familyKey === id);
|
||||
if (live) return live.name;
|
||||
const fam = worldRef?.family?.[id];
|
||||
return fam?.name || "\u4e0d\u660e";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue