This commit is contained in:
2026-04-06 21:30:50 +09:00
parent 8bc873bf29
commit 4509d18b51

View File

@@ -34,7 +34,7 @@ export class InstancePlugin extends BaseInstancePlugin {
setInterval() { setInterval() {
if (!this.updateInterval) { if (!this.updateInterval) {
this.updateInterval = setInterval(this.updateUps.bind(this), (this.instance.config.get("exp_server_ups.update_interval" as any) as number)); this.updateInterval = setInterval(this.updateUps.bind(this), this.instance.config.get("exp_server_ups.update_interval"));
} }
} }
@@ -51,7 +51,7 @@ export class InstancePlugin extends BaseInstancePlugin {
if (collected > 0) { if (collected > 0) {
const minTick = this.gameTimes[0]; const minTick = this.gameTimes[0];
const maxTick = this.gameTimes[collected]; const maxTick = this.gameTimes[collected];
ups = (maxTick - minTick) / (collected * ((this.instance.config.get("exp_server_ups.update_interval" as any) as number) / 1000)); ups = (maxTick - minTick) / (collected * (this.instance.config.get("exp_server_ups.update_interval") / 1000));
} }
try { try {
@@ -61,7 +61,7 @@ export class InstancePlugin extends BaseInstancePlugin {
this.logger.error(`Failed to receive new game time: ${error}`); this.logger.error(`Failed to receive new game time: ${error}`);
} }
if (collected > (this.instance.config.get("exp_server_ups.average_interval" as any) as number)) { if (collected > this.instance.config.get("exp_server_ups.average_interval")) {
this.gameTimes.shift(); this.gameTimes.shift();
} }
} }