Add default values to house and biz classes
This commit is contained in:
@@ -145,10 +145,34 @@ function initClassTable() {
|
||||
},
|
||||
businessData: class {
|
||||
constructor(businessAssoc) {
|
||||
if(!businessAssoc) {
|
||||
return;
|
||||
}
|
||||
this.databaseId = 0;
|
||||
this.name = "";
|
||||
this.ownerType = AG_BIZOWNER_NONE;
|
||||
this.ownerId = 0
|
||||
this.locked = false
|
||||
|
||||
this.entrancePosition = false;
|
||||
this.entranceRotation = 0.0;
|
||||
this.entranceInterior = 0;
|
||||
this.entranceDimension = 0;
|
||||
this.entrancePickupModel = -1;
|
||||
this.entranceBlipModel = -1;
|
||||
this.entrancePickup = null;
|
||||
this.entranceBlip = null;
|
||||
|
||||
this.exitPosition = false;
|
||||
this.exitRotation = 0.0;
|
||||
this.exitInterior = 0;
|
||||
this.exitDimension = 0;
|
||||
this.exitPickupModel = -1;
|
||||
this.exitBlipModel = -1;
|
||||
this.exitPickup = null;
|
||||
this.exitBlip = null;
|
||||
|
||||
this.entranceFee = 0;
|
||||
this.till = 0
|
||||
|
||||
if(businessAssoc != false) {
|
||||
this.databaseId = toInteger(businessAssoc["biz_id"]);
|
||||
this.name = toString(businessAssoc["biz_name"]);
|
||||
this.ownerType = toInteger(businessAssoc["biz_owner_type"]);
|
||||
@@ -173,8 +197,10 @@ function initClassTable() {
|
||||
this.exitPickup = null;
|
||||
this.exitBlip = null;
|
||||
|
||||
this.entranceFee = toInteger(businessAssoc["biz_entrance_fee"]);
|
||||
this.till = toInteger(businessAssoc["biz_till"]);
|
||||
}
|
||||
}
|
||||
},
|
||||
businessLocationData: class {
|
||||
constructor(businessLocationAssoc) {
|
||||
@@ -195,10 +221,31 @@ function initClassTable() {
|
||||
},
|
||||
houseData: class {
|
||||
constructor(houseAssoc) {
|
||||
if(!houseAssoc) {
|
||||
return false;
|
||||
}
|
||||
this.databaseId = 0
|
||||
this.description = "";
|
||||
this.ownerType = AG_HOUSEOWNER_NONE;
|
||||
this.ownerId = 0
|
||||
this.locked = false;
|
||||
|
||||
this.entrancePosition = false;
|
||||
this.entranceRotation = 0.0;
|
||||
this.entranceInterior = 0;
|
||||
this.entranceDimension = 0;
|
||||
this.entrancePickupModel = -1;
|
||||
this.entranceBlipModel = -1;
|
||||
this.entrancePickup = null;
|
||||
this.entranceBlip = null;
|
||||
|
||||
this.exitPosition = false;
|
||||
this.exitRotation = 0.0;
|
||||
this.exitInterior = 0;
|
||||
this.exitDimension = -1;
|
||||
this.exitPickupModel = -1;
|
||||
this.exitBlipModel = -1;
|
||||
this.exitPickup = null;
|
||||
this.exitBlip = null;
|
||||
|
||||
if(houseAssoc != false) {
|
||||
this.databaseId = toInteger(houseAssoc["house_id"]);
|
||||
this.description = toString(houseAssoc["house_description"]);
|
||||
this.ownerType = toInteger(houseAssoc["house_owner_type"]);
|
||||
@@ -223,6 +270,7 @@ function initClassTable() {
|
||||
this.exitPickup = null;
|
||||
this.exitBlip = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
familyData: class {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user