cleanup and bulk private array updates

This commit is contained in:
vbawol 2017-05-01 09:07:41 -05:00
parent 3f45e6fa81
commit 06fc5e3006
72 changed files with 247 additions and 126 deletions

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_antagonists/EPOCH_server_handle_say3D.sqf
*/
private["_range", "_nearBy", "_sound"];
params [["_player",objNull,[objNull]],["_target",objNull],["_sound","",[""]], ["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_nearBy","_range","_say3dsoundsConfig","_selectedSound","_target","_targets"];
//[[[end]]]
params [["_player",objNull,[objNull]],["_target",objNull],["_sound","",[""]], ["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _target) then {_target = _player};

View File

@ -17,7 +17,9 @@
or
[_player,"moveName","token"] call EPOCH_server_handle_switchMove;
*/
private["_range", "_move", "_nearBy"];
//[[[cog import generate_private_arrays ]]]
private ["_nearBy","_range","_selectedMove","_switchMovehandlerConfig","_target","_targets"];
//[[[end]]]
params [["_player",objNull,[objNull]],["_move","",[""]],["_token","",[""]],["_target",objNull]];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_saveBuilding.sqf
*/
private ["_class","_worldspace","_objHiveKey","_animPhases","_VAL","_return","_objSlot"];
//[[[cog import generate_private_arrays ]]]
private ["_VAL","_animPhases","_cfgBaseBuilding","_class","_objHiveKey","_objSlot","_return","_worldspace"];
//[[[end]]]
_return = false;
if !(isNull _this) then {
_objSlot = _this getVariable["BUILD_SLOT", -1];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_changeOwner.sqf
*/
private ["_result","_newOwner"];
//[[[cog import generate_private_arrays ]]]
private ["_newOwner","_result"];
//[[[end]]]
params ["_object","_newOwnerObj"];
_newOwner = owner _newOwnerObj;
_result = false;

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_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]]]
_maxTTL = parseNumber EPOCH_expiresBuilding;
_serverSettingsConfig = configFile >> "CfgEpochServer";
_UseIndestructible = [_serverSettingsConfig, "UseIndestructible", false] call EPOCH_fnc_returnConfigEntry;

View File

@ -25,8 +25,10 @@
Returns:
NOTHING
*/
private ["_playerUID","_counter","_objSlot","_buildingJammerRange","_current_crypto","_cIndex","_vars","_storSlot","_playerCryptoLimit","_cfgEpochClient"];
params [["_object",objNull],"_player","_maintCount",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_buildingJammerRange","_cIndex","_cfgEpochClient","_counter","_current_crypto","_objSlot","_playerCryptoLimit","_playerUID","_storSlot","_vars"];
//[[[end]]]
params [["_object",objNull],"_player","_maintCount",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _object) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_paintBUILD.sqf
*/
private["_cfgBaseBuilding","_color", "_class", "_currentTextureSlot", "_slot", "_worldspace", "_objHiveKey", "_VAL", "_return", "_playerUID", "_objSlot"];
params [["_object",objNull],"_textureSlot","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_class","_color","_currentTextureSlot","_objSlot","_playerUID"];
//[[[end]]]
params [["_object",objNull],"_textureSlot","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _object) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf
*/
private["_cfgBaseBuilding","_vehSlot", "_gwh", "_wepsItemsCargo", "_magsAmmoCargo", "_objTypes", "_objQty", "_magazine", "_weapon", "_suppressor", "_laser", "_optics", "_arrCount", "_magazineName", "_magazineSize", "_qty", "_objType", "_inventory", "_posWH", "_nearbyWH", "_removeParts", "_isTemporary", "_storageSlot"];
params ["_building","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_ammoObj","_arrCount","_attachments","_cfgBaseBuilding","_gwh","_inventory","_isTemporary","_magazineName","_magazineSize","_magsAmmoCargo","_nearbyWH","_objQty","_objType","_objTypes","_posWH","_qty","_removeParts","_storageSlot","_vehSlot","_wMags","_wMagsArray","_wepsItemsCargo"];
//[[[end]]]
params ["_building","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _building) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf
*/
private["_staticClassConfig","_objSlot", "_findnextslot", "_worldspace", "_objHiveKey", "_VAL", "_cfgBaseBuilding", "_slot", "_storageObj", "_pos", "_buildClass", "_newVehicle", "_textureSlot", "_staticClass", "_playerUID", "_oemType"];
params ["_vehicle", "_player", ["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_cfgBaseBuilding","_findnextslot","_newVehicle","_objSlot","_oemType","_playerUID","_serverSettingsConfig","_slot","_staticClass","_staticClassConfig","_storageObj","_vehiclePos"];
//[[[end]]]
params ["_vehicle", "_player", ["_token","",[""]] ];
if (isNull _vehicle) exitWith{};
if !([_player,_token] call EPOCH_server_getPToken) exitWith {};
@ -43,7 +45,7 @@ if (isText _staticClassConfig) then {
_vehiclePos = getposATL _vehicle;
_storageObj = [_staticClass,_vehicle] call EPOCH_swapBuilding;
if (_UseIndestructible) then {
if ({_storageObj iskindof _x} count _ExceptedBaseObjects == 0) then {
{
@ -53,7 +55,7 @@ if (isText _staticClassConfig) then {
} foreach _IndestructibleBaseObjects;
};
};
if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{
_storageObj setVariable["EPOCH_Locked", false, true];
};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf
*/
private ["_newObj","_class","_objSlot","_cfgBaseBuilding","_lastPosition","_currentPosition","_entities"];
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_class","_currentPosition","_entities","_lastPosition","_newObj","_objSlot","_staticClassConfig"];
//[[[end]]]
_entities = allMissionObjects "Constructions_modular_F";
{
_lastPosition = _x getVariable["LAST_POS", []];

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf
*/
private["_classConfig","_cfgClass", "_newObj", "_return", "_class", "_oemType", "_cfgBaseBuilding", "_object", "_objSlot", "_damage", "_color", "_textureSlot"];
params [["_object",objNull,[objNull]],["_static",false,[false]]];
//[[[cog import generate_private_arrays ]]]
private ["_ammoClass","_ammoObj","_cfgBaseBuilding","_cfgClass","_class","_classConfig","_color","_damage","_newObj","_objSlot","_oemType","_return","_textureSlot","_worldspace"];
//[[[end]]]
params [["_object",objNull,[objNull]],["_static",false,[false]] ];
_return = _object;
_objSlot = _object getVariable ["BUILD_SLOT", -1];
if (_objSlot != -1) then {

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf
*/
private["_simulClassConfig","_worldspace", "_newObj", "_class", "_objSlot", "_cfgBaseBuilding", "_isSupported", "_lastPosition", "_currentPosition", "_objectPos"];
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_class","_isSupported","_newObj","_objSlot","_objectPos","_playerUID","_simulClassConfig","_simulatedCount","_slot","_stableCount","_start"];
//[[[end]]]
if !(isNil "EPOCH_unsupportedCheckRunning") exitWith{ diag_log "UnsupportedCheck: Already running aborted"};
EPOCH_unsupportedCheckRunning = true;

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf
*/
private ["_cfgBaseBuilding","_class","_newObj","_upgrade","_objSlot","_objType","_upgrades"];
params ["_object","_player",["_index",0],["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_class","_newObj","_objSlot","_objType","_upgrade","_upgrades"];
//[[[end]]]
params ["_object","_player",["_index",0],["_token","",[""]] ];
if (isNull _object) exitWith{};
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -1,5 +1,7 @@
// _newObj = [_class,_object] call EPOCH_swapBuilding;
private ["_objectPos","_newObj"];
//[[[cog import generate_private_arrays ]]]
private ["_newObj","_objectPos","_playersNear"];
//[[[end]]]
params [["_class",""],["_object",objNull],["_method",0]];
_newObj = objNull;
if (!isNull _object && !(_class isEqualTo "")) then {

View File

@ -17,7 +17,10 @@
true = group has been created and / or successfully saved!
false = group exist already and hasn't been saved!
*/
params ["_leader", "_groupName", ["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_cIndex","_contentArray","_current_crypto","_groupID","_groupName","_leaderName","_playerCryptoLimit","_return","_textArr","_upgradePrice","_vars"];
//[[[end]]]
params ["_leader", "_groupName", ["_token","",[""]] ];
if !([_leader, _token] call EPOCH_server_getPToken) exitWith{};
_return = false;

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_group/EPOCH_server_deleteGroup.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_groupID","_return"];
params ["_player",["_token","",[""]]];
//[[[end]]]
params ["_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf
*/
private ["_modOrMember","_modOrMemberRevert","_response","_contentArray","_modArray","_memberArray","_selectedPlayerName","_group","_removePlayerArray","_modOrMemberArray","_found"];
//[[[cog import generate_private_arrays ]]]
private ["_allPlayers","_contentArray","_found","_group","_memberrange","_modOrMember","_modOrMemberArray","_modOrMemberRevert","_removePlayerArray","_response","_selectedPlayerName"];
//[[[end]]]
params [["_groupID",""],["_selectedPlayerUID",""],["_addOrRemove",false],["_modOrMemberVar",true],["_player",objnull],["_token",""]];
if !([_player, _token] call EPOCH_server_getPToken) exitWith {};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_group/EPOCH_server_upgradeGroup.sqf
*/
private ["_playerCryptoLimit","_current_crypto","_groupMemberPUID","_return","_newGroupSize","_upgradePrice","_contentArray","_found","_cIndex","_vars","_response"];
params ["_groupID","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_cIndex","_contentArray","_current_crypto","_found","_groupMemberPUID","_newGroupSize","_playerCryptoLimit","_response","_return","_upgradePrice","_vars"];
//[[[end]]]
params ["_groupID","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
_return = false;

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_destroyTrash.sqf
*/
private["_target", "_eventArray", "_triggerType", "_nearPlayers", "_posWH", "_item", "_config", "_object", "_player", "_payout", "_type"];
params [["_object",objNull,[objNull]],["_type",0,[0]],["_player",objNull,[objNull]],["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_antagTable","_antagTableArray","_config","_errorMsg","_item","_nearPlayers","_payout","_posWH","_target","_triggerType","_weightedArray"];
//[[[end]]]
params [["_object",objNull,[objNull]],["_type",0,[0]],["_player",objNull,[objNull]],["_token","",[""]] ];
if (isNull _object) exitWith{};
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_knockDownTree.sqf
*/
private["_posWH", "_item", "_nearbyWH", "_payout", "_object", "_type", "_player"];
params ["_object","_type","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_item","_lootType","_nearbyWH","_posWH"];
//[[[end]]]
params ["_object","_type","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _object) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_lootAnimal.sqf
*/
private["_item", "_class", "_pos", "_objectClass"];
params ["_object","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_class","_classOverride","_config","_errorMsg","_item","_objectClass","_pos"];
//[[[end]]]
params ["_object","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if !(isNull _object) then {

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_lootContainer.sqf
*/
private ["_class","_pos","_dir","_object","_whConfig","_type","_lootClasses","_player","_maxLoot","_triggerType","_eventArray","_animated","_config"];
params ["_object","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_animated","_antagTable","_antagTableArray","_class","_config","_dir","_errorMsg","_lootClasses","_object","_pos","_triggerType","_type","_weightedArray","_whConfig"];
//[[[end]]]
params ["_object","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _object) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_mineRocks.sqf
*/
private["_posWH", "_item", "_nearbyWH", "_rock"];
params ["_object","_index","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_item","_lootables","_nearbyWH","_payout","_payoutQty","_posWH","_selectedPayout"];
//[[[end]]]
params ["_object","_index","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if !(_object isKindOf "All") then {

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_looting/EPOCH_server_spawnBoatLoot.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_item","_marker"];
//[[[end]]]
{
// 20 percent chance for loot to spawn
if ((random 1) <= 0.4) then {

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_airDropCrate.sqf
*/
private ["_pos","_axeCrate","_axeChute","_crateSmoke","_axeLight"];
params ["_object","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_axeChute","_axeCrate","_axeLight","_crateSmoke","_pos"];
//[[[end]]]
params ["_object","_player",["_token","",[""]] ];
if !([_player,_token] call EPOCH_server_getPToken)exitWith{};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createAirDrop.sqf
*/
private ["_playerOwner","_objType","_obj","_grp","_unitPos","_driver","_unit"];
//[[[cog import generate_private_arrays ]]]
private ["_driver","_drvOwner","_grp","_obj","_objType","_playerOwner","_unit","_unitPos"];
//[[[end]]]
params ["_player",["_token","",[""]],"_pos"];
if (!isNil "axenotSent" && {axenotSent}) exitWith {

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf
*/
private ["_grp","_driver","_gunner","_commander","_crew","_missionVehList","_obj","_cfgPricing","_objClass","_vehicles","_backpacks","_weapons","_items","_magazines","_vehAllowed"];
//[[[cog import generate_private_arrays ]]]
private ["_allowedVehicleListName","_allowedVehiclesList","_backpacks","_cfgPricing","_commander","_crew","_driver","_grp","_gunner","_items","_lootTableIndex","_magazines","_obj","_objArr","_pos","_veh","_vehAllowed","_vehicles","_weapons","_wepHolder"];
//[[[end]]]
params ["_player",["_token","",[""]],["_objArr",[]],["_pos",[]],["_wepHolder",objNull],["_clearCargo",true],["_objSpc","CAN_COLLIDE"],["_driverType",""],["_gunnerType",""],["_commanderType",""],["_crewType",""],["_doDamage",false]];
if !([_player,_token]call EPOCH_server_getPToken) exitWith {};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_fillContainer.sqf
*/
private["_player","_container","_clearFirst","_pos","_chance","_weps","_mags","_items"];
//[[[cog import generate_private_arrays ]]]
private ["_container","_pos"];
//[[[end]]]
params ["_player",["_token","",[""]],["_container",objNull,[objNull]],["_clearFirst",false],["_chance",25]];
_pos = getPosATL _player;

View File

@ -17,14 +17,14 @@ params["_plyr","_token",["_cmd",-1],["_tmpVar", nil],{"_missionIndex",-1],["_ite
if !([_plyr, _token] call EPOCH_server_getPToken) exitWith{};
if(isNil "missionControlHandle")then{
missionControlHandle = [] execFSM "x\addons\a3_epoch_server\system\mission_control.fsm";
diag_log format ["MISSION CONTROL INIT: %1",missionControlHandle];
missionControlHandle = [] execFSM "x\addons\a3_epoch_server\system\mission_control.fsm";
diag_log format ["MISSION CONTROL INIT: %1",missionControlHandle];
//Catch first instant if fsm slow to start - may not be necessary.
["_clientCmd",[_plyr, _cmd, _missionIndex,_item,_pos]] spawn{
waitUntil {!(isNil "missionControlHandle")};
missionControlHandle setFSMVariable [_this select 0, _this select 1];
};
//Catch first instant if fsm slow to start - may not be necessary.
["_clientCmd",[_plyr, _cmd, _missionIndex,_item,_pos]] spawn{
waitUntil {!(isNil "missionControlHandle")};
missionControlHandle setFSMVariable [_this select 0, _this select 1];
};
}else{
missionControlHandle setFSMVariable ["_clientCmd",[_plyr, _cmd, _missionIndex,_item,_pos]];
missionControlHandle setFSMVariable ["_clientCmd",[_plyr, _cmd, _missionIndex,_item,_pos]];
};

View File

@ -24,10 +24,9 @@
[["yourClass",4],["myClass",3]] // addItemToBackpack
]
*/
private ["_itemSlot"];
params ["_player","_slots"];
{
_itemSlot = _forEachIndex;
private _itemSlot = _forEachIndex;
_x params ["_items","_itemqtys"];
{
for "_i" from 1 to (_itemqtys select _forEachIndex) do {

View File

@ -1,12 +0,0 @@
// input
/*
1 = _remoteExecClient_NAMES
2 = _rnd_strings_REC
3 = _skn_PVC_INDEX
*/
private '_index';
_index = %1 find (_this select 0 select 0);
if (_index != -1) then {
[%2 select _index, _this select 0 select 1] remoteExec ['EPOCH_%3',(_this select 1)];
};

View File

@ -1,4 +1,4 @@
params [["_player",objNull,[objNull]],["_crypto",0,[0]],["_token","",[""]]];
params [["_player",objNull,[objNull]],["_crypto",0,[0]],["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (_crypto > 0) exitwith { // This is only for pay Crypto, not for give Crypto ;)
diag_log format ['Player %1 (%2) killed for Code hack',name _player, getplayeruid _player];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_checkPlayer.sqf
*/
private["_arr", "_dead", "_isMale", "_medical", "_apperance", "_class", "_vars", "_hitpoints", "_deadPlayer", "_response", "_playerUID", "_playerObj"];
//[[[cog import generate_private_arrays ]]]
private ["_apperance","_arr","_class","_dead","_deadPlayer","_hitpoints","_isMale","_medical","_playerUID","_response","_vars"];
//[[[end]]]
params [["_playerObj",objNull]];
if (_playerObj isEqualType objNull) then {
if (!isNull _playerObj) then {

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_deadPlayer.sqf
*/
private ["_triggerType","_veh","_bankBalance","_bankData","_response","_playerUID","_pos","_cIndex","_vars","_current_crypto"];
params ["_playerObj","_killer","_playerName",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_bankBalance","_bankData","_cIndex","_current_crypto","_defaultVars","_playerName","_playerUID","_pos","_response","_triggerType","_vars"];
//[[[end]]]
params ["_playerObj","_killer","_playerName",["_token","",[""]] ];
// handle token check and isnull for _player
if !([_playerObj, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,6 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_antagonists/EPOCH_server_playerDeathOptions.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_bomb","_pos"];
//[[[end]]]
params ["_player", "_token"];
diag_log format["Epoch: ADMIN: Attempting player detonate on %1.", getPlayerUID _player];
if !([_player,_token]call EPOCH_server_getPToken)exitWith{};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_equippedItem.sqf
*/
private["_channelID", "_selectedChannel"];
//[[[cog import generate_private_arrays ]]]
private ["_channelID","_config","_selectedChannel"];
//[[[end]]]
params ["_class","_status","_player"];
_selectedChannel = EPOCH_customChannels select 0;

View File

@ -17,10 +17,7 @@ private ["_allGroupMembers","_alreadyDead","_attachments","_backpack","_canBeRev
//[[[end]]]
_reject = true;
params [
["_player",objNull,[objNull]],
["_isMale",true]
];
params [["_player",objNull,[objNull]],["_isMale",true]];
if (!isNull _player) then {
@ -244,7 +241,7 @@ if (!isNull _player) then {
if (_weapon != "") then {
_newPlyr addWeapon _weapon;
};
switch _type do {
switch (_type) do {
case 1: { // primary
removeAllPrimaryWeaponItems _newPlyr;
{ _newPlyr addPrimaryWeaponItem _x } forEach _attachments;

View File

@ -12,6 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_selectSpawnpoint.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_currentPos","_server_vars"];
//[[[end]]]
params [["_jammer",objNull],["_player",objNull],["_token",""]];
// check token
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,12 +12,14 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_onPlayerDisconnect.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_return"];
//[[[end]]]
params ["_player","_id","_uid","_name"];
_return = false;
if (!isNull _player) then {
if (_player getVariable["SETUP", false]) then {
[_player, _player getVariable["VARS", []]] call EPOCH_server_savePlayer;
[_player, _player getVariable["VARS", []] ] call EPOCH_server_savePlayer;
if (alive _player) then {
_player setVariable ["VARS", nil];
deleteVehicle _player;

View File

@ -15,4 +15,4 @@
params ["_player","_token","_obj", "_var", "_value", "_local"];
if !([_player,_token]call EPOCH_server_getPToken)exitWith{};
diag_log format["Epoch: ADMIN: Attempting Set variable [%2,%3,%4] on %1.", _obj, _var, _value,_local];
[_obj, _var,_value,_local] remoteExec ['EPOCH_fnc_playerSetVariable', _obj];
[_obj, _var,_value,_local] remoteExec ['EPOCH_fnc_playerSetVariable', _obj];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_respawnPlayer.sqf
*/
private["_defaultUniform", "_class", "_vest", "_dir", "_location", "_playerObj"];
//[[[cog import generate_private_arrays ]]]
private ["_class","_defaultUniform","_dir","_location","_playerObj","_vest"];
//[[[end]]]
params ["_playerObj",["_token","",[""]],"_isMale"];
if !([_playerObj, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,8 +12,8 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf
*/
private["_return", "_pos", "_medical", "_playerUID", "_weapons", "_vars", "_itemsplayer", "_weaponsplayer", "_appearance", "_player", "_dmg", "_allowSave", "_cIndex", "_Svars", "_current_crypto", "_group", "_revive", "_vehiclePlyr","_server_vars"];
params ["_player", "_vars"];
private["_return", "_pos", "_medical", "_playerUID", "_weapons", "_itemsplayer", "_weaponsplayer", "_appearance", "_dmg", "_allowSave", "_cIndex", "_Svars", "_current_crypto", "_group", "_revive", "_vehiclePlyr","_server_vars"];
params [["_player",objNull], ["_vars",[]]];
if (isNull _player) exitWith {
diag_log "DEBUG SAVE ABORT null player object";

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_storeCrypto.sqf
*/
private["_bankBalance", "_bankBalanceBefore", "_current_crypto", "_transferBankBalance", "_transferBankBalanceBefore", "_return", "_transferBankData", "_transferTargetUID", "_transferResponse", "_transferAmountIn", "_transferAmountOut", "_transferBalance", "_transferTarget", "_cIndex", "_vars", "_bankData", "_tradeArray", "_playerUID", "_response"];
params ["_player","_tradeArray",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_bankBalance","_bankBalanceBefore","_bankData","_cIndex","_current_crypto","_playerCryptoLimit","_playerUID","_response","_return","_transferAmountIn","_transferAmountOut","_transferBalance","_transferBankBalance","_transferBankBalanceBefore","_transferBankData","_transferResponse","_transferTarget","_transferTargetUID","_vars"];
//[[[end]]]
params ["_player","_tradeArray",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_unpackBackpack.sqf
*/
private ["_wHPos","_wH","_nearByHolder"];
params ["_item","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_nearByHolder","_wH","_wHPos"];
//[[[end]]]
params ["_item","_player",["_token","",[""]] ];
if !([_player,_token] call EPOCH_server_getPToken) exitWith {};
if (_item isKindOf "Bag_Base") then {

View File

@ -12,6 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_serverCommand.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_playerUID"];
//[[[end]]]
params ["_command","_param1","_param2","_param3"];
switch (_command) do {
case 'shutdown': { 'epochserver' callExtension '991' };

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf
*/
private["_randomItemArray", "_quan", "_randomLootClass", "_randomItem", "_lootPaid", "_mags", "_lootItemWeightedArray", "_lootItemArray", "_weightedItemArray", "_exit", "_maxPayout", "_lootTable", "_lootTableArray", "_weightedArray"];
params ["_object","_type",["_forceSpawn",false],["_pos",[]]];
//[[[cog import generate_private_arrays ]]]
private ["_config","_debug","_exit","_loop","_lootItemArray","_lootItemWeightedArray","_lootTable","_lootTableClass","_lootTableIndex","_loots","_magazineSize","_mags","_maxLoot","_maxPayout","_minLoot","_pricingConfig","_quan","_randomItem","_randomItemArray","_randomizeMagazineAmmoCount","_weightedItemArray"];
//[[[end]]]
params ["_object","_type",["_forceSpawn",false],["_pos",[]] ];
_debug = true;
_pricingConfig = 'CfgPricing' call EPOCH_returnConfig;

View File

@ -16,8 +16,11 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_server/EPOCH_server_makeMarker.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_mrkr","_mrkrName","_trgtObj","_trgtType"];
//[[[end]]]
params ["_trgt","_mPos",["_mShape","ICON"],["_mType","mil_dot"],["_mText",""],["_mColor","ColorBlack"],["_mSize",[0.7,0.7]],"_mBrush","_mDir","_mAlpha",["_mrkrName",""]];
private ["_trgtType","_trgtObj"];
diag_log format["Epoch: ADMIN: Creating marker at %1 called by %2.", _mPos, _trgt];
if(count _trgt < 2)exitWith{};
_trgtType = _trgt select 0;
@ -39,7 +42,7 @@ switch _trgtType do {
}foreach (units group _trgtObj);
};
};
case 2: {
if(_trgtObj == "")then{_trgtObj=diag_tickTime;};
_mrkr = createMarker [_mrkrName, _mPos];
@ -52,7 +55,7 @@ switch _trgtType do {
if!(isNil "_mDir")then{_mrkr setMarkerDir _mDir;};
if!(isNil "_mAlpha")then{_mrkr setMarkerAlpha _mAlpha;};
};
case 3: {
if(isArray _trgtObj && count _trgtObj > 0)then{
{
@ -61,6 +64,6 @@ switch _trgtType do {
};
};
default {diag_log format["Epoch: ADMIN: Marker failed at %1 called by %2.", _mPos, _trgt];};
};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_server_traderKilled.sqf
*/
private ["_marker","_slot","_objHiveKey"];
//[[[cog import generate_private_arrays ]]]
private ["_marker","_objHiveKey","_slot"];
//[[[end]]]
params ["_trader","_player"];
if (!isNull _trader) then {
_marker = _trader getVariable["MARKER_REF",""];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_weightedArray.sqf
*/
private["_return","_lootTableArray","_weightedArray"];
//[[[cog import generate_private_arrays ]]]
private ["_lootIndex","_lootTableArray","_return","_weightedArray"];
//[[[end]]]
params ["_keyName","_configName","_arrayName"];
_return = missionNamespace getVariable[format["EPOCH_LT_%1_%2_%3",_configName,_keyName,_arrayName],[]];
if(_return isEqualTo[]) then {

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf
*/
private ["_arr","_currentStock","_limit","_toBeRemoved","_marker","_staticTrader","_agent","_class","_pos","_randomAIUniform","_dir","_objHiveKey","_response","_schedule","_home","_work","_traderSlotIndex","_staticTradersArray","_staticTradersArrCount","_aiTables","_serverSettingsConfig","_storedVehicleLimit"];
//[[[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"];
//[[[end]]]
params [["_maxTraderLimit",0]];
_staticTradersArray = [] + EPOCH_staticNPCTraderPos;
@ -189,7 +191,7 @@ for "_i" from 0 to _maxTraderLimit do {
if (_x isKindOf "Air" || _x isKindOf "Ship" || _x isKindOf "LandVehicle" || _x isKindOf "Tank") then {
if (EPOCH_storedVehicleCount <= _storedVehicleLimit) then {
EPOCH_storedVehicleCount = EPOCH_storedVehicleCount + _currentStock;
// Count how many of this vehicle are in stock at any trader.
if !(_x in EPOCH_traderStoredVehicles) then {
EPOCH_traderStoredVehicles pushBack _x;
@ -200,7 +202,7 @@ for "_i" from 0 to _maxTraderLimit do {
_existingStock = EPOCH_traderStoredVehiclesCnt select _indexStock;
EPOCH_traderStoredVehiclesCnt set [_indexStock, (_existingStock + _currentStock)];
};
};
};
} else {
_toBeRemoved pushBack _forEachIndex;
};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf
*/
private ["_pos","_marker","_buildingWork","_home","_work","_startTime","_endTime","_schedule","_agent","_slot","_objHiveKey","_buildingHome","_buildings","_randomAIUniform","_aiClass","_homes","_position","_spawnCount","_config","_aiTables","_acceptableBlds","_traderHomes","_usedBuildings","_checkBuilding"];
//[[[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"];
//[[[end]]]
_spawnCount = count EPOCH_TraderSlots;
_config = (configFile >> "CfgEpoch" >> worldName);
_aiTables = getArray(_config >> "traderUniforms");
@ -63,7 +65,7 @@ for "_i" from 1 to _spawnCount do {
if !(EPOCH_forceStaticTraders) then {
[_agent, _home, [_work, _schedule]] execFSM "\epoch_server\system\Trader_brain.fsm";
};
["AI", _objHiveKey, [_aiClass, _home, [_work, _schedule]]] call EPOCH_fnc_server_hiveSET;
["AI", _objHiveKey, [_aiClass, _home, [_work, _schedule]] ] call EPOCH_fnc_server_hiveSET;
if (EPOCH_SHOW_TRADERS) then {
_marker = createMarker[str(_agent), (_pos)];
_marker setMarkerShape "ICON";

View File

@ -22,8 +22,10 @@
Returns:
MIXED
*/
private ["_cIndex","_vars","_current_crypto"];
params [["_player",objNull,[objNull]],["_crypto",0,[0]]];
//[[[cog import generate_private_arrays ]]]
private ["_cIndex","_current_crypto","_vars"];
//[[[end]]]
params [["_player",objNull,[objNull]],["_crypto",0,[0]] ];
if (!isNull _player && isPlayer _player) then {
// get index of custom variable
_cIndex = EPOCH_customVars find "Crypto";

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf
*/
private ["_SkipOut","_tradeIn","_tradeOut","_message","_vehicleSold","_vehHiveKey","_VAL","_makeTradeIn","_vehSlot","_playerNetID","_vehicle","_vehicles","_tradeTotal","_current_crypto","_tradeQtyTotal","_currQty","_qtyIndex","_itemWorth","_item","_itemQty","_position","_foundSmoke","_objOwner","_tmpposition","_lockOwner","_helipad","_helipads","_smoke","_vehicleBought","_playerGroup","_vehObj","_final_location","_group","_wp","_wHPos","_wH","_nearByHolder","_itemTax","_tax","_objHiveKey","_playerCryptoLimit","_config","_cIndex","_vars","_current_cryptoRaw","_aiItems","_itemClasses","_itemQtys","_returnIn","_returnOut","_slot"];
params ["_trader","_itemsIn","_itemsOut","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_MaxBankDebit","_SkipOut","_VAL","_aiItems","_bankBalance","_bankData","_cIndex","_config","_currQty","_current_crypto","_current_cryptoRaw","_errorMsg","_final_location","_foundSmoke","_group","_helipad","_helipads","_item","_itemClasses","_itemQty","_itemQtys","_itemTax","_itemWorth","_itemsIn","_itemsOut","_lockOwner","_makeTradeIn","_message","_nearByHolder","_objHiveKey","_objOwner","_playerCryptoLimit","_playerGroup","_playerNetID","_playerUID","_position","_qtyIndex","_response","_return","_returnIn","_returnOut","_road","_serverSettingsConfig","_slot","_smoke","_tax","_tmpposition","_tradeIn","_tradeOut","_tradeQtyTotal","_tradeTotal","_vars","_vehHiveKey","_vehObj","_vehSlot","_vehicle","_vehicleBought","_vehicleSold","_vehicles","_vehslot","_wH","_wHPos","_wp"];
//[[[end]]]
params ["_trader","_itemsIn","_itemsOut","_player",["_token","",[""]] ];
_playerUID = getplayeruid _player;
@ -47,7 +49,7 @@ if (_slot != -1) then {
_current_cryptoRaw = _current_crypto;
// SELL ITEMS TO TRADER
_aiItems = _trader getVariable["AI_ITEMS", [[], []]];
_aiItems = _trader getVariable["AI_ITEMS", [[], []] ];
_itemClasses = _aiItems select 0;
_itemQtys = _aiItems select 1;
{

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeTrade.sqf
*/
private ["_current_crypto1","_overFlowItems","_playerCryptoLimit","_tradeOffer2","_tradeOffer1","_trade1","_trade2","_cIndex","_player1_vars","_player2_vars","_current_crypto2","_tradeCryptoOffer1","_tradeCryptoOffer2"];
params ["_player1", "_player2","_array","_tradeOffer",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_cIndex","_current_crypto1","_current_crypto2","_overFlowItems","_player1_vars","_player2_vars","_playerCryptoLimit","_trade1","_trade2"];
//[[[end]]]
params ["_player1", "_player2","_array","_tradeOffer",["_token","",[""]] ];
if (isNull _player2) exitWith{};
if !([_player1, _token] call EPOCH_server_getPToken) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_trading/EPOCH_server_tradeRequest.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_tradeKey"];
params ["_target","_source",["_token","",[""]]];
//[[[end]]]
params ["_target","_source",["_token","",[""]] ];
if !([_source, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _target) exitWith{};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf
*/
private ["_inventory","_location","_dir","_textures","_colors","_textureSelectionIndex","_selections","_count","_color","_cfgBaseBuilding","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_class_raw","_damage","_class","_worldspace","_wsCount","_vehicle","_arr","_storageSlotIndex","_vehHiveKey","_response","_diag"];
//[[[cog import generate_private_arrays ]]]
private ["_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_arr","_attachments","_availableColorsConfig","_cfgBaseBuilding","_class","_class_raw","_color","_colors","_count","_damage","_diag","_dir","_inventory","_location","_magazineName","_magazineSize","_magazineSizeMax","_marker","_objQty","_objType","_objTypes","_qty","_response","_selections","_serverSettingsConfig","_storageSlotIndex","_textureSelectionIndex","_textures","_vehHiveKey","_vehicle","_wMags","_wMagsArray","_worldspace","_wsCount"];
//[[[end]]]
params [["_maxStorageLimit",0]];
_serverSettingsConfig = configFile >> "CfgEpochServer";

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf
*/
private ["_removeweapons","_removemagazinesturret","_location","_class","_dmg","_actualHitpoints","_hitpoints","_textures","_color","_colors","_textureSelectionIndex","_selections","_count","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_found","_vehicle","_allHitpoints","_config","_worldspace","_damage","_arr","_arrNum","_vehicleSlotIndex","_vehHiveKey","_response","_immuneVehicleSpawnTime","_diag","_dataFormat","_dataFormatCount","_allVehicles","_serverSettingsConfig","_simulationHandler","_immuneVehicleSpawn"];
//[[[cog import generate_private_arrays ]]]
private ["_actualHitpoints","_allHitpoints","_allVehicles","_arr","_arrNum","_attachments","_class","_color","_colors","_config","_count","_damage","_dataFormat","_dataFormatCount","_diag","_dmg","_found","_hitpoints","_immuneVehicleSpawn","_immuneVehicleSpawnTime","_location","_magazineName","_magazineSize","_magazineSizeMax","_marker","_objQty","_objType","_objTypes","_qty","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_simulationHandler","_textureSelectionIndex","_textures","_vehHiveKey","_vehicle","_vehicleSlotIndex","_wMags","_wMagsArray","_worldspace"];
//[[[end]]]
params [["_maxVehicleLimit",0]];
_diag = diag_tickTime;

View File

@ -12,7 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf
*/
params ["_unit","_lockStatus","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_fnc_lock","_fnc_unlock","_gArray","_owners","_playerGroup","_playerUID","_response","_type"];
//[[[end]]]
params ["_unit","_lockStatus","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _unit) exitWith{};
if (_player distance _unit > 20) exitWith{};

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packStorage.sqf
*/
private ["_wepsItemsCargo","_magsAmmoCargo","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_arrCount","_magazineName","_magazineSize","_qty","_objType","_posWH","_inventory","_gwh","_returnItems","_owners","_class"];
params ["_unit","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_arrCount","_attachments","_class","_config","_gwh","_inventory","_magazineName","_magazineSize","_magsAmmoCargo","_objQty","_objType","_objTypes","_owners","_posWH","_qty","_returnItems","_wMags","_wMagsArray","_wepsItemsCargo"];
//[[[end]]]
params ["_unit","_player",["_token","",[""]] ];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _unit) exitWith{};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf
*/
private ["_vehSlot","_vehHiveKey","_ammoObj"];
//[[[cog import generate_private_arrays ]]]
private ["_ammoObj","_vehHiveKey","_vehSlot"];
//[[[end]]]
params ["_building","_killer"];
if (!isNull _building) then {
_vehSlot = _building getVariable["BUILD_SLOT", -1];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedStorage.sqf
*/
private ["_vehSlot","_vehHiveKey"];
//[[[cog import generate_private_arrays ]]]
private ["_vehHiveKey","_vehSlot"];
//[[[end]]]
params ["_storage","_killer"];
if (!isNull _storage) then {

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedVehicle.sqf
*/
private ["_vehSlot","_vehHiveKey"];
//[[[cog import generate_private_arrays ]]]
private ["_vehHiveKey","_vehSlot"];
//[[[end]]]
params ["_vehicle","_killer"];
if (!isNull _vehicle) then {
_vehSlot = _vehicle getVariable ["VEHICLE_SLOT", "ABORT"];
@ -20,7 +22,7 @@ if (!isNull _vehicle) then {
_vehHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _vehSlot];
["Vehicle", _vehHiveKey] call EPOCH_fnc_server_hiveDEL;
EPOCH_VehicleSlots pushBack _vehSlot;
missionNamespace setVariable ['EPOCH_VehicleSlotCount', count EPOCH_VehicleSlots, true];
['VehicleKilled', format["%1 was killed by %2 at %3", typeOf _vehicle, _killer, getPosATL _vehicle]] call EPOCH_fnc_server_hiveLog;

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_storage.sqf
*/
private ["_wepsItemsCargo","_magsAmmoCargo","_cargoIndex","_vehHiveKey","_damage","_vehiclePos","_magsAmmoCargoMinimized","_inventory","_colorSlot","_storageOwners","_locked","_worldspace","_VAL","_class","_vehSlot"];
//[[[cog import generate_private_arrays ]]]
private ["_VAL","_cargo","_cargoIndex","_class","_colorSlot","_damage","_inventory","_locked","_magsAmmoCargo","_magsAmmoCargoMinimized","_magsAmmoCargox","_newComponents","_selectedWeapon","_selectedWeaponComponents","_storageOwners","_vehHiveKey","_vehSlot","_vehiclePos","_weapon","_weaponComponents","_wepsItemsCargo","_wepsItemsCargoNormalized","_wepsItemsCargox","_worldspace"];
//[[[end]]]
params [["_vehicle",objNull]];
if (!isNull _vehicle) then {

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf
*/
private ["_wepsItemsCargo","_magsAmmoCargo","_cargoIndex","_vehHiveKey","_hitpoints","_magsAmmoCargoMinimized","_inventory","_colorSlot","_VAL","_vehSlot"];
//[[[cog import generate_private_arrays ]]]
private ["_VAL","_cargo","_cargoIndex","_colorSlot","_hitpoints","_inventory","_magsAmmoCargo","_magsAmmoCargoMinimized","_magsAmmoCargox","_newComponents","_selectedWeapon","_selectedWeaponComponents","_startTime","_vehHiveKey","_vehSlot","_weapon","_weaponComponents","_wepsItemsCargo","_wepsItemsCargoNormalized","_wepsItemsCargox"];
//[[[end]]]
params [["_vehicle",objNull]];
if (!isNull _vehicle) then {

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicles.sqf
*/
private ["_vehSlot","_storSlot","_objSlot"];
params [["_objects",[]]];
//[[[cog import generate_private_arrays ]]]
private ["_objSlot","_storSlot","_vehSlot"];
//[[[end]]]
params [["_objects",[]] ];
{
if (!isNull _x) then {
_vehSlot = _x getVariable ["VEHICLE_SLOT", "ABORT"];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf
*/
private ["_removeweapons","_removemagazinesturret","_maxDamage","_textures","_textureSelectionIndex","_selections","_colors","_color","_count","_vehLockHiveKey","_marker","_cfgEpochVehicles","_vehObj"];
//[[[cog import generate_private_arrays ]]]
private ["_availableColorsConfig","_cfgEpochVehicles","_color","_colors","_count","_marker","_maxDamage","_removemagazinesturret","_removeweapons","_selections","_serverSettingsConfig","_textureSelectionIndex","_textures","_vehLockHiveKey","_vehObj"];
//[[[end]]]
params ["_vehClass","_position","_direction","_locked","_slot",["_lockOwner",""],["_can_collide","CAN_COLLIDE"],["_spawnLoot",false],["_spawnDamaged",true]];
if !(isClass (configFile >> "CfgVehicles" >> _vehClass)) exitWith {objNull};
_serverSettingsConfig = configFile >> "CfgEpochServer";
@ -45,7 +47,7 @@ if !(isNull _vehObj) then{
_vehObj removeMagazinesTurret _x;
} foreach _removemagazinesturret;
};
// Disable Termal Equipment
_vehObj disableTIEquipment true;

View File

@ -12,8 +12,10 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicles.sqf
*/
private ["_vehClass","_velimit","_vehicleCount","_limit","_cityPos","_range","_nearBy","_find","_position","_direction","_getRandomPos","_newPosition","_road","_selectedCity","_roads","_isShip","_collide","_marker","_vehObj","_slot","_vehCount","_preferedPos","_allowedVehiclesList","_spawnPositionSizeDefaults","_serverMapConfig","_spawnPositionSize","_allowedTypes","_allCitys","_allCitysDync","_spawnCount"];
params [["_allowedVehiclesList",[]]];
//[[[cog import generate_private_arrays ]]]
private ["_allCitys","_allCitysDync","_allowedTypes","_cityPos","_collide","_direction","_find","_getRandomPos","_isShip","_limit","_marker","_nearBy","_newPosition","_position","_preferedPos","_range","_road","_roads","_selectedCity","_serverMapConfig","_slot","_spawnCount","_spawnPositionSize","_spawnPositionSizeDefaults","_vehClass","_vehCount","_vehObj"];
//[[[end]]]
params [["_allowedVehiclesList",[]] ];
if (_allowedVehiclesList isEqualTo []) exitWith {
diag_log "DEBUG: All vehicles over limit";

View File

@ -13,7 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGET.sqf
*/
private ["_hiveResponse","_hiveStatus","_hiveMessage"];
//[[[cog import generate_private_arrays ]]]
private ["_hiveMessage","_hiveResponse","_hiveStatus"];
//[[[end]]]
params ["_prefix","_key"];
_hiveStatus = -1;

View File

@ -13,7 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETBIT.sqf
*/
private ["_hiveResponse","_hiveMessage"];
//[[[cog import generate_private_arrays ]]]
private ["_hiveMessage","_hiveResponse"];
//[[[end]]]
params ["_prefix","_key","_bit"];
_hiveMessage = false;
_hiveResponse = "epochserver" callExtension format["240|%1:%2|%3", _prefix, _key, _bit];

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETRANGE.sqf
*/
private["_hiveResponse", "_hiveStatus", "_hiveMessage", "_currentIndex", "_hiveMakeCall", "_data"];
//[[[cog import generate_private_arrays ]]]
private ["_currentIndex","_currentIndexMax","_hiveCharCount","_hiveMakeCall","_hiveMessage","_hiveResponse","_hiveStatus"];
//[[[end]]]
params ["_prefix","_key"];
_hiveMessage = "";

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETTTL.sqf
*/
private ["_hiveResponse","_hiveStatus","_hiveMessage","_whileCount"];
//[[[cog import generate_private_arrays ]]]
private ["_hiveMessage","_hiveResponse","_hiveStatus","_hiveTTL","_whileCount"];
//[[[end]]]
params ["_prefix","_key"];
_hiveStatus = -1;

View File

@ -12,6 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveUnitTest.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_charCheck","_expires","_payload","_payload_64k","_payload_64k_count","_response","_startTime","_testID"];
//[[[end]]]
_testID = "1234567890";
_payload = "32D1ECB8511569B43A5CC39DF4261CACDA912C798B066EE1E1EE06E2F09D02073C1B3FC638F091D58E7691DA7D0F7E1F01371CB58346572A015F6F93429F3BDC";
_expires = "600"; // 10 minutes