From fc8a7d69f60bdae6b04f06803f813a203a5fcc06 Mon Sep 17 00:00:00 2001 From: Skillet Date: Mon, 20 Mar 2023 12:11:20 -0400 Subject: [PATCH] use fallback for seeding --- squadjsPlugins/db-log-addOn.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/squadjsPlugins/db-log-addOn.js b/squadjsPlugins/db-log-addOn.js index c00044d..51d1718 100644 --- a/squadjsPlugins/db-log-addOn.js +++ b/squadjsPlugins/db-log-addOn.js @@ -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); + } } }