use fallback for seeding

This commit is contained in:
Skillet 2023-03-20 12:11:20 -04:00 committed by GitHub
parent 329751f831
commit fc8a7d69f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,12 +89,19 @@ export default class DBLogPlayerTime extends DBLog {
console.log('Mounting db-log');
if(this.server.currentLayer){
if(this.server.currentLayer.gamemode === "Seed"){
console.log('switching to seeding');
console.log('starting to seeding');
this.seeding = ServerState.seeding;
} else {
console.log('switching to Live');
console.log('starting to Live');
this.seeding = ServerState.live;
}
} else {
if(this.currentLayerRcon.level.includes("Seed")){
console.log('starting to seeding');
this.seeding = ServerState.seeding;
} else {
console.log('starting to Live');
this.seeding = ServerState.live;
}
await super.mount();
console.log('finished mounting db-log');
@ -226,6 +233,14 @@ export default class DBLogPlayerTime extends DBLog {
console.log('switching to Live');
await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.live);
}
} else {
if(this.currentLayerRcon.level.includes("Seed")){
console.log('switching to seeding');
await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.seeding);
} else {
console.log('switching to Live');
await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.live);
}
}
}