mirror of
https://github.com/AsgardEternal/SquadJSDocker.git
synced 2025-01-02 14:29:26 -06:00
Update db-log-addOn.js
This commit is contained in:
parent
a6c503c624
commit
0b34ecb0b5
@ -85,6 +85,13 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
|
|
||||||
async mount() {
|
async mount() {
|
||||||
console.log('Mounting db-log');
|
console.log('Mounting db-log');
|
||||||
|
if(this.server.currentLayer.gamemode === "Seed"){
|
||||||
|
console.log('switching to seeding');
|
||||||
|
this.seeding = ServerState.seeding;
|
||||||
|
} else {
|
||||||
|
console.log('switching to Live');
|
||||||
|
this.seeding = ServerState.live;
|
||||||
|
}
|
||||||
await super.mount();
|
await super.mount();
|
||||||
console.log('finished mounting db-log');
|
console.log('finished mounting db-log');
|
||||||
this.server.on('PLAYER_CONNECTED', this.onPlayerConnected);
|
this.server.on('PLAYER_CONNECTED', this.onPlayerConnected);
|
||||||
@ -150,6 +157,7 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async updateCurrentTimeState(date, oldState, newState){
|
async updateCurrentTimeState(date, oldState, newState){
|
||||||
|
if(oldState === newState) return;
|
||||||
const timeNow = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
const timeNow = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
||||||
console.log(timeNow);
|
console.log(timeNow);
|
||||||
const curPlayer = await this.models.PlayerTimeNew.findAll({
|
const curPlayer = await this.models.PlayerTimeNew.findAll({
|
||||||
|
Loading…
Reference in New Issue
Block a user