mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Made user ids case insensitive
This commit is contained in:
1 parent
41d76ff757
commit
bdf02a5ea2
15 files changed
+130
-45
No files matched your search
@@ -92,4 +92,19 @@ export default class PlayerStats {
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
merge(other: PlayerStats) {
|
||||
this.joinCount += other.joinCount;
|
||||
this.onlineTimeMs += other.onlineTimeMs;
|
||||
if (!this.firstJoinAt || (other.firstJoinAt && other.firstJoinAt > this.firstJoinAt)) {
|
||||
this.firstJoinAt = other.firstJoinAt;
|
||||
}
|
||||
if (!this.lastJoinAt || (other.lastJoinAt && other.lastJoinAt > this.lastJoinAt)) {
|
||||
this.lastJoinAt = other.lastJoinAt;
|
||||
}
|
||||
if (!this.lastLeaveAt || (other.lastLeaveAt && other.lastLeaveAt > this.lastLeaveAt)) {
|
||||
this.lastLeaveAt = other.lastLeaveAt;
|
||||
this.lastLeaveReason = other.lastLeaveReason;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user