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:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_PutHandler.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_PutHandler.sqf
|
||||||
*/
|
*/
|
||||||
_class = param [2];
|
private _class = param [2];
|
||||||
//Radio Check
|
//Radio Check
|
||||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _class)) == "ItemRadio") then {
|
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _class)) == "ItemRadio") then {
|
||||||
if !(_class in(assignedItems player)) then {
|
if !(_class in(assignedItems player)) then {
|
||||||
|
@ -19,7 +19,8 @@ if (!isNull EP_light) then {
|
|||||||
deleteVehicle EP_light;
|
deleteVehicle EP_light;
|
||||||
};
|
};
|
||||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
_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 {
|
if (_nlEnabled isEqualTo 1) then {
|
||||||
_pos = (getPosATL player);
|
_pos = (getPosATL player);
|
||||||
_pos set [2,_nlZ];
|
_pos set [2,_nlZ];
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
Github:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_supportCopter.sqf
|
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"];
|
params ["_pos","_copter"];
|
||||||
|
|
||||||
_arrUnits = getArray (getMissionConfig "CfgEpochUAVSupport" >> "unitTypes");
|
_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;
|
[_SpawnTypes select _foreachindex, player, true, _x, _this] call EPOCH_unitSpawn;
|
||||||
} forEach _Spawncounts;
|
} forEach _Spawncounts;
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
params ["_unitClass",["_trgt",player],["_doVariable",false],["_unitCount",1],["_extraData",[]]];
|
params ["_unitClass",["_trgt",player],["_doVariable",false],["_unitCount",1],["_extraData",[]] ];
|
||||||
|
|
||||||
_bomb = objNull;
|
_bomb = objNull;
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ switch _unitClass do {
|
|||||||
// randomize skill
|
// randomize skill
|
||||||
for "_i" from 0 to ((count _arrSkills)-1) do {
|
for "_i" from 0 to ((count _arrSkills)-1) do {
|
||||||
_aiskill = floor random (_arrVals select _i);
|
_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];
|
_unit setSkill [_arrSkills select _i,_arrVals select _i];
|
||||||
};
|
};
|
||||||
// spawn brains only on leader
|
// spawn brains only on leader
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
NOTHING
|
NOTHING
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
params [
|
params [
|
||||||
["_object",objNull,[objNull]],
|
["_object",objNull,[objNull]],
|
||||||
@ -115,7 +115,7 @@ if (_object isKindOf "Constructions_static_F") then {
|
|||||||
};
|
};
|
||||||
_canUpgradePartCount = _canUpgradePartCount + _req;
|
_canUpgradePartCount = _canUpgradePartCount + _req;
|
||||||
} forEach _upgradeParts;
|
} forEach _upgradeParts;
|
||||||
|
|
||||||
_doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH"];
|
_doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH"];
|
||||||
_gates = ["CinderWallGarage_EPOCH"];
|
_gates = ["CinderWallGarage_EPOCH"];
|
||||||
if (_canUpgrade) then {
|
if (_canUpgrade) then {
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
Github:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryOpened.sqf
|
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"];
|
params ["_unit","_container","_sec"];
|
||||||
setMousePosition[0.5, 0.5];
|
setMousePosition[0.5, 0.5];
|
||||||
call EPOCH_showStats;
|
call EPOCH_showStats;
|
||||||
@ -24,11 +27,12 @@ if !(isNull _sec) then {
|
|||||||
_blocked = (_containerlocked && _seclocked);
|
_blocked = (_containerlocked && _seclocked);
|
||||||
if (!_blocked && _containerlocked || _seclocked) then {
|
if (!_blocked && _containerlocked || _seclocked) then {
|
||||||
[] spawn {
|
[] spawn {
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
waitUntil {!isNull findDisplay 602};
|
waitUntil {!isNull findDisplay 602};
|
||||||
_d = findDisplay 602;
|
private _d = findDisplay 602;
|
||||||
_cargo = _d displayCtrl 6401;
|
private _cargo = _d displayCtrl 6401;
|
||||||
_ground = _d displayCtrl 6321;
|
private _ground = _d displayCtrl 6321;
|
||||||
_cargo ctrlEnable false;
|
_cargo ctrlEnable false;
|
||||||
ctrlSetFocus _ground;
|
ctrlSetFocus _ground;
|
||||||
ctrlActivate _ground;
|
ctrlActivate _ground;
|
||||||
|
@ -34,6 +34,6 @@ _rnd = ((180 +_offset) - (_arcIn / 2)) + (random _arcIn);
|
|||||||
_pos = getPosATL _unitIn;
|
_pos = getPosATL _unitIn;
|
||||||
_dist = ((random (_maxIn - _minIn)) + _minIn) max _minIn;
|
_dist = ((random (_maxIn - _minIn)) + _minIn) max _minIn;
|
||||||
_dir = (getDir _unitIn) - _rnd;
|
_dir = (getDir _unitIn) - _rnd;
|
||||||
if (_dir<0) then {_dir = _dir + 360};
|
if (_dir < 0) then {_dir = _dir + 360};
|
||||||
//return
|
//return
|
||||||
[(_pos select 0) + (_dist*(sin _dir)), (_pos select 1) + (_dist*(cos _dir)), _pos select 2]
|
[(_pos select 0) + (_dist*(sin _dir)), (_pos select 1) + (_dist*(cos _dir)), _pos select 2]
|
||||||
|
@ -36,6 +36,6 @@ _rnd = _offset - (random _arcIn);
|
|||||||
_pos = getPosATL _trgtIn;
|
_pos = getPosATL _trgtIn;
|
||||||
_dist = ((random (_maxIn - _minIn)) + _minIn) max _minIn;
|
_dist = ((random (_maxIn - _minIn)) + _minIn) max _minIn;
|
||||||
_dir = _dirTo - _rnd;
|
_dir = _dirTo - _rnd;
|
||||||
if (_dir<0) then {_dir = _dir + 360};
|
if (_dir < 0) then {_dir = _dir + 360};
|
||||||
// Return
|
// Return
|
||||||
[(_pos select 0) + (_dist*(sin _dir)), (_pos select 1) + (_dist*(cos _dir)), _pos select 2]
|
[(_pos select 0) + (_dist*(sin _dir)), (_pos select 1) + (_dist*(cos _dir)), _pos select 2]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
By Aaron Clark - Epoch Mod
|
By Aaron Clark - Epoch Mod
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
_button_texts = [];
|
_button_texts = [];
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
NOTHING
|
NOTHING
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
params ["_control","_index"];
|
params ["_control","_index"];
|
||||||
EPOCH_InteractedItem = [];
|
EPOCH_InteractedItem = [];
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
BOOL
|
BOOL
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
params [["_building",objNull,[objNull]], ["_lootCheckBufferLimit",333], ["_lootObjectLimit",33]];
|
params [["_building",objNull,[objNull]], ["_lootCheckBufferLimit",333], ["_lootObjectLimit",33]];
|
||||||
|
|
||||||
@ -40,6 +40,7 @@ _lootBias = getNumber(_config >> "lootBias");
|
|||||||
_lootType = getText(_config >> "lootType");
|
_lootType = getText(_config >> "lootType");
|
||||||
_loots = getArray(_config >> _lootType);
|
_loots = getArray(_config >> _lootType);
|
||||||
_lootLimit = ceil random(getNumber(_config >> "limit"));
|
_lootLimit = ceil random(getNumber(_config >> "limit"));
|
||||||
|
_posName = "";
|
||||||
|
|
||||||
EPOCH_LootedBlds pushBackUnique _building;
|
EPOCH_LootedBlds pushBackUnique _building;
|
||||||
if (count EPOCH_LootedBlds >= _lootCheckBufferLimit) then {
|
if (count EPOCH_LootedBlds >= _lootCheckBufferLimit) then {
|
||||||
@ -49,7 +50,8 @@ if (count EPOCH_LootedBlds >= _lootCheckBufferLimit) then {
|
|||||||
if ((random 100) < _lootBias) then {
|
if ((random 100) < _lootBias) then {
|
||||||
_possibleLoots = [];
|
_possibleLoots = [];
|
||||||
{
|
{
|
||||||
_x params ["_posName","_class","_randomColor"];
|
_x params ["_posNameTMP","_class","_randomColor"];
|
||||||
|
_posName = _posNameTMP;
|
||||||
_positions = getArray(_config >> _posName);
|
_positions = getArray(_config >> _posName);
|
||||||
{
|
{
|
||||||
_possibleLoots pushBack [_class,_randomColor,_x];
|
_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
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/missions/EPOCH_mission_accept.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
_missionIndex = lbCurSel 1500;
|
_missionIndex = lbCurSel 1500;
|
||||||
_missionAllowed = true;
|
_missionAllowed = true;
|
||||||
@ -42,7 +42,7 @@ if !(isNull _trader) then {
|
|||||||
_inGameTasksconfig = getMissionConfig "inGameTasks";
|
_inGameTasksconfig = getMissionConfig "inGameTasks";
|
||||||
_taskname = _missionTasks select 0;
|
_taskname = _missionTasks select 0;
|
||||||
_simpleTask = getNumber (_inGameTasksconfig >> _taskname >> "simpleTask");
|
_simpleTask = getNumber (_inGameTasksconfig >> _taskname >> "simpleTask");
|
||||||
|
|
||||||
if (_selectedMission isequalto "debugResetMission") exitwith {
|
if (_selectedMission isequalto "debugResetMission") exitwith {
|
||||||
EPOCH_ResetTraderMission = true;
|
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 = format ['You are already running %1. Finish or cancel it first',_missionname];
|
||||||
[_msg, 5] call Epoch_message;
|
[_msg, 5] call Epoch_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_simpleTask > 0) then { //Simple Task
|
if (_simpleTask > 0) then { //Simple Task
|
||||||
_taskSQF = getText ( _inGameTasksconfig >> _taskName >> "initsqf");
|
_taskSQF = getText ( _inGameTasksconfig >> _taskName >> "initsqf");
|
||||||
if !(_taskSQF isequalto '') then {
|
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");
|
_taskCall = getText ( _inGameTasksconfig >> _taskName >> "initcall");
|
||||||
if !(_taskCall isequalto '') then {
|
if !(_taskCall isequalto '') then {
|
||||||
|
@ -12,9 +12,6 @@
|
|||||||
Github:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/missions/EPOCH_spawn_construct.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/missions/EPOCH_spawn_construct.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
private _unit = createAgent ["Construct_F", getPos player, [], 520, "FORM"];
|
||||||
private ["_unit"];
|
|
||||||
//[[[end]]]
|
|
||||||
_unit = createAgent ["Construct_F", getPos player, [], 520, "FORM"];
|
|
||||||
{_unit disableAI _x}forEach["TARGET","AUTOTARGET","FSM"];
|
{_unit disableAI _x}forEach["TARGET","AUTOTARGET","FSM"];
|
||||||
[_unit] execFSM "\x\addons\a3_epoch_code\System\Construct_Brain.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;
|
_trader = objNull;
|
||||||
_nrMn = nearestObjects [player, ["C_Man_1"], 16];
|
_nrMn = nearestObjects [player, ["C_Man_1"], 16];
|
||||||
_trader = _nrMn select 0;
|
_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."];
|
_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;
|
||||||
|
@ -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 !";
|
_trdrMsg = "Do I look like the local Neighbourhood Watch..? No, I do not !";
|
||||||
_plyrs = [];
|
_plyrs = [];
|
||||||
_plyrs = player nearEntities [["Epoch_Man_base_F","Epoch_Female_base_F"], 250];
|
_plyrs = player nearEntities [["Epoch_Man_base_F","Epoch_Female_base_F"], 250];
|
||||||
@ -9,4 +11,4 @@ if (count _plyrs < 2) then {
|
|||||||
_plyr = selectRandom _plyrs;
|
_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 = 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;
|
||||||
|
@ -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.";
|
_trdrMsg = "Hey, there is a garage down the road.. Well, there used to be.";
|
||||||
_vehs = [];
|
_vehs = [];
|
||||||
_plyr = player;
|
_plyr = player;
|
||||||
_vehs = nearestObjects [_plyr, ["CAR","AIR"], 1000];
|
_vehs = nearestObjects [_plyr, ["CAR","AIR"], 1000];
|
||||||
if (count _vehs < 1) then {
|
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"]];
|
_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 {
|
} else {
|
||||||
@ -10,4 +12,4 @@ if (count _vehs < 1) then {
|
|||||||
_dist = _veh distance _plyr;
|
_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 = 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;
|
||||||
|
@ -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;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
//[[[cog import generate_private_arrays ]]]
|
||||||
|
private ["_hour","_min"];
|
||||||
|
//[[[end]]]
|
||||||
_hour = str(date select 3);
|
_hour = str(date select 3);
|
||||||
_min = str(date select 4);
|
_min = str(date select 4);
|
||||||
|
|
||||||
@ -10,4 +12,4 @@ if(count _min < 2)then{
|
|||||||
_min = "0" + _min;
|
_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;
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Check.sqf
|
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;
|
_vehicle = vehicle player;
|
||||||
if (_vehicle == player) exitwith {false};
|
if (_vehicle == player) exitwith {false};
|
||||||
|
@ -13,18 +13,20 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Rearm.sqf
|
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'];
|
params ['_vehicle','_ammotype','_turret','_reloagmags','_ammocount','_costs'];
|
||||||
|
|
||||||
if (!local _vehicle) exitWith {
|
if (!local _vehicle) exitWith {
|
||||||
_line = 'Rearm denied - Go in as driver first!';
|
_line = 'Rearm denied - Go in as driver first!';
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
};
|
};
|
||||||
_vehtype = typeof _vehicle;
|
_vehtype = typeof _vehicle;
|
||||||
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
|
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
|
||||||
if (EPOCH_playerCrypto < _costs) exitWith {
|
if (EPOCH_playerCrypto < _costs) exitWith {
|
||||||
_line = format ['You need %1 Crypto to Rearm %2', _costs,_vehName];
|
_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{
|
if(_costs > 0)then{
|
||||||
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
|
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
|
||||||
@ -32,10 +34,10 @@ if(_costs > 0)then{
|
|||||||
_vehicle removeMagazinesTurret [_ammotype,_turret];
|
_vehicle removeMagazinesTurret [_ammotype,_turret];
|
||||||
for '_i' from 1 to _reloagmags do {
|
for '_i' from 1 to _reloagmags do {
|
||||||
_vehicle addMagazineTurret [_ammotype, _turret, _ammocount];
|
_vehicle addMagazineTurret [_ammotype, _turret, _ammocount];
|
||||||
};
|
};
|
||||||
_magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName');
|
_magname = getText (configFile >> 'CfgMagazines' >> _ammotype >> 'displayName');
|
||||||
if (_magname isequalto '') then {
|
if (_magname isequalto '') then {
|
||||||
_magname = _ammotype;
|
_magname = _ammotype;
|
||||||
};
|
};
|
||||||
_line = format ['%1 rearmed with %2', _vehName, _magname];
|
_line = format ['%1 rearmed with %2', _vehName, _magname];
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
|
@ -19,13 +19,13 @@ _args params [['_costs',0],['_updateInterval',1],['_amount',0.1]];
|
|||||||
|
|
||||||
if (!local _vehicle) exitWith {
|
if (!local _vehicle) exitWith {
|
||||||
_line = 'Refuel denied - Go in as driver first!';
|
_line = 'Refuel denied - Go in as driver first!';
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
};
|
};
|
||||||
_vehtype = typeof _vehicle;
|
_vehtype = typeof _vehicle;
|
||||||
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
|
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
|
||||||
if (EPOCH_playerCrypto < _costs) exitWith {
|
if (EPOCH_playerCrypto < _costs) exitWith {
|
||||||
_line = format ['You need %1 Crypto to Refuel %2', _costs,_vehName];
|
_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{
|
if(_costs > 0)then{
|
||||||
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
|
[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 {
|
while {(vehicle player == _vehicle) && (local _vehicle) && (alive player)} do {
|
||||||
if (speed _vehicle > 2 || speed _vehicle < -2 ) exitWith {
|
if (speed _vehicle > 2 || speed _vehicle < -2 ) exitWith {
|
||||||
_line = format ['Refueling of %1 stopped', _vehName];
|
_line = format ['Refueling of %1 stopped', _vehName];
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
};
|
};
|
||||||
_vehicle setFuel ((Fuel _vehicle)+_amount);
|
_vehicle setFuel ((Fuel _vehicle)+_amount);
|
||||||
if (Fuel _vehicle > 0.99) exitWith {
|
if (Fuel _vehicle > 0.99) exitWith {
|
||||||
_line = format ['%1 Refueled', _vehName];
|
_line = format ['%1 Refueled', _vehName];
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
};
|
};
|
||||||
uisleep _updateInterval;
|
uisleep _updateInterval;
|
||||||
};
|
};
|
||||||
|
@ -13,46 +13,48 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Repair.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Repair.sqf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ['_vehtype','_vehName','_allRepaired'];
|
//[[[cog import generate_private_arrays ]]]
|
||||||
params [['_vehicle',objnull],['_args',[]]];
|
private ["_allHitPointsDamage","_allRepaired","_line","_partName","_pos","_repaired","_vehName","_vehtype"];
|
||||||
|
//[[[end]]]
|
||||||
|
params [['_vehicle',objnull],['_args',[]] ];
|
||||||
_args params [['_costs',0],['_updateInterval',1.2]];
|
_args params [['_costs',0],['_updateInterval',1.2]];
|
||||||
|
|
||||||
if (!local _vehicle) exitWith {
|
if (!local _vehicle) exitWith {
|
||||||
_line = 'Repair denied - Go in as driver first!';
|
_line = 'Repair denied - Go in as driver first!';
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
};
|
};
|
||||||
_vehtype = typeOf _vehicle;
|
_vehtype = typeOf _vehicle;
|
||||||
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
|
_vehName = getText(configFile >> 'cfgVehicles' >> _vehtype >> 'displayName');
|
||||||
if (EPOCH_playerCrypto < _costs) exitWith {
|
if (EPOCH_playerCrypto < _costs) exitWith {
|
||||||
_line = format ['You need %1 Crypto to Repair %2', _costs,_vehName];
|
_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{
|
if(_costs > 0)then{
|
||||||
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
|
[player,(_costs*-1),Epoch_personalToken] remoteexec ['epoch_server_paycrypto',2];
|
||||||
};
|
};
|
||||||
_vehicle engineOn false;
|
_vehicle engineOn false;
|
||||||
_repaired = [];
|
_repaired = [];
|
||||||
_allRepaired = true;
|
_allRepaired = true;
|
||||||
_allHitPointsDamage = getAllHitPointsDamage _vehicle;
|
_allHitPointsDamage = getAllHitPointsDamage _vehicle;
|
||||||
{
|
{
|
||||||
if ((vehicle player != _vehicle) || (!local _vehicle) || speed _vehicle < -2 || speed _vehicle > 2) exitWith {
|
if ((vehicle player != _vehicle) || (!local _vehicle) || speed _vehicle < -2 || speed _vehicle > 2) exitWith {
|
||||||
_allRepaired = false;
|
_allRepaired = false;
|
||||||
_line = format ['Repairing of %1 stopped', _vehName];
|
_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 {
|
if (!(_x in _repaired) && !(_x isequalto "") && (_allHitPointsDamage select 2 select _foreachindex) > 0) then {
|
||||||
_partName = toarray _x;
|
_partName = toarray _x;
|
||||||
_partName set [0,20];
|
_partName set [0,20];
|
||||||
_partName set [1,45];
|
_partName set [1,45];
|
||||||
_partName set [2,20];
|
_partName set [2,20];
|
||||||
_partName = toString _partName;
|
_partName = toString _partName;
|
||||||
_vehicle setHitPointDamage [_x,0];
|
_vehicle setHitPointDamage [_x,0];
|
||||||
_line = format ['Repairing%1 ...', _partName];
|
_line = format ['Repairing%1 ...', _partName];
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
_repaired pushback _x;
|
_repaired pushback _x;
|
||||||
uisleep _updateInterval;
|
uisleep _updateInterval;
|
||||||
};
|
};
|
||||||
} foreach (_allHitPointsDamage select 0);
|
} foreach (_allHitPointsDamage select 0);
|
||||||
if (_allRepaired) then {
|
if (_allRepaired) then {
|
||||||
if ((damage _vehicle) > 0 || {_x > 0} count ((getallhitpointsdamage _vehicle) select 2) > 0) 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];
|
[_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];
|
_pos set [2,(_pos select 2)+0.25];
|
||||||
_vehicle setposatl _pos;
|
_vehicle setposatl _pos;
|
||||||
_line = format ['%1 full Repaired', _vehName];
|
_line = format ['%1 full Repaired', _vehName];
|
||||||
[_line,5] call Epoch_message;
|
[_line,5] call Epoch_message;
|
||||||
};
|
};
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/servicepoint/EPOCH_SP_Start.sqf
|
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_Refuel = nil;
|
||||||
Ignatz_Repair = nil;
|
Ignatz_Repair = nil;
|
||||||
@ -96,11 +98,11 @@ _fnc_actionTitle = {
|
|||||||
|
|
||||||
_costs = [_vehicle, _refuel_costs] call _fnc_getCosts;
|
_costs = [_vehicle, _refuel_costs] call _fnc_getCosts;
|
||||||
_actionTitle = [format['Refuel %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
|
_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;
|
_costs = [_vehicle, _repair_costs] call _fnc_getCosts;
|
||||||
_actionTitle = [format['Repair %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
|
_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 > 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 > 1) then {Ignatz_Rearm1 = _Ignatz_SP_Array select 1;};
|
||||||
if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;};
|
if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
params ["_control","_selected"];
|
params ["_control","_selected"];
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ if !(isNull EPOCH_lastNPCtradeTarget) then {
|
|||||||
// limit adding more if item is over stocked
|
// limit adding more if item is over stocked
|
||||||
if (_control == 41501) then {
|
if (_control == 41501) then {
|
||||||
_slot = EPOCH_lastNPCtradeTarget getVariable["AI_SLOT", -1];
|
_slot = EPOCH_lastNPCtradeTarget getVariable["AI_SLOT", -1];
|
||||||
_aiItems = EPOCH_lastNPCtradeTarget getVariable["AI_ITEMS", [[], []]];
|
_aiItems = EPOCH_lastNPCtradeTarget getVariable["AI_ITEMS", [[], []] ];
|
||||||
_itemClasses = _aiItems select 0;
|
_itemClasses = _aiItems select 0;
|
||||||
_itemQtys = _aiItems select 1;
|
_itemQtys = _aiItems select 1;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_ok","_slot","_target"];
|
private ["_MainCategoriearray","_categorie","_config","_ok","_slot","_target"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
_config = 'CfgItemSort' call EPOCH_returnConfig;
|
_config = 'CfgItemSort' call EPOCH_returnConfig;
|
||||||
_MainCategoriearray = getarray (_config >> "MainCategories" >> "Classes");
|
_MainCategoriearray = getarray (_config >> "MainCategories" >> "Classes");
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_showStats.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_showStats.sqf
|
||||||
*/
|
*/
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
private "_display";
|
//[[[cog import generate_private_arrays ]]]
|
||||||
|
private ["_display","_display3"];
|
||||||
|
//[[[end]]]
|
||||||
9992 cutRsc["EpochGameUI2", "PLAIN", 2, false];
|
9992 cutRsc["EpochGameUI2", "PLAIN", 2, false];
|
||||||
_display = uiNamespace getVariable "EPOCH_EpochGameUI2";
|
_display = uiNamespace getVariable "EPOCH_EpochGameUI2";
|
||||||
(_display displayCtrl 21208) ctrlSetText format["%1", EPOCH_playerCrypto];
|
(_display displayCtrl 21208) ctrlSetText format["%1", EPOCH_playerCrypto];
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
Usage:
|
Usage:
|
||||||
"TEST" call Epoch_message
|
"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"
|
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||||
_msg = param [0, "No input"];
|
_msg = param [0, "No input"];
|
||||||
_time = param [1, 2];
|
_time = param [1, 2];
|
||||||
@ -26,15 +28,15 @@ if(_customCol isEqualTo [])then{
|
|||||||
if !(_bgCol isEqualTypeAll 0)then{_bgCol = [0,0,0,0.2]};
|
if !(_bgCol isEqualTypeAll 0)then{_bgCol = [0,0,0,0.2]};
|
||||||
if !(_txtCol isEqualTypeAll 0)then{_txtCol = [1,1,1,0.95]};
|
if !(_txtCol isEqualTypeAll 0)then{_txtCol = [1,1,1,0.95]};
|
||||||
}else{
|
}else{
|
||||||
_bgCol = if((_customCol select 0)isEqualTypeAll 0)then[{_customCol select 0},{_bgCol = [0,0,0,0.2]}];
|
_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]}];
|
_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
|
_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]]};
|
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 {
|
[] spawn {
|
||||||
private ["_c1pos","_c2pos","_c3pos","_clr","_dsp"];
|
private ["_c1pos","_c2pos","_c3pos","_clr","_dsp"];
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
Usage:
|
Usage:
|
||||||
"TEST" call Epoch_message_old1
|
"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"
|
#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};
|
if (_text isEqualType "STRING") then {_text = parseText _text};
|
||||||
|
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
Usage:
|
Usage:
|
||||||
"TEST" call Epoch_message_old2
|
"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"
|
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||||
|
|
||||||
_in = param [0, "No input given"];
|
_in = param [0, "No input given"];
|
||||||
@ -36,40 +39,40 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
|
|||||||
[GUI_GRID_W, GUI_GRID_H] spawn {
|
[GUI_GRID_W, GUI_GRID_H] spawn {
|
||||||
params ["_gridW","_gridH"];
|
params ["_gridW","_gridH"];
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
_dsp = findDisplay 46;
|
_dsp = findDisplay 46;
|
||||||
|
|
||||||
_c = _dsp ctrlCreate ["rmx_ST2", -8777];
|
_c = _dsp ctrlCreate ["rmx_ST2", -8777];
|
||||||
_c2 = _dsp ctrlCreate ["RscText", -8776];
|
_c2 = _dsp ctrlCreate ["RscText", -8776];
|
||||||
_c3 = _dsp ctrlCreate ["RscText", -8775];
|
_c3 = _dsp ctrlCreate ["RscText", -8775];
|
||||||
|
|
||||||
_clr = call Epoch_getColorScheme;
|
_clr = call Epoch_getColorScheme;
|
||||||
|
|
||||||
_c ctrlSetBackgroundColor [_clr select 0, _clr select 1, _clr select 2, 0.5];
|
_c ctrlSetBackgroundColor [_clr select 0, _clr select 1, _clr select 2, 0.5];
|
||||||
_c2 ctrlSetBackgroundColor _clr;
|
_c2 ctrlSetBackgroundColor _clr;
|
||||||
_c3 ctrlSetBackgroundColor _clr;
|
_c3 ctrlSetBackgroundColor _clr;
|
||||||
|
|
||||||
//first animation
|
//first animation
|
||||||
_width = 0.2 * _gridW;
|
_width = 0.2 * _gridW;
|
||||||
_height = 2 * _gridH;
|
_height = 2 * _gridH;
|
||||||
|
|
||||||
_c ctrlSetPosition [0.5 - _gridW / 2,1,_gridW,_height];
|
_c ctrlSetPosition [0.5 - _gridW / 2,1,_gridW,_height];
|
||||||
_c2 ctrlSetPosition[0.5 - _gridW / 2,1,_width,_height];
|
_c2 ctrlSetPosition[0.5 - _gridW / 2,1,_width,_height];
|
||||||
_c3 ctrlSetPosition[0.5 + _gridW / 2,1,_width,_height];
|
_c3 ctrlSetPosition[0.5 + _gridW / 2,1,_width,_height];
|
||||||
_c ctrlCommit 0;
|
_c ctrlCommit 0;
|
||||||
_c2 ctrlCommit 0;
|
_c2 ctrlCommit 0;
|
||||||
_c3 ctrlCommit 0;
|
_c3 ctrlCommit 0;
|
||||||
|
|
||||||
_cmt = 0.25;
|
_cmt = 0.25;
|
||||||
|
|
||||||
//Main queue
|
//Main queue
|
||||||
while {!(rmx_var_dtMessageArr isEqualTo [])} do
|
while {!(rmx_var_dtMessageArr isEqualTo [])} do
|
||||||
{
|
{
|
||||||
|
|
||||||
_in = parseText (rmx_var_dtMessageArr select 0 select 0);
|
_in = parseText (rmx_var_dtMessageArr select 0 select 0);
|
||||||
_timer = rmx_var_dtMessageArr select 0 select 1;
|
_timer = rmx_var_dtMessageArr select 0 select 1;
|
||||||
rmx_var_dtMessageArr deleteAt 0;
|
rmx_var_dtMessageArr deleteAt 0;
|
||||||
|
|
||||||
_c ctrlSetStructuredText _in;
|
_c ctrlSetStructuredText _in;
|
||||||
|
|
||||||
_cnt = 0;
|
_cnt = 0;
|
||||||
@ -80,18 +83,18 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
|
|||||||
} count (toArray str _in);
|
} count (toArray str _in);
|
||||||
|
|
||||||
_w2 = ((_cnt max 5) min 80) * _gridW;
|
_w2 = ((_cnt max 5) min 80) * _gridW;
|
||||||
|
|
||||||
_c ctrlSetPosition [0.5 - _w2 / 2,1,_w2,_height];
|
_c ctrlSetPosition [0.5 - _w2 / 2,1,_w2,_height];
|
||||||
_c2 ctrlSetPosition[0.5 - _w2 / 2,1,_width,_height];
|
_c2 ctrlSetPosition[0.5 - _w2 / 2,1,_width,_height];
|
||||||
_c3 ctrlSetPosition[0.5 + _w2 / 2,1,_width,_height];
|
_c3 ctrlSetPosition[0.5 + _w2 / 2,1,_width,_height];
|
||||||
|
|
||||||
_c ctrlCommit _cmt;
|
_c ctrlCommit _cmt;
|
||||||
_c2 ctrlCommit _cmt;
|
_c2 ctrlCommit _cmt;
|
||||||
_c3 ctrlCommit _cmt;
|
_c3 ctrlCommit _cmt;
|
||||||
|
|
||||||
uiSleep _timer;
|
uiSleep _timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
//exit with animation
|
//exit with animation
|
||||||
_c ctrlSetPosition [0.5 - _gridW / 2,1,_gridW,_height];
|
_c ctrlSetPosition [0.5 - _gridW / 2,1,_gridW,_height];
|
||||||
_c2 ctrlSetPosition[0.5 - _gridW / 2,1,_width,_height];
|
_c2 ctrlSetPosition[0.5 - _gridW / 2,1,_width,_height];
|
||||||
@ -99,12 +102,12 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
|
|||||||
_c ctrlCommit _cmt;
|
_c ctrlCommit _cmt;
|
||||||
_c2 ctrlCommit _cmt;
|
_c2 ctrlCommit _cmt;
|
||||||
_c3 ctrlCommit _cmt;
|
_c3 ctrlCommit _cmt;
|
||||||
|
|
||||||
uiSleep _cmt;
|
uiSleep _cmt;
|
||||||
|
|
||||||
ctrlDelete _c;
|
ctrlDelete _c;
|
||||||
ctrlDelete _c2;
|
ctrlDelete _c2;
|
||||||
ctrlDelete _c3;
|
ctrlDelete _c3;
|
||||||
|
|
||||||
rmx_var_dtEnabled = nil;
|
rmx_var_dtEnabled = nil;
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
Github:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/missions/EPOCH_mission_refresh.sqf
|
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");
|
_missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses");
|
||||||
|
|
||||||
_index = lbCurSel 1500;
|
_index = lbCurSel 1500;
|
||||||
@ -25,6 +27,6 @@ if!(_menuCondition=="")then{
|
|||||||
_missionDesc = "NOT AVAILABLE - " + _missionDesc;
|
_missionDesc = "NOT AVAILABLE - " + _missionDesc;
|
||||||
lbSetColor [1001, 0, [0.73,0.24,0.11,1] ] ;
|
lbSetColor [1001, 0, [0.73,0.24,0.11,1] ] ;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ctrlSetText [1001, _missionDesc];
|
ctrlSetText [1001, _missionDesc];
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
Radiation levels 1-9, 0 to disable
|
Radiation levels 1-9, 0 to disable
|
||||||
To reuse code in a new PP function, adjust _priority so they don't overwrite each other
|
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 ]]]
|
||||||
params [["_level",0,[0]],["_speed",0,[0]]];
|
private ["_cc","_ci","_fg","_priority"];
|
||||||
|
//[[[end]]]
|
||||||
|
params [["_level",0,[0]],["_speed",0,[0]] ];
|
||||||
|
|
||||||
if (isNil "rmx_var_RadiationHandles") then {
|
if (isNil "rmx_var_RadiationHandles") then {
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
if !(isNil "Epoch_Survival_Started") exitWith { false };
|
if !(isNil "Epoch_Survival_Started") exitWith { false };
|
||||||
Epoch_Survival_Started = true;
|
Epoch_Survival_Started = true;
|
||||||
|
|
||||||
_selectedFunction = "CfgClientFunctions";
|
private _selectedFunction = "CfgClientFunctions";
|
||||||
if (isDedicated) then {
|
if (isDedicated) then {
|
||||||
// dedicated server
|
// dedicated server
|
||||||
_selectedFunction = "CfgServerFunctions";
|
_selectedFunction = "CfgServerFunctions";
|
||||||
|
Loading…
Reference in New Issue
Block a user