From 5b0931cfcc8941349f0cdd46f9a87ccd4a4fc401 Mon Sep 17 00:00:00 2001 From: "DESKTOP-UH65DCE\\MusTanG" Date: Mon, 13 Nov 2017 14:54:50 -0600 Subject: [PATCH] add missing and sort private arrays --- .../EPOCH_server_spawnBoatLoot.sqf | 33 ++++++++++--------- .../EpochEvents/CarnivalSpawner.sqf | 2 +- .../EpochEvents/ContainerSpawner.sqf | 2 +- .../EpochEvents/EarthQuake.sqf | 2 +- .../EpochEvents/PlantSpawner.sqf | 2 +- .../EpochEvents/Satellite.sqf | 2 +- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf b/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf index f2d9f828..445d0717 100644 --- a/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf +++ b/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf @@ -13,16 +13,10 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_cfgEpoch","_debug","_showBoatMarkers","_decayMarkerColor","_compromisedColor","_worldSize","_shipwrecks","_total","_count","_distFromOthers","_tooClose","_spawnedLoot","_wreck","_item","_markers","_position","_debugMkr","_heightenedPVP"]; +private ["_cfgEpoch", "_debug", "_worldSize", "_shipwrecks", "_total", "_count", "_distFromOthers", "_spawnedLoot","_tooClose", "_wreck", "_position", "_item", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_rEvents", "_thisEvent"]; //[[[end]]] _cfgEpoch = configFile >> "CfgEpoch" >> worldname; _debug = if(getNumber(_cfgEpoch >> "debugShipwreckLoot") isEqualTo 1)then{true}else{false}; -_showBoatMarkers = if(getNumber(_cfgEpoch >> "showBoatLootMarkers") isEqualTo 1)then{true}else{false}; -_decayMarkerColor = getText(_cfgEpoch >> "shipwreckDecayMarkerColor"); -_compromisedColor = getText(_cfgEpoch >> "shipwreckCompromisedColor"); -_heightenedPVP = if(getNumber(_cfgEpoch >> "HeightenedPlayerVsPlayer") isEqualTo 1)then{true}else{false}; -_markers = []; -_originalColors = []; if (getNumber(_cfgEpoch >> "shipwreckLootEnabled") isEqualTo 1) then { _worldSize = worldSize/2; @@ -64,21 +58,28 @@ if (getNumber(_cfgEpoch >> "shipwreckLootEnabled") isEqualTo 1) then { }; _item setMass 220; _item setVariable["EPOCH_Loot",false,true]; - if (_showBoatMarkers) then { - _markers = ["Shipwreck",_wreck] call EPOCH_server_createGlobalMarkerSet; + + // SET UP THE MARKER. + _markers = []; + _originalColors = []; + _showMarkers = if(getNumber(_cfgEpoch >> "showBoatLootMarkers") isEqualTo 1)then{true}else{false}; + _decayMarkerColor = getText(_cfgEpoch >> "shipwreckDecayMarkerColor"); + _compromisedColor = getText(_cfgEpoch >> "shipwreckCompromisedColor"); + if (_showMarkers) then{ + _markers = ["Shipwreck",_position] call EPOCH_server_createGlobalMarkerSet; { _originalColors pushBack (getMarkerColor _x); }forEach _markers; - }; - - // Check for HeightenedPlayerVsPlayer false and remove comprimised coloring - if((_showBoatMarkers) && !(_heightenedPVP))then{ - _compromisedColor = getMarkerColor (_markers select 0); + + // Check for HeightenedPlayerVsPlayer false and remove comprimised coloring + if!(getNumber(_cfgEpoch >> "HeightenedPlayerVsPlayer") isEqualTo 1)then{ + _compromisedColor = getMarkerColor (_markers select 0); + }; }; _rEvents = missionNameSpace getVariable["EPOCH_RunningEvents",[]]; - _shipwreckEvent = [_position, [_item], [], "shipwreckCounter", diag_tickTime, 99999, _showBoatMarkers, _markers, _originalColors, _decayMarkerColor, _compromisedColor]; - missionNameSpace setVariable["EPOCH_RunningEvents",_rEvents + [_shipwreckEvent]]; + _thisEvent = [_position, [_item], [], "shipwreckCounter", diag_tickTime, 99999, _showBoatMarkers, _markers, _originalColors, _decayMarkerColor, _compromisedColor]; + missionNameSpace setVariable["EPOCH_RunningEvents",_rEvents + [_thisEvent]]; }; }; if(_debug)then{ diff --git a/Sources/epoch_server_settings/EpochEvents/CarnivalSpawner.sqf b/Sources/epoch_server_settings/EpochEvents/CarnivalSpawner.sqf index 8974ec15..d759dce5 100644 --- a/Sources/epoch_server_settings/EpochEvents/CarnivalSpawner.sqf +++ b/Sources/epoch_server_settings/EpochEvents/CarnivalSpawner.sqf @@ -6,7 +6,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/CarnivalSpawner.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_cfgEpoch", "_debug", "_showMarkers", "_limit", "_counter", "_decayTime", "_distFromOthers", "_others", "_position", "_goodPos", "_objs","_item", "_lootPos", "_lootPos", "_loot", "_debugMkr", "_markers", "_originalColors", "_decayMarkerColor", "_compromisedColor", "_rEvents", "_thisEvent"]; +private ["_cfgEpoch", "_debug", "_showMarkers", "_limit", "_counter", "_others", "_distFromOthers", "_position", "_goodPos", "_objs","_item", "_lootPos", "_loot", "_debugMkr", "_markers", "_originalColors", "_decayMarkerColor", "_compromisedColor", "_decayTime", "_serverSettingsConfig", "_timeMultiplier", "_rEvents", "_thisEvent"]; //[[[end]]] _cfgEpoch = configFile >> "CfgEpoch" >> worldname; _debug = if(getNumber(_cfgEpoch >> "debugCarnivalSpawner") isEqualTo 1)then{true}else{false}; diff --git a/Sources/epoch_server_settings/EpochEvents/ContainerSpawner.sqf b/Sources/epoch_server_settings/EpochEvents/ContainerSpawner.sqf index ee23767c..e6dcb8ce 100644 --- a/Sources/epoch_server_settings/EpochEvents/ContainerSpawner.sqf +++ b/Sources/epoch_server_settings/EpochEvents/ContainerSpawner.sqf @@ -6,7 +6,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/ContainterSpawner.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_position","_item","_markers"]; +private ["_cfgEpoch", "_debug", "_limit", "_counter", "_others", "_distFromOthers", "_position", "_goodPos", "_item", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_decayTime", "_serverSettingsConfig", "_timeMultiplier", "_rEvents", "_thisEvent"]; //[[[end]]] _cfgEpoch = configFile >> "CfgEpoch" >> worldname; _debug = if(getNumber(_cfgEpoch >> "debugContainerSpawner") isEqualTo 1)then{true}else{false}; diff --git a/Sources/epoch_server_settings/EpochEvents/EarthQuake.sqf b/Sources/epoch_server_settings/EpochEvents/EarthQuake.sqf index e2948fa8..77547740 100644 --- a/Sources/epoch_server_settings/EpochEvents/EarthQuake.sqf +++ b/Sources/epoch_server_settings/EpochEvents/EarthQuake.sqf @@ -8,7 +8,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/Earthquake.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_cfgEpoch", "_debug", "_limit", "_counter", "_others", "_distFromOthers", "_position", "_goodPos", "_playersNearEpicenter", "_chance", "_minerals", "_item", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_spawned", "_decayTime", "_rEvents", "_thisEvent"]; +private ["_cfgEpoch", "_debug", "_limit", "_counter", "_others", "_distFromOthers", "_position", "_goodPos", "_playersNearEpicenter", "_chance", "_minerals", "_item", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_spawned", "_decayTime", "_serverSettingsConfig", "_timeMultiplier", "_rEvents", "_thisEvent"]; //[[[end]]] _cfgEpoch = configFile >> "CfgEpoch" >> worldname; _debug = if(getNumber(_cfgEpoch >> "debugEarthquakeSpawner") isEqualTo 1)then{true}else{false}; diff --git a/Sources/epoch_server_settings/EpochEvents/PlantSpawner.sqf b/Sources/epoch_server_settings/EpochEvents/PlantSpawner.sqf index d61051c7..7849e797 100644 --- a/Sources/epoch_server_settings/EpochEvents/PlantSpawner.sqf +++ b/Sources/epoch_server_settings/EpochEvents/PlantSpawner.sqf @@ -17,7 +17,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/PlantSpawner.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_cfgEpoch", "_debug", "_limit", "_counter", "_distFromOthers", "_others", "_nearbyLocations", "_position", "_selectedLocation", "_goodPos", "_plantsArray", "_plant", "_plantCount", "_scatter", "_plants", "_plantPos", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_decayTime", "_rEvents","_thisEvent"]; +private ["_cfgEpoch", "_debug", "_limit", "_counter", "_others", "_distFromOthers", "_nearbyLocations", "_position", "_selectedLocation", "_goodPos", "_plantsArray", "_plant", "_plantCount", "_scatter", "_plants", "_plantPos", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_decayTime", "_serverSettingsConfig", "_timeMultiplier", "_rEvents","_thisEvent"]; //[[[end]]] _cfgEpoch = configFile >> "CfgEpoch" >> worldname; _debug = if(getNumber(_cfgEpoch >> "debugPlantSpawner") isEqualTo 1)then{true}else{false}; diff --git a/Sources/epoch_server_settings/EpochEvents/Satellite.sqf b/Sources/epoch_server_settings/EpochEvents/Satellite.sqf index 5b59919f..79d8b8bd 100644 --- a/Sources/epoch_server_settings/EpochEvents/Satellite.sqf +++ b/Sources/epoch_server_settings/EpochEvents/Satellite.sqf @@ -6,7 +6,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/Satellite.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_satellite","_markers","_playersNearEpicenter","_position","_satellites"]; +private ["_cfgEpoch", "_debug", "_limit", "_counter", "_others", "_distFromOthers", "_position", "_goodPos", "_satellites", "_satellite", "_debugMkr", "_markers", "_originalColors", "_showMarkers", "_decayMarkerColor", "_compromisedColor", "_decayTime", "_serverSettingsConfig", "_timeMultiplier", "_rEvents","_thisEvent"]; //[[[end]]] _cfgEpoch = configFile >> "CfgEpoch" >> worldname; _debug = if(getNumber(_cfgEpoch >> "debugSatelliteSpawner") isEqualTo 1)then{true}else{false};