more cleanup and privates

This commit is contained in:
vbawol 2017-05-02 08:28:52 -05:00
parent e8d136a293
commit 9a7bc7b455
32 changed files with 137 additions and 100 deletions

View File

@ -12,7 +12,7 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_PutHandler.sqf
*/
_class = param [2];
private _class = param [2];
//Radio Check
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _class)) == "ItemRadio") then {
if !(_class in(assignedItems player)) then {

View File

@ -19,7 +19,8 @@ if (!isNull EP_light) then {
deleteVehicle EP_light;
};
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_nlSettings = getArray ( _config >> "niteLight") params [["_nlEnabled",1],["_nlBright",1.88],["_nlZ",22]];
_nlSettings = getArray( _config >> "niteLight");
_nlSettings params [["_nlEnabled",1],["_nlBright",1.88],["_nlZ",22]];
if (_nlEnabled isEqualTo 1) then {
_pos = (getPosATL player);
_pos set [2,_nlZ];

View File

@ -12,6 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_supportCopter.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_SpawnTypes","_Spawncounts","_UnitType","_arrUnits","_idx","_maxunitCount","_minunitCount","_unitCount"];
//[[[end]]]
params ["_pos","_copter"];
_arrUnits = getArray (getMissionConfig "CfgEpochUAVSupport" >> "unitTypes");
@ -36,4 +39,3 @@ for "_i" from 1 to _unitCount do {
{
[_SpawnTypes select _foreachindex, player, true, _x, _this] call EPOCH_unitSpawn;
} forEach _Spawncounts;

View File

@ -13,9 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_bomb","_config","_currentLimit","_disableAI","_driver","_grp","_index","_jammerRange","_jammers","_loop","_nonJammer","_nonTrader","_nonTraderAIRange","_restricted","_sapperNum","_spawnLimit","_targetPos","_unit","_units"];
private ["_aiskill","_arrSkills","_arrUnits","_arrVals","_bomb","_config","_currentLimit","_disableAI","_driver","_grp","_index","_jammerRange","_jammers","_loop","_minAISkill","_nonJammer","_nonTrader","_nonTraderAIRange","_pos","_restricted","_sapperHndl","_sapperNum","_spawnLimit","_targetPos","_unit","_units"];
//[[[end]]]
params ["_unitClass",["_trgt",player],["_doVariable",false],["_unitCount",1],["_extraData",[]]];
params ["_unitClass",["_trgt",player],["_doVariable",false],["_unitCount",1],["_extraData",[]] ];
_bomb = objNull;
@ -183,7 +183,7 @@ switch _unitClass do {
// randomize skill
for "_i" from 0 to ((count _arrSkills)-1) do {
_aiskill = floor random (_arrVals select _i);
if (_aiskill<_minAISkill) then {_aiskill=_minAISkill};
if (_aiskill < _minAISkill) then {_aiskill = _minAISkill};
_unit setSkill [_arrSkills select _i,_arrVals select _i];
};
// spawn brains only on leader

View File

@ -23,7 +23,7 @@
NOTHING
*/
//[[[cog import generate_private_arrays ]]]
private ["_buildingAllowed","_buildingCountLimit","_buildingJammerRange","_canUpgrade","_canUpgradePartCount","_config","_jammer","_missingCount","_missingParts","_nearestJammer","_ownedJammerExists","_part","_partCheck","_removedPartCount","_req","_return","_stability","_targeter","_upgrade","_upgradeParts","_upgrades"];
private ["_buildingAllowed","_buildingCountLimit","_buildingJammerRange","_canUpgrade","_canUpgradePartCount","_config","_config2","_countdoors","_countgates","_doors","_gates","_jammer","_maxdoors","_maxgates","_missingCount","_missingParts","_nearestJammer","_ownedJammerExists","_part","_partCheck","_removedPartCount","_req","_return","_stability","_targeter","_upgrade","_upgradeParts","_upgrades","_upgradeto"];
//[[[end]]]
params [
["_object",objNull,[objNull]],
@ -115,7 +115,7 @@ if (_object isKindOf "Constructions_static_F") then {
};
_canUpgradePartCount = _canUpgradePartCount + _req;
} forEach _upgradeParts;
_doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH"];
_gates = ["CinderWallGarage_EPOCH"];
if (_canUpgrade) then {

View File

@ -12,6 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryOpened.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_blocked","_containerlocked","_seclocked"];
//[[[end]]]
params ["_unit","_container","_sec"];
setMousePosition[0.5, 0.5];
call EPOCH_showStats;
@ -24,11 +27,12 @@ if !(isNull _sec) then {
_blocked = (_containerlocked && _seclocked);
if (!_blocked && _containerlocked || _seclocked) then {
[] spawn {
disableSerialization;
waitUntil {!isNull findDisplay 602};
_d = findDisplay 602;
_cargo = _d displayCtrl 6401;
_ground = _d displayCtrl 6321;
private _d = findDisplay 602;
private _cargo = _d displayCtrl 6401;
private _ground = _d displayCtrl 6321;
_cargo ctrlEnable false;
ctrlSetFocus _ground;
ctrlActivate _ground;

View File

@ -34,6 +34,6 @@ _rnd = ((180 +_offset) - (_arcIn / 2)) + (random _arcIn);
_pos = getPosATL _unitIn;
_dist = ((random (_maxIn - _minIn)) + _minIn) max _minIn;
_dir = (getDir _unitIn) - _rnd;
if (_dir<0) then {_dir = _dir + 360};
if (_dir < 0) then {_dir = _dir + 360};
//return
[(_pos select 0) + (_dist*(sin _dir)), (_pos select 1) + (_dist*(cos _dir)), _pos select 2]

View File

@ -36,6 +36,6 @@ _rnd = _offset - (random _arcIn);
_pos = getPosATL _trgtIn;
_dist = ((random (_maxIn - _minIn)) + _minIn) max _minIn;
_dir = _dirTo - _rnd;
if (_dir<0) then {_dir = _dir + 360};
if (_dir < 0) then {_dir = _dir + 360};
// Return
[(_pos select 0) + (_dist*(sin _dir)), (_pos select 1) + (_dist*(cos _dir)), _pos select 2]

View File

@ -3,7 +3,7 @@
By Aaron Clark - Epoch Mod
*/
//[[[cog import generate_private_arrays ]]]
private ["_activeControl","_bg","_btn_arr","_buffer","_buttonTXT","_button_gen","_button_texts","_cfgItemInteractions","_config","_control","_data","_display","_interactOption","_magCount","_pos","_start_idc","_type","_y2d"];
private ["_activeControl","_bg","_btn_arr","_buffer","_buttonTXT","_button_gen","_button_texts","_cfgItemInteractions","_config","_control","_data","_display","_interactActions","_interactOption","_magCount","_pos","_start_idc","_type","_y2d"];
//[[[end]]]
_button_texts = [];

View File

@ -23,7 +23,7 @@
NOTHING
*/
//[[[cog import generate_private_arrays ]]]
private ["_container","_craftingArray","_craftingArrayNames","_data","_idc","_index","_pic","_text","_weaponsAndItems"];
private ["_container","_craftingArray","_craftingArrayNames","_data","_idc","_index","_pic","_text","_val","_weaponsAndItems"];
//[[[end]]]
params ["_control","_index"];
EPOCH_InteractedItem = [];

View File

@ -24,7 +24,7 @@
BOOL
*/
//[[[cog import generate_private_arrays ]]]
private ["_cfgBaseBuilding","_class","_color","_colors","_config","_delete","_dir","_item","_lootBias","_lootLimit","_lootType","_loots","_masterConfig","_pos","_positions","_possibleCount","_possibleLoots","_randomIndex","_return","_selectedLoot"];
private ["_cfgBaseBuilding","_class","_color","_colors","_config","_delete","_dir","_item","_lootBias","_lootLimit","_lootType","_loots","_masterConfig","_pos","_posName","_positions","_possibleCount","_possibleLoots","_randomIndex","_return","_selectedLoot"];
//[[[end]]]
params [["_building",objNull,[objNull]], ["_lootCheckBufferLimit",333], ["_lootObjectLimit",33]];
@ -40,6 +40,7 @@ _lootBias = getNumber(_config >> "lootBias");
_lootType = getText(_config >> "lootType");
_loots = getArray(_config >> _lootType);
_lootLimit = ceil random(getNumber(_config >> "limit"));
_posName = "";
EPOCH_LootedBlds pushBackUnique _building;
if (count EPOCH_LootedBlds >= _lootCheckBufferLimit) then {
@ -49,7 +50,8 @@ if (count EPOCH_LootedBlds >= _lootCheckBufferLimit) then {
if ((random 100) < _lootBias) then {
_possibleLoots = [];
{
_x params ["_posName","_class","_randomColor"];
_x params ["_posNameTMP","_class","_randomColor"];
_posName = _posNameTMP;
_positions = getArray(_config >> _posName);
{
_possibleLoots pushBack [_class,_randomColor,_x];

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/missions/EPOCH_mission_accept.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_allowTask","_doTask","_fnc_path","_itemCompile","_menuCondition","_miNSTask","_missionAllowed","_missionClasses","_missionIndex","_missionTasks","_nrEnts","_path","_plyrVar","_selectedMission","_simpleTask","_simpleTaskFNC","_simpleTaskFSM","_simpleTaskSQF","_tag","_taskNS","_trader","_uiNSTask"];
private ["_epochmissionsconfig","_inGameTasksconfig","_menuCondition","_missionAllowed","_missionClasses","_missionIndex","_missionTasks","_missionname","_msg","_newtask","_nexttask","_nrEnts","_selectedMission","_simpleTask","_taskCall","_taskSQF","_taskname","_trader"];
//[[[end]]]
_missionIndex = lbCurSel 1500;
_missionAllowed = true;
@ -42,7 +42,7 @@ if !(isNull _trader) then {
_inGameTasksconfig = getMissionConfig "inGameTasks";
_taskname = _missionTasks select 0;
_simpleTask = getNumber (_inGameTasksconfig >> _taskname >> "simpleTask");
if (_selectedMission isequalto "debugResetMission") exitwith {
EPOCH_ResetTraderMission = true;
};
@ -51,11 +51,11 @@ if !(isNull _trader) then {
_msg = format ['You are already running %1. Finish or cancel it first',_missionname];
[_msg, 5] call Epoch_message;
};
if (_simpleTask > 0) then { //Simple Task
_taskSQF = getText ( _inGameTasksconfig >> _taskName >> "initsqf");
if !(_taskSQF isequalto '') then {
call compile format ["[_taskName,player,_unit,_taskItem] execVM ""%1""",_taskSQF];
call compile format ["[_taskName,player,_unit,_taskItem] execVM ""%1""",_taskSQF];
};
_taskCall = getText ( _inGameTasksconfig >> _taskName >> "initcall");
if !(_taskCall isequalto '') then {

View File

@ -12,9 +12,6 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/missions/EPOCH_spawn_construct.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_unit"];
//[[[end]]]
_unit = createAgent ["Construct_F", getPos player, [], 520, "FORM"];
private _unit = createAgent ["Construct_F", getPos player, [], 520, "FORM"];
{_unit disableAI _x}forEach["TARGET","AUTOTARGET","FSM"];
[_unit] execFSM "\x\addons\a3_epoch_code\System\Construct_Brain.fsm";

View File

@ -1,3 +1,6 @@
//[[[cog import generate_private_arrays ]]]
private ["_nameArr","_newName","_nrMn","_responseArr","_trader","_trdrCurrName"];
//[[[end]]]
_trader = objNull;
_nrMn = nearestObjects [player, ["C_Man_1"], 16];
_trader = _nrMn select 0;
@ -12,4 +15,4 @@ _trader setVariable ["traderName",_newName, true];
};
_responseArr = ["I don't know. You can only be regenerated so many times before the memory starts to go..","You again..! Go bother someone else.",format["There was a time when names mattered, call me %1.",name _trader],"My name..? What does it matter.","Hey buddy you rock up here unannounced and suddenly we're friends ? On your bike if you aren't buying or selling.",format["My name.. I am known as %1",name _trader], format["When names mattered I was called %1",name _trader],"I forget.. At least, I try to forget."];
[selectRandom _responseArr, 5] call Epoch_message;
[selectRandom _responseArr, 5] call Epoch_message;

View File

@ -1,4 +1,6 @@
private["_plyr","_trdrMsg"];
//[[[cog import generate_private_arrays ]]]
private ["_plyr","_plyrs","_trdrMsg"];
//[[[end]]]
_trdrMsg = "Do I look like the local Neighbourhood Watch..? No, I do not !";
_plyrs = [];
_plyrs = player nearEntities [["Epoch_Man_base_F","Epoch_Female_base_F"], 250];
@ -9,4 +11,4 @@ if (count _plyrs < 2) then {
_plyr = selectRandom _plyrs;
_trdrMsg = format["%2 %1.",name _plyr, selectRandom ["The last person picked up by the UAV was","I did spot someone earlier, their name was","I heard there was somebody new in the area, "]];
};
[_trdrMsg, 5] call Epoch_message;
[_trdrMsg, 5] call Epoch_message;

View File

@ -1,8 +1,10 @@
private["_plyr","_trdrMsg"];
//[[[cog import generate_private_arrays ]]]
private ["_dist","_plyr","_trdrMsg","_veh","_vehs"];
//[[[end]]]
_trdrMsg = "Hey, there is a garage down the road.. Well, there used to be.";
_vehs = [];
_plyr = player;
_vehs = nearestObjects [_plyr, ["CAR","AIR"], 1000];
_vehs = nearestObjects [_plyr, ["CAR","AIR"], 1000];
if (count _vehs < 1) then {
_trdrMsg = format["%2 %1.",name _plyr,selectRandom["I haven't seen anything lately, why not buy one","There is nothing around here","The last time the UAV went out it found nothing"]];
} else {
@ -10,4 +12,4 @@ if (count _vehs < 1) then {
_dist = _veh distance _plyr;
_trdrMsg = format["I know of at least one vehicle within %1m of my current location. It looks like a %2.",_dist, typeof _veh];
};
[_trdrMsg, 5] call Epoch_message;
[_trdrMsg, 5] call Epoch_message;

View File

@ -1,3 +1,3 @@
_newsArr = ["My dog was shot. That made me sad.","Business has been quiet since word got out that sappers are in the area.","Looters are expecting too much crypto for all the junk they bring in.","What do I look like ? A newspaper vendor. Go Away.","The sun came up again this morning.. That's good news I suppose.","Keep your dog fed with raw or cooked carcasses.","Sappers are known to be good for their pelts. Just don't get too close to one","Some very strange rumours that a Construct was seen in the mountains. Those things are just bedtime stories to scare kids with.","UAVs are a good source of components.","Some say the nearby town is haunted by malevolent spirits.","I hear the military are helping survivors with air drops. Your loot is always welcome here if you find one.","Dogs can help you find pelts and animal carcasses","I heard that a new vehicle has been seen, some kind of board that you stand on. I personally don't believe the rumours."];
private _newsArr = ["My dog was shot. That made me sad.","Business has been quiet since word got out that sappers are in the area.","Looters are expecting too much crypto for all the junk they bring in.","What do I look like ? A newspaper vendor. Go Away.","The sun came up again this morning.. That's good news I suppose.","Keep your dog fed with raw or cooked carcasses.","Sappers are known to be good for their pelts. Just don't get too close to one","Some very strange rumours that a Construct was seen in the mountains. Those things are just bedtime stories to scare kids with.","UAVs are a good source of components.","Some say the nearby town is haunted by malevolent spirits.","I hear the military are helping survivors with air drops. Your loot is always welcome here if you find one.","Dogs can help you find pelts and animal carcasses","I heard that a new vehicle has been seen, some kind of board that you stand on. I personally don't believe the rumours."];
[selectRandom _newsArr, 5] call Epoch_message;
[selectRandom _newsArr, 5] call Epoch_message;

View File

@ -1,4 +1,6 @@
//[[[cog import generate_private_arrays ]]]
private ["_hour","_min"];
//[[[end]]]
_hour = str(date select 3);
_min = str(date select 4);
@ -10,4 +12,4 @@ if(count _min < 2)then{
_min = "0" + _min;
};
[format ["The time is %1:%2.",_hour, _min], 5] call Epoch_message;
[format ["The time is %1:%2.",_hour, _min], 5] call Epoch_message;

View File

@ -13,7 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Check.sqf
*/
private ['_inSP','_vehicle','_vehName','_allRepaired'];
//[[[cog import generate_private_arrays ]]]
private ["_ServicePointClasses","_config","_inSP","_nearClasses","_servicepointDist","_servicepoints","_vehicle"];
//[[[end]]]
_vehicle = vehicle player;
if (_vehicle == player) exitwith {false};

View File

@ -13,18 +13,20 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Rearm.sqf
*/
private ['_magname','_vehtype','_vehName'];
//[[[cog import generate_private_arrays ]]]
private ["_line","_magname","_vehName","_vehtype"];
//[[[end]]]
params ['_vehicle','_ammotype','_turret','_reloagmags','_ammocount','_costs'];
if (!local _vehicle) exitWith {
_line = 'Rearm denied - Go in as driver first!';
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
_vehtype = typeof _vehicle;
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
if (EPOCH_playerCrypto < _costs) exitWith {
_line = format ['You need %1 Crypto to Rearm %2', _costs,_vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
if(_costs > 0)then{
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
@ -32,10 +34,10 @@ if(_costs > 0)then{
_vehicle removeMagazinesTurret [_ammotype,_turret];
for '_i' from 1 to _reloagmags do {
_vehicle addMagazineTurret [_ammotype, _turret, _ammocount];
};
};
_magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName');
if (_magname isequalto '') then {
_magname = _ammotype;
};
_line = format ['%1 rearmed with %2', _vehName, _magname];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;

View File

@ -19,13 +19,13 @@ _args params [['_costs',0],['_updateInterval',1],['_amount',0.1]];
if (!local _vehicle) exitWith {
_line = 'Refuel denied - Go in as driver first!';
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
_vehtype = typeof _vehicle;
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
if (EPOCH_playerCrypto < _costs) exitWith {
_line = format ['You need %1 Crypto to Refuel %2', _costs,_vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
if(_costs > 0)then{
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
@ -34,12 +34,12 @@ _vehicle engineOn false;
while {(vehicle player == _vehicle) && (local _vehicle) && (alive player)} do {
if (speed _vehicle > 2 || speed _vehicle < -2 ) exitWith {
_line = format ['Refueling of %1 stopped', _vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
_vehicle setFuel ((Fuel _vehicle)+_amount);
if (Fuel _vehicle > 0.99) exitWith {
_line = format ['%1 Refueled', _vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
uisleep _updateInterval;
};

View File

@ -13,46 +13,48 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Repair.sqf
*/
private ['_vehtype','_vehName','_allRepaired'];
params [['_vehicle',objnull],['_args',[]]];
//[[[cog import generate_private_arrays ]]]
private ["_allHitPointsDamage","_allRepaired","_line","_partName","_pos","_repaired","_vehName","_vehtype"];
//[[[end]]]
params [['_vehicle',objnull],['_args',[]] ];
_args params [['_costs',0],['_updateInterval',1.2]];
if (!local _vehicle) exitWith {
_line = 'Repair denied - Go in as driver first!';
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
_vehtype = typeOf _vehicle;
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
if (EPOCH_playerCrypto < _costs) exitWith {
_line = format ['You need %1 Crypto to Repair %2', _costs,_vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
if(_costs > 0)then{
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
};
_vehicle engineOn false;
_repaired = [];
_repaired = [];
_allRepaired = true;
_allHitPointsDamage = getAllHitPointsDamage _vehicle;
{
if ((vehicle player != _vehicle) || (!local _vehicle) || speed _vehicle < -2 || speed _vehicle > 2) exitWith {
_allRepaired = false;
_line = format ['Repairing of %1 stopped', _vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};
if (!(_x in _repaired) && !(_x isequalto "") && (_allHitPointsDamage select 2 select _foreachindex) > 0) then {
_partName = toarray _x;
_partName set [0,20];
_partName set [1,45];
_partName set [2,20];
_partName = toString _partName;
_vehicle setHitPointDamage [_x,0];
_line = format ['Repairing%1 ...', _partName];
[_line,5] call Epoch_message;
_repaired pushback _x;
uisleep _updateInterval;
};
} foreach (_allHitPointsDamage select 0);
_partName = toarray _x;
_partName set [0,20];
_partName set [1,45];
_partName set [2,20];
_partName = toString _partName;
_vehicle setHitPointDamage [_x,0];
_line = format ['Repairing%1 ...', _partName];
[_line,5] call Epoch_message;
_repaired pushback _x;
uisleep _updateInterval;
};
} foreach (_allHitPointsDamage select 0);
if (_allRepaired) then {
if ((damage _vehicle) > 0 || {_x > 0} count ((getallhitpointsdamage _vehicle) select 2) > 0) then {
[_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
@ -61,5 +63,5 @@ if (_allRepaired) then {
_pos set [2,(_pos select 2)+0.25];
_vehicle setposatl _pos;
_line = format ['%1 full Repaired', _vehName];
[_line,5] call Epoch_message;
[_line,5] call Epoch_message;
};

View File

@ -13,7 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Start.sqf
*/
private ['_missingammo','_ownedcompletemags','_magname','_actionTitle','_costs','_vehicle','_refuel_costs','_refuel_updateInterval','_refuel_amount','_costsFree','_repair_costs','_fnc_getCosts','_fnc_actionTitle'];
//[[[cog import generate_private_arrays ]]]
private ["_Ignatz_SP_Array","_VehiclesAndAmmo","_actionName","_actionTitle","_ammocount","_ammotype","_cost","_costs","_costsFree","_costsText","_fnc_actionTitle","_fnc_getCosts","_magname","_maxammototal","_maxmags","_missingammo","_ownedcompletemags","_refuel_amount","_refuel_costs","_refuel_updateInterval","_reloagmags","_repairTime","_repair_costs","_totalammocount","_turret","_typeName","_vehicle"];
//[[[end]]]
Ignatz_Refuel = nil;
Ignatz_Repair = nil;
@ -96,11 +98,11 @@ _fnc_actionTitle = {
_costs = [_vehicle, _refuel_costs] call _fnc_getCosts;
_actionTitle = [format['Refuel %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Refuel = [_actionTitle,[_vehicle,[_costs, _refuel_updateInterval,_refuel_amount]]];
Ignatz_Refuel = [_actionTitle,[_vehicle,[_costs, _refuel_updateInterval,_refuel_amount]] ];
_costs = [_vehicle, _repair_costs] call _fnc_getCosts;
_actionTitle = [format['Repair %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]]];
Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]] ];
if (count _Ignatz_SP_Array > 0) then {Ignatz_Rearm0 = _Ignatz_SP_Array select 0;};
if (count _Ignatz_SP_Array > 1) then {Ignatz_Rearm1 = _Ignatz_SP_Array select 1;};
if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;};

View File

@ -1,5 +1,5 @@
//[[[cog import generate_private_arrays ]]]
private ["_action","_class","_condition","_disabledDoor","_displayname","_doorIndex","_index","_position","_statement","_uniqueActions","_unlock","_useractions"];
private ["_aiItems","_allowAdd","_array","_config","_cryptoCount","_index","_item","_itemClasses","_itemQtys","_itemTax","_itemWorth","_limit","_qtyIndex","_sizeOut","_slot","_stockLimit","_tax","_uiItem","_worth"];
//[[[end]]]
params ["_control","_selected"];
@ -17,7 +17,7 @@ if !(isNull EPOCH_lastNPCtradeTarget) then {
// limit adding more if item is over stocked
if (_control == 41501) then {
_slot = EPOCH_lastNPCtradeTarget getVariable["AI_SLOT", -1];
_aiItems = EPOCH_lastNPCtradeTarget getVariable["AI_ITEMS", [[], []]];
_aiItems = EPOCH_lastNPCtradeTarget getVariable["AI_ITEMS", [[], []] ];
_itemClasses = _aiItems select 0;
_itemQtys = _aiItems select 1;

View File

@ -1,5 +1,5 @@
//[[[cog import generate_private_arrays ]]]
private ["_ok","_slot","_target"];
private ["_MainCategoriearray","_categorie","_config","_ok","_slot","_target"];
//[[[end]]]
_config = 'CfgItemSort' call EPOCH_returnConfig;
_MainCategoriearray = getarray (_config >> "MainCategories" >> "Classes");

View File

@ -13,7 +13,9 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_showStats.sqf
*/
disableSerialization;
private "_display";
//[[[cog import generate_private_arrays ]]]
private ["_display","_display3"];
//[[[end]]]
9992 cutRsc["EpochGameUI2", "PLAIN", 2, false];
_display = uiNamespace getVariable "EPOCH_EpochGameUI2";
(_display displayCtrl 21208) ctrlSetText format["%1", EPOCH_playerCrypto];

View File

@ -13,7 +13,9 @@
Usage:
"TEST" call Epoch_message
*/
//[[[cog import generate_private_arrays ]]]
private ["_bgCol","_c","_c1StartPos","_c1pos","_c2pos","_c3pos","_col","_config","_ctrl","_ctrlArr","_customCol","_dsp","_fade","_fnc_animFirst","_fnc_animShiftCtrl","_fontSize","_msg","_oldCtrl","_pos","_tick","_time","_txtCol","_uniqueID","_yPos","_ySize"];
//[[[end]]]
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
_msg = param [0, "No input"];
_time = param [1, 2];
@ -26,15 +28,15 @@ if(_customCol isEqualTo [])then{
if !(_bgCol isEqualTypeAll 0)then{_bgCol = [0,0,0,0.2]};
if !(_txtCol isEqualTypeAll 0)then{_txtCol = [1,1,1,0.95]};
}else{
_bgCol = if((_customCol select 0)isEqualTypeAll 0)then[{_customCol select 0},{_bgCol = [0,0,0,0.2]}];
_txtCol = if((_customCol select 1)isEqualTypeAll 0)then[{_customCol select 1},{_txtCol = [1,1,1,0.95]}];
_bgCol = if((_customCol select 0)isEqualTypeAll 0) then [{_customCol select 0},{_bgCol = [0,0,0,0.2]}];
_txtCol = if((_customCol select 1)isEqualTypeAll 0) then [{_customCol select 1},{_txtCol = [1,1,1,0.95]}];
};
_msg = str (parseText str _msg); //Parses and converts text back to small string
if !(isNil "rmx_var_msgQueue") exitWith {rmx_var_msgQueue pushBack [_msg, _time, [_bgCol,_txtCol]]};
rmx_var_msgQueue = [[_msg, _time, [_bgCol,_txtCol]]];
rmx_var_msgQueue = [[_msg, _time, [_bgCol,_txtCol]] ];
[] spawn {
private ["_c1pos","_c2pos","_c3pos","_clr","_dsp"];

View File

@ -15,9 +15,12 @@
Usage:
"TEST" call Epoch_message_old1
*/
//[[[cog import generate_private_arrays ]]]
private ["_add","_alreadyEnabled","_arr","_centerX","_centerY","_cnt","_controls","_ctrl","_ctrlGroup","_ctrlText","_del","_display","_height","_input","_scale","_text","_tick","_width","_xPos","_y","_yPos"];
//[[[end]]]
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
private ["_y","_cnt","_ctrl","_alreadyEnabled","_input","_scale","_width","_height","_centerX","_centerY","_display","_ctrlGroup","_controls","_ctrlText","_add"];
params [["_text","Missing text",["",(text "")]],["_time",5,[1]],["_color","#ffffff",[""]]];
params [["_text","Missing text",["",(text "")]],["_time",5,[1]],["_color","#ffffff",[""]] ];
if (_text isEqualType "STRING") then {_text = parseText _text};

View File

@ -13,6 +13,9 @@
Usage:
"TEST" call Epoch_message_old2
*/
//[[[cog import generate_private_arrays ]]]
private ["_c","_c2","_c3","_clr","_cmt","_cnt","_ct","_dsp","_height","_in","_timer","_w2","_width"];
//[[[end]]]
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
_in = param [0, "No input given"];
@ -36,40 +39,40 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
[GUI_GRID_W, GUI_GRID_H] spawn {
params ["_gridW","_gridH"];
disableSerialization;
_dsp = findDisplay 46;
_c = _dsp ctrlCreate ["rmx_ST2", -8777];
_c2 = _dsp ctrlCreate ["RscText", -8776];
_c3 = _dsp ctrlCreate ["RscText", -8775];
_clr = call Epoch_getColorScheme;
_c ctrlSetBackgroundColor [_clr select 0, _clr select 1, _clr select 2, 0.5];
_c2 ctrlSetBackgroundColor _clr;
_c3 ctrlSetBackgroundColor _clr;
//first animation
_width = 0.2 * _gridW;
_height = 2 * _gridH;
_c ctrlSetPosition [0.5 - _gridW / 2,1,_gridW,_height];
_c2 ctrlSetPosition[0.5 - _gridW / 2,1,_width,_height];
_c3 ctrlSetPosition[0.5 + _gridW / 2,1,_width,_height];
_c ctrlCommit 0;
_c2 ctrlCommit 0;
_c3 ctrlCommit 0;
_cmt = 0.25;
//Main queue
while {!(rmx_var_dtMessageArr isEqualTo [])} do
while {!(rmx_var_dtMessageArr isEqualTo [])} do
{
_in = parseText (rmx_var_dtMessageArr select 0 select 0);
_timer = rmx_var_dtMessageArr select 0 select 1;
rmx_var_dtMessageArr deleteAt 0;
_c ctrlSetStructuredText _in;
_cnt = 0;
@ -80,18 +83,18 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
} count (toArray str _in);
_w2 = ((_cnt max 5) min 80) * _gridW;
_c ctrlSetPosition [0.5 - _w2 / 2,1,_w2,_height];
_c2 ctrlSetPosition[0.5 - _w2 / 2,1,_width,_height];
_c3 ctrlSetPosition[0.5 + _w2 / 2,1,_width,_height];
_c ctrlCommit _cmt;
_c2 ctrlCommit _cmt;
_c3 ctrlCommit _cmt;
uiSleep _timer;
};
//exit with animation
_c ctrlSetPosition [0.5 - _gridW / 2,1,_gridW,_height];
_c2 ctrlSetPosition[0.5 - _gridW / 2,1,_width,_height];
@ -99,12 +102,12 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
_c ctrlCommit _cmt;
_c2 ctrlCommit _cmt;
_c3 ctrlCommit _cmt;
uiSleep _cmt;
ctrlDelete _c;
ctrlDelete _c2;
ctrlDelete _c3;
rmx_var_dtEnabled = nil;
};
};

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/missions/EPOCH_mission_refresh.sqf
*/
private["_index","_missionClasses","_missionDesc"];
//[[[cog import generate_private_arrays ]]]
private ["_index","_menuCondition","_missionClasses","_missionDesc"];
//[[[end]]]
_missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses");
_index = lbCurSel 1500;
@ -25,6 +27,6 @@ if!(_menuCondition=="")then{
_missionDesc = "NOT AVAILABLE - " + _missionDesc;
lbSetColor [1001, 0, [0.73,0.24,0.11,1] ] ;
};
};
};
ctrlSetText [1001, _missionDesc];

View File

@ -19,8 +19,10 @@
Radiation levels 1-9, 0 to disable
To reuse code in a new PP function, adjust _priority so they don't overwrite each other
*/
private ["_priority","_fg","_cc"];
params [["_level",0,[0]],["_speed",0,[0]]];
//[[[cog import generate_private_arrays ]]]
private ["_cc","_ci","_fg","_priority"];
//[[[end]]]
params [["_level",0,[0]],["_speed",0,[0]] ];
if (isNil "rmx_var_RadiationHandles") then {

View File

@ -15,7 +15,7 @@
if !(isNil "Epoch_Survival_Started") exitWith { false };
Epoch_Survival_Started = true;
_selectedFunction = "CfgClientFunctions";
private _selectedFunction = "CfgClientFunctions";
if (isDedicated) then {
// dedicated server
_selectedFunction = "CfgServerFunctions";