Plots in var for later improvements

This commit is contained in:
He-Man 2018-06-25 18:21:25 +02:00
parent 32d73a7fac
commit 4ee52e3881
3 changed files with 20 additions and 8 deletions

View File

@ -16,6 +16,7 @@
private ["_Simulated","_DamageAllowed","_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_VAL","_ammoClass","_ammoObj","_anims","_animsData","_arr","_arrCount","_baseObj","_buildingJammerRange","_cfgBaseBuilding","_cfgEpochClient","_class","_color","_damage","_location","_marker","_maxTTL","_owner","_response","_serverSettingsConfig","_storageSlot","_textureSlot","_ttl","_vehHiveKey","_worldspace"];
//[[[end]]]
EPOCH_BaseCams = [];
EPOCH_Plotpoles = [];
_maxTTL = parseNumber EPOCH_expiresBuilding;
_serverSettingsConfig = configFile >> "CfgEpochServer";
_baseDynamicSimulationSystem = [_serverSettingsConfig, "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry;
@ -154,13 +155,16 @@ for "_i" from 0 to _this do {
// Set PubVar later after all Cams are loaded in
};
if (_class isequalto "PlotPole_EPOCH" && EPOCH_SHOW_JAMMERS) then {
_marker = createMarker [str(_location), _location];
_marker setMarkerShape "ICON";
// TODO allow players to change this per base
_marker setMarkerType "mil_dot";
// _marker setMarkerText _class;
_marker setMarkerColor "ColorBlue";
if (_class isequalto "PlotPole_EPOCH") then {
EPOCH_Plotpoles pushbackunique _baseObj;
if (EPOCH_SHOW_JAMMERS) then {
_marker = createMarker [str(_location), _location];
_marker setMarkerShape "ICON";
// TODO allow players to change this per base
_marker setMarkerType "mil_dot";
// _marker setMarkerText _class;
_marker setMarkerColor "ColorBlue";
};
};
};
@ -196,5 +200,6 @@ for "_i" from 0 to _this do {
};
};
publicvariable "EPOCH_BaseCams";
publicvariable "EPOCH_Plotpoles";
missionNamespace setVariable ["EPOCH_BuildingSlotCount", {_x == 0} count EPOCH_BuildingSlots, true];
true

View File

@ -100,6 +100,10 @@ if (isText _staticClassConfig) then {
else {
_newVehicle setVariable["BUILD_OWNER", _playerUID, true];
};
if (_newVehicle isKindOf "PlotPole_EPOCH") then {
EPOCH_Plotpoles pushBackUnique _newVehicle;
publicvariable "EPOCH_Plotpoles";
};
_newVehicle call EPOCH_saveBuilding;
};

View File

@ -34,7 +34,10 @@ if (!isNull _building) then {
EPOCH_BaseCams = EPOCH_BaseCams - [_building];
publicvariable "EPOCH_BaseCams";
};
if (_building iskindof "PlotPole_EPOCH") then {
EPOCH_Plotpoles = EPOCH_Plotpoles - [_building];
publicvariable "EPOCH_Plotpoles";
};
// Check if building killer is the owner and log accordingly
if (_killer isequaltype objnull) then {
if ((_building getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID _killer, _killer getVariable["GROUP", ""]]) then