Rename job route "stop" to location

This commit is contained in:
Vortrex
2022-02-10 17:57:40 -06:00
parent 567baf8466
commit 13affb28eb
3 changed files with 25 additions and 25 deletions

View File

@@ -196,7 +196,7 @@ function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healt
function onLocalPlayerEnterSphere(event, sphere) { function onLocalPlayerEnterSphere(event, sphere) {
logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered sphere`); logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered sphere`);
if(sphere == jobRouteStopSphere) { if(sphere == jobRouteLocationSphere) {
enteredJobRouteSphere(); enteredJobRouteSphere();
} }
} }

View File

@@ -9,8 +9,8 @@
let localPlayerJobType = 0; let localPlayerJobType = 0;
let localPlayerWorking = false; let localPlayerWorking = false;
let jobRouteStopBlip = null; let jobRouteLocationBlip = null;
let jobRouteStopSphere = null; let jobRouteLocationSphere = null;
// =========================================================================== // ===========================================================================
@@ -35,21 +35,21 @@ function setLocalPlayerWorkingState(tempWorking) {
// =========================================================================== // ===========================================================================
function showJobRouteStop(position, colour) { function showJobRouteLocation(position, colour) {
logToConsole(LOG_DEBUG, `[VRR.Job] Showing route stop`); logToConsole(LOG_DEBUG, `[VRR.Job] Showing job route location`);
if(getMultiplayerMod() == VRR_MPMOD_GTAC) { if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
if(game.game == VRR_GAME_GTA_SA) { if(game.game == VRR_GAME_GTA_SA) {
jobRouteStopSphere = game.createPickup(1318, position, 1); jobRouteLocationSphere = game.createPickup(1318, position, 1);
} else { } else {
jobRouteStopSphere = game.createSphere(position, 3); jobRouteLocationSphere = game.createSphere(position, 3);
jobRouteStopSphere.colour = colour; jobRouteLocationSphere.colour = colour;
} }
if(jobRouteStopBlip != null) { if(jobRouteLocationBlip != null) {
destroyElement(jobRouteStopBlip); destroyElement(jobRouteLocationBlip);
} }
blinkJobRouteStopBlip(10, position, colour); blinkJobRouteLocationBlip(10, position, colour);
} }
} }
@@ -57,29 +57,29 @@ function showJobRouteStop(position, colour) {
function enteredJobRouteSphere() { function enteredJobRouteSphere() {
logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`); logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`);
tellServerPlayerArrivedAtJobRouteStop(); tellServerPlayerArrivedAtJobRouteLocation();
destroyElement(jobRouteStopSphere); destroyElement(jobRouteLocationSphere);
destroyElement(jobRouteStopBlip); destroyElement(jobRouteLocationBlip);
jobRouteStopSphere = null; jobRouteLocationSphere = null;
jobRouteStopBlip = null; jobRouteLocationBlip = null;
} }
// =========================================================================== // ===========================================================================
function blinkJobRouteStopBlip(times, position, colour) { function blinkJobRouteLocationBlip(times, position, colour) {
for(let i = 1 ; i <= times ; i++) { for(let i = 1 ; i <= times ; i++) {
setTimeout(function() { setTimeout(function() {
if(jobRouteStopBlip != null) { if(jobRouteLocationBlip != null) {
destroyElement(jobRouteStopBlip); destroyElement(jobRouteLocationBlip);
jobRouteStopBlip = null; jobRouteLocationBlip = null;
} else { } else {
jobRouteStopBlip = game.createBlip(position, 0, 2, colour); jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
} }
}, 500*i); }, 500*i);
} }
setTimeout(function() { setTimeout(function() {
jobRouteStopBlip = game.createBlip(position, 0, 2, colour); jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
}, 500*times+1); }, 500*times+1);
} }

View File

@@ -39,7 +39,7 @@ function addAllNetworkHandlers() {
addNetworkEventHandler("vrr.heading", setLocalPlayerHeading); addNetworkEventHandler("vrr.heading", setLocalPlayerHeading);
addNetworkEventHandler("vrr.interior", setLocalPlayerInterior); addNetworkEventHandler("vrr.interior", setLocalPlayerInterior);
addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration); addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration);
addNetworkEventHandler("vrr.showJobRouteStop", showJobRouteStop); addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation);
addNetworkEventHandler("vrr.snow", setSnowState); addNetworkEventHandler("vrr.snow", setSnowState);
addNetworkEventHandler("vrr.health", setLocalPlayerHealth); addNetworkEventHandler("vrr.health", setLocalPlayerHealth);
addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey); addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey);
@@ -160,8 +160,8 @@ function tellServerPlayerUsedKeyBind(key) {
// =========================================================================== // ===========================================================================
function tellServerPlayerArrivedAtJobRouteStop() { function tellServerPlayerArrivedAtJobRouteLocation() {
sendNetworkEventToServer("vrr.arrivedAtJobRouteStop"); sendNetworkEventToServer("vrr.arrivedAtJobRouteLocation");
} }
// =========================================================================== // ===========================================================================