diff --git a/Changelogs/0.3.6.0.txt b/Changelogs/0.3.6.0.txt index 742f3668..6d0bf63c 100644 --- a/Changelogs/0.3.6.0.txt +++ b/Changelogs/0.3.6.0.txt @@ -2,9 +2,10 @@ [Added] Added ability to sell Primary weapon from hands and empty backpacks. Thanks to @He-Man [Changed] Increased max player load 2x to compensate for the new stamina system in 1.54. [Changed] Increased backpack storage limits to allow carrying long weapons. +[Fixed] Updated Epoch armor stats UI system to support new changes since 1.54. [Fixed] Changes to default Arma weapon configs to allow long (Lynx,etc) weapons to be stored in backpacks. [Fixed] Unable to sell after attempting to sell a temporary vehicle. Thanks to @He-Man -[Fixed] Updated Hitpoints to 1.54 for all custom Epoch characters, this fixes the hitpoint .rpt errors since 1.54 as well. +[Fixed] Updated Hitpoints for all custom Epoch characters, fixes the hitpoint .rpt errors since 1.54. [Fixed] Reduce run speed of Sappers since 1.54 update. [Fixed] Wood tower "add/remove wall" options are now only available when build mode is enabled. diff --git a/Sources/epoch_code/compile/environment/EPOCH_client_bitePlayer.sqf b/Sources/epoch_code/compile/environment/EPOCH_client_bitePlayer.sqf index 256b344c..9c7cfd05 100644 --- a/Sources/epoch_code/compile/environment/EPOCH_client_bitePlayer.sqf +++ b/Sources/epoch_code/compile/environment/EPOCH_client_bitePlayer.sqf @@ -1,21 +1,44 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Performs damage related effects + + 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/master/Sources/epoch_code/compile/environment/EPOCH_client_bitePlayer.sqf + + Example: + [cursorTarget,_index] call EPOCH_upgradeBUILD; + + Parameter(s): + _this: OBJECT - Player + + Returns: + NOTHING +*/ if !(isNull _this && alive _this) then { - + _distance = 5; _toxicChance = 0.1; _bleedChance = 1; _bloodpChance = 0; _fatigueChance = 0.1; - + _bleedAmount = 30; _bloodpAmount = 2; - + _soundEffect = -1; _soundEffectGlobal = false; _canSee = false; _ppEffect = 0; switch (typeOf _this) do { - case "Snake_random_EPOCH": { + case "Snake_random_EPOCH": { _distance = 3; _toxicChance = 0.2; _bloodpChance = 1; @@ -123,4 +146,4 @@ if !(isNull _this && alive _this) then { player setFatigue 1; }; }; -}; \ No newline at end of file +}; diff --git a/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf b/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf index 8cf594c8..89414573 100644 --- a/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf +++ b/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf @@ -1,3 +1,26 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Triggers earthquake with increasing intensity the closer the player + + 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/master/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf + + Example: + _location call EPOCH_client_earthQuake + + Parameter(s): + _this: ARRAY - Locaton of epicenter + + Returns: + Script handle +*/ _epicenter = _this; _distance = player distance _epicenter; _intensity = 1; @@ -12,4 +35,4 @@ if (_distance < 250) then { }; }; }; -_intensity spawn BIS_fnc_earthQuake; \ No newline at end of file +_intensity spawn BIS_fnc_earthQuake; diff --git a/Sources/epoch_code/compile/environment/EPOCH_client_loadAnimalBrain.sqf b/Sources/epoch_code/compile/environment/EPOCH_client_loadAnimalBrain.sqf index 6cde01fe..17afd304 100644 --- a/Sources/epoch_code/compile/environment/EPOCH_client_loadAnimalBrain.sqf +++ b/Sources/epoch_code/compile/environment/EPOCH_client_loadAnimalBrain.sqf @@ -1,3 +1,26 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Creates animals with custom Epoch fsm AI "brain" + + 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/master/Sources/epoch_code/compile/environment/EPOCH_client_loadAnimalBrain.sqf + + Example: + call EPOCH_client_loadAnimalBrain; + + Parameter(s): + None + + Returns: + NOTHING +*/ private["_fightOrFlight", "_id", "_animal", "_tryAnimalPos", "_animalPos", "_randomIndex", "_randomAIClass", "_aiTables", "_plyrPos"]; if (count(player nearEntities["Animal_Base_F", 200]) >= 1) exitWith{}; diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_Interface_interact.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_Interface_interact.sqf deleted file mode 100644 index 9811089a..00000000 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_Interface_interact.sqf +++ /dev/null @@ -1,75 +0,0 @@ -disableSerialization; -// diag_log format["DEBUG INTERACT: %1", _this]; - -_control = _this select 0; -_prevIndex = _this select 1; - -_selected = (_control lbValue _prevIndex); -_data = (_control lbData _prevIndex); - -// diag_log format["DEBUG INTERACT SELECTED: %1 DATA: %2", _selected, _data]; - -lbClear 1700; - - -_selectedInteractID = format["%1_%2",_data,_selected]; - -if (_data == "Shop") exitWith { - _shopArray = getArray (configFile >> "CfgInteract" >> _selectedInteractID >> "shop"); - _dt = [format["START SHOP DIALOG: %1", _shopArray], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; - closeDialog 0; -}; - - -if (_data == "Mission") exitWith { - _missionArray = getArray (configFile >> "CfgInteract" >> _selectedInteractID >> "mission"); - _dt = [format["START MISSION DIALOG: %1", _missionArray], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; - closeDialog 0; -}; - -_responseArray = getArray (configFile >> "CfgInteract" >> _selectedInteractID >> "responseNPC"); - -if !(_responseArray isEqualTo []) then { - _response = (_responseArray select floor(random(count _responseArray))); - if (_response != "") then { - _dt = [format["%1", _response], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; - }; -}; - -// diag_log format["DEBUG INTERACT _interactID: %1", _selectedInteractID]; - - -_dataArray = getArray (configFile >> "CfgInteract" >> _selectedInteractID >> "interactMenu"); -{ - _interactSecondID = format["Interact_%1", _x]; - _interactName = getText (configFile >> "CfgInteract" >> _interactSecondID >> "interactName"); - _index = lbAdd[1700,_interactName]; - - - lbSetValue [1700, _index, _x]; - lbSetData [1700, _index,"Interact"]; -}forEach _dataArray; - - - -_dataArray = getArray (configFile >> "CfgInteract" >> _selectedInteractID >> "missionMenu"); -{ - _interactSecondID = format["Mission_%1", _x]; - _interactName = getText (configFile >> "CfgInteract" >> _interactSecondID >> "interactName"); - _index = lbAdd[1700,_interactName]; - - lbSetValue [1700, _index, _x]; - lbSetData [1700, _index,"Mission"]; -}forEach _dataArray; - - - -_dataArray = getArray (configFile >> "CfgInteract" >> _selectedInteractID >> "shopMenu"); -{ - _interactSecondID = format["Shop_%1", _x]; - _interactName = getText (configFile >> "CfgInteract" >> _interactSecondID >> "interactName"); - _index = lbAdd[1700,_interactName]; - - lbSetValue [1700, _index, _x]; - lbSetData [1700, _index,"Shop"]; -}forEach _dataArray; \ No newline at end of file diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf index c0341471..98ccf344 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf @@ -1,4 +1,31 @@ -private["_dikCode", "_handled"]; +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Key Down EH functions + + 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/master/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf + + Example: + _this call EPOCH_KeyDown; + + Parameter(s): + _this select 0: CONTROL - _display + _this select 1: NUMBER - _dikcode + _this select 2: BOOL - Shift State + _this select 3: BOOL - Ctrl State + _this select 4: BOOL - Alt State + + Returns: + BOOL +*/ +private["_handled"]; params ["_display","_dikCode","_shift","_ctrl","_alt"]; _handled = false; diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyUp.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyUp.sqf index ed0c7304..5843327c 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyUp.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyUp.sqf @@ -1,4 +1,31 @@ -private["_dikCode", "_handled"]; +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Key Up EH functions + + 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/master/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyUp.sqf + + Example: + _this call EPOCH_KeyUp; + + Parameter(s): + _this select 0: CONTROL - _display + _this select 1: NUMBER - _dikcode + _this select 2: BOOL - Shift State + _this select 3: BOOL - Ctrl State + _this select 4: BOOL - Alt State + + Returns: + BOOL +*/ +private["_handled"]; params ["_display","_dikCode","_shift","_ctrl","_alt"]; _handled = false; @@ -11,4 +38,3 @@ if (_dikCode == EPOCH_keysAction) then { _handled - diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_onChar.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_onChar.sqf index e8ca86f4..807ac895 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_onChar.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_onChar.sqf @@ -1,3 +1,27 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + removes any non numeric chars and inforce number to max limit to a control. + + 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/master/Sources/epoch_code/compile/interface_event_handlers/EPOCH_onChar.sqf + + Example: + [_control,_maxLimit] call EPOCH_onChar; + + Parameter(s): + _this select 0: CONTROL - _display + _this select 0: NUMBER - max limit + + Returns: + NOTHING +*/ _control = _this select 0; _textArr = toArray(ctrlText(_control select 0)); { @@ -9,4 +33,4 @@ if (count _textArr > 10) then { _textArr resize 10; }; _num = parseNumber(toString _textArr) min (_this select 1); -(_control select 0) ctrlSetText str(_num); \ No newline at end of file +(_control select 0) ctrlSetText str(_num); diff --git a/Sources/epoch_code/compile/inventory/EPOCH_factorArmor.sqf b/Sources/epoch_code/compile/inventory/EPOCH_factorArmor.sqf index 5e71f4e1..c0b4bb0d 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_factorArmor.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_factorArmor.sqf @@ -1,3 +1,27 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Gear Armor factor for passThrough calculation with support for A3 1.54+. + + 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/master/Sources/epoch_code/compile/inventory/EPOCH_factorArmor.sqf + + Example: + _gearArmor = ([_passThrough,_armor] call EPOCH_factorArmor); + + Parameter(s): + _this select 0: NUMBER - passThrough + _this select 1: NUMBER - armor + + Returns: + NUMBER +*/ private ["_passThrough","_armor","_factor"]; _passThrough = _this select 0; _armor = _this select 1; diff --git a/Sources/epoch_code/compile/inventory/EPOCH_gearArmorCalc.sqf b/Sources/epoch_code/compile/inventory/EPOCH_gearArmorCalc.sqf index ce074dd5..3320b9be 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_gearArmorCalc.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_gearArmorCalc.sqf @@ -1,4 +1,32 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Gear armor calculation with support for A3 1.54+. + + 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/master/Sources/epoch_code/compile/inventory/EPOCH_gearArmorCalc.sqf + + Example: + _vestArmor = (vest player) call EPOCH_gearArmorCalc; + + Parameter(s): + _this select 0: STRING - Vest or Headhear classname + + Returns: + NUMBER +*/ private ["_passThrough","_armor"]; -_passThrough = getNumber(configFile >> "CfgWeapons" >> _this >> "ItemInfo" >> "passThrough"); -_armor = getNumber(configFile >> "CfgWeapons" >> _this >> "ItemInfo" >> "armor"); -([_passThrough,_armor] call EPOCH_factorArmor) +_gearConfig = (configfile >> "CfgWeapons" >> _this); +_passThrough = getNumber(_gearConfig >> "ItemInfo" >> "passThrough"); +_armor = getNumber(_gearConfig >> "ItemInfo" >> "armor"); +_gearArmor = ([_passThrough,_armor] call EPOCH_factorArmor); +{ + _gearArmor = _gearArmor + ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor) +} forEach ("isClass _x" configclasses (_gearConfig >> "ItemInfo" >> "HitpointsProtectionInfo")); +_gearArmor diff --git a/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf b/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf index 4e444fc3..5f96bcdd 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf @@ -1,3 +1,28 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Init epoch gear armor stats. + + 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/master/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf + + Example: + player addEventHandler ["InventoryOpened", { + _this spawn EPOCH_initUI; + }]; + + Parameter(s): + None + + Returns: + NOHTING +*/ private ["_bar","_uniformArmor","_totalArmor","_finalArmor","_vestArmor","_headgearArmor","_bar_pos","_bar_compare","_color","_colorCompare","_display","_totalArmorMax"]; disableSerialization; diff --git a/Sources/epoch_code/compile/inventory/EPOCH_maxArmorInit.sqf b/Sources/epoch_code/compile/inventory/EPOCH_maxArmorInit.sqf index 7eebe3eb..5d78e337 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_maxArmorInit.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_maxArmorInit.sqf @@ -1,11 +1,31 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Gear armor max armor calculation with support for A3 1.54+. + + 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/master/Sources/epoch_code/compile/inventory/EPOCH_maxArmorInit.sqf + + Example: + call EPOCH_maxArmorInit; + + Parameter(s): + None + + Returns: + NOTHING +*/ private ["_tempArmor","_maxArmorUniform","_curArmor","_maxArmorVest","_maxArmorHeadgear"]; _maxArmorUniform = 0; { - - _tempArmor = 0; - {_tempArmor = _tempArmor + ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor)} forEach ("isClass _x" configclasses (_x >> "HitPoints")); - _curArmor = ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor) + getNumber(_x >> 'armorStructural') + _tempArmor; - + _curArmor = ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor) + getNumber(_x >> 'armorStructural'); + {_curArmor = _curArmor + ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor)} forEach ("isClass _x" configclasses (_x >> "HitPoints")); if (_curArmor > _maxArmorUniform) then { _maxArmorUniform = _curArmor; }; @@ -14,6 +34,7 @@ _maxArmorUniform = 0; _maxArmorVest = 0; { _curArmor = ([getNumber(_x >> 'itemInfo' >> 'passThrough'),getNumber(_x >> 'itemInfo' >> 'armor')] call EPOCH_factorArmor); + {_curArmor = _curArmor + ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor)} forEach ("isClass _x" configclasses (_x >> "ItemInfo" >> "HitpointsProtectionInfo")); if (_curArmor > _maxArmorVest) then { _maxArmorVest = _curArmor; }; @@ -22,6 +43,7 @@ _maxArmorVest = 0; _maxArmorHeadgear = 0; { _curArmor = ([getNumber(_x >> 'itemInfo' >> 'passThrough'),getNumber(_x >> 'itemInfo' >> 'armor')] call EPOCH_factorArmor); + {_curArmor = _curArmor + ([getNumber(_x >> 'passThrough'),getNumber(_x >> 'armor')] call EPOCH_factorArmor)} forEach ("isClass _x" configclasses (_x >> "ItemInfo" >> "HitpointsProtectionInfo")); if (_curArmor > _maxArmorHeadgear) then { _maxArmorHeadgear = _curArmor; }; diff --git a/Sources/epoch_code/compile/inventory/EPOCH_refeshUI.sqf b/Sources/epoch_code/compile/inventory/EPOCH_refeshUI.sqf index 693a9250..5f86e837 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_refeshUI.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_refeshUI.sqf @@ -1,3 +1,26 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Gear armor stats UI refresh code + + 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/master/Sources/epoch_code/compile/inventory/EPOCH_refeshUI.sqf + + Example: + 0 call EPOCH_refeshUI; + + Parameter(s): + None + + Returns: + NOTHING +*/ private ["_newArmor","_totalArmor","_totalArmorMax","_selectedClass","_selectedItem","_bar","_uniformArmor","_finalArmor","_vestArmor","_headgearArmor","_totalArmorUI","_bar_compare"]; disableSerialization; if (!isNull findDisplay 602) then { @@ -62,5 +85,4 @@ if (!isNull findDisplay 602) then { _bar_compare = _totalArmorUI select 1; _finalArmor = linearConversion [0,_totalArmorMax,_newArmor,0.01,1,true]; _bar_compare progressSetPosition _finalArmor; - }; diff --git a/Sources/epoch_code/compile/inventory/EPOCH_uniformArmorCalc.sqf b/Sources/epoch_code/compile/inventory/EPOCH_uniformArmorCalc.sqf index c73ba0a1..37fb02fd 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_uniformArmorCalc.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_uniformArmorCalc.sqf @@ -1,3 +1,26 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Uniform Gear armor calculation + + 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/master/Sources/epoch_code/compile/inventory/EPOCH_uniformArmorCalc.sqf + + Example: + _newArmor = _selectedClass call EPOCH_uniformArmorCalc; + + Parameter(s): + _this: STRING - CfgWeapons class name of uniform + + Returns: + NUMBER +*/ private ["_uniformClass","_uniformArmor","_uniformConfig","_uniformArmorStructural"]; _uniformClass = _this;