global marker sets and map upgrade

New global marker sets and functions.
Replace all markers for events and locations(fully configurable in CfgMarkerSets)
New MapScale marker zoom feature.
This commit is contained in:
DirtySanchez 2017-10-18 11:27:23 -05:00
parent 90f7b5c0a3
commit b2cf56a7b6
19 changed files with 368 additions and 93 deletions

View File

@ -34,7 +34,7 @@ if(_mClass isEqualTo "") exitWith {
};
// get config for custom marker sets
_config = 'CfgLocalMarkerSets' call EPOCH_returnConfig;
_config = 'CfgMarkerSets' call EPOCH_returnConfig;
if !(isclass (_config >> _mClass)) exitwith {
diag_log "EPOCHDebug: createLocalMarkerSet -2- not a class markerClass, nothing to create";
};

View File

@ -26,7 +26,7 @@ if(_mClass isEqualTo "") exitWith {
};
// get config for custom marker sets
_config = 'CfgLocalMarkerSets' call EPOCH_returnConfig;
_config = 'CfgMarkerSets' call EPOCH_returnConfig;
if !(isclass (_config >> _mClass)) exitwith {
diag_log "EPOCHDebug: deleteLocalMarkerSet -2- not a class markerClass, nothing to delete";
};

View File

@ -359,7 +359,7 @@ if !(_playerTempKey isEqualTo "EPOCH_playerTemp") then {
};
// Check for PlayerMarker and Update or Remove it
_config = 'CfgLocalMarkerSets' call EPOCH_returnConfig;
_config = 'CfgMarkerSets' call EPOCH_returnConfig;
_markerArray = getArray(_config >> 'PlayerMarker' >> 'markerArray');
_markerName = (_markerArray select 0) select 0;
@ -377,6 +377,53 @@ if(_markerName in allMapMarkers)then{
};
};
if(visibleMap)then{
_mapControl = (findDisplay 12) displayCtrl 51;
_mapScale = ctrlMapScale _mapControl;
_zoomMarkers = allMapMarkers;
if(isNil {EPOCH_lastMapScale})then{EPOCH_lastMapScale = 0};
for "_i" from 0 to ((count _zoomMarkers) - 1) do {
_zoomMarker = _zoomMarkers select _i;
switch(true)do{
case ( (_mapScale >= 0.95) && (_mapScale <= 1) ): {
_zoomMarker setMarkerSizeLocal [0.666,0.666];
//_zoomMarker setMarkerAlphaLocal 0;
};
case ( (_mapScale >= 0.75) && (_mapScale < 0.95) ): {
_zoomMarker setMarkerSizeLocal [0.8,0.8];
};
case ( (_mapScale >= 0.55) && (_mapScale < 0.75) ): {
_zoomMarker setMarkerSizeLocal [1,1];
};
case ( (_mapScale >= 0.5) && (_mapScale < 0.55) ): {
_zoomMarker setMarkerSizeLocal [1.1,1.1];
};
case ( (_mapScale >= 0.45) && (_mapScale < 0.5) ): {
_zoomMarker setMarkerSizeLocal [1.2,1.2];
};
case ( (_mapScale >= 0.35) && (_mapScale < 0.45) ): {
_zoomMarker setMarkerSizeLocal [1.4,1.4];
};
case ( (_mapScale >= 0.25) && (_mapScale < 0.35) ): {
_zoomMarker setMarkerSizeLocal [1.666,1.666];
};
case ( (_mapScale >= 0.15) && (_mapScale < 0.25) ): {
_zoomMarker setMarkerSizeLocal [1.8,1.8];
};
case ( (_mapScale >= 0.1) && (_mapScale < 0.15) ): {
_zoomMarker setMarkerSizeLocal [1.9,1.9];
};
case ( (_mapScale >= 0.0666) && (_mapScale < 0.1) ): {
_zoomMarker setMarkerSizeLocal [2.2,2.2];
};
case ( (_mapScale >= 0) && (_mapScale < 0.0666) ): {
_zoomMarker setMarkerSizeLocal [2.666,2.666];
};
};
};
EPOCH_lastMapScale = _mapScale;
};
// force update
if (EPOCH_forceUpdateNow) then {
EPOCH_forceUpdateNow = false;

View File

@ -41,12 +41,12 @@ class CfgActionMenu
dyna_WeapsMagsTurret = "call {_out = [];if (dyna_inVehicle) then {_added = [];{_weapon = _x;_WeaponMags = ((vehicle player) magazinesTurret dyna_Turret) select {(_x in (getArray (configFile >> 'CfgWeapons' >> _weapon >> 'magazines'))) && !((getText (configFile >> 'CfgMagazines' >> _x >> 'picture')) isequalto '')};if !(_WeaponMags isequalto []) then {{if !(_x in _added) then {_out pushback [_weapon,_x];_added pushback _x;};} foreach _WeaponMags;};} foreach dyna_weaponsTurret;};_out}";
dyna_mapPlayerMarkerON = "(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'playerLocationMarkerGPSOnly') isEqualTo 1)";
dyna_mapPlayerMarker = "(((getArray(('CfgLocalMarkerSets' call EPOCH_returnConfig) >> 'PlayerMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)";
dyna_mapPlayerMarker = "(((getArray(('CfgMarkerSets' call EPOCH_returnConfig) >> 'PlayerMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)";
dyna_deathMarkerON = "(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'playerDeathMarkerGPSOnly') isEqualTo 1)";
dyna_deathMarker = "profileNameSpace getVariable['EPOCHLastKnownDeath',[]]";
dyna_deathMarkerAvail = "!(dyna_deathMarker isEqualTo [])";
dyna_mapDeathMarker = "(((getArray(('CfgLocalMarkerSets' call EPOCH_returnConfig) >> 'DeathMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)";
dyna_mapDeathMarker = "(((getArray(('CfgMarkerSets' call EPOCH_returnConfig) >> 'DeathMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)";
};
class self

View File

@ -5,24 +5,164 @@
Use ['Name',position] call EPOCH_fnc_createLocalMarkerSet;
Global Markers are mostly for server use
Use ['Name',position] call EPOCH_fnc_createGlobalMarkerSet;
Use ['Name',position] call EPOCH_server_createGlobalMarkerSet;
*/
class CfgLocalMarkerSets
class CfgMarkerSets
{
brushes[] = {"Solid","SolidFull","Horizontal","Vertical","Grid","FDiagonal","BDiagonal","DiagGrid","Cross","Border","SolidBorder"};
class PlayerMarker {
markerArray[] = {
{"PlayerMarker1","ICON","EpochGPS","ColorBlue",1,{0.8,0.8},0,"format['%1/%2',(format[mapGridPosition player]) select [0,3],(format[mapGridPosition player]) select [3,3]]"},
{"PlayerMarker2","ICON","EpochActive_Hex","ColorBlue",1,{0.8,0.8}},
{"PlayerMarker3","ICON","EpochBG_Hex","ColorWhite",0.3,{0.8,0.8}}
{"PlayerMarker1","ICON","EpochActive_Hex","ColorBlue",1,{0.9,0.9}},
{"PlayerMarker2","ICON","EpochBG_Hex","ColorWhite",0.3,{0.9,0.9}},
{"PlayerMarker3","ICON","EpochGPS","ColorBlue",1,{0.8,0.8},0,"format['%1/%2',(format[mapGridPosition player]) select [0,3],(format[mapGridPosition player]) select [3,3]]"}
};
};
class DeathMarker {
markerArray[] = {
{"DeathMarker1","ICON","EpochSkull","ColorRed",1,{0.8,0.8},0,"str(name player)"},
{"DeathMarker2","ICON","EpochActive_Circle","ColorRed",1,{0.8,0.8}},
{"DeathMarker3","ICON","EpochBG_Circle","ColorPink",0.3,{0.8,0.8}}
{"DeathMarker1","ICON","EpochActive_Circle","ColorRed",1,{0.9,0.9}},
{"DeathMarker2","ICON","EpochBG_Circle","ColorPink",0.3,{0.9,0.9}},
{"DeathMarker3","ICON","EpochSkull","ColorRed",1,{0.8,0.8},0,"str(name player)"}
};
};
class EpochDebugBox {
markerArray[] = {
{"","ICON","EpochActive_Square","ColorGreen",1,{1,1}},
{"","ICON","EpochBG_Square","ColorBlack",0.2,{1,1}},
{"","ICON","EpochRespawn","ColorGreen",0.75,{1,1}}
};
};
class PlantSpawn {
markerArray[] = {
{"","ICON","EpochActive_Diamond","ColorGreen",1,{1.1,1.1}},
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.1,1.1}},
{"","ICON","EpochPlant","ColorGreen",0.9,{1.2,1.2}}
};
};
class AirDrop {
markerArray[] = {
{"","ICON","EpochActive_Diamond","ColorGreen",1,{1.1,1.1}},
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.1,1.1}},
{"","ICON","EpochAirdrop","ColorGreen",0.75,{1.2,1.2}}
};
};
class Carnival {
markerArray[] = {
{"","ICON","EpochActive_Diamond","ColorOrange",1,{1.2,1.2}},
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.2,1.2}},
{"","ICON","EpochCarnival","ColorOrange",0.75,{1.3,1.3}}
};
};
class Container {
markerArray[] = {
{"","ICON","EpochActive_Diamond","ColorOrange",1,{1.2,1.2}},
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.2,1.2}},
{"","ICON","EpochContainer","ColorOrange",0.75,{1.3,1.3}}
};
};
class EarthQuake {
markerArray[] = {
{"","ICON","EpochActive_Circle","ColorGrey",1,{1.2,1.2}},
{"","ICON","EpochBG_Circle","ColorBlack",0.2,{1.2,1.2}},
{"","ICON","EpochGem","ColorRed",1,{1.3,1.3}}
};
};
class ServicePoint {
markerArray[] = {
{"","ICON","EpochBG_Circle","ColorGrey",0.25,{0.85,0.85}},
{"","ICON","EpochActive_Circle","ColorBlack",1,{0.85,0.85}},
{"","ICON","EpochService","ColorGrey",1,{0.9,0.9},0,"'Service Point'"}
};
};
class Radiation {
markerArray[] = {
{"","ICON","EpochBG_Triangle","ColorBlack",0.3,{1.8,1.8}},
{"","ICON","EpochActive_Triangle","ColorYellow",1,{1.7,1.7}},
{"","ICON","EpochRadiation","ColorYellow",1,{0.95,0.95}}
};
};
class Satellite {
markerArray[] = {
{"","ICON","EpochBG_Triangle","ColorBlack",0.15,{1.5,1.5},58},
{"","ICON","EpochActive_Triangle","ColorYellow",0.5,{1.3,1.3},58},
{"","ICON","EpochSatellite","ColorYellow",1,{0.75,0.75},58}
};
};
class MissionNoob {
markerArray[] = {
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Square","ColorGreen",0.5,{1.2,1.2}},
{"","ICON","EpochMissionNoob1","ColorYellow",1,{1,1}}
};
};
class MissionNoobPlus {
markerArray[] = {
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Square","ColorGreen",0.75,{1.2,1.2}},
{"","ICON","EpochMissionNoob2","ColorYellow",1,{1,1}}
};
};
class MissionSurvivor {
markerArray[] = {
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Square","ColorBlue",0.5,{1.2,1.2}},
{"","ICON","EpochMissionMedium1","ColorGreen",1,{1,1}}
};
};
class MissionSurvivorPlus {
markerArray[] = {
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Square","ColorBlue",0.75,{1.2,1.2}},
{"","ICON","EpochMissionMedium2","ColorGreen",1,{1,1}}
};
};
class MissionSlaughter {
markerArray[] = {
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Square","ColorRed",0.5,{1.2,1.2}},
{"","ICON","EpochMissionVeteran1","ColorBlue",1,{1,1}}
};
};
class MissionSlaughterPlus {
markerArray[] = {
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Square","ColorRed",0.75,{1.2,1.2}},
{"","ICON","EpochMissionVeteran2","ColorBlue",1,{1,1}}
};
};
class IGSafeZones {
markerArray[] = {
{"","ICON","mil_warning","ColorRed",1,{1,1},0,"format['SafeZone%1',IGSZCounter];IGSZCounter = IGSZCounter+1"},
{"","ELLIPSE","Grid","ColorGreen",1,{250,250}}
};
};
class StaticTrader {
markerArray[] = {
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
{"","ICON","EpochActive_Circle","ColorRed",0.75,{0.8,0.8}},
{"","ICON","EpochStaticTrader","ColorBlack",1,{0.7,0.7}}
};
};
class DynamicTrader {
markerArray[] = {
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
{"","ICON","EpochActive_Circle","ColorGreen",0.75,{0.8,0.8}},
{"","ICON","EpochDynamicTrader","ColorBrown",1,{0.7,0.7}}
};
};
class NewDynamicTrader {
markerArray[] = {
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
{"","ICON","EpochActive_Circle","ColorKhaki",0.75,{0.8,0.8}},
{"","ICON","EpochStaticTrader","ColorKhaki",1,{0.7,0.7}}
};
};
class Shipwreck {
markerArray[] = {
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{1.2,1.2}},
{"","ICON","EpochActive_Circle","ColorOrange",1,{1.2,1.2}},
{"","ICON","EpochShipwreck","ColorOrange",1,{1.3,1.3}}
};
};
};

View File

@ -22,11 +22,7 @@ private ["_item","_marker"];
_item setMass 220;
if (EPOCH_SHOW_BOATLOOT) then {
_marker = createMarker[str(_x), _x];
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_dot";
// _marker setMarkerText "Shipwreck";
_marker setMarkerColor "ColorOrange";
_markers = ["Shipwreck",_x] call EPOCH_server_createGlobalMarkerSet;
};
};
} foreach (getArray (configFile >> "CfgEpoch" >> worldname >> "containerPos"));

View File

@ -0,0 +1,91 @@
/*
Author: DirtySanchez
Contributors:
Description:
Utilize new Epoch Active Markers, Backgrounds and Icons courtesy of DrokZ.
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_server_createGlobalMarkerSet.sqf
usage:
[_markerClass, _position] call EPOCH_server_createGlobalMarkerSet;
_markerClass(_mClass) - use one of the class markers in the epoch_configs/Configs/CfgMarkerSets.hpp or create new
_position(_mPos) - position you would like to place the marker set on the map
Example:
1. ['DeathMarker',_pos] call EPOCH_server_createGlobalMarkerSet;
2. ['PlayerMarker',_pos] call EPOCH_server_createGlobalMarkerSet;
*/
private["_config", "_markerArray", "_ccText"];
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_data",[]] ];
if(_mClass isEqualTo "") exitWith {
diag_log "EPOCHDebug: createGlobalMarkerSet -1- empty markerClass, nothing to create";
};
// get config for custom marker sets
_config = 'CfgMarkerSets' call EPOCH_returnConfig;
if !(isclass (_config >> _mClass)) exitwith {
diag_log "EPOCHDebug: createGlobalMarkerSet -2- not a class markerClass, nothing to create";
};
// get array for custom marker set
_markerArray = getArray(_config >> _mClass >> "markerArray");
if(_markerArray isEqualTo []) exitWith {
diag_log "EPOCHDebug: createGlobalMarkerSet -3- empty markerArray, nothing to create";
};
// check for defined Marker counter
if(isNil {Epoch_markerCounterGlobal})then{Epoch_markerCounterGlobal = 0};
_return = [];
// run forEach loop on array
{
// double check all, use these defaults if not defined
_x params [
["_mName",format["globalMarker__%1", Epoch_markerCounterGlobal]],
["_mShape","ICON"],
["_mType","hd_dot"],
["_mColor","ColorBlack"],
["_mAlpha",1],
["_mSize",[0.8,0.8]],
["_mDir",0],
["_mText",""]
];
_mName = format["globalMarker_%1", Epoch_markerCounterGlobal];
_marker = createMarker [_mName, _mPos];
_return pushBack _mName;
_mName setMarkerShape _mShape;
if!(_mShape isEqualTo "ICON")then{
if!(_mType in (getArray(_config >> "brushes")))exitWith{
diag_log "EPOCHDebug: createGlobalMarkerSet -5- Shape is Ellipse or Rectangle and needs a Brush Type";
};
};
_mName setMarkerType _mType;
_mName setMarkerAlpha _mAlpha;
_mName setMarkerSize _mSize;
_mName setMarkerDir _mDir;
if!(_mText isEqualTo "")then{
_ccText = call compile _mText;
_mName setMarkerText _ccText;
};
if!(_mColor isEqualTo "")then{
_mName setMarkerColor _mColor
};
Epoch_markerCounterGlobal = Epoch_markerCounterGlobal + 1;
}forEach _markerArray;
_return

View File

@ -0,0 +1,31 @@
/*
Author: DirtySanchez - EpochMod.com
Contributors:
Description:
Delete Marker Set
License:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_server_deleteGlobalMarkerSet.sqf
usage:
[_markerArray] call EPOCH_server_deleteGlobalMarkerSet;
_markerArray - 1 or more in game marker names
*/
private["_mName"];
params [ ["_markerArray",[]], ["_data",[]] ];
if(_markerArray isEqualTo []) exitWith {
diag_log "EPOCHDebug: deleteGlobalMarkerSet -1- empty markerArray, nothing to delete";
};
{
_mName = _x;
deleteMarker _mName;
}forEach _markerArray;

View File

@ -13,13 +13,15 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_server_traderKilled.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_marker","_objHiveKey","_slot","_playerCStats","_playerKarma","_playerKarmaAdj","_kIndex"];
private ["_markers","_objHiveKey","_slot","_playerCStats","_playerKarma","_playerKarmaAdj","_kIndex"];
//[[[end]]]
params ["_trader","_player"];
if (!isNull _trader) then {
_marker = _trader getVariable["MARKER_REF",""];
if (_marker != "") then {
_marker setMarkerColor "ColorRed";
_markers = _trader getVariable["MARKER_REF",""];
if (_markers != []) then {
{
_x setMarkerColor "ColorRed";
}forEach _markers;
};
_slot = _trader getVariable["AI_SLOT", -1];
if (_slot != -1) then {

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_agent","_aiTables","_arr","_class","_currentStock","_existingStock","_home","_indexStock","_limit","_marker","_objHiveKey","_pos","_randomAIUniform","_response","_schedule","_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_toBeRemoved","_traderSlotIndex","_work"];
private ["_agent","_aiTables","_arr","_class","_currentStock","_existingStock","_home","_indexStock","_limit","_markers","_objHiveKey","_pos","_randomAIUniform","_response","_schedule","_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_toBeRemoved","_traderSlotIndex","_work"];
//[[[end]]]
params [["_maxTraderLimit",0]];
@ -110,12 +110,8 @@ for "_i" from 0 to (_maxTraderLimit-1) do {
EPOCH_TraderSlots deleteAt _traderSlotIndex;
if (EPOCH_SHOW_TRADERS) then {
_marker = createMarker [str(_agent), (_pos)];
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorBlack";
_agent setVariable["MARKER_REF", _marker];
_markers = ["StaticTrader",_pos] call EPOCH_server_createGlobalMarkerSet;
_agent setVariable["MARKER_REF", _markers];
};
} else {
// Spawn dynamic traders
@ -227,11 +223,8 @@ for "_i" from 0 to (_maxTraderLimit-1) do {
EPOCH_TraderSlots deleteAt _traderSlotIndex;
if (EPOCH_SHOW_TRADERS) then {
_marker = createMarker [str(_agent), (_pos)];
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorBrown";
_agent setVariable["MARKER_REF", _marker];
_markers = ["DynamicTrader",_pos] call EPOCH_server_createGlobalMarkerSet;
_agent setVariable["MARKER_REF", _markers];
};
};
};

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_acceptableBlds","_agent","_aiClass","_aiTables","_buildingHome","_buildingWork","_buildings","_checkBuilding","_config","_endTime","_home","_homes","_marker","_objHiveKey","_pos","_position","_randomAIUniform","_return","_schedule","_slot","_spawnCount","_startTime","_traderHomes","_usedBuildings","_work"];
private ["_acceptableBlds","_agent","_aiClass","_aiTables","_buildingHome","_buildingWork","_buildings","_checkBuilding","_config","_endTime","_home","_homes","_markers","_objHiveKey","_pos","_position","_randomAIUniform","_return","_schedule","_slot","_spawnCount","_startTime","_traderHomes","_usedBuildings","_work"];
//[[[end]]]
_spawnCount = count EPOCH_TraderSlots;
_config = (configFile >> "CfgEpoch" >> worldName);
@ -67,11 +67,8 @@ for "_i" from 1 to _spawnCount do {
};
["AI", _objHiveKey, [_aiClass, _home, [_work, _schedule]] ] call EPOCH_fnc_server_hiveSET;
if (EPOCH_SHOW_TRADERS) then {
_marker = createMarker[str(_agent), (_pos)];
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorKhaki";
_agent setVariable["MARKER_REF", _marker];
_markers = ["NewDynamicTrader",_pos] call EPOCH_server_createGlobalMarkerSet;
_agent setVariable["MARKER_REF", _markers];
};
};
};

View File

@ -123,6 +123,8 @@ class CfgServerFunctions
class serverCommand {};
class server_makeMarker {};
class server_removeMarker {};
class server_createGlobalMarkerSet {};
class server_deleteGlobalMarkerSet {};
};
class epoch_missions {
class Server_createObject {};

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/init/server_init.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_ReservedSlots","_SideHQ1","_SideHQ2","_SideHQ3","_abortAndError","_allowedVehicleIndex","_allowedVehicleListName","_allowedVehiclesList","_allowedVehiclesListArray","_cfgServerVersion","_channelColor","_channelNumber","_channelTXT","_clientVersion","_config","_configSize","_configVersion","_date","_dateChanged","_epochConfig","_epochWorldPath","_existingStock","_hiveVersion","_index","_indexStock","_instanceID","_marker","_markercolor","_markertxt","_markertype","_pos","_radio","_response","_sapper","_serverConfig","_serverSettingsConfig","_servicepoints","_startTime","_staticDateTime","_staticFuelSources","_timeDifference","_vehicleCount","_vehicleSlotLimit","_worldSize"];
private ["_ReservedSlots","_SideHQ1","_SideHQ2","_SideHQ3","_abortAndError","_allowedVehicleIndex","_allowedVehicleListName","_allowedVehiclesList","_allowedVehiclesListArray","_cfgServerVersion","_channelColor","_channelNumber","_channelTXT","_clientVersion","_config","_configSize","_configVersion","_date","_dateChanged","_epochConfig","_epochWorldPath","_existingStock","_hiveVersion","_index","_indexStock","_instanceID","_marker","_markers","_markercolor","_markertxt","_markertype","_pos","_radio","_response","_sapper","_serverConfig","_serverSettingsConfig","_servicepoints","_startTime","_staticDateTime","_staticFuelSources","_timeDifference","_vehicleCount","_vehicleSlotLimit","_worldSize"];
//[[[end]]]
_startTime = diag_tickTime;
missionNamespace setVariable ['Epoch_ServerVersion', getText(configFile >> "CfgMods" >> "Epoch" >> "version"), true];
@ -245,14 +245,8 @@ _servicepoints = getArray (_config >> worldname >> 'ServicePoints');
};
};
if !(_markertype isequalto "") then {
_marker = createMarker [('ServicePointMarker'+(str _foreachindex)), _pos];
_marker setmarkertype _markertype;
if !(_markercolor isequalto "") then {
_marker setmarkercolor _markercolor;
};
if !(_markertxt isequalto "") then {
_marker setMarkerText _markertxt;
};
//_marker = createMarker [('ServicePointMarker'+(str _foreachindex)), _pos];
_markers = ["ServicePoint", _pos] call EPOCH_server_createGlobalMarkerSet;
if !(surfaceiswater _pos) then {
"Land_HelipadCircle_F" createvehicle _pos;
};
@ -290,12 +284,7 @@ if !(_radioactiveLocations isEqualTo []) then {
_locations = _locations - [_selectedLoc];
_radioactiveLocationsTmp pushBack [_selectedLoc,random 666];
private _position = locationPosition _selectedLoc;
_marker = name _selectedLoc;
_marker = createMarker[_marker, _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "hd_warning";
_marker setMarkerColor "ColorRed";
// _marker setMarkerText "Radioactive";
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
};
};
};

View File

@ -6,7 +6,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/CarnivalSpawner.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_ferrisPosition","_item","_marker"];
private ["_ferrisPosition","_item","_markers"];
//[[[end]]]
_ferrisPosition = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 4000, 0] call BIS_fnc_findSafePos;
if ((count _ferrisPosition) == 2) then{
@ -18,10 +18,6 @@ if ((count _ferrisPosition) == 2) then{
} forEach["Carnival_Tent", "Land_Slide_F", "Carnival_Tent", "Land_Carousel_01_F", "Carnival_Tent", "Carnival_Tent"];
if (EPOCH_showShippingContainers) then{
_marker = createMarker[str(_ferrisPosition), _ferrisPosition];
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_dot";
// _marker setMarkerText "Ferris";
_marker setMarkerColor "ColorOrange";
_markers = ["Carnival",_ferrisPosition] call EPOCH_server_createGlobalMarkerSet;
};
};

View File

@ -6,16 +6,12 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/ContainterSpawner.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_cargoPosition","_item","_marker"];
private ["_cargoPosition","_item","_markers"];
//[[[end]]]
_cargoPosition = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 4000, 1] call BIS_fnc_findSafePos;
if ((count _cargoPosition) == 2) then{
_item = createVehicle["Cargo_Container", _cargoPosition, [], 0.0, "CAN_COLLIDE"];
if (EPOCH_showShippingContainers) then{
_marker = createMarker[str(_cargoPosition), _cargoPosition];
_marker setMarkerShape "ICON";
_marker setMarkerType "mil_dot";
// _marker setMarkerText "Container";
_marker setMarkerColor "ColorOrange";
_markers = ["Container",_cargoPosition] call EPOCH_server_createGlobalMarkerSet;
};
};

View File

@ -6,7 +6,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/Earthquake.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_chance","_item","_marker","_minerals","_playersNearEpicenter","_position"];
private ["_chance","_item","_markers","_minerals","_playersNearEpicenter","_position"];
//[[[end]]]
_position = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 1000, 0] call BIS_fnc_findSafePos;
if ((count _position) == 2) then{
@ -24,11 +24,7 @@ if ((count _position) == 2) then{
_minerals = ["MineralDepositCopper_EPOCH", "MineralDepositGold_EPOCH", "MineralDepositSilver_EPOCH"];
_item = createVehicle[(selectRandom _minerals), _position, [], 0.0, "CAN_COLLIDE"];
if (EPOCH_showEarthQuakes) then{
_marker = createMarker[str(_position), _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "hd_objective";
// _marker setMarkerText "Mineral";
_marker setMarkerColor "ColorGrey";
_markers = ["EarthQuake",_position] call EPOCH_server_createGlobalMarkerSet;
};
};
};

View File

@ -7,3 +7,5 @@
*/
{[_x,100] call EPOCH_server_effectCrypto;} forEach (allPlayers select {alive _x});
// Add on screen notification large crypto symbol and maybe audio clip CHA-CHING, configurable option for hosts

View File

@ -15,7 +15,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/PlantSpawner.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_debug","_decayTime","_jammers","_marker","_nearbyLocations","_plant","_plantCount","_plants","_playersNearby","_position","_restricted","_scatter","_selectedLocation","_showPlantMarkers","_timeStamp"];
private ["_debug","_decayTime","_jammers","_markers","_nearbyLocations","_plant","_plantCount","_plants","_playersNearby","_position","_restricted","_scatter","_selectedLocation","_showPlantMarkers","_timeStamp"];
//[[[end]]]
// SET THIS TO TRUE TO GET MESSAGES IN LOG.
@ -97,10 +97,7 @@ if ((count _position) == 2) then{
// SET UP THE MARKER.
if (_showPlantMarkers) then{
_marker = createMarker[str(_position), _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "waypoint";
_marker setMarkerColor "ColorGreen";
_markers = ["PlantSpawn",_position] call EPOCH_server_createGlobalMarkerSet;
};
// TICK COUNTER + 1 SPAWNED PLANT PATCH.
@ -115,26 +112,30 @@ if ((count _position) == 2) then{
EPOCH_plantCounter = EPOCH_plantCounter - 1;
// DELETE THAT MARKER.
if (_showPlantMarkers) then{
deleteMarker _marker;
[_markers] call EPOCH_server_deleteGlobalMarkerSet;
};
// remove any left over "dead" plants (only if decayTime is reached)
{deleteVehicle _x} forEach _plantsLeft;
};
// set marker to brown to show 50% decay but not if already marked as picked (red).
if !(getMarkerColor _marker in ["ColorRed","ColorBrown"]) then {
if ((diag_tickTime - _timeStamp) > (_decayTime/2)) then {
_marker setMarkerColor "ColorBrown";
{
if !(getMarkerColor _x in ["ColorRed","ColorBrown"]) then {
if ((diag_tickTime - _timeStamp) > (_decayTime/2)) then {
_x setMarkerColor "ColorBrown";
};
};
};
}forEach _markers;
// WAIT FOR A PLAYER TO Pick one plant then set marker to red
if (count _plantsLeft != _plantCount) then {
if (_showPlantMarkers) then{
if (getMarkerColor _marker != "ColorRed") then {
_marker setMarkerColor "ColorRed";
};
{
if (getMarkerColor _x != "ColorRed") then {
_x setMarkerColor "ColorRed";
};
}forEach _markers;
};
};
sleep 30;
};
};
// END SCRIPT.
// END SCRIPT.

View File

@ -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","_marker","_playersNearEpicenter","_position","_satellites"];
private ["_satellite","_markers","_playersNearEpicenter","_position","_satellites"];
//[[[end]]]
_position = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 1000, 0] call BIS_fnc_findSafePos;
if ((count _position) == 2) then{
@ -25,10 +25,6 @@ if ((count _position) == 2) then{
_satellite setVariable ["EPOCH_Rads", 10, true];
if (EPOCH_showSatellites) then{
_marker = createMarker[str(_position), _position];
_marker setMarkerShape "ICON";
_marker setMarkerType "hd_warning";
// _marker setMarkerText "Satellite";
_marker setMarkerColor "ColorGreen";
_markers = ["Satellite",_position] call EPOCH_server_createGlobalMarkerSet;
};
};