From 7926067fdf2a08974a6589ffe3c903b9cd48ac01 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 21 Dec 2020 22:51:25 -0600 Subject: [PATCH] Add spawned to client data class --- scripts/server/class.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/server/class.js b/scripts/server/class.js index 377a7e53..0ed30bf4 100644 --- a/scripts/server/class.js +++ b/scripts/server/class.js @@ -32,6 +32,8 @@ function initClassTable() { this.garbageRoute = null; this.lastGarbageStop = null; + + this.spawned = false; } }, accountData: class { @@ -58,7 +60,7 @@ function initClassTable() { this.notes = []; this.messages = []; - this.keybinds = []; + this.keyBinds = []; this.contacts = []; this.subAccounts = []; this.loggedIn = false; @@ -84,7 +86,7 @@ function initClassTable() { } this.databaseId = accountMessageAssoc["acct_msg_id"]; - this.accountId = accountMessageAssoc["acct_msg_acct"]; + this.account = accountMessageAssoc["acct_msg_acct"]; this.whoSent = accountMessageAssoc["acct_msg_who_sent"]; this.whenSent = accountMessageAssoc["acct_msg_when_sent"]; this.whenRead = accountMessageAssoc["acct_msg_when_read"]; @@ -101,7 +103,7 @@ function initClassTable() { } this.databaseId = accountStaffNoteAssoc["acct_note_id"]; - this.accountId = accountStaffNoteAssoc["acct_note_acct"]; + this.account = accountStaffNoteAssoc["acct_note_acct"]; this.whoAdded = accountStaffNoteAssoc["acct_note_who_added"]; this.whenAdded = accountStaffNoteAssoc["acct_note_when_added"]; this.deleted = intToBool(accountMessageAssoc["acct_note_deleted"]); @@ -120,7 +122,7 @@ function initClassTable() { this.server = subAccountAssoc["sacct_server"]; this.firstName = subAccountAssoc["sacct_name_first"]; this.lastName = subAccountAssoc["sacct_name_last"]; - this.accountId = subAccountAssoc["sacct_acct"]; + this.account = subAccountAssoc["sacct_acct"]; this.skin = subAccountAssoc["sacct_skin"]; this.cash = subAccountAssoc["sacct_cash"]; this.placeOfOrigin = subAccountAssoc["sacct_origin"]; @@ -436,14 +438,17 @@ function initClassTable() { this.commandString = commandString; this.whenAdded = 0; this.enabled = true; + this.keyState = false; - if(keyBindAssoc) { + if(keyBindAssoc != null) { + console.log(keyBindAssoc["acct_hotkey_key"]); this.databaseId = keyBindAssoc["acct_hotkey_id"]; - this.key = keyBindAssoc["acct_hotkey_key"]; + this.key = toInteger(keyBindAssoc["acct_hotkey_key"]); this.account = keyBindAssoc["acct_hotkey_acct"]; this.commandString = keyBindAssoc["acct_hotkey_cmdstr"]; this.whenAdded = keyBindAssoc["acct_hotkey_when_added"]; this.enabled = intToBool(keyBindAssoc["acct_hotkey_enabled"]); + this.keyState = intToBool(keyBindAssoc["acct_hotkey_down"]); } } },