aa
This commit is contained in:
parent
f941200504
commit
ad2cc76429
34 changed files with 616 additions and 365 deletions
|
|
@ -385,7 +385,7 @@
|
|||
if (tailMask & 1) writer.u(pinIdx);
|
||||
if (tailMask & 2) writer.u(nestIdx);
|
||||
if (tailMask & 4) { writeBitFields(writer, [stateId], [1]); writer.s(stateTarget); }
|
||||
if (tailMask & 8) for (let i = 0; i < 4; i++) writer.s(genetics[i] || 100);
|
||||
if (tailMask & 8) for (let i = 0; i < 5; i++) writer.s(genetics[i] ?? (i === 4 ? 0 : 100));
|
||||
if (tailMask & 16) { writer.u(fightStats[0] || 0); writer.u(fightStats[1] || 0); writer.s(fightStats[2] || 0); }
|
||||
}
|
||||
function readTarinai(reader, coordState = null) {
|
||||
|
|
@ -407,7 +407,7 @@
|
|||
const pinIdx = (tailMask & 1) ? reader.u() : -1;
|
||||
const nestIdx = (tailMask & 2) ? reader.u() : -1;
|
||||
const stateInfo = (tailMask & 4) ? [readBitFields(reader, [1])[0], reader.s()] : [0, -1];
|
||||
const genetics = (tailMask & 8) ? [reader.s(), reader.s(), reader.s(), reader.s()] : [];
|
||||
const genetics = (tailMask & 8) ? [reader.s(), reader.s(), reader.s(), reader.s(), reader.s()] : [];
|
||||
const fightStats = (tailMask & 16) ? [reader.u(), reader.u(), reader.s()] : [];
|
||||
return [flags, birthSeed, x, y, age, generation, hunger, energy, sleepPressure, needs, current, parents, relationships, timers, modes, pinIdx, nestIdx, stateInfo, genetics, fightStats];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue