From 20502f5bcaef4ecba8a28f16374f3b4b56def8a8 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 2 Jul 2022 23:31:14 -0500 Subject: [PATCH] Add JSDoc info and cache ATM locations --- scripts/server/business.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/server/business.js b/scripts/server/business.js index da9182d0..ce3009aa 100644 --- a/scripts/server/business.js +++ b/scripts/server/business.js @@ -40,6 +40,9 @@ const VRR_BIZ_OWNER_PUBLIC = 5; // Public Business. Used for g /** * @class Representing a businesses' data. Loaded and saved in the database + * @property {Array.} locations + * @property {Array.} floorItemCache + * @property {Array.} storageItemCache */ class BusinessData { constructor(dbAssoc = false) { @@ -58,7 +61,7 @@ class BusinessData { this.floorItemCache = []; this.storageItemCache = []; this.locations = []; - this.gameScripts = []; + //this.gameScripts = []; this.entrancePosition = false; this.entranceRotation = 0.0; @@ -2532,6 +2535,12 @@ function setBusinessDataIndexes() { // getServerData().businesses[i].streamingRadioStationIndex = radioStationIndex; // } //} + + for (let j in getServerData().businesses[i].locations) { + if (getServerData().businesses[i].locations[j].type == VRR_BIZ_LOC_ATM) { + getServerData().atmLocationCache.push([i, j, getServerData().businesses[i].locations[j].position]); + } + } } }