Mass commit

This commit is contained in:
Vortrex
2021-01-01 16:18:59 -06:00
parent a9dad59b27
commit 5af3023c85
45 changed files with 1648 additions and 1599 deletions

View File

@@ -65,7 +65,7 @@ function initClassTable() {
bank: dbAssoc["svr_newchar_bank"],
skin: dbAssoc["svr_newchar_skin"],
},
this.connectCameraPosition = toVector3(dbAssoc["svr_connectcam_pos_x"], dbAssoc["svr_connectcam_pos_y"], dbAssoc["svr_connectcam_pos_z"]);
this.connectCameraLookAt = toVector3(dbAssoc["svr_connectcam_lookat_x"], dbAssoc["svr_connectcam_lookat_y"], dbAssoc["svr_connectcam_lookat_z"]);
this.hour = toInteger(dbAssoc["svr_start_time_hour"]);
@@ -76,7 +76,7 @@ function initClassTable() {
this.useGUI = intToBool(dbAssoc["svr_gui"]);
this.guiColour = [toInteger(dbAssoc["svr_gui_col1_r"]), toInteger(dbAssoc["svr_gui_col1_g"]), toInteger(dbAssoc["svr_gui_col1_b"])];
this.showLogo = intToBool(dbAssoc["svr_logo"]);
this.antiCheat = {
enabled: intToBool(dbAssoc["svr_ac_enabled"]),
checkGameScripts: intToBool(dbAssoc["svr_ac_check_scripts"]),
@@ -104,7 +104,7 @@ function initClassTable() {
this.garbageRoute = null;
this.garbageRouteStop = null;
this.garbageRouteIsland = null;
this.spawned = false;
this.rentingVehicle = false;
@@ -114,38 +114,59 @@ function initClassTable() {
this.returnToJobVehicleTick = 0;
this.returnToJobVehicleTimer = null;
this.switchingCharacter = false;
}
},
accountData: class {
constructor(accountAssoc) {
if(!accountAssoc) {
return;
}
this.databaseId = accountAssoc["acct_id"];
this.name = accountAssoc["acct_name"];
this.password = accountAssoc["acct_pass"];
this.registerDate = accountAssoc["acct_when_made"];
this.databaseId = 0;
this.name = "";
this.password = "";
this.registerDate = 0;
this.flags = {
moderation: accountAssoc["acct_mod_flags"],
settings: accountAssoc["acct_settings"],
admin: accountAssoc["acct_staff_flags"],
moderation: 0,
settings: 0,
admin: 0,
};
this.staffTitle = accountAssoc["acct_staff_title"];
this.ircAccount = accountAssoc["acct_irc"] || "None";
this.discordAccount = accountAssoc["acct_discord"];
this.settings = accountAssoc["acct_settings"];
this.emailAddress = accountAssoc["acct_email"];
this.ipAddress = accountAssoc["ip"];
this.staffTitle = "";
this.ircAccount = "";
this.discordAccount = 0,
this.settings = 0,
this.emailAddress = "";
this.ipAddress = 0,
this.notes = [];
this.messages = [];
this.keyBinds = [];
this.contacts = [];
this.subAccounts = [];
this.loggedIn = false;
this.loggedIn = false;
if(accountAssoc) {
this.databaseId = accountAssoc["acct_id"];
this.name = accountAssoc["acct_name"];
this.password = accountAssoc["acct_pass"];
this.registerDate = accountAssoc["acct_when_made"];
this.flags = {
moderation: accountAssoc["acct_mod_flags"],
settings: accountAssoc["acct_settings"],
admin: accountAssoc["acct_staff_flags"],
};
this.staffTitle = accountAssoc["acct_staff_title"];
this.ircAccount = accountAssoc["acct_irc"] || "None";
this.discordAccount = accountAssoc["acct_discord"];
this.settings = accountAssoc["acct_settings"];
this.emailAddress = accountAssoc["acct_email"];
this.ipAddress = accountAssoc["ipstring"];
this.notes = [];
this.messages = [];
this.keyBinds = [];
this.contacts = [];
this.subAccounts = [];
this.loggedIn = false;
}
}
},
accountContactData: class {
@@ -153,7 +174,7 @@ function initClassTable() {
if(!accountContactAssoc) {
return;
}
this.databaseId = accountContactAssoc["acct_contact_id"];
this.accountId = accountContactAssoc["acct_contact_acct"];
this.contactAccountId = accountContactAssoc["acct_contact_contact"];
@@ -166,7 +187,7 @@ function initClassTable() {
if(!accountMessageAssoc) {
return;
}
this.databaseId = accountMessageAssoc["acct_msg_id"];
this.account = accountMessageAssoc["acct_msg_acct"];
this.whoSent = accountMessageAssoc["acct_msg_who_sent"];
@@ -177,13 +198,13 @@ function initClassTable() {
this.folder = accountMessageAssoc["acct_msg_folder"];
this.message = accountMessageAssoc["acct_msg_message"];
}
},
},
accountStaffNoteData: class {
constructor(accountStaffNoteAssoc) {
if(!accountStaffNoteAssoc) {
return;
}
this.databaseId = accountStaffNoteAssoc["acct_note_id"];
this.account = accountStaffNoteAssoc["acct_note_acct"];
this.whoAdded = accountStaffNoteAssoc["acct_note_who_added"];
@@ -193,13 +214,13 @@ function initClassTable() {
this.server = accountMessageAssoc["acct_note_server"];
this.note = accountMessageAssoc["acct_note_message"];
}
},
},
subAccountData: class {
constructor(subAccountAssoc) {
if(!subAccountAssoc) {
return;
}
this.databaseId = subAccountAssoc["sacct_id"];
this.server = subAccountAssoc["sacct_server"];
this.firstName = subAccountAssoc["sacct_name_first"];
@@ -225,11 +246,11 @@ function initClassTable() {
this.weapons = [];
this.inJail = false;
this.interior = 0;
this.dimension = 0;
}
},
},
businessData: class {
constructor(businessAssoc) {
this.databaseId = 0;
@@ -248,7 +269,7 @@ function initClassTable() {
this.entranceBlipModel = -1;
this.entrancePickup = null;
this.entranceBlip = null;
this.exitPosition = false;
this.exitRotation = 0.0;
this.exitInterior = 0;
@@ -269,25 +290,21 @@ function initClassTable() {
this.buyPrice = toInteger(businessAssoc["biz_buy_price"]);
this.locked = intToBool(toInteger(businessAssoc["biz_locked"]));
this.hasInterior = intToBool(toInteger(businessAssoc["biz_has_interior"]));
this.entrancePosition = toVector3(toFloat(businessAssoc["biz_entrance_pos_x"]), toFloat(businessAssoc["biz_entrance_pos_y"]), toFloat(businessAssoc["biz_entrance_pos_z"]));
this.entranceRotation = toInteger(businessAssoc["biz_entrance_rot_z"]);
this.entranceInterior = toInteger(businessAssoc["biz_entrance_int"]);
this.entranceDimension = toInteger(businessAssoc["biz_entrance_vw"]);
this.entrancePickupModel = toInteger(businessAssoc["biz_entrance_pickup"]);
this.entranceBlipModel = toInteger(businessAssoc["biz_entrance_blip"]);
this.entrancePickup = null;
this.entrancePickup = null;
this.entranceBlipModel = toInteger(businessAssoc["biz_entrance_blip"]);
this.exitPosition = toVector3(businessAssoc["biz_exit_pos_x"], businessAssoc["biz_exit_pos_y"], businessAssoc["biz_exit_pos_z"]);
this.exitRotation = toInteger(businessAssoc["biz_exit_rot_z"]);
this.exitInterior = toInteger(businessAssoc["biz_exit_int"]);
this.exitDimension = toInteger(businessAssoc["biz_exit_vw"]);
this.exitPickupModel = toInteger(businessAssoc["biz_exit_pickup"]);
this.exitBlipModel = toInteger(businessAssoc["biz_exit_blip"]);
this.exitPickup = null;
this.exitBlip = null;
this.entranceFee = toInteger(businessAssoc["biz_entrance_fee"]);
this.till = toInteger(businessAssoc["biz_till"]);
}
@@ -319,7 +336,7 @@ function initClassTable() {
this.buyPrice = 0;
this.locked = false;
this.hasInterior = false;
this.entrancePosition = false;
this.entranceRotation = 0.0;
this.entranceInterior = 0;
@@ -328,7 +345,7 @@ function initClassTable() {
this.entranceBlipModel = -1;
this.entrancePickup = null;
this.entranceBlip = null;
this.exitPosition = false;
this.exitRotation = 0.0;
this.exitInterior = 0;
@@ -346,24 +363,20 @@ function initClassTable() {
this.buyPrice = toInteger(houseAssoc["house_buy_price"]);
this.locked = intToBool(toInteger(houseAssoc["house_locked"]));
this.hasInterior = intToBool(toInteger(houseAssoc["house_has_interior"]));
this.entrancePosition = toVector3(toFloat(houseAssoc["house_entrance_pos_x"]), toFloat(houseAssoc["house_entrance_pos_y"]), toFloat(houseAssoc["house_entrance_pos_z"]));
this.entranceRotation = toFloat(houseAssoc["house_entrance_rot_z"]);
this.entranceInterior = toInteger(houseAssoc["house_entrance_int"]);
this.entranceDimension = toInteger(houseAssoc["house_entrance_vw"]);
this.entrancePickupModel = toInteger(houseAssoc["house_entrance_pickup"]);
this.entranceBlipModel = toInteger(houseAssoc["house_entrance_blip"]);
this.entrancePickup = null;
this.entranceBlip = null;
this.entranceBlipModel = toInteger(houseAssoc["house_entrance_blip"]);
this.exitPosition = toVector3(toFloat(houseAssoc["house_exit_pos_x"]), toFloat(houseAssoc["house_exit_pos_y"]), toFloat(houseAssoc["house_exit_pos_z"]));
this.exitRotation = toFloat(houseAssoc["house_exit_rot_z"]);
this.exitInterior = toInteger(houseAssoc["house_exit_int"]);
this.exitDimension = toInteger(houseAssoc["house_exit_vw"]);
this.exitPickupModel = toInteger(houseAssoc["house_exit_pickup"]);
this.exitBlipModel = toInteger(houseAssoc["house_exit_blip"]);
this.exitPickup = null;
this.exitBlip = null;
}
}
},
@@ -380,32 +393,32 @@ function initClassTable() {
this.server = getServerId();
this.model = (vehicle != false) ? vehicle.modelIndex : 0;
this.vehicle = vehicle;
// Ownership
this.ownerType = AG_VEHOWNER_NONE;
this.ownerId = 0;
this.buyPrice = 0;
this.rentPrice = 0;
this.rentedBy = false;
this.rentStart = 0;
this.rentStart = 0;
// Position and Rotation
this.spawnPosition = (vehicle) ? vehicle.position : toVector3(0.0, 0.0, 0.0);
this.spawnRotation = (vehicle) ? vehicle.heading : 0.0;
this.spawnLocked = false;
// Colour Info
this.colour1IsRGBA = 0;
this.colour2IsRGBA = 0;
this.colour3IsRGBA = 0;
this.colour4IsRGBA = 0;
this.colour4IsRGBA = 0;
this.colour1RGBA = toColour(255, 255, 255, 255);
this.colour2RGBA = toColour(255, 255, 255, 255);
this.colour3RGBA = toColour(255, 255, 255, 255);
this.colour4RGBA = toColour(255, 255, 255, 255);
this.colour4RGBA = toColour(255, 255, 255, 255);
this.colour1 = (vehicle) ? vehicle.colour1 : 1;
this.colour2 = (vehicle) ? vehicle.colour2 : 1;
this.colour3 = (vehicle) ? vehicle.colour3 : 1;
this.colour3 = (vehicle) ? vehicle.colour3 : 1;
this.colour4 = (vehicle) ? vehicle.colour4 : 1;
// Vehicle Attributes
@@ -416,37 +429,37 @@ function initClassTable() {
this.engineDamage = 0;
this.visualDamage = 0;
this.dirtLevel = 0;
if(vehicleAssoc) {
// General Info
this.databaseId = toInteger(vehicleAssoc["veh_id"]);
this.server = toInteger(vehicleAssoc["veh_server"]);
this.model = toInteger(vehicleAssoc["veh_model"]);
// Ownership
this.ownerType = toInteger(vehicleAssoc["veh_owner_type"]);
this.ownerId = toInteger(vehicleAssoc["veh_owner_id"]);
this.buyPrice = toInteger(vehicleAssoc["veh_buy_price"]);
this.rentPrice = toInteger(vehicleAssoc["veh_buy_price"]);
// Position and Rotation
this.spawnPosition = toVector3(vehicleAssoc["veh_pos_x"], vehicleAssoc["veh_pos_y"], vehicleAssoc["veh_pos_z"]);
this.spawnRotation = toInteger(vehicleAssoc["veh_rot_z"]);
this.spawnLocked = intToBool(toInteger(vehicleAssoc["veh_spawn_lock"]));
// Colour Info
this.colour1IsRGBA = intToBool(toInteger(vehicleAssoc["veh_col1_isrgba"]));
this.colour2IsRGBA = intToBool(toInteger(vehicleAssoc["veh_col2_isrgba"]));
this.colour3IsRGBA = intToBool(toInteger(vehicleAssoc["veh_col3_isrgba"]));
this.colour4IsRGBA = intToBool(toInteger(vehicleAssoc["veh_col4_isrgba"]));
this.colour4IsRGBA = intToBool(toInteger(vehicleAssoc["veh_col4_isrgba"]));
this.colour1RGBA = toColour(toInteger(vehicleAssoc["veh_col1_r"]), toInteger(vehicleAssoc["veh_col1_g"]), toInteger(vehicleAssoc["veh_col1_b"]), toInteger(vehicleAssoc["veh_col1_a"]));
this.colour2RGBA = toColour(toInteger(vehicleAssoc["veh_col2_r"]), toInteger(vehicleAssoc["veh_col2_g"]), toInteger(vehicleAssoc["veh_col2_b"]), toInteger(vehicleAssoc["veh_col2_a"]));
this.colour3RGBA = toColour(toInteger(vehicleAssoc["veh_col3_r"]), toInteger(vehicleAssoc["veh_col3_g"]), toInteger(vehicleAssoc["veh_col3_b"]), toInteger(vehicleAssoc["veh_col3_a"]));
this.colour4RGBA = toColour(toInteger(vehicleAssoc["veh_col4_r"]), toInteger(vehicleAssoc["veh_col4_g"]), toInteger(vehicleAssoc["veh_col4_b"]), toInteger(vehicleAssoc["veh_col4_a"]));
this.colour4RGBA = toColour(toInteger(vehicleAssoc["veh_col4_r"]), toInteger(vehicleAssoc["veh_col4_g"]), toInteger(vehicleAssoc["veh_col4_b"]), toInteger(vehicleAssoc["veh_col4_a"]));
this.colour1 = toInteger(vehicleAssoc["veh_col1"]);
this.colour2 = toInteger(vehicleAssoc["veh_col2"]);
this.colour3 = toInteger(vehicleAssoc["veh_col3"]);
this.colour4 = toInteger(vehicleAssoc["veh_col4"]);
this.colour4 = toInteger(vehicleAssoc["veh_col4"]);
// Vehicle Attributes
this.locked = intToBool(toInteger(vehicleAssoc["veh_locked"]));
@@ -526,7 +539,7 @@ function initClassTable() {
this.colour = toColour(jobAssoc["job_colour_r"], jobAssoc["job_colour_g"], jobAssoc["job_colour_b"], 255);
this.whiteListEnabled = jobAssoc["job_whitelist"];
this.blackListEnabled = jobAssoc["job_blacklist"];
this.equipment = [];
this.uniforms = [];
this.locations = [];
@@ -584,8 +597,8 @@ function initClassTable() {
this.name = jobUniformAssoc["job_uniform_name"];
this.requiredRank = jobUniformAssoc["job_uniform_minrank"];
this.skin = jobUniformAssoc["job_uniform_skin"];
this.enabled = jobUniformAssoc["job_uniform_skin"];
}
this.enabled = jobUniformAssoc["job_uniform_skin"];
}
}
},
jobLocationData: class {
@@ -640,7 +653,7 @@ function initClassTable() {
this.enabled = jobBlackListAssoc["job_bl_enabled"];
}
}
},
},
keyBindData: class {
constructor(keyBindAssoc, key = 0, commandString = "") {
this.databaseId = 0;
@@ -678,7 +691,7 @@ function initClassTable() {
if(!dbAssoc) {
return;
}
this.databaseId = dbAssoc["ac_script_wl_id"];
this.enabled = intToBool(dbAssoc["ac_script_wl_enabled"]);
this.server = dbAssoc["ac_script_wl_server"];
@@ -692,21 +705,27 @@ function initClassTable() {
this.range = range;
}
},
interiorTemplateData: class {
constructor(exitPosition, interior) {
this.exitPosition = exitPosition;
this.interior = interior;
}
},
}
return tempClasses;
}
// ---------------------------------------------------------------------------
function getClasses() {
return serverClasses;
return serverClasses;
}
// ---------------------------------------------------------------------------
function getClass(className) {
return serverClasses[className];
return serverClasses[className];
}
// ---------------------------------------------------------------------------