From 13affb28eb39f6eb90832a1734b71271ea2231aa Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 10 Feb 2022 17:57:40 -0600 Subject: [PATCH] Rename job route "stop" to location --- scripts/client/event.js | 2 +- scripts/client/job.js | 42 ++++++++++++++++++++-------------------- scripts/client/server.js | 6 +++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/client/event.js b/scripts/client/event.js index ca451df6..03ae0839 100644 --- a/scripts/client/event.js +++ b/scripts/client/event.js @@ -196,7 +196,7 @@ function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healt function onLocalPlayerEnterSphere(event, sphere) { logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered sphere`); - if(sphere == jobRouteStopSphere) { + if(sphere == jobRouteLocationSphere) { enteredJobRouteSphere(); } } diff --git a/scripts/client/job.js b/scripts/client/job.js index efd5e7b9..2a884e39 100644 --- a/scripts/client/job.js +++ b/scripts/client/job.js @@ -9,8 +9,8 @@ let localPlayerJobType = 0; let localPlayerWorking = false; -let jobRouteStopBlip = null; -let jobRouteStopSphere = null; +let jobRouteLocationBlip = null; +let jobRouteLocationSphere = null; // =========================================================================== @@ -35,21 +35,21 @@ function setLocalPlayerWorkingState(tempWorking) { // =========================================================================== -function showJobRouteStop(position, colour) { - logToConsole(LOG_DEBUG, `[VRR.Job] Showing route stop`); +function showJobRouteLocation(position, colour) { + logToConsole(LOG_DEBUG, `[VRR.Job] Showing job route location`); if(getMultiplayerMod() == VRR_MPMOD_GTAC) { if(game.game == VRR_GAME_GTA_SA) { - jobRouteStopSphere = game.createPickup(1318, position, 1); + jobRouteLocationSphere = game.createPickup(1318, position, 1); } else { - jobRouteStopSphere = game.createSphere(position, 3); - jobRouteStopSphere.colour = colour; + jobRouteLocationSphere = game.createSphere(position, 3); + jobRouteLocationSphere.colour = colour; } - if(jobRouteStopBlip != null) { - destroyElement(jobRouteStopBlip); + if(jobRouteLocationBlip != null) { + destroyElement(jobRouteLocationBlip); } - blinkJobRouteStopBlip(10, position, colour); + blinkJobRouteLocationBlip(10, position, colour); } } @@ -57,29 +57,29 @@ function showJobRouteStop(position, colour) { function enteredJobRouteSphere() { logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`); - tellServerPlayerArrivedAtJobRouteStop(); - destroyElement(jobRouteStopSphere); - destroyElement(jobRouteStopBlip); - jobRouteStopSphere = null; - jobRouteStopBlip = null; + tellServerPlayerArrivedAtJobRouteLocation(); + destroyElement(jobRouteLocationSphere); + destroyElement(jobRouteLocationBlip); + jobRouteLocationSphere = null; + jobRouteLocationBlip = null; } // =========================================================================== -function blinkJobRouteStopBlip(times, position, colour) { +function blinkJobRouteLocationBlip(times, position, colour) { for(let i = 1 ; i <= times ; i++) { setTimeout(function() { - if(jobRouteStopBlip != null) { - destroyElement(jobRouteStopBlip); - jobRouteStopBlip = null; + if(jobRouteLocationBlip != null) { + destroyElement(jobRouteLocationBlip); + jobRouteLocationBlip = null; } else { - jobRouteStopBlip = game.createBlip(position, 0, 2, colour); + jobRouteLocationBlip = game.createBlip(position, 0, 2, colour); } }, 500*i); } setTimeout(function() { - jobRouteStopBlip = game.createBlip(position, 0, 2, colour); + jobRouteLocationBlip = game.createBlip(position, 0, 2, colour); }, 500*times+1); } diff --git a/scripts/client/server.js b/scripts/client/server.js index b91b6575..189a5442 100644 --- a/scripts/client/server.js +++ b/scripts/client/server.js @@ -39,7 +39,7 @@ function addAllNetworkHandlers() { addNetworkEventHandler("vrr.heading", setLocalPlayerHeading); addNetworkEventHandler("vrr.interior", setLocalPlayerInterior); addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration); - addNetworkEventHandler("vrr.showJobRouteStop", showJobRouteStop); + addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation); addNetworkEventHandler("vrr.snow", setSnowState); addNetworkEventHandler("vrr.health", setLocalPlayerHealth); addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey); @@ -160,8 +160,8 @@ function tellServerPlayerUsedKeyBind(key) { // =========================================================================== -function tellServerPlayerArrivedAtJobRouteStop() { - sendNetworkEventToServer("vrr.arrivedAtJobRouteStop"); +function tellServerPlayerArrivedAtJobRouteLocation() { + sendNetworkEventToServer("vrr.arrivedAtJobRouteLocation"); } // ===========================================================================