1
0
mirror of synced 2025-01-31 20:15:24 +01:00

Fuck you typescript

This commit is contained in:
Rin 2022-07-18 14:30:47 +01:00
parent e99849b03f
commit cf3607470f

View File

@ -27,15 +27,23 @@ export default class GameModule extends Module {
let saveEx: any = {};
if (divcount !== null && divcount !== undefined) {
saveEx.stClearDivCount = divcount;
} else {
saveEx.stClearDivCount = car!.stClearDivCount;
}
if (body.stResult!.stClearBits !== null && body.stResult!.stClearBits !== undefined) {
saveEx.stClearBits = body.stResult!.stClearBits!;
} else {
saveEx.stClearBits = car!.stClearBits;
}
if (body.stResult!.stPlayCount !== null && body.stResult!.stPlayCount !== undefined) {
saveEx.stPlayCount = body.stResult!.stPlayCount!;
} else {
saveEx.stPlayCount = car!.stPlayCount;
}
if (body.stResult!.stClearCount !== null && body.stResult!.stClearCount !== undefined) {
saveEx.stClearCount = body.stResult!.stClearCount!;
} else {
saveEx.stClearCount = car!.stClearCount;
}
if (body.stResult!.stLoseBits !== null && body.stResult!.stLoseBits !== undefined) {
let actualLoseBits = BigInt(0);
@ -45,15 +53,23 @@ export default class GameModule extends Module {
actualLoseBits = actualLoseBits | BigInt(body.stResult!.stLoseBits.low);
saveEx.stLoseBits = actualLoseBits;
}
} else {
saveEx.stLoseBits = car!.stLoseBits;
}
if (body.stResult!.stConsecutiveWins !== null && body.stResult!.stConsecutiveWins !== undefined) {
saveEx.stConsecutiveWins = body.stResult!.stConsecutiveWins!;
} else {
saveEx.stConsecutiveWins = car!.stConsecutiveWins;
}
if (body.stResult!.tuningPoint !== null && body.stResult!.tuningPoint !== undefined) {
saveEx.tuningPoints = body.stResult!.tuningPoint!;
} else {
saveEx.tuningPoints = car!.tuningPoints;
}
if (body.stResult!.stCompleted_100Episodes !== null && body.stResult!.stCompleted_100Episodes !== undefined) {
saveEx.stCompleted100Episodes = body.stResult!.stCompleted_100Episodes!;
} else {
saveEx.stCompleted100Episodes = car!.stCompleted100Episodes;
}
console.log(body);
console.log(saveEx);