mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0.4.0.0 b584
More work on Dynamic HUD and hudConfigs are now found in CfgEpochClient. Animal spawn table now found in CfgEpochClient. Two new functions added to handle get(In|Out)Man Event Handlers. moved forced disabling of build mode when getting in vehicle to getInMan EH function. removed a few unused files.
This commit is contained in:
parent
5fc12c058c
commit
90f5674a74
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -16,6 +16,7 @@
|
||||
[_this select 1, _this select 2] remoteExec ['EPOCH_handleServerMessage',_x];
|
||||
|
||||
*/
|
||||
if (isLocalized (_this select 0)) then{
|
||||
[format["%1", format[localize (_this select 0), _this select 1]], 5] call Epoch_message;
|
||||
params [["_str",""],["_input",""]];
|
||||
if (isLocalized _str) then{
|
||||
[format["%1", format[localize _str, _input]], 5] call Epoch_message;
|
||||
};
|
||||
|
@ -65,6 +65,7 @@ if !(isNull _object) then{
|
||||
_recipeItem = _x;
|
||||
_recipeQty = 1;
|
||||
if (_x isEqualType[]) then{
|
||||
_x params ["_recipeItem","_recipeQty"];
|
||||
_recipeItem = _x select 0;
|
||||
_recipeQty = _x select 1;
|
||||
};
|
||||
|
@ -23,10 +23,10 @@
|
||||
*/
|
||||
private ["_randomAIClass","_animalPos","_tryAnimalPos","_id","_animal","_animalAiTables","_playerPos"];
|
||||
|
||||
// TODO: move static arrays to config
|
||||
if (count(player nearEntities["Animal_Base_F", 200]) >= 1) exitWith{};
|
||||
|
||||
_animalAiTables = ["Sheep_random_EPOCH", "Sheep_random_EPOCH", "Goat_random_EPOCH", "Goat_random_EPOCH", "Goat_random_EPOCH", ["Cock_random_EPOCH", "Hen_random_EPOCH"], ["Cock_random_EPOCH", "Hen_random_EPOCH"], "Rabbit_EPOCH", "Rabbit_EPOCH", "Rabbit_EPOCH", "Snake_random_EPOCH", "Snake2_random_EPOCH", ["Fin_random_EPOCH", "Alsatian_Random_EPOCH"]];
|
||||
_animalAiTables = ["CfgEpochClient", "animalAiTables", ["Sheep_random_EPOCH", "Sheep_random_EPOCH", "Goat_random_EPOCH", "Goat_random_EPOCH", "Goat_random_EPOCH", ["Cock_random_EPOCH", "Hen_random_EPOCH"], ["Cock_random_EPOCH", "Hen_random_EPOCH"], "Rabbit_EPOCH", "Rabbit_EPOCH", "Rabbit_EPOCH", "Snake_random_EPOCH", "Snake2_random_EPOCH", ["Fin_random_EPOCH", "Alsatian_Random_EPOCH"]]] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
_randomAIClass = selectRandom _animalAiTables;
|
||||
_animalPos = nil;
|
||||
_playerPos = position player;
|
||||
|
24
Sources/epoch_code/compile/event_handlers/EPOCH_getInMan.sqf
Normal file
24
Sources/epoch_code/compile/event_handlers/EPOCH_getInMan.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Get In handler for A3 Epoch
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_getInMan_EH.sqf
|
||||
*/
|
||||
params ["_unit","_position","_vehicle"];
|
||||
if (_unit == player) then {
|
||||
// Disable build mode
|
||||
if (EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
["BUILD MODE: DISABLED", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
};
|
@ -4,13 +4,14 @@
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
A3 Epoch Anti-Vehicle Wall glitch
|
||||
Get out handler for A3 Epoch
|
||||
Includes Anti-Vehicle Wall glitch checks
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_antiWall.sqf
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_getOutMan_EH.sqf
|
||||
*/
|
||||
private ["_start","_end","_dirTo"];
|
||||
params ["_unit","_position","_vehicle"];
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Custom RE handler with random variables
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/setup/EPOCH_client_publicEH.sqf
|
||||
|
||||
Example:
|
||||
["aset","agte","eage",...] call EPOCH_client_publicEH;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: STRING - main random string to listen for events
|
||||
_this select 1+: random strings
|
||||
Returns:
|
||||
NOTHING
|
||||
|
||||
call compile ("
|
||||
EPOCH_"+(_this select 0)+" = {
|
||||
_data = (_this select 1);
|
||||
switch (_this select 0) do {
|
||||
case "+str(_this select 1)+": { EPOCH_bankBalance = _data; };
|
||||
case "+str(_this select 2)+": { Epoch_my_Group = []; Epoch_my_GroupUID = '' };
|
||||
case "+str(_this select 3)+": { Epoch_my_Group = _data; call EPOCH_Group_update };
|
||||
case "+str(_this select 4)+": { Epoch_my_GroupUID = _data };
|
||||
case "+str(_this select 5)+": { {missionNamespace setVariable[format['EPOCH_player%1', _x], EPOCH_defaultVars select(EPOCH_customVars find _x)]} forEach['Temp','Hunger','Thirst','Toxicity','Stamina','HitPoints','BloodP','Alcohol','Radiation']};
|
||||
case "+str(_this select 6)+": { EPOCH_TRADE_COMPLETE = _data };
|
||||
|
||||
};
|
||||
};
|
||||
");
|
||||
*/
|
@ -1,3 +1,14 @@
|
||||
// init
|
||||
_forceUpdate = false;
|
||||
_forceBloodRise = false;
|
||||
_forceFatigue = false;
|
||||
_allowBloodDrop = false;
|
||||
_forceStaminaDrop = false;
|
||||
_warnbloodPressure = EPOCH_playerBloodP > 120;
|
||||
_increaseStamina = true;
|
||||
_val = 0;
|
||||
|
||||
// AR HUD Target start
|
||||
_currentTarget = objNull;
|
||||
_currentTargetMode = 0;
|
||||
_cursorTarget = ([10] call EPOCH_fnc_cursorTarget);
|
||||
@ -28,113 +39,46 @@ if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then {
|
||||
};
|
||||
EPOCH_currentTarget = _currentTarget;
|
||||
EPOCH_currentTargetMode = _currentTargetMode;
|
||||
// AR HUD target end
|
||||
|
||||
_increaseStamina = false;
|
||||
_vehicle = vehicle player;
|
||||
if (_vehicle == player) then {
|
||||
_val = log(abs(speed player));
|
||||
_staminaThreshold = 0.7;
|
||||
if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3};
|
||||
if (_val>_staminaThreshold) then {
|
||||
EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0;
|
||||
} else {
|
||||
_increaseStamina = true;
|
||||
};
|
||||
} else {
|
||||
if (EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
["BUILD MODE: DISABLED", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
_increaseStamina = true;
|
||||
|
||||
// TODO: move back to vehicle configs
|
||||
switch (typeOf _vehicle) do {
|
||||
case "jetski_epoch": {
|
||||
_clock_hour10 = floor ((date select 3)/10);
|
||||
_clock_minute10 = floor ((date select 4)/10);
|
||||
{
|
||||
_vehicle setObjectTexture [_forEachIndex,_x];
|
||||
}forEach[
|
||||
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_hour10],
|
||||
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 3)-(_clock_hour10*10)],
|
||||
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_minute10],
|
||||
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 4)-(_clock_minute10*10)],
|
||||
format["\x\addons\a3_epoch_vehicles\data\fuel%1_ca.paa",floor(fuel _vehicle*10)]
|
||||
];
|
||||
};
|
||||
case "ebike_epoch": {
|
||||
{
|
||||
_vehicle setObjectTexture [_forEachIndex,_x];
|
||||
}forEach[
|
||||
format["\x\addons\a3_epoch_vehicles\data\speed%1_ca.paa",floor(speed _vehicle/9) max 0],
|
||||
format["\x\addons\a3_epoch_vehicles\data\energ%1_ca.paa",floor(fuel _vehicle*14)]
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_envCold = EPOCH_playerTemp <= 95.0;
|
||||
_envHot = EPOCH_playerTemp >= 106.7;
|
||||
_hungry = EPOCH_playerHunger <= 0;
|
||||
_thirsty = EPOCH_playerThirst <= 0;
|
||||
_warnbloodPressure = EPOCH_playerBloodP > 120;
|
||||
|
||||
//_thirst ctrlShow (EPOCH_playerThirst <= 625);
|
||||
/*
|
||||
if (EPOCH_playerThirst <= 625) then {
|
||||
_thirst = ["topRight",_hudIndex] call epoch_getHUDCtrl;
|
||||
_hudIndex = _hudIndex + 1;
|
||||
|
||||
_thirst ctrlSetText "x\addons\a3_epoch_code\Data\UI\thirst_ca.paa";
|
||||
[_thirst,_thirsty] call _scaleUI;
|
||||
_color = [2500,0,EPOCH_playerThirst,1] call EPOCH_colorRange;
|
||||
_thirst ctrlSetTextColor _color;
|
||||
};
|
||||
|
||||
if (EPOCH_playerHunger <= 1250) then {
|
||||
_hunger = ["topRight",_hudIndex] call epoch_getHUDCtrl;
|
||||
_hudIndex = _hudIndex + 1;
|
||||
_hunger ctrlSetText "x\addons\a3_epoch_code\Data\UI\hunger_ca.paa";
|
||||
|
||||
[_hunger,_hungry] call _scaleUI;
|
||||
_color = [5000,0,EPOCH_playerHunger,1] call EPOCH_colorRange;
|
||||
_hunger ctrlSetTextColor _color;
|
||||
};
|
||||
*/
|
||||
|
||||
_playerOxygen = getOxygenRemaining player;
|
||||
//_oxygen ctrlShow (_playerOxygen < 1);
|
||||
if (_playerOxygen < 1) then {
|
||||
_hudIndex = missionNamespace getVariable [format["EPOCH_dynHUD_%1","topRight"],1];
|
||||
_oxygen = ["topRight",_hudIndex] call epoch_getHUDCtrl;
|
||||
missionNamespace setVariable [format["EPOCH_dynHUD_%1","topRight"], _hudIndex + 1];
|
||||
_oxygen ctrlSetText "x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa";
|
||||
|
||||
[_oxygen,(_playerOxygen <= 0.55)] call _scaleUI;
|
||||
_color = [0,1,_playerOxygen,1] call EPOCH_colorRange;
|
||||
_oxygen ctrlSetTextColor _color;
|
||||
};
|
||||
|
||||
// dynamic start (greater than)
|
||||
// dynamic HUD start
|
||||
{
|
||||
_x params [["_selVarName",""],["_HUDclass","topRight"],["_ctrlText",""]];
|
||||
_x params [["_selectedVar",[]],["_HUDclass","topRight"],["_ctrlText",""],["_criticalAttributes",[]]];
|
||||
_selectedVar params [["_selVarName",""],["_selVarType",""],["_selVarSubData",""],["_extraLogicRaw",[]],["_customVarLimits",[]]];
|
||||
|
||||
_varIndex = EPOCH_customVars find _selVarName;
|
||||
if (_varIndex != -1) then {
|
||||
_currentVarVal = missionNamespace getVariable[format['EPOCH_player%1', _selVarName],EPOCH_defaultVars select _varIndex];
|
||||
(EPOCH_customVarLimits select _varIndex) params [["_playerLimitMax",100],["_playerLimitMin",0],["_playerWarnLimit",25],["_playerCriticalLimit",75],["_playerWarnLow",0],["_playerCriticalLow",0]];
|
||||
if (_varIndex != -1 || !(_customVarLimits isEqualTo [])) then {
|
||||
if (_customVarLimits isEqualTo []) then {
|
||||
_customVarLimits = EPOCH_customVarLimits select _varIndex;
|
||||
};
|
||||
_currentVarVal = [_selVarName,_varIndex,_selVarType,_selVarSubData] call _fnc_returnHudVar;
|
||||
_customVarLimits params [["_playerLimitMax",100],["_playerLimitMin",0],["_playerWarnLimit",101],["_playerCriticalLimit",101],["_playerWarnLow",0],["_playerCriticalLow",0]];
|
||||
|
||||
_extraLogic = false;
|
||||
if !(_extraLogicRaw isEqualTo []) then {
|
||||
_extraLogicRaw params [["_extraLogicType",""],["_extraLogicCond",""],["_extraLogicData",""]];
|
||||
_extraLogicVarName = "";
|
||||
_extraLogicDefaultValue = "";
|
||||
if (_extraLogicType isEqualType []) then {
|
||||
_extraLogicType params [["_extraLogicVarName",""],["_extraLogicType",""],["_extraLogicDefaultValue",""]];
|
||||
};
|
||||
_extraVarIndex = EPOCH_customVars find _extraLogicVarName;
|
||||
_extraLogic = [([_extraLogicVarName,_extraVarIndex,_extraLogicType,_extraLogicDefaultValue] call _fnc_returnHudVar),_extraLogicCond,_extraLogicData] call _fnc_arrayToLogic;
|
||||
};
|
||||
|
||||
if (_playerLimitMax isEqualType "") then {
|
||||
_playerLimitMax = missionNamespace getVariable [_playerLimitMax, 0];
|
||||
};
|
||||
if (_playerLimitMin isEqualType "") then {
|
||||
_playerLimitMin = missionNamespace getVariable [_playerLimitMin, 0];
|
||||
};
|
||||
|
||||
_warnLow = _currentVarVal < _playerWarnLow;
|
||||
_warnHigh = _currentVarVal > _playerWarnLimit;
|
||||
_criticalLow = _currentVarVal <= _playerCriticalLow;
|
||||
_criticalHigh = _currentVarVal >= _playerCriticalLimit;
|
||||
if (_warnHigh || _warnLow) then {
|
||||
|
||||
if (_warnHigh || _warnLow || _extraLogic) then {
|
||||
_hudIndex = missionNamespace getVariable [format["EPOCH_dynHUD_%1",_HUDclass],1];
|
||||
_curCtrl = [_HUDclass,_hudIndex] call epoch_getHUDCtrl;
|
||||
missionNamespace setVariable [format["EPOCH_dynHUD_%1",_HUDclass], _hudIndex + 1];
|
||||
@ -143,118 +87,83 @@ if (_playerOxygen < 1) then {
|
||||
};
|
||||
_curCtrl ctrlSetText _ctrlText;
|
||||
_critical = (_criticalHigh || _criticalLow);
|
||||
if (_critical) then {
|
||||
_forceUpdate = "forceUpdate" in _criticalAttributes;
|
||||
_forceFatigue = "forceFatigue" in _criticalAttributes;
|
||||
_forceBloodRise = "forceBloodRise" in _criticalAttributes;
|
||||
};
|
||||
|
||||
[_curCtrl,_critical] call _scaleUI;
|
||||
// todo make this reversable or even limited to a color range.
|
||||
_color = [_playerLimitMin,_playerLimitMax,_currentVarVal,1] call EPOCH_colorRange;
|
||||
_curCtrl ctrlSetTextColor _color;
|
||||
};
|
||||
};
|
||||
} forEach
|
||||
[
|
||||
[
|
||||
'Temp',
|
||||
"topRight",
|
||||
[
|
||||
"x\addons\a3_epoch_code\Data\UI\hot_ca.paa",
|
||||
"x\addons\a3_epoch_code\Data\UI\cold_ca.paa"
|
||||
]
|
||||
],
|
||||
[
|
||||
'Hunger',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\hunger_ca.paa"
|
||||
],
|
||||
[
|
||||
'Thirst',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\thirst_ca.paa"
|
||||
],
|
||||
[ 'Toxicity',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"
|
||||
],
|
||||
[
|
||||
'Wet',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\wet_ca.paa"
|
||||
],
|
||||
[
|
||||
'BloodP',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa"
|
||||
],
|
||||
[
|
||||
'Alcohol',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"
|
||||
],
|
||||
[
|
||||
'Soiled',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"
|
||||
],
|
||||
[
|
||||
'Radiation',
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\rads_ca.paa"
|
||||
]
|
||||
];
|
||||
// dynamic end
|
||||
} forEach _hudConfigs;
|
||||
// dynamic HUD end
|
||||
|
||||
_legDamage = player getHitPointDamage "HitLegs";
|
||||
// _broken ctrlShow (_legDamage >= 0.5);
|
||||
if (_legDamage >= 0.5) then {
|
||||
_hudIndex = missionNamespace getVariable [format["EPOCH_dynHUD_%1","topRight"],1];
|
||||
_broken = ["topRight",_hudIndex] call epoch_getHUDCtrl;
|
||||
missionNamespace setVariable [format["EPOCH_dynHUD_%1","topRight"], _hudIndex + 1];
|
||||
_broken ctrlSetText "x\addons\a3_epoch_code\Data\UI\broken_ca.paa";
|
||||
[_broken,true] call _scaleUI;
|
||||
_color = [1,0,_legDamage,1] call EPOCH_colorRange;
|
||||
_broken ctrlSetTextColor _color;
|
||||
};
|
||||
|
||||
if (_envCold || _envHot || _hungry || _thirsty) then {
|
||||
if (_envHot || _envCold) then {
|
||||
player setFatigue 1;
|
||||
};
|
||||
EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190;
|
||||
// cause Fatigue if cold or hot, also increase blood pressure if thristy or hungry.
|
||||
if (_forceBloodRise || _forceFatigue) then {
|
||||
_increaseStamina = false;
|
||||
} else {
|
||||
if (EPOCH_playerStamina > 0) then {
|
||||
if !(_panic) then {
|
||||
if (!_warnbloodPressure) then {
|
||||
player setFatigue 0;
|
||||
};
|
||||
EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100;
|
||||
};
|
||||
if (EPOCH_playerStamina > 0 && !_panic) then {
|
||||
_allowBloodDrop = true;
|
||||
};
|
||||
};
|
||||
|
||||
_critical = (damage player >= 0.7 || _warnbloodPressure);
|
||||
// _emergency ctrlShow _critical;
|
||||
if (_critical) then {
|
||||
_hudIndex = missionNamespace getVariable [format["EPOCH_dynHUD_%1","topRight"],1];
|
||||
_emergency = ["topRight",_hudIndex] call epoch_getHUDCtrl;
|
||||
missionNamespace setVariable [format["EPOCH_dynHUD_%1","topRight"], _hudIndex + 1];
|
||||
_emergency ctrlSetText "x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa";
|
||||
[_emergency,(EPOCH_playerBloodP > 140)] call _scaleUI;
|
||||
_color = [180,100,EPOCH_playerBloodP,1] call EPOCH_colorRange;
|
||||
_emergency ctrlSetTextColor _color;
|
||||
// force Fatigue
|
||||
if (_forceFatigue) then {
|
||||
player setFatigue 1;
|
||||
} else {
|
||||
if (!_warnbloodPressure) then {
|
||||
player setFatigue 0;
|
||||
};
|
||||
};
|
||||
|
||||
if (EPOCH_playerBloodP >= 180) then {
|
||||
// force Blood Pressure Rise
|
||||
if (_forceBloodRise) then {
|
||||
EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190;
|
||||
} else {
|
||||
if (_allowBloodDrop) then {
|
||||
// allow player to bleed out
|
||||
_lowerBPlimit = [100,0] select (isBleeding player);
|
||||
EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max _lowerBPlimit;
|
||||
};
|
||||
};
|
||||
|
||||
// check if player On Foot
|
||||
if (isNull objectParent player) then {
|
||||
_val = log(abs(speed player));
|
||||
_staminaThreshold = [0.7,0.3] select EPOCH_playerIsSwimming;
|
||||
if (_val > _staminaThreshold) then {
|
||||
_forceStaminaDrop = true;
|
||||
};
|
||||
};
|
||||
|
||||
// Decrease Stamina
|
||||
if (_forceStaminaDrop) then {
|
||||
EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0;
|
||||
} else {
|
||||
// Increase Stamina if player is not Fatigued
|
||||
if (_increaseStamina && (getFatigue player) == 0) then {
|
||||
EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax;
|
||||
};
|
||||
};
|
||||
|
||||
// force update
|
||||
if (_forceUpdate) then {
|
||||
true call EPOCH_pushCustomVar;
|
||||
};
|
||||
if (_increaseStamina && (getFatigue player) == 0) then {
|
||||
EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax;
|
||||
};
|
||||
|
||||
// ~ debug
|
||||
if (EPOCH_debugMode) then {
|
||||
call EPOCH_debugMonitor;
|
||||
};
|
||||
|
||||
// player to player trade loop
|
||||
call EPOCH_TradeLoop;
|
||||
|
||||
// blank out unused hud elements
|
||||
|
||||
// blank out unused hud elements and prepare for next loop
|
||||
_hudIndex = missionNamespace getVariable [format["EPOCH_dynHUD_%1","topRight"],1];
|
||||
for "_i" from _hudIndex to 9 do {
|
||||
_c = ["topRight",_i] call epoch_getHUDCtrl;
|
||||
|
@ -12,6 +12,7 @@ _baseHTLoss = ["CfgEpochClient", "baseHTLoss", 8] call EPOCH_fnc_returnConfigEnt
|
||||
_energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_hudConfigs = ["CfgEpochClient", "hudConfigs", []] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
EPOCH_chargeRate = 0;
|
||||
EPOCH_playerIsSwimming = false;
|
||||
@ -22,33 +23,35 @@ if (count EPOCH_playerSpawnArray != count EPOCH_spawnIndex) then{
|
||||
{ EPOCH_playerSpawnArray pushBack 0 } forEach EPOCH_spawnIndex;
|
||||
};
|
||||
|
||||
//9990 cutRsc ["EpochGameUI","PLAIN",2,false];
|
||||
//_display = uiNamespace getVariable "EPOCH_EpochGameUI";
|
||||
// HUD and Logic functions - todo move to client function.
|
||||
/*
|
||||
EPOCH_fnc_makeCtrl = {
|
||||
params [["_picture",""],["_HUDclass","topRight"]];
|
||||
private _index = missionNamespace getvariable ["EPOCH_dynamicCtrlIndex",1];
|
||||
private _ctrl = [_HUDclass,_index] call epoch_getHUDCtrl;
|
||||
_ctrl ctrlSetText _picture;
|
||||
missionNamespace setvariable ["EPOCH_dynamicCtrlIndex",_index + 1];
|
||||
_ctrl
|
||||
[_selVarName,_varIndex,_selVarType,_selVarSubData] call _fnc_returnHudVar
|
||||
*/
|
||||
_fnc_returnHudVar = {
|
||||
params [["_selVarName",""],["_varIndex",0],["_selVarType",""],["_selVarSubData",""]];
|
||||
switch (_selVarType) do {
|
||||
case "getMissionNamespaceVariable": {missionNamespace getVariable[_selVarName,_selVarSubData]};
|
||||
case "getPlayerHitPointDamage": {player getHitPointDamage _selVarSubData};
|
||||
case "getPlayerOxygenRemaining": {getOxygenRemaining player};
|
||||
case "getPlayerDamage": {damage player};
|
||||
default {missionNamespace getVariable[format['EPOCH_player%1', _selVarName],EPOCH_defaultVars select _varIndex]};
|
||||
}
|
||||
};
|
||||
/*
|
||||
[1,">=",0] call _fnc_arrayToLogic; // returns: true
|
||||
*/
|
||||
_fnc_arrayToLogic = {
|
||||
params [["_v",""],["_t",""],["_d",""]];
|
||||
switch (_t) do {
|
||||
case ">=": {_v >= _d};
|
||||
case "<=": {_v <= _d};
|
||||
case "<": {_v < _d};
|
||||
case ">": {_v > _d};
|
||||
case "!=": {!(_v isEqualTo _d)};
|
||||
default {_v isEqualTo _d};
|
||||
}
|
||||
};
|
||||
|
||||
_thirst = ["x\addons\a3_epoch_code\Data\UI\thirst_ca.paa"] call EPOCH_fnc_makeCtrl;
|
||||
_hunger = ["x\addons\a3_epoch_code\Data\UI\hunger_ca.paa"] call EPOCH_fnc_makeCtrl;
|
||||
_broken = ["x\addons\a3_epoch_code\Data\UI\broken_ca.paa"] call EPOCH_fnc_makeCtrl;
|
||||
_oxygen = ["x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"] call EPOCH_fnc_makeCtrl;
|
||||
_hazzard = ["x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"] call EPOCH_fnc_makeCtrl;
|
||||
_emergency = ["x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa"] call EPOCH_fnc_makeCtrl;
|
||||
|
||||
diag_log format ["init HUD: %1 %2 %3 %4 %5 %6", _thirst,_hunger,_broken,_oxygen,_hazzard,_emergency];
|
||||
|
||||
{
|
||||
|
||||
_x ctrlShow false;
|
||||
}forEach[_thirst,_hunger,_broken,_oxygen,_hazzard,_emergency];
|
||||
|
||||
*/
|
||||
// find radio
|
||||
{
|
||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) == "ItemRadio") exitWith{
|
||||
|
@ -30,7 +30,6 @@ class CfgClientFunctions
|
||||
class supportCopter {};
|
||||
class consumeItem {};
|
||||
class unitSpawn {};
|
||||
class antiWall {};
|
||||
class onEachFrame {};
|
||||
class callSapperMigration {};
|
||||
class zombieSpawn {};
|
||||
@ -74,10 +73,13 @@ class CfgClientFunctions
|
||||
class KeyUp {};
|
||||
class onChar {};
|
||||
};
|
||||
|
||||
class event_handlers
|
||||
{
|
||||
class getInMan {};
|
||||
class getOutMan {};
|
||||
};
|
||||
class setup
|
||||
{
|
||||
class client_publicEH {};
|
||||
class masterLoop {};
|
||||
class clientInit {};
|
||||
class clientRespawn {};
|
||||
@ -192,7 +194,7 @@ class CfgClientFunctions
|
||||
class dynamicMenuPopulate {};
|
||||
class dynamicMenuCleanup {};
|
||||
};
|
||||
|
||||
|
||||
class dynamicHUD {
|
||||
file = "epoch_code\gui\scripts\dynamicHUD";
|
||||
class dynamicHUD_adjust {};
|
||||
@ -200,7 +202,7 @@ class CfgClientFunctions
|
||||
class dynamicHUD_start {};
|
||||
class getHUDCtrl {};
|
||||
};
|
||||
|
||||
|
||||
class gui_craft {
|
||||
file = "epoch_code\gui\scripts\craftingv2";
|
||||
class crafting_animate {};
|
||||
|
@ -49,7 +49,7 @@ class CfgEpochClient
|
||||
{"EPOCH_RyanZombie_1",12}
|
||||
};
|
||||
customVarsDefaults[] = {
|
||||
// EPOCH_player + varName, default value, {max,min,warn-high,critical-high,warn-low,critical-low}
|
||||
// EPOCH_player + varName, default value, {max,min,warn-high,crit-high,warn-low,crit-low}
|
||||
{"Temp",98.6,{106.7,95,102,105,96,95}},
|
||||
{"Hunger",5000,{5000,0,5001,5001,1250,0}},
|
||||
{"Thirst",2500,{2500,0,2501,2501,625,0}},
|
||||
@ -61,8 +61,8 @@ class CfgEpochClient
|
||||
{"Toxicity",0,{100,0,35,55,-1,-1}},
|
||||
{"Stamina",100,{"EPOCH_playerStaminaMax",0}},
|
||||
{"Crypto",0,{250000,0}},
|
||||
{"HitPoints",{0,0,0,0},{1,1,1,1}},
|
||||
{"BloodP",100,{190,0,120,140,99,0}},
|
||||
{"HitPoints",{0,0,0,0},{1,0,0.5,1,-1,-1}},
|
||||
{"BloodP",100,{190,0,120,140,70,50}},
|
||||
{"SpawnArray",{},{}},
|
||||
{"Karma",0,{50000,-50000}},
|
||||
{"Alcohol",0,{100,0,35,55,-1,-1}},
|
||||
@ -70,6 +70,107 @@ class CfgEpochClient
|
||||
{"Nuisance",0,{100,0}},
|
||||
{"MissionArray",{},{}}
|
||||
};
|
||||
|
||||
// HUD configs
|
||||
hudConfigs[] = {
|
||||
/*
|
||||
{
|
||||
{
|
||||
"AnyVarName",
|
||||
"getMissionNamespaceVariable",
|
||||
"defaultValue",
|
||||
{
|
||||
{
|
||||
"VarName1",
|
||||
"getMissionNamespaceVariable",
|
||||
"defaultValue"
|
||||
},
|
||||
">=",
|
||||
0.7
|
||||
},
|
||||
{5000,0,5001,5001,1250,0}
|
||||
},
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa"
|
||||
},
|
||||
{
|
||||
{
|
||||
"Thirst",
|
||||
"",
|
||||
"",
|
||||
{
|
||||
{"Hunger","getPlayerVariable"},">=",1000
|
||||
},
|
||||
{2500,0,2501,2501,625,0}
|
||||
},
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",
|
||||
|
||||
},
|
||||
*/
|
||||
{
|
||||
{"BloodP","","",{"getPlayerDamage",">=",0.7}},
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa",
|
||||
{"forceUpdate"}
|
||||
},
|
||||
{
|
||||
{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"
|
||||
},
|
||||
{
|
||||
"Hunger",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",
|
||||
{"forceBloodRise"}
|
||||
},
|
||||
{
|
||||
"Thirst",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\thirst_ca.paa",
|
||||
{"forceBloodRise"}
|
||||
},
|
||||
{
|
||||
"Temp",
|
||||
"topRight",
|
||||
{
|
||||
"x\addons\a3_epoch_code\Data\UI\hot_ca.paa",
|
||||
"x\addons\a3_epoch_code\Data\UI\cold_ca.paa"
|
||||
},
|
||||
{"forceFatigue"}
|
||||
},
|
||||
{ "Toxicity",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"
|
||||
},
|
||||
{
|
||||
"Wet",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\wet_ca.paa"
|
||||
},
|
||||
{
|
||||
"Alcohol",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"
|
||||
},
|
||||
{
|
||||
"Soiled",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"
|
||||
},
|
||||
{
|
||||
"Radiation",
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\rads_ca.paa"
|
||||
},
|
||||
{
|
||||
{"HitPoints","getPlayerHitPointDamage","HitLegs"},
|
||||
"topRight",
|
||||
"x\addons\a3_epoch_code\Data\UI\broken_ca.paa"
|
||||
}
|
||||
};
|
||||
|
||||
// controls max group limit and cost
|
||||
group_upgrade_lvl[] = {4,"1000",6,"1500",8,"2000",10,"2500",12,"3000",14,"3500",16,"4000",32,"8000",64,"16000"};
|
||||
|
||||
@ -91,8 +192,8 @@ class CfgEpochClient
|
||||
Dammaged = "";
|
||||
Hit = "";
|
||||
HitPart = "";
|
||||
GetInMan = "";
|
||||
GetOutMan = "_this call EPOCH_antiWall;";
|
||||
GetInMan = "_this call EPOCH_getInMan";
|
||||
GetOutMan = "_this call EPOCH_getOutMan;";
|
||||
|
||||
// suppress these units from spawning near Jammer or Traders
|
||||
nonJammerAI[] = {"B_Heli_Transport_01_F","PHANTOM","EPOCH_Sapper_F","Epoch_SapperB_F","I_UAV_01_F","EPOCH_RyanZombie_1"};
|
||||
@ -102,6 +203,9 @@ class CfgEpochClient
|
||||
// Fishing loots
|
||||
fishLoots[] = {"ItemTuna","ItemSeaBass","ItemSeaBass","ItemSeaBass","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout"};
|
||||
|
||||
// Animal spawn table
|
||||
animalAiTables[] = {"Sheep_random_EPOCH", "Sheep_random_EPOCH", "Goat_random_EPOCH", "Goat_random_EPOCH", "Goat_random_EPOCH", {"Cock_random_EPOCH", "Hen_random_EPOCH"}, {"Cock_random_EPOCH", "Hen_random_EPOCH"}, "Rabbit_EPOCH", "Rabbit_EPOCH", "Rabbit_EPOCH", "Snake_random_EPOCH", "Snake2_random_EPOCH", {"Fin_random_EPOCH", "Alsatian_Random_EPOCH"}};
|
||||
|
||||
// Player specific configs
|
||||
playerDeathScreen = "TapOut";
|
||||
playerKilledScreen = "TapOut2";
|
||||
|
@ -1 +1 @@
|
||||
build=583;
|
||||
build=589;
|
||||
|
@ -1 +1 @@
|
||||
build=583;
|
||||
build=589;
|
||||
|
@ -1 +1 @@
|
||||
build=583;
|
||||
build=589;
|
||||
|
@ -1 +1 @@
|
||||
build=583;
|
||||
build=589;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user