mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
more cleanup and privates
This commit is contained in:
parent
e8d136a293
commit
9a7bc7b455
@ -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 {
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
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",[]] ];
|
||||
|
||||
|
@ -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]],
|
||||
|
@ -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;
|
||||
|
@ -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 = [];
|
||||
|
||||
|
@ -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 = [];
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -1,4 +1,6 @@
|
||||
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;
|
||||
|
@ -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;
|
@ -1,4 +1,6 @@
|
||||
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_hour","_min"];
|
||||
//[[[end]]]
|
||||
_hour = str(date select 3);
|
||||
_min = str(date select 4);
|
||||
|
||||
|
@ -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};
|
||||
|
@ -13,7 +13,9 @@
|
||||
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 {
|
||||
|
@ -13,7 +13,9 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Repair.sqf
|
||||
*/
|
||||
|
||||
private ['_vehtype','_vehName','_allRepaired'];
|
||||
//[[[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]];
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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"];
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -15,8 +15,11 @@
|
||||
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",[""]] ];
|
||||
|
||||
if (_text isEqualType "STRING") then {_text = parseText _text};
|
||||
|
@ -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"];
|
||||
|
@ -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;
|
||||
|
@ -19,7 +19,9 @@
|
||||
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"];
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_cc","_ci","_fg","_priority"];
|
||||
//[[[end]]]
|
||||
params [["_level",0,[0]],["_speed",0,[0]] ];
|
||||
|
||||
if (isNil "rmx_var_RadiationHandles") then {
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user