mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
commit
3ad650c95b
21
Changelogs/0.3.6.0.txt
Normal file
21
Changelogs/0.3.6.0.txt
Normal file
@ -0,0 +1,21 @@
|
||||
**Client**
|
||||
[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] cursorTarget function to only use new Epoch method while underwater. Should help with targeting issues on land.
|
||||
[Fixed] Canceling build mode did not remove the ghost object as it should have.
|
||||
[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 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.
|
||||
|
||||
**Server**
|
||||
[Fixed] Typo in server side AH event handler code and repacked a3_server_settings.pbo.
|
||||
[Fixed] Storage was incorrectly set to set damage to 99% instead of 1% to temp force maintenance option after restart.
|
||||
[Fixed] Add player objects to remains collector, this should allow for proper corpse cleanup.
|
||||
[Changed] Weapons will now only spawn with a single magazine and a random ammo count.
|
||||
[Changed] Magazines now spawn with a random ammo count.
|
||||
[Changed] Disable simulation of locked storage devices. This also prevents removal of items until device is unlocked/re-simulated.
|
||||
[Info] Removed old .bikey and added new one for 0360.
|
7
Changelogs/0.3.7.0.txt
Normal file
7
Changelogs/0.3.7.0.txt
Normal file
@ -0,0 +1,7 @@
|
||||
WIP
|
||||
[Added] Hotwire Kit
|
||||
[Added] Key Makers Kit
|
||||
[Added] Keys in colors: (Black,Red,Green,Blue,Yellow)
|
||||
[Added] 55 Gallon Fuel Barrel (Full/Empty)
|
||||
[Added] Metal Pipes
|
||||
[Added] Documents (Trash,Vehicle Upgrades)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Server_Install_Pack/keys/epoch0360.bikey
Normal file
BIN
Server_Install_Pack/keys/epoch0360.bikey
Normal file
Binary file not shown.
@ -1,14 +1,14 @@
|
||||
// EPOCH SERVER CONFIG
|
||||
|
||||
// GLOBAL SETTINGS
|
||||
hostname = "EpochMod.com (0.3.3.1|1.50) ID02 YourHost";
|
||||
hostname = "EpochMod.com (0.3.6|1.54) ID02 YourHost";
|
||||
password = "";
|
||||
passwordAdmin = "!CHANGE_THIS_PASSWORD!";
|
||||
serverCommandPassword = "!CHANGE_THIS_PASSWORD!";
|
||||
logFile = "A3Master.log";
|
||||
verifySignatures = 2;
|
||||
BattlEye = 1;
|
||||
requiredBuild = 131696;
|
||||
requiredBuild = 133570;
|
||||
|
||||
// WHITELIST FILE TYPES
|
||||
allowedLoadFileExtensions[] = {:};
|
||||
|
@ -1,3 +0,0 @@
|
||||
All content in this PBO was made exclusively for A3 Epoch mod.
|
||||
|
||||
To use/edit/distribute any of the content in this mod please contact vbawol@veteranbastards.com or ptomany@gmail.com
|
@ -931,7 +931,7 @@ class FSM
|
||||
" }forEach EPOCH_playerHitPoints;" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"[] spawn EPOCH_masterLoop_v2;" \n
|
||||
"[] spawn EPOCH_masterLoop;" \n
|
||||
"true call EPOCH_fnc_Weather;" \n
|
||||
"[5,100] spawn EPOCH_niteLight;" \n
|
||||
"" \n
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch request teleport
|
||||
|
||||
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/EPOCH_EnterBuilding.sqf
|
||||
*/
|
||||
if !(isNull _this) then{
|
||||
EPOCH_oneWayTP = [player,_this,Epoch_personalToken];
|
||||
publicVariableServer "EPOCH_oneWayTP";
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Request loot event and setup mirror
|
||||
|
||||
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/EPOCH_LootIT.sqf
|
||||
*/
|
||||
if (!isNull _this) then {
|
||||
EPOCH_lootContainer = [_this,player,Epoch_personalToken];
|
||||
publicVariableServer "EPOCH_lootContainer";
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Tells server when a radio is equpped for use with custom radio channels
|
||||
|
||||
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/EPOCH_PutHandler.sqf
|
||||
*/
|
||||
private ["_femaleVariant","_vest","_class","_config","_woman","_maleVariant"];
|
||||
_class = _this select 2;
|
||||
//Radio Check
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Quick take concept for underwater looting
|
||||
|
||||
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/EPOCH_QuickTakeAll.sqf
|
||||
*/
|
||||
closeDialog 0;
|
||||
{
|
||||
_magazines = magazinesAmmoCargo _x;
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Quick take load function concept for underwater looting
|
||||
|
||||
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/EPOCH_QuickTakeLoad.sqf
|
||||
*/
|
||||
createDialog "QuickTake";
|
||||
{
|
||||
_magazines = magazinesAmmoCargo _x;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
test code to spawn trader milita (unused)
|
||||
|
||||
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/EPOCH_SpawnTraderMiltia.sqf
|
||||
*/
|
||||
|
||||
//Make _trgt = trader and join militia to traders group
|
||||
_trgt = player;
|
||||
_nrBuilds = nearestObjects [getPosATL _trgt,["house"],50];
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Unisex check for vests, gives swing ammo and performs radio changed check
|
||||
|
||||
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/EPOCH_UnisexCheck.sqf
|
||||
*/
|
||||
private ["_femaleVariant","_vest","_class","_config","_woman","_maleVariant"];
|
||||
_woman = getNumber(configFile >> "CfgVehicles" >> (typeOf player) >> "woman");
|
||||
_class = _this select 2;
|
||||
|
@ -1,5 +1,16 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
A3 Epoch Anti-Vehicle Wall glitch
|
||||
|
||||
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/EPOCH_antiWall.sqf
|
||||
*/
|
||||
_vehicle = _this select 0;
|
||||
_position = _this select 1;
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
A3 Epoch call sapper migration
|
||||
|
||||
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/EPOCH_callSapperMigration.sqf
|
||||
*/
|
||||
private["_notReady","_abortAfter","_start","_finish","_dirTo","_nrPlyrs","_i","_pos","_trgt","_sapperCount"];
|
||||
_disableAI = {
|
||||
{_this disableAI _x}forEach["TARGET","AUTOTARGET","FSM"];
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch Chopwood function
|
||||
|
||||
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/EPOCH_chopWood.sqf
|
||||
*/
|
||||
|
||||
private["_currentPos", "_object", "_type", "_objects", "_sel_object"];
|
||||
|
||||
_currentPos = player modelToWorld[0, 5, 0];
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch consume item function
|
||||
|
||||
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/EPOCH_consumeItem.sqf
|
||||
*/
|
||||
private ["_type","_interactOption","_previewClass","_object","_isStorage","_isOk","_buildClass","_vehicle","_currentFuel","_canCapacity","_fuelCapacity","_newFuel","_vehicles","_highestDMG","_currentHIT","_currentDMG","_newDMG","_paintCanIndex","_paintCanColor","_msg","_color","_text","_item","_pic","_removeItem"];
|
||||
|
||||
_text = EPOCH_InteractedItem select 0;
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch debug monitor
|
||||
|
||||
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/EPOCH_debugMonitor.sqf
|
||||
*/
|
||||
private["_hours"];
|
||||
_hours = floor(servertime/60/60);
|
||||
|
||||
@ -57,4 +71,3 @@ hintSilent parseText format ["
|
||||
round((serverTime/60)-(_hours*60)),
|
||||
if (typeName EPOCH_diag_fps == "SCALAR") then [{EPOCH_diag_fps},{"MANIPULATED"}]
|
||||
];
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch display kyrpto changes
|
||||
|
||||
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/EPOCH_effectCrypto.sqf
|
||||
*/
|
||||
if (typeName _this == "SCALAR") then {
|
||||
EPOCH_playerCrypto = _this;
|
||||
9992 cutRsc["EpochGameUI2", "PLAIN", 2, false];
|
||||
|
@ -1,4 +1,17 @@
|
||||
// EPOCH fishing
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch fishing function
|
||||
|
||||
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/EPOCH_fish.sqf
|
||||
*/
|
||||
private ["_bob","_fishes","_fish","_randomChance","_bobber","_nearByBobbers","_objects","_currentPos"];
|
||||
|
||||
_currentPos = player modelToWorld[0, 5 + (random 5), 0];
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch handle localized message function
|
||||
|
||||
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/EPOCH_handleServerMessage.sqf
|
||||
*/
|
||||
if (isLocalized (_this select 0)) then{
|
||||
_dt = [format["<t size = ""0.8"" shadow = ""0"" color = ""#99ffffff"">%1</t>", format[localize (_this select 0), _this select 1]], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
|
@ -1,4 +1,17 @@
|
||||
// store all interacted vehicles for update
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
store all interacted vehicles for update
|
||||
|
||||
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/EPOCH_interact.sqf
|
||||
*/
|
||||
private ["_vehSlot"];
|
||||
0 call EPOCH_refeshUI;
|
||||
if (!isNull _this) then {
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Request trash loot event
|
||||
|
||||
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/EPOCH_lootTrash.sqf
|
||||
*/
|
||||
private["_found", "_return", "_foundLocalAnimal", "_str", "_blood", "_foundTerminal", "_index"];
|
||||
|
||||
_return = false;
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Request mine rocks and scrap metal
|
||||
|
||||
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/EPOCH_mineRocks.sqf
|
||||
*/
|
||||
private ["_object","_foundIndex","_found","_str","_objects","_lootables","_currentPos","_p3dName","_findStart","_config","_cinderList","_rocksList"];
|
||||
|
||||
if ((diag_tickTime - EPOCH_lastMineRocks) >= 2) then {
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
setup nightlight to provide improved night vision
|
||||
|
||||
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/EPOCH_niteLight.sqf
|
||||
*/
|
||||
private ["_pos"];
|
||||
|
||||
if (!isNull EP_light) then {
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
code that executes onEachFrame is used for 3d movment, ESP, and 3d icons.
|
||||
|
||||
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/EPOCH_onEachFrame.sqf
|
||||
*/
|
||||
if (EPOCH_velTransform) then {
|
||||
if (EPOCH_playerEnergy > 0) then {
|
||||
_pos1 = getPosASL EPOCH_target;
|
||||
@ -113,7 +127,7 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
|
||||
if (_stability == 0) then {
|
||||
switch EPOCH_buildOption do {
|
||||
case 0: {EPOCH_stabilityTarget call EPOCH_removeBUILD};
|
||||
case 1: {EPOCH_stabilityTarget call EPOCH_upgradeBUILDv2};
|
||||
case 1: {EPOCH_stabilityTarget call EPOCH_upgradeBUILD};
|
||||
case 2: {EPOCH_stabilityTarget call EPOCH_fnc_SelectTargetBuild};
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
test code to replace string in word (old)
|
||||
|
||||
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/EPOCH_replaceWord.sqf
|
||||
*/
|
||||
private["_nextChar2", "_nextChar1", "_nextChar", "_replaceArray", "_STRING", "_needle", "_replace"];
|
||||
_replaceArray = [];
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors: Aaron Clark
|
||||
|
||||
Description:
|
||||
Spawn drone function
|
||||
|
||||
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/EPOCH_supportCopter.sqf
|
||||
*/
|
||||
private["_pos","_copter","_plyr","_unit","_copterSupportGrp","_arrUnits","_arrSkills","_aiskill"];
|
||||
_pos = _this select 0;
|
||||
_copter = _this select 1;
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Antagonist spawn function
|
||||
|
||||
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/EPOCH_unitSpawn.sqf
|
||||
*/
|
||||
private ["_unit","_group","_bomb","_unitClass","_targetPos","_disableAI","_nonJammer","_nonTrader","_jammerRange","_jammers","_restricted","_sapperNum"];
|
||||
|
||||
_unitClass = _this;
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Antagonist spawn chance decrease function
|
||||
|
||||
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/EPOCH_unitSpawnDecrease.sqf
|
||||
*/
|
||||
_index = EPOCH_spawnIndex find _this;
|
||||
if (_index != -1) then{
|
||||
EPOCH_playerSpawnArray set[_index, ((EPOCH_playerSpawnArray select _index) - 1) max 0];
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Antagonist spawn chance increase function
|
||||
|
||||
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/EPOCH_unitSpawnIncrease.sqf
|
||||
*/
|
||||
_index = EPOCH_spawnIndex find _this;
|
||||
if (_index != -1) then{
|
||||
EPOCH_playerSpawnArray set[_index, ((EPOCH_playerSpawnArray select _index) + 1) min (EPOCH_spawnLimits select _index)];
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Niklas Wagner - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Update loading screen message
|
||||
|
||||
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/EPOCH_updateLoadingScreen.sqf
|
||||
*/
|
||||
disableSerialization;
|
||||
_display = uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull];
|
||||
if (!isNull _display) then {
|
||||
|
@ -1,12 +0,0 @@
|
||||
private["_hitpoints", "_type", "_cachekey", "_na"];
|
||||
_hitpoints = [];
|
||||
if (!isNull _this) then {
|
||||
_type = typeOf _this;
|
||||
_cachekey = format["%1_HP", _type];
|
||||
_hitpoints = missionNamespace getVariable[_cachekey, []];
|
||||
if (_hitpoints isEqualTo []) then {
|
||||
_na = configProperties[configFile >> "CfgVehicles" >> _type >> "HitPoints", "_hitpoints pushBack configName _x; true", true];
|
||||
missionNamespace setVariable[_cachekey, _hitpoints];
|
||||
};
|
||||
};
|
||||
_hitpoints
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Unisex check for vests, gives swing ammo and performs radio changed check
|
||||
|
||||
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/both/EPOCH_isAny.sqf
|
||||
|
||||
Example:
|
||||
_return = [_item, "CfgVehicles"] call EPOCH_fnc_isAny;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: STRING - Parent Class
|
||||
_this select 0: STRING - Child Class
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
private ["_item","_return"];
|
||||
_item = _this select 0;
|
||||
_type = _this select 1;
|
||||
|
@ -1,7 +1,31 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch Change wall state
|
||||
By Aaron Clark
|
||||
|
||||
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/building/EPOCH_changeWallState.sqf
|
||||
|
||||
Example:
|
||||
[_this,"NWall",1] call EPOCH_changeWallState;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
_this select 1: STRING - Name of animation
|
||||
_this select 1: SCALAR - state
|
||||
0: true = add wall
|
||||
1: false = remove wall
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_recipeItem","_recipeQty","_hasRecipeItems","_msg","_recipeCount","_currentCount","_numRemoved","_items","_mags","_dt","_recipe","_craftItem","_craftQty","_config","_objClass","_object","_anim","_state"];
|
||||
_object = param [0,objNull];
|
||||
_anim = param [1,""];
|
||||
_state = param [2,0];
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: Raimonds Virtoss
|
||||
|
||||
Description:
|
||||
Epoch Check build
|
||||
|
||||
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/building/EPOCH_checkBuild.sqf
|
||||
|
||||
Example:
|
||||
cursorTarget call EPOCH_checkBuild;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
|
||||
Returns:
|
||||
ARRAY of BOOLs
|
||||
*/
|
||||
private ["_dt","_out","_object","_objType","_config"];
|
||||
_out = [false, false, false];
|
||||
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ _out };
|
||||
|
@ -1,4 +1,27 @@
|
||||
private["_color", "_distance", "_previous"];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: Raimonds Virtoss
|
||||
|
||||
Description:
|
||||
Epoch build countdown
|
||||
|
||||
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/building/EPOCH_countdown.sqf
|
||||
|
||||
Example:
|
||||
_currentTarget spawn EPOCH_countdown;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_posObj","_savedBuildPos","_previousBuildPos","_saveCheck","_endTime","_worldspace","_class","_newObj","_startTime","_objClass"];
|
||||
|
||||
if (!isNull _this) then {
|
||||
|
||||
|
@ -1,20 +1,40 @@
|
||||
private [];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: Raimonds Virtoss
|
||||
|
||||
Description:
|
||||
Epoch build select target
|
||||
|
||||
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/building/EPOCH_fnc_SelectTargetBuild.sqf
|
||||
|
||||
Example:
|
||||
cursorTarget call EPOCH_fnc_SelectTargetBuild;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
private ["_targeter","_stability","_dt","_object"];
|
||||
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ false };
|
||||
|
||||
if !(isNull EPOCH_Target) exitWith{ false };
|
||||
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; false };
|
||||
|
||||
_object = _this;
|
||||
params ["_object"];
|
||||
|
||||
EPOCH_buildOption = 2;
|
||||
|
||||
if (isNull _object) exitWith{ false };
|
||||
if ((player distance _object) > 9) exitWith { false };
|
||||
|
||||
if (!(_object isKindOf "ThingX") && !(_object isKindOf "Constructions_static_F") && !(_object isKindOf "Constructions_foundation_F")) exitWith{ false };
|
||||
|
||||
|
||||
// check if another player has target
|
||||
_targeter = _object getVariable["last_targeter", objNull];
|
||||
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: Raimonds Virtoss
|
||||
|
||||
Description:
|
||||
check if building is allowed
|
||||
|
||||
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/building/EPOCH_isBuildAllowed.sqf
|
||||
|
||||
Example:
|
||||
_isAllowed = "" call EPOCH_isBuildAllowed;
|
||||
_isAllowed = _objType call EPOCH_isBuildAllowed;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
private ["_buildingAllowed","_jammer","_restricted","_restrictedLocations","_myPosATL"];
|
||||
_buildingAllowed = true;
|
||||
_ownedJammerExists = false;
|
||||
@ -10,14 +34,17 @@ _buildingCountLimit = getNumber(_config >> "buildingCountLimit");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
|
||||
|
||||
_staticClass = getText(configfile >> "CfgVehicles" >> _this >> "staticClass");
|
||||
_simulClass = getText(configfile >> "CfgVehicles" >> _this >> "simulClass");
|
||||
// input
|
||||
params ["_objType"];
|
||||
|
||||
_staticClass = getText(configfile >> "CfgVehicles" >> _objType >> "staticClass");
|
||||
_simulClass = getText(configfile >> "CfgVehicles" >> _objType >> "simulClass");
|
||||
_bypassJammer = getNumber(configfile >> "CfgVehicles" >> _staticClass >> "bypassJammer");
|
||||
|
||||
// Jammer
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _buildingJammerRange*3];
|
||||
if !(_jammer isEqualTo []) then {
|
||||
if (_this in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
if (_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
{
|
||||
if (alive _x) exitWith{
|
||||
_buildingAllowed = false;
|
||||
@ -64,7 +91,7 @@ if !(_buildingAllowed)exitWith{ false };
|
||||
|
||||
// require jammer check if not found as owner of jammer
|
||||
if (getNumber(_config >> "buildingRequireJammer") == 0 && _bypassJammer == 0) then{
|
||||
if !(_this in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
if !(_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
_buildingAllowed = _ownedJammerExists;
|
||||
if !(_buildingAllowed) then {
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Building Disallowed: Frequency Jammer Needed</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
|
@ -1,4 +1,27 @@
|
||||
private["_jammed", "_jammer"];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Base building object lock check 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/building/EPOCH_lockCheck.sqf
|
||||
|
||||
Example:
|
||||
call EPOCH_lockCheck
|
||||
|
||||
Parameter(s):
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
private ["_jammed","_jammer","_buildingJammerRange","_config"];
|
||||
_config = "CfgEpochClient" call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Base building maintain base 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/building/EPOCH_maintainIT.sqf
|
||||
|
||||
Example:
|
||||
cursorTarget call EPOCH_maintainIT;
|
||||
|
||||
Parameter(s):
|
||||
_this: OBJECT - Base building object ("Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Constructions_lockedstatic_F")
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_dt","_buildingJammerRange","_maintainCount","_rnd","_config"];
|
||||
if !(isNil "EPOCH_maintainLockout") exitWith {_dt = ["<t size=""0.8"" shadow=""0"" color=""#99ffffff"">Already Maintaining a base.</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;};
|
||||
if (EPOCH_playerCrypto > 0) then {
|
||||
_config = "CfgEpochClient" call EPOCH_returnConfig;
|
||||
|
@ -1,4 +1,27 @@
|
||||
private["_buildingAllowed", "_jammer", "_restricted", "_restrictedLocations", "_myPosATL"];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Base building maintain base 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/building/EPOCH_removeBUILD.sqf
|
||||
|
||||
Example:
|
||||
cursorTarget call EPOCH_removeBUILD;
|
||||
|
||||
Parameter(s):
|
||||
_this: OBJECT - Base building object
|
||||
|
||||
Returns:
|
||||
BOOL - true if removed
|
||||
*/
|
||||
private ["_buildingAllowed","_jammer","_buildingJammerRange","_buildingCountLimit","_dt","_nearestJammer","_ownedJammerExists","_return","_config","_objType","_object","_targeter","_stability","_removeParts"];
|
||||
_buildingAllowed = true;
|
||||
_ownedJammerExists = false;
|
||||
_nearestJammer = objNull;
|
||||
@ -12,7 +35,7 @@ if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
|
||||
|
||||
EPOCH_buildOption = 0;
|
||||
|
||||
_object = _this;
|
||||
params ["_object"];
|
||||
_objType = typeOf _object;
|
||||
|
||||
// check if another player has target
|
||||
|
@ -1,8 +1,30 @@
|
||||
private [
|
||||
"_cfgClass","_class","_worldspace","_objSlot","_newObj","_playerOffset","_bbr","_p1","_p2","_maxWidth","_maxLength","_maxHeight","_pos2","_vel2","_dir2","_up2","_pos1","_vel1","_dir1","_up1","_interval","_velocityTransformation","_object","_status","_return","_oemType","_config","_currentTarget"];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Base building base building with physics
|
||||
|
||||
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/building/EPOCH_simulSwap.sqf
|
||||
|
||||
Example:
|
||||
[_object] spawn EPOCH_simulSwap;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_class","_worldspace","_objSlot","_newObj","_pos2","_vel2","_dir2","_up2","_velocityTransformation","_object","_return","_oemType","_config","_currentTarget","_dt","_energyCost","_allowedSnapObjects","_textureSlot","_lastCheckTime","_rejectMove","_nearestObject","_nearestObjectRaw","_distanceNear","_previousDistanceNear","_pOffset","_snapPos","_isSnap","_snapPosition","_snapType","_snapDistance","_prevSnapDistance","_snapPointsPara","_snapPointsPerp","_snapArrayPara","_snapArrayPerp","_direction","_distance","_plyrdistance","_create","_allowedSnapPoints","_snapObjects","_onContactEH","_offset","_disallowed","_objType","_distanceMod"];
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{};
|
||||
|
||||
_object = _this select 0;
|
||||
_object = param [0,objNull];
|
||||
if (isNull _object) exitWith{ EPOCH_target = objNull; };
|
||||
|
||||
_objType = typeOf _object;
|
||||
@ -174,7 +196,7 @@ if (isText(_config)) then {
|
||||
if (_direction < 0) then {
|
||||
_direction = 360 + _direction;
|
||||
};
|
||||
_dir2 = [vectorDir _nearestObject, _direction] call EPOCH_returnVector;
|
||||
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
|
||||
_up2 = (vectorUp _nearestObject);
|
||||
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
|
||||
};
|
||||
@ -183,11 +205,11 @@ if (isText(_config)) then {
|
||||
if !(surfaceIsWater _pos2) then {
|
||||
_pos2 = ATLtoASL _pos2;
|
||||
};
|
||||
if (EPOCH_space) then {
|
||||
if (EPOCH_doRotate) then {
|
||||
_vel2 = (velocity player);
|
||||
_dir2 = [vectorDir player, EPOCH_buildDirection] call EPOCH_returnVector;
|
||||
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
|
||||
_up2 = (vectorUp player);
|
||||
EPOCH_space = false;
|
||||
EPOCH_doRotate = false;
|
||||
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
|
||||
} else {
|
||||
EP_velocityTransformation = [];
|
||||
|
@ -1,9 +1,38 @@
|
||||
private["_allowedSnapObjects", "_currentZoffset", "_nearestObject", "_pOffset", "_snapPos", "_snapPosition", "_snapType", "_snapDistance", "_prevSnapDistance", "_pos2", "_dir", "_snapPointsPara", "_snapPointsPerp", "_distance", "_objSlot", "_currentTarget", "_allowedSnapPoints", "_snapObjects", "_class", "_buildingPos"];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Base building base building with ghost preview.
|
||||
|
||||
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/building/EPOCH_simulSwap.sqf
|
||||
|
||||
Example:
|
||||
[_object] spawn EPOCH_simulSwap;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
_this select 1: STRING - Item to consume on build finalization
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_allowedSnapObjects","_nearestObject","_pOffset","_snapPos","_snapPosition","_snapType","_snapDistance","_pos2","_snapPointsPara","_snapPointsPerp","_distance","_objSlot","_currentTarget","_allowedSnapPoints","_class","_dt","_energyCost","_maxHeight","_stabilityCheck","_pos2ATL","_lastCheckTime","_rejectMove","_currentOffSet","_dir2","_up2","_isSnap","_snapPos1","_pos_snapObj","_direction","_pos1_snap","_pos2_snap","_ins","_EPOCH_2","_arr_snapPoints","_pos1","_offSet","_snapConfig","_baselineSnapPos","_nearestObjects","_EPOCH_1","_numberOfContacts","_worldspace","_offsetZPos","_currentPos","_object","_item","_objType","_simulClass","_snapChecks","_maxSnapDistance"];
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{};
|
||||
|
||||
_object = _this select 0;
|
||||
_item = _this select 1;
|
||||
// inputs
|
||||
_object = param [0,objNull];
|
||||
_item = param [1,""];
|
||||
|
||||
// exit if object is nulll
|
||||
if (isNull _object) exitWith{ EPOCH_target = objNull; };
|
||||
// exit if item is not given
|
||||
if (_item == "") exitWith{ EPOCH_target = objNull; };
|
||||
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Need Energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
@ -112,10 +141,10 @@ if (_class != "") then {
|
||||
EPOCH_target attachTo[player];
|
||||
};
|
||||
|
||||
if (EPOCH_space) then {
|
||||
_dir2 = [vectorDir player, EPOCH_buildDirection] call EPOCH_returnVector;
|
||||
if (EPOCH_doRotate) then {
|
||||
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
|
||||
_up2 = (vectorUp player);
|
||||
EPOCH_space = false;
|
||||
EPOCH_doRotate = false;
|
||||
EPOCH_target setVectorDirAndUp [_dir2,_up2];
|
||||
};
|
||||
|
||||
@ -231,7 +260,7 @@ if (_class != "") then {
|
||||
_direction = 360 + _direction;
|
||||
};
|
||||
|
||||
_dir2 = [vectorDir _nearestObject, _direction] call EPOCH_returnVector;
|
||||
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
|
||||
|
||||
if (_pos2 select 2 > _maxHeight) then {
|
||||
_pos2 set[2, _maxHeight];
|
||||
|
@ -1,5 +1,33 @@
|
||||
if (isNull _this) exitWith{ false };
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Base building upgrade 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/building/EPOCH_upgradeBUILD.sqf
|
||||
|
||||
Example:
|
||||
[cursorTarget,_index] call EPOCH_upgradeBUILD;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - Base building object
|
||||
_this select 1: NUMBER - index of array from (CfgBaseBuilding >> "upgradeBuilding")
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_buildingJammerRange","_buildingCountLimit","_nearestJammer","_ownedJammerExists","_buildingAllowed","_dt","_missingCount","_canUpgrade","_missingParts","_part","_req","_partCheck","_canUpgradePartCount","_removedPartCount","_return","_upgrade","_upgradeParts","_config","_upgrades","_object","_index","_targeter","_stability","_jammer"];
|
||||
_return = false;
|
||||
_object = param [0,objNull,[objNull]];
|
||||
_index = param [1,-1,[0]]; //EPOCH_UpgradeIndex
|
||||
if !(_index isEqualTo -1) then {Epoch_upgradeIndex = _index};
|
||||
if (isNull _object) exitWith {false};
|
||||
|
||||
_buildingAllowed = true;
|
||||
_ownedJammerExists = false;
|
||||
@ -14,7 +42,7 @@ if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
|
||||
|
||||
EPOCH_buildOption = 1;
|
||||
|
||||
_object = _this;
|
||||
|
||||
|
||||
// check if another player has target
|
||||
_targeter = _object getVariable["last_targeter", objNull];
|
||||
@ -29,10 +57,6 @@ if (_stability > 0) exitWith{
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _buildingJammerRange];
|
||||
|
||||
if !(_jammer isEqualTo[]) then {
|
||||
@ -54,18 +78,22 @@ if !(_jammer isEqualTo[]) then {
|
||||
};
|
||||
if !(_buildingAllowed)exitWith{ false };
|
||||
|
||||
if (_this isKindOf "Constructions_static_F") then {
|
||||
if (_object isKindOf "Constructions_static_F") then {
|
||||
|
||||
// take upgrade item from player here
|
||||
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
||||
_upgrade = getArray(_config >> (typeOf _this) >> "upgradeBuilding");
|
||||
if !(_upgrade isEqualTo []) then {
|
||||
|
||||
_upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding");
|
||||
if !(_upgrades isEqualTo []) then {
|
||||
|
||||
// get selected upgrade
|
||||
_upgrade = _upgrades param [Epoch_upgradeIndex,[]];
|
||||
|
||||
_upgradeParts = _upgrade select 1;
|
||||
|
||||
_canUpgrade = true;
|
||||
_canUpgradePartCount = 0;
|
||||
_missingParts = [];
|
||||
_missingParts = "";
|
||||
{
|
||||
_part = _x select 0;
|
||||
_req = _x select 1;
|
||||
@ -78,7 +106,7 @@ if (_this isKindOf "Constructions_static_F") then {
|
||||
//diag_log format["DEBUG: _missingCount %1", _missingCount];
|
||||
|
||||
_canUpgrade = false;
|
||||
_missingParts pushBack format["Missing %1 %2", _missingCount, (_part call EPOCH_itemDisplayName)];
|
||||
_missingParts = _missingParts + format["Missing %1 %2, ", _missingCount, (_part call EPOCH_itemDisplayName)];
|
||||
};
|
||||
_canUpgradePartCount = _canUpgradePartCount + _req;
|
||||
} forEach _upgradeParts;
|
||||
@ -96,8 +124,9 @@ if (_this isKindOf "Constructions_static_F") then {
|
||||
|
||||
if (_canUpgradePartCount == _removedPartCount) then {
|
||||
// send to server for upgrade
|
||||
EPOCH_UPBUILD = [_this,player,Epoch_personalToken];
|
||||
EPOCH_UPBUILD = [_object,player,Epoch_upgradeIndex,Epoch_personalToken];
|
||||
publicVariableServer "EPOCH_UPBUILD";
|
||||
Epoch_upgradeIndex = nil;
|
||||
_return = true;
|
||||
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Upgraded</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
|
@ -1,113 +0,0 @@
|
||||
_return = false;
|
||||
_object = param [0,objNull,[objNull]];
|
||||
_index = param [1,-1,[0]]; //EPOCH_UpgradeIndex
|
||||
if !(_index isEqualTo -1) then {Epoch_upgradeIndex = _index};
|
||||
if (isNull _object) exitWith {false};
|
||||
|
||||
_buildingAllowed = true;
|
||||
_ownedJammerExists = false;
|
||||
_nearestJammer = objNull;
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_buildingCountLimit = getNumber(_config >> "buildingCountLimit");
|
||||
|
||||
// defaults
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
|
||||
|
||||
EPOCH_buildOption = 1;
|
||||
|
||||
|
||||
|
||||
// check if another player has target
|
||||
_targeter = _object getVariable["last_targeter", objNull];
|
||||
|
||||
if (!isNull _targeter && _targeter != player && (player distance _object > _targeter distance _object)) exitWith{ EPOCH_stabilityTarget = objNull; false };
|
||||
|
||||
_stability = _object getVariable["stability", 100];
|
||||
if (_stability > 0) exitWith{
|
||||
if (isNull EPOCH_stabilityTarget) then {
|
||||
_object setVariable["last_targeter", player, true];
|
||||
EPOCH_stabilityTarget = _object;
|
||||
};
|
||||
};
|
||||
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _buildingJammerRange];
|
||||
|
||||
if !(_jammer isEqualTo[]) then {
|
||||
{
|
||||
if (alive _x) exitWith{
|
||||
_nearestJammer = _x;
|
||||
};
|
||||
} foreach _jammer;
|
||||
|
||||
if !(isNull _nearestJammer) then {
|
||||
if ((_nearestJammer getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) then {
|
||||
_ownedJammerExists = true;
|
||||
}
|
||||
else {
|
||||
_buildingAllowed = false;
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Upgrade Disallowed: Frequency Blocked</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
};
|
||||
};
|
||||
if !(_buildingAllowed)exitWith{ false };
|
||||
|
||||
if (_object isKindOf "Constructions_static_F") then {
|
||||
|
||||
// take upgrade item from player here
|
||||
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
||||
|
||||
_upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding");
|
||||
if !(_upgrades isEqualTo []) then {
|
||||
|
||||
// get selected upgrade
|
||||
_upgrade = _upgrades param [Epoch_upgradeIndex,[]];
|
||||
|
||||
_upgradeParts = _upgrade select 1;
|
||||
|
||||
_canUpgrade = true;
|
||||
_canUpgradePartCount = 0;
|
||||
_missingParts = "";
|
||||
{
|
||||
_part = _x select 0;
|
||||
_req = _x select 1;
|
||||
_partCheck = {_x == _part} count (magazines player);
|
||||
//diag_log format["DEBUG: _partCheck %1", _partCheck];
|
||||
//diag_log format["DEBUG: _x %1", _x];
|
||||
if (_partCheck < _req) then {
|
||||
_missingCount = _req - _partCheck;
|
||||
|
||||
//diag_log format["DEBUG: _missingCount %1", _missingCount];
|
||||
|
||||
_canUpgrade = false;
|
||||
_missingParts = _missingParts + format["Missing %1 %2, ", _missingCount, (_part call EPOCH_itemDisplayName)];
|
||||
};
|
||||
_canUpgradePartCount = _canUpgradePartCount + _req;
|
||||
} forEach _upgradeParts;
|
||||
|
||||
_removedPartCount = 0;
|
||||
if (_canUpgrade) then {
|
||||
{
|
||||
for "_i" from 1 to (_x select 1) do {
|
||||
if ((_x select 0) in (magazines player)) then {
|
||||
player removeMagazine (_x select 0);
|
||||
_removedPartCount = _removedPartCount + 1;
|
||||
};
|
||||
};
|
||||
} forEach _upgradeParts;
|
||||
|
||||
if (_canUpgradePartCount == _removedPartCount) then {
|
||||
// send to server for upgrade
|
||||
EPOCH_UPBUILD = [_object,player,Epoch_upgradeIndex,Epoch_personalToken];
|
||||
publicVariableServer "EPOCH_UPBUILD";
|
||||
Epoch_upgradeIndex = nil;
|
||||
_return = true;
|
||||
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Upgraded</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
} else {
|
||||
_dt = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _missingParts], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
};
|
||||
};
|
||||
_return
|
@ -1,180 +0,0 @@
|
||||
EPOCH_buildClasses = ["Land_Obstacle_Bridge_F",
|
||||
|
||||
"Land_Shoot_House_Wall_F",
|
||||
"Land_Shoot_House_Wall_Stand_F",
|
||||
"Land_Shoot_House_Wall_Crouch_F",
|
||||
"Land_Shoot_House_Wall_Prone_F",
|
||||
"Land_Shoot_House_Wall_Long_F",
|
||||
"Land_Shoot_House_Wall_Long_Stand_F",
|
||||
"Land_Shoot_House_Wall_Long_Crouch_F",
|
||||
"Land_Shoot_House_Wall_Long_Prone_F",
|
||||
"Land_Shoot_House_Corner_F",
|
||||
"Land_Shoot_House_Corner_Stand_F",
|
||||
"Land_Shoot_House_Corner_Crouch_F",
|
||||
"Land_Shoot_House_Corner_Prone_F",
|
||||
"Land_Shoot_House_Panels_F",
|
||||
"Land_Shoot_House_Panels_Crouch_F",
|
||||
"Land_Shoot_House_Panels_Prone_F",
|
||||
"Land_Shoot_House_Panels_Vault_F",
|
||||
"Land_Shoot_House_Panels_Window_F",
|
||||
"Land_Shoot_House_Panels_Windows_F",
|
||||
"Land_Shoot_House_Tunnel_F",
|
||||
"Land_Shoot_House_Tunnel_Stand_F",
|
||||
"Land_Shoot_House_Tunnel_Crouch_F",
|
||||
"Land_Shoot_House_Tunnel_Prone_F",
|
||||
|
||||
|
||||
"Land_Obstacle_RunAround_F","Land_Obstacle_Saddle_F","Land_RampConcrete_F","Land_RampConcreteHigh_F","Land_GH_Stairs_F","Land_Billboard_F","Land_HBarrier_1_F","Land_HBarrier_3_F","Land_HBarrier_5_F","Land_Razorwire_F","Land_HBarrierWall6_F","WoodFloor_EPOCH","WoodLargeWall_EPOCH","Land_BagFence_Long_F","Land_BagFence_Corner_F","Land_BagFence_End_F","Land_BagFence_Round_F","Land_BagFence_Short_F"];
|
||||
EPOCH_buildClassesCount = count EPOCH_buildClasses - 1;
|
||||
Epoch_selectedBuildClasIndex = 0;
|
||||
EPOCH_selectedBuildClass = EPOCH_buildClasses select 0;
|
||||
|
||||
EPOCH_snapExtents = [];
|
||||
|
||||
EPOCH_buildWorldspace = [[0,0,0],[0,0,0],[0,0,0]];
|
||||
EPOCH_KeyDownFunctionhandler = {
|
||||
_dikCode = _this select 1;
|
||||
_shift = _this select 2;
|
||||
_ctrl = _this select 3;
|
||||
_alt = _this select 4;
|
||||
|
||||
switch (_dikCode) do {
|
||||
case 0x39 : {
|
||||
_worldspace = EPOCH_buildWorldspace;
|
||||
_newObj = EPOCH_selectedBuildClass createVehicle (_worldspace select 0);
|
||||
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
|
||||
_newObj setposASL (_worldspace select 0);
|
||||
_handled = true;
|
||||
};
|
||||
case 0xC9 : {
|
||||
Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex + 1) min EPOCH_buildClassesCount) max 0;
|
||||
EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex;
|
||||
|
||||
if !(isNull EPOCH_currentBuildObj) then {
|
||||
deleteVehicle EPOCH_currentBuildObj;
|
||||
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
|
||||
EPOCH_currentBuildObj disableCollisionWith player;
|
||||
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
|
||||
};
|
||||
|
||||
hint EPOCH_selectedBuildClass;
|
||||
_handled = true;
|
||||
};
|
||||
case 0xD1 : {
|
||||
Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex - 1) min EPOCH_buildClassesCount) max 0;
|
||||
EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex;
|
||||
hint EPOCH_selectedBuildClass;
|
||||
|
||||
if !(isNull EPOCH_currentBuildObj) then {
|
||||
deleteVehicle EPOCH_currentBuildObj;
|
||||
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
|
||||
EPOCH_currentBuildObj disableCollisionWith player;
|
||||
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
|
||||
};
|
||||
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
_handled
|
||||
};
|
||||
|
||||
|
||||
[] spawn {
|
||||
(findDisplay 46) displayRemoveAllEventHandlers "KeyDown";
|
||||
(findDisplay 46) displayAddEventHandler["KeyDown",{_this call EPOCH_KeyDownFunctionhandler}];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
EPOCH_snapExtents = [];
|
||||
_playerPos = player modelToWorld [0,5,5];
|
||||
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle _playerPos;
|
||||
EPOCH_currentBuildObj setPosATL _playerPos;
|
||||
EPOCH_currentBuildObj disableCollisionWith player;
|
||||
_numberOfContacts = 0;
|
||||
for "_i" from 0 to 10 do {
|
||||
};
|
||||
_pos1 = EPOCH_currentBuildObj modelToWorld [0,0,10];
|
||||
_pos2 = EPOCH_currentBuildObj modelToWorld [0,0,0];
|
||||
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player];
|
||||
if (count _ins == 0) then {
|
||||
} else {
|
||||
_pos3 = (_ins select 0 select 0);
|
||||
if !(surfaceIsWater _pos3) then {_pos3 = ASLtoATL _pos3};
|
||||
_offset = EPOCH_currentBuildObj worldToModelVisual _pos3;
|
||||
EPOCH_snapExtents pushBack _offset;
|
||||
_numberOfContacts = _numberOfContacts + 1;
|
||||
|
||||
_fullHeight = _offset select 0;
|
||||
_halfHeight = _fullHeight/2;
|
||||
|
||||
|
||||
|
||||
_pos1 = EPOCH_currentBuildObj modelToWorld [0,10,_halfHeight];
|
||||
_pos2 = EPOCH_currentBuildObj modelToWorld [0,0,_halfHeight];
|
||||
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player];
|
||||
if (count _ins == 0) then {
|
||||
} else {
|
||||
_pos3 = (_ins select 0 select 0);
|
||||
if !(surfaceIsWater _pos3) then {_pos3 = ASLtoATL _pos3};
|
||||
_offset = EPOCH_currentBuildObj worldToModelVisual _pos3;
|
||||
EPOCH_snapExtents pushBack _offset;
|
||||
_numberOfContacts = _numberOfContacts + 1;
|
||||
};
|
||||
|
||||
_pos1 = EPOCH_currentBuildObj modelToWorld [0,-10,_halfHeight];
|
||||
_pos2 = EPOCH_currentBuildObj modelToWorld [0,0,_halfHeight];
|
||||
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player];
|
||||
if (count _ins == 0) then {
|
||||
} else {
|
||||
_pos3 = (_ins select 0 select 0);
|
||||
if !(surfaceIsWater _pos3) then {_pos3 = ASLtoATL _pos3};
|
||||
_offset = EPOCH_currentBuildObj worldToModelVisual _pos3;
|
||||
EPOCH_snapExtents pushBack _offset;
|
||||
_numberOfContacts = _numberOfContacts + 1;
|
||||
};
|
||||
|
||||
_pos1 = EPOCH_currentBuildObj modelToWorld [10,0,_halfHeight];
|
||||
_pos2 = EPOCH_currentBuildObj modelToWorld [0,0,_halfHeight];
|
||||
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player];
|
||||
if (count _ins == 0) then {
|
||||
} else {
|
||||
_pos3 = (_ins select 0 select 0);
|
||||
if !(surfaceIsWater _pos3) then {_pos3 = ASLtoATL _pos3};
|
||||
_offset = EPOCH_currentBuildObj worldToModelVisual _pos3;
|
||||
EPOCH_snapExtents pushBack _offset;
|
||||
_numberOfContacts = _numberOfContacts + 1;
|
||||
};
|
||||
|
||||
_pos1 = EPOCH_currentBuildObj modelToWorld [-10,0,_halfHeight];
|
||||
_pos2 = EPOCH_currentBuildObj modelToWorld [0,0,_halfHeight];
|
||||
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player];
|
||||
if (count _ins == 0) then {
|
||||
} else {
|
||||
_pos3 = (_ins select 0 select 0);
|
||||
if !(surfaceIsWater _pos3) then {_pos3 = ASLtoATL _pos3};
|
||||
_offset = EPOCH_currentBuildObj worldToModelVisual _pos3;
|
||||
EPOCH_snapExtents pushBack _offset;
|
||||
_numberOfContacts = _numberOfContacts + 1;
|
||||
};
|
||||
|
||||
|
||||
_pos1 = EPOCH_currentBuildObj modelToWorld [0,0,-4.5];
|
||||
_pos2 = EPOCH_currentBuildObj modelToWorld [0,0,0];
|
||||
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player];
|
||||
if (count _ins == 0) then {
|
||||
} else {
|
||||
_pos3 = (_ins select 0 select 0);
|
||||
if !(surfaceIsWater _pos3) then {_pos3 = ASLtoATL _pos3};
|
||||
_offset = EPOCH_currentBuildObj worldToModelVisual _pos3;
|
||||
EPOCH_snapExtents pushBack _offset;
|
||||
_numberOfContacts = _numberOfContacts + 1;
|
||||
};
|
||||
|
||||
};
|
||||
onEachFrame {
|
||||
{
|
||||
drawIcon3D ["a3\modules_f\data\iconlock_ca.paa", [1,1,1,1], EPOCH_currentBuildObj modelToWorld _x, 1, 1, 45, "Snap", 1, 0.05, "TahomaB"];
|
||||
} forEach EPOCH_snapExtents;
|
||||
};
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
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;
|
||||
|
@ -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;
|
||||
|
@ -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{};
|
||||
|
@ -1,3 +1,28 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Return configFile or missionConfigFile data if exists else return default variable
|
||||
|
||||
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/functions/EPOCH_fn_returnConfigEntryV2.sqf
|
||||
|
||||
Example:
|
||||
_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: STRING - Config Class
|
||||
_this select 1: STRING - Variable Name
|
||||
_this select 2: STRING - Default Variable
|
||||
|
||||
Returns:
|
||||
MIXED
|
||||
*/
|
||||
private["_defaultData", "_config", "_varData","_missionconfig","_finalconfig"];
|
||||
_defaultData = _this select 2;
|
||||
_config = (configfile >> (_this select 0));
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Calculates weather related player 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/functions/EPOCH_fnc_Weather.sqf
|
||||
|
||||
Example:
|
||||
call EPOCH_fnc_Weather;
|
||||
|
||||
Parameter(s):
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_warming","_isNearFire","_airTemp","_waterTemp","_playerPosATL"];
|
||||
|
||||
if (isNil "EPOCH_CURRENT_WEATHER") then {
|
||||
|
@ -1,4 +1,26 @@
|
||||
// Epoch add item with overflow
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch add item with overflow
|
||||
|
||||
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/functions/EPOCH_fnc_addItemOverflow.sqf
|
||||
|
||||
Example:
|
||||
_fish call EPOCH_fnc_addItemOverflow;
|
||||
|
||||
Parameter(s):
|
||||
_this: STRING - Item Class
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_wHPos","_wH","_nearByHolder","_item"];
|
||||
_item = _this;
|
||||
if (player canAdd _item) then {
|
||||
|
@ -1,4 +1,34 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch cursorTarget anywhere
|
||||
|
||||
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/functions/EPOCH_fnc_addItemOverflow.sqf
|
||||
|
||||
Example:
|
||||
_target = [10] call EPOCH_fnc_cursorTarget;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: SCALAR - Distance in meters
|
||||
_this select 1: STRING - lod1
|
||||
_this select 3: STRING - lod2
|
||||
_this select 4: BOOL - sort
|
||||
|
||||
Returns:
|
||||
(OBJECT or objNull)
|
||||
*/
|
||||
params [["_distance",10], ["_lod1", "VIEW"], ["_lod2","FIRE"], ["_sort",true]];
|
||||
if (EPOCH_playerIsSwimming) then {
|
||||
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,_distance],player,objNull,_sort,1,_lod1,_lod2];
|
||||
if (_ins isEqualTo []) exitWith { objNull };
|
||||
(_ins select 0 param [3,objNull])
|
||||
} else {
|
||||
cursorTarget
|
||||
}
|
||||
|
@ -1,3 +1,29 @@
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Epoch cursorTarget anywhere
|
||||
|
||||
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/functions/EPOCH_fnc_dirToFuzzy.sqf
|
||||
|
||||
Example:
|
||||
_dirToF = [_pos,_destination,44] call EPOCH_fnc_dirToFuzzy;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: (ARRAY or OBJECT) - position1
|
||||
_this select 1: (ARRAY or OBJECT) - position2
|
||||
_this select 2: NUMBER - random spread [optional: default 32]
|
||||
|
||||
Returns:
|
||||
SCALAR - (direction 0-360)
|
||||
*/
|
||||
|
||||
private ["_pos1","_pos2","_ret"];
|
||||
|
||||
_pos1 = _this select 0;
|
||||
|
@ -1,11 +1,30 @@
|
||||
//Picks a random spot behind the player
|
||||
//usage: [200,50,60] call EPOCH_fnc_findRandomPosBehind
|
||||
//_maxIn - Maximum distance to choose point
|
||||
//_minIn - Minimum distance to choose point
|
||||
//_arcIn - Spread of arc in degrees behind player
|
||||
//_unitIn - Unit, player, vehicle etc.
|
||||
//_offset - offset initial angle, allows to pick position to the side with -90 or 90 (right or left)
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Picks a random spot behind 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/functions/EPOCH_fnc_findRandomPosBehind.sqf
|
||||
|
||||
Example:
|
||||
_moveTo = [24,4,142,_trgt] call EPOCH_fnc_findRandomPosBehind;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: SCALAR - Maximum distance to choose point
|
||||
_this select 1: SCALAR - Minimum distance to choose point
|
||||
_this select 2: SCALAR - Spread of arc in degrees behind player
|
||||
_this select 3: OBJECT - Unit, player, vehicle etc.
|
||||
_this select 4: SCALAR - offset initial angle, allows to pick position to the side with -90 or 90 (right or left) [optional: default 0]
|
||||
|
||||
Returns:
|
||||
ARRAY
|
||||
*/
|
||||
_maxIn = _this select 0;
|
||||
_minIn = _this select 1;
|
||||
_arcIn = _this select 2;
|
||||
|
@ -1,12 +1,31 @@
|
||||
//Currently only used to find random position
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Currently only used to find random position (Unused)
|
||||
//TODO: Expand upon to find spot on road || in field for unit spawn.
|
||||
//Usage: [centre, min distance, max distance, height, onRoad] call EPOCH_fnc_findSafePos;
|
||||
//centre - centre position (array)
|
||||
//min distance - minimum distance away from centre to choose a location
|
||||
//max distance - maximum distance away from centre to choose a location
|
||||
//height - is passed through
|
||||
//onRoad - (boolean) - will select a point on the nearest road (within 250m) from the randomly found position.
|
||||
//
|
||||
|
||||
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/functions/EPOCH_fnc_findSafePos.sqf
|
||||
|
||||
Example:
|
||||
_moveTo = [_centre, _min_distance, _max_distance, _height, _onRoad] call EPOCH_fnc_findSafePos;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: SCALAR - center position
|
||||
_this select 1: SCALAR - minimum distance away from centre to choose a location
|
||||
_this select 2: SCALAR - minimum distance away from centre to choose a location
|
||||
_this select 3: SCALAR - height - is passed through. [optional: default 0]
|
||||
_this select 4: BOOL - will select a point on the nearest road (within 250m) from the randomly found position. [optional: default false]
|
||||
|
||||
Returns:
|
||||
ARRAY
|
||||
*/
|
||||
private["_MinDist","_MaxDist","_outHeight","_inPos","_rDist","_rDir","_outPos","_nrRoad","_nrRoads","_onRoad"];
|
||||
_inPos = _this select 0;
|
||||
_MinDist = _this select 1;
|
||||
|
@ -1,11 +1,31 @@
|
||||
//Picks a random spot relative to the target with some randomness.
|
||||
//usage: [200,50,60] call EPOCH_fnc_findRandomPosBehind
|
||||
//_maxIn - Maximum distance to choose point
|
||||
//_minIn - Minimum distance to choose point
|
||||
//_arcIn - Spread of arc in degrees relative to _unitIn. Is randomised to add fuzziness to final location.
|
||||
//_unitIn - Unit, player, vehicle etc.
|
||||
//_offset - Offset initial angle, allows to pick position to the side of _unitIn with -90 or 90.
|
||||
//_trgtIn = Target to use for relative position from _unitIn. Allows to pick a position left of _trgtin for example.
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Picks a random spot relative to the target with some randomness. (Unused)
|
||||
|
||||
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/functions/EPOCH_fnc_findSapperStalkLocation.sqf
|
||||
|
||||
Example:
|
||||
_moveTo = [_centre, _min_distance, _max_distance, _height, _onRoad] call EPOCH_fnc_findSafePos;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: SCALAR - Maximum distance to choose point
|
||||
_this select 1: SCALAR - Minimum distance to choose point
|
||||
_this select 2: SCALAR - Spread of arc in degrees relative to _unitIn. Is randomised to add fuzziness to final location.
|
||||
_this select 3: OBJECT - Unit, player, vehicle etc.
|
||||
_this select 4: SCALAR - Offset initial angle, allows to pick position to the side of _unitIn with -90 or 90.
|
||||
_this select 5: OBJECT - Target to use for relative position from _unitIn. Allows to pick a position left of _trgtin for example. [optional: default false]
|
||||
|
||||
Returns:
|
||||
ARRAY
|
||||
*/
|
||||
_maxIn = _this select 0;
|
||||
_minIn = _this select 1;
|
||||
_arcIn = _this select 2;
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Function to check if player is in a building.
|
||||
|
||||
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/functions/EPOCH_fnc_isInsideBuilding.sqf
|
||||
|
||||
Example:
|
||||
_inBuilding = call EPOCH_fnc_isInsideBuilding;
|
||||
|
||||
Parameter(s):
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
private ["_playerPosASL","_abovePlayerPosASL"];
|
||||
_playerPosASL = visiblePositionASL player;
|
||||
_abovePlayerPosASL = [_playerPosASL select 0,_playerPosASL select 1,(_playerPosASL select 2) + 10];
|
||||
|
@ -1,3 +1,28 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Player death handler
|
||||
|
||||
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/functions/EPOCH_fnc_playerDeath.sqf
|
||||
|
||||
Example:
|
||||
player addEventHandler ["Killed", {_this call EPOCH_fnc_playerDeath}];
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - player
|
||||
_this select 1: OBJECT - killer
|
||||
|
||||
Returns:
|
||||
BOOL
|
||||
*/
|
||||
|
||||
private["_unit", "_killer"];
|
||||
_unit = _this select 0;
|
||||
_killer = _this select 1;
|
||||
|
@ -1,3 +1,33 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Weapon fired handler
|
||||
|
||||
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/functions/EPOCH_fnc_playerFired.sqf
|
||||
|
||||
Example:
|
||||
player addEventHandler ["Fired", {_this call EPOCH_fnc_playerFired}];
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: unit: Object - Object the event handler is assigned to
|
||||
_this select 1: weapon: String - Fired weapon
|
||||
_this select 2: muzzle: String - Muzzle that was used
|
||||
_this select 3: mode: String - Current mode of the fired weapon
|
||||
_this select 4: ammo: String - Ammo used
|
||||
_this select 5: magazine: String - magazine name which was used
|
||||
_this select 6: projectile: Object - Object of the projectile that was shot (Arma 2: OA and onwards)
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
|
||||
private ["_highestDMG","_currentHIT","_currentDMG","_attachments","_newDMG","_cursorTarget","_repaired","_unit","_weapon","_ammo","_projectile"];
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Picks a random spot relative to the target with some randomness. (Unused)
|
||||
|
||||
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/functions/EPOCH_fnc_stringLeft.sqf
|
||||
|
||||
Example:
|
||||
_trimmedStr = ["String In",3] call EPOCH_fnc_stringLeft;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: STRING or anything - String to be trimmed
|
||||
_this select 1: SCALAR - number of chars to remove
|
||||
|
||||
Returns:
|
||||
STRING
|
||||
*/
|
||||
private["_strIn","_strOut","_count","_return","_arrFull","_arrOut"];
|
||||
_arrOut = [];
|
||||
_strIn = _this select 0;
|
||||
|
@ -1,11 +1,29 @@
|
||||
/*
|
||||
Returns string if only one element in second param, otherwise returns array
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Sorts an array based on distance to input array. (unused)
|
||||
|
||||
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/functions/Epoch_SortArrayByDistance.sqf
|
||||
|
||||
Example(s):
|
||||
_displayName = _item call epoch_itemData; // string
|
||||
_pic = [_item,["Picture"]] call epoch_itemData; //string
|
||||
_data = [_item,["picture","model","displayName"]] call epoch_itemData; //array
|
||||
*/
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: STRING - Vehicle, Weapon, or Magazine config class name
|
||||
_this select 1: STRING or ARRAY of config variables
|
||||
|
||||
Returns:
|
||||
Returns STRING if only one element in second param, otherwise returns ARRAY
|
||||
*/
|
||||
private ["_item","_entries","_single","_arr","_return"];
|
||||
_item = param [0,""];
|
||||
_entries = param [1,["DisplayName"],[[]]];
|
||||
|
@ -1,4 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Returns the DisplayName of a Vehicle, Weapon, or Magazine.
|
||||
|
||||
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/functions/EPOCH_itemDisplayName.sqf
|
||||
|
||||
Example:
|
||||
_displayName = _part call EPOCH_itemDisplayName;
|
||||
|
||||
Parameter(s):
|
||||
_this: STRING - Vehicle, Weapon, or Magazine config class name
|
||||
|
||||
Returns:
|
||||
STRING
|
||||
*/
|
||||
private ["_item"];
|
||||
_item = _this;
|
||||
_return = "";
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Returns the picture variable of a Vehicle, Weapon, or Magazine.
|
||||
|
||||
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/functions/EPOCH_itemPicture.sqf
|
||||
|
||||
Example:
|
||||
_picture = _part call EPOCH_itemPicture;
|
||||
|
||||
Parameter(s):
|
||||
_this: STRING - Vehicle, Weapon, or Magazine config class name
|
||||
|
||||
Returns:
|
||||
STRING
|
||||
*/
|
||||
private ["_item"];
|
||||
_item = _this;
|
||||
_return = "";
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Sends message server to save custom variables from 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/functions/EPOCH_pushCustomVar.sqf
|
||||
|
||||
Example:
|
||||
true call EPOCH_pushCustomVar;
|
||||
|
||||
Parameter(s):
|
||||
_this: BOOL - true = fast save, false = slow save window
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_tempVars","_tempVal","_tempIndex","_time"];
|
||||
_time = if (_this) then [{15},{80}];
|
||||
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Returns missionConfigFile if exists otherwise uses configFile
|
||||
|
||||
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/functions/EPOCH_returnConfig.sqf
|
||||
|
||||
Example:
|
||||
_config = 'CfgCrafting' call EPOCH_returnConfig;
|
||||
|
||||
Parameter(s):
|
||||
_this: STRING - Config class name
|
||||
|
||||
Returns:
|
||||
CONFIG
|
||||
*/
|
||||
private["_return", "_config"];
|
||||
_return = (configfile >> _this);
|
||||
_config = (missionConfigFile >> _this);
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Sorts an array based on distance to input array. (unused)
|
||||
|
||||
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/functions/Epoch_SortArrayByDistance.sqf
|
||||
|
||||
Example:
|
||||
_sorted = [_unsorted, _inPosition] call Epoch_SortArrayByDistance;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: ARRAY - of unsorted positions
|
||||
_this select 1: ARRAY - position
|
||||
|
||||
Returns:
|
||||
ARRAY of ARRAYS
|
||||
*/
|
||||
private ["_sorted","_closest","_unsorted","_pos","_testPos","_closestPos"];
|
||||
_sorted = [];
|
||||
_closest = [];
|
||||
|
@ -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["<t size='0.8' shadow='0' color='#99ffffff'>START SHOP DIALOG: %1</t>", _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["<t size='0.8' shadow='0' color='#99ffffff'>START MISSION DIALOG: %1</t>", _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["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _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;
|
@ -1,4 +1,31 @@
|
||||
private["_dikCode", "_handled"];
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com - @vbawol
|
||||
|
||||
Contributors: @Skaronator @raymix @Fank
|
||||
|
||||
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;
|
||||
@ -9,7 +36,7 @@ _handled = false;
|
||||
|
||||
if !(alive player) exitWith{ false };
|
||||
|
||||
EPOCH_space = false;
|
||||
EPOCH_doRotate = false;
|
||||
|
||||
if (_dikCode in [0x02,0x03,0x04,0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05,0x0E]) then {
|
||||
_handled = true;
|
||||
@ -30,18 +57,15 @@ if (_ctrl && _dikCode == EPOCH_keysVolumeDown) then {
|
||||
|
||||
// ESC default to cancel
|
||||
if (_dikCode == 0x01) then {
|
||||
|
||||
if !(isNull EPOCH_Target) then {
|
||||
if !(_vehicle isKindOf "ThingX") then {
|
||||
if !(EPOCH_Target isKindOf "ThingX") then {
|
||||
deleteVehicle EPOCH_Target;
|
||||
} else {
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
|
||||
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
||||
|
||||
EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2];
|
||||
EPOCH_arr_interactedObjs = [];
|
||||
};
|
||||
@ -163,8 +187,8 @@ if (vehicle player == player) then {
|
||||
case EPOCH_keysBuildMovBak: { EPOCH_Y_OFFSET = (EPOCH_Y_OFFSET - 0.1) max 2; _handled = true };
|
||||
case EPOCH_keysBuildMovL: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET + 0.1) min 5; _handled = true };
|
||||
case EPOCH_keysBuildMovR: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET - 0.1) max - 5; _handled = true };
|
||||
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_space = true; _handled = true };
|
||||
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_space = true; _handled = true };
|
||||
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_doRotate = true; _handled = true };
|
||||
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_doRotate = true; _handled = true };
|
||||
//case EPOCH_keysBuildIt: { cursorTarget call EPOCH_fnc_SelectTarget; _handled = true };
|
||||
};
|
||||
};
|
||||
@ -246,7 +270,7 @@ if (vehicle player == player) then {
|
||||
|
||||
if (_dikCode in(actionKeys "Gear")) then {
|
||||
if !(isNull EPOCH_Target) then {
|
||||
if !(_vehicle isKindOf "ThingX") then {
|
||||
if !(EPOCH_Target isKindOf "ThingX") then {
|
||||
deleteVehicle EPOCH_Target;
|
||||
} else {
|
||||
EPOCH_Target = objNull;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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));
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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: 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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: Raimonds Virtoss
|
||||
|
||||
Description:
|
||||
Epoch Item Interact
|
||||
|
||||
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_itemInteractClick.sqf
|
||||
|
||||
Example:
|
||||
onLBSelChanged = "_this call EPOCH_itemInteractClick";
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: CONTROL - control
|
||||
_this select 1: NUMBER - listbox index
|
||||
|
||||
Returns:
|
||||
BOOL - allways returns true
|
||||
*/
|
||||
private ["_data","_confData","_usedIn","_type","_interactOption","_buttonTXT","_control","_index","_text","_pic","_craftingArray","_craftingArrayNames","_config","_craftingConfig","_display","_useBtn"];
|
||||
|
||||
EPOCH_InteractedItem = [];
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: Raimonds Virtoss
|
||||
|
||||
Description:
|
||||
Epoch Item Interact when double clicked
|
||||
|
||||
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_itemInteractDblClick.sqf
|
||||
|
||||
Example:
|
||||
onLBDblClick = "_this call EPOCH_itemInteractDblClick";
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: CONTROL - control
|
||||
_this select 1: NUMBER - listbox index
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
EPOCH_InteractedItem = [];
|
||||
_control = _this select 0;
|
||||
_index = _this select 1;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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 {
|
||||
@ -21,7 +44,7 @@ if (!isNull findDisplay 602) then {
|
||||
_bar = uiNameSpace getVariable "RscCustomProgressUniform";
|
||||
_uniformArmor = (uniform player) call EPOCH_uniformArmorCalc;
|
||||
_totalArmor = _totalArmor + _uniformArmor;
|
||||
_finalArmor = linearConversion [0,EPOCH_MAX_ARMOR select 0,_uniformArmor,0.01,1];
|
||||
_finalArmor = linearConversion [0,EPOCH_MAX_ARMOR select 0,_uniformArmor,0.01,1,true];
|
||||
_bar progressSetPosition _finalArmor;
|
||||
|
||||
if (_selectedItem == 801) then {
|
||||
@ -33,7 +56,7 @@ if (!isNull findDisplay 602) then {
|
||||
_bar = uiNameSpace getVariable "RscCustomProgressVest";
|
||||
_vestArmor = (vest player) call EPOCH_gearArmorCalc;
|
||||
_totalArmor = _totalArmor + _vestArmor;
|
||||
_finalArmor = linearConversion [0,EPOCH_MAX_ARMOR select 1,_vestArmor,0.01,1];
|
||||
_finalArmor = linearConversion [0,EPOCH_MAX_ARMOR select 1,_vestArmor,0.01,1,true];
|
||||
_bar progressSetPosition _finalArmor;
|
||||
|
||||
if (_selectedItem == 701) then {
|
||||
@ -45,7 +68,7 @@ if (!isNull findDisplay 602) then {
|
||||
_bar = uiNameSpace getVariable "RscCustomProgressHeadgear";
|
||||
_headgearArmor = (headgear player) call EPOCH_gearArmorCalc;
|
||||
_totalArmor = _totalArmor + _headgearArmor;
|
||||
_finalArmor = linearConversion [0,EPOCH_MAX_ARMOR select 2,_headgearArmor,0.01,1];
|
||||
_finalArmor = linearConversion [0,EPOCH_MAX_ARMOR select 2,_headgearArmor,0.01,1,true];
|
||||
_bar progressSetPosition _finalArmor;
|
||||
|
||||
if (_selectedItem == 605) then {
|
||||
@ -56,11 +79,10 @@ if (!isNull findDisplay 602) then {
|
||||
|
||||
_totalArmorUI = uiNameSpace getVariable "RscCustomProgressTotal";
|
||||
_bar = _totalArmorUI select 0;
|
||||
_finalArmor = linearConversion [0,_totalArmorMax,_totalArmor,0.01,1];
|
||||
_finalArmor = linearConversion [0,_totalArmorMax,_totalArmor,0.01,1,true];
|
||||
_bar progressSetPosition _finalArmor;
|
||||
|
||||
_bar_compare = _totalArmorUI select 1;
|
||||
_finalArmor = linearConversion [0,_totalArmorMax,_newArmor,0.01,1];
|
||||
_finalArmor = linearConversion [0,_totalArmorMax,_newArmor,0.01,1,true];
|
||||
_bar_compare progressSetPosition _finalArmor;
|
||||
|
||||
};
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
workaround for weapons not returning class in the inventory listboxes
|
||||
|
||||
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_selectInventoryItem.sqf
|
||||
|
||||
Example:
|
||||
[_control,_index] call EPOCH_selectInventoryItem;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: CONTROL - control
|
||||
_this select 1: NUMBER - listbox index
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_index","_data","_control","_text","_pic","_craftingArray","_craftingArrayNames"];
|
||||
|
||||
EPOCH_InteractedItem = [];
|
||||
@ -16,9 +40,8 @@ _pic = _control lbPicture _index;
|
||||
_craftingArray = [];
|
||||
_craftingArrayNames = [];
|
||||
|
||||
comment 'Not ideal This is needed as weapons do not return a class in the UI';
|
||||
comment 'This test is to over come an issue that causes the wrong class selected';
|
||||
comment 'when more than two classes share the same displayName';
|
||||
// This test is to over come an issue that causes the wrong class selected
|
||||
// when more than two classes share the same displayName
|
||||
if (_data == "") then {
|
||||
{
|
||||
_name = configName(_x);
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Initalize player 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/master/Sources/epoch_code/compile/setup/EPOCH_clientInit.sqf
|
||||
|
||||
Example:
|
||||
call EPOCH_clientInit;
|
||||
|
||||
Parameter(s):
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_buildDirection = 0;
|
||||
EPOCH_debugMode = false;
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Custom Epoch keymap
|
||||
|
||||
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/setup/EPOCH_clientKeyMap.sqf
|
||||
|
||||
Example:
|
||||
_arr = 2 call EPOCH_clientKeyMap;
|
||||
|
||||
Parameter(s):
|
||||
TBA
|
||||
|
||||
Returns:
|
||||
Mixed
|
||||
*/
|
||||
|
||||
private ["_keyMap","_args","_input","_return"];
|
||||
params [["_args",0],["_input",0]];
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
call EPOCH_clientInit;
|
||||
[] spawn EPOCH_masterLoop_v2;
|
||||
[] spawn EPOCH_masterLoop;
|
||||
[5,100] call EPOCH_niteLight;
|
||||
|
||||
Epoch_canBeRevived = true;
|
||||
|
@ -1,4 +1,27 @@
|
||||
//
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Unisex check for vests, gives swing ammo and performs radio changed check
|
||||
|
||||
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/setup/EPOCH_clientRevive.sqf
|
||||
|
||||
Example:
|
||||
_data call EPOCH_clientRevive;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: OBJECT - player object
|
||||
_this select 1: STRING - personal token
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
_playerObject = _this select 0;
|
||||
if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
|
||||
_ply = player;
|
||||
@ -12,7 +35,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
|
||||
Epoch_personalToken = _this select 1;
|
||||
|
||||
// call EPOCH_clientInit;
|
||||
[] spawn EPOCH_masterLoop_v2;
|
||||
[] spawn EPOCH_masterLoop;
|
||||
[5, 100] call EPOCH_niteLight;
|
||||
|
||||
closeDialog 0;
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Custom addPublicVariableEventHandler 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/master/Sources/epoch_code/compile/setup/EPOCH_client_publicEH.sqf
|
||||
|
||||
Example:
|
||||
call EPOCH_clientInit;
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: STRING - main random string to listen for events
|
||||
_this select 1+: random strings
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
call compile ("
|
||||
'"+(_this select 0)+"' addPublicVariableEventHandler {
|
||||
"+(_this select 0)+" = nil;
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Reject players own connection
|
||||
|
||||
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/setup/EPOCH_client_rejectPlayer.sqf
|
||||
|
||||
Example:
|
||||
call EPOCH_clientInit;
|
||||
|
||||
Parameter(s):
|
||||
_this: BOOL - true = set bad publicVariable to server forces kick
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
if (_this) then {
|
||||
PLAYER_BADHIVE = true;
|
||||
publicVariableServer "PLAYER_BADHIVE";
|
||||
|
@ -1,583 +1,62 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Unisex check for vests, gives swing ammo and performs radio changed check
|
||||
|
||||
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/setup/EPOCH_masterLoop.sqf
|
||||
|
||||
Example:
|
||||
[] spawn EPOCH_masterLoop;
|
||||
|
||||
Parameter(s):
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
disableSerialization;
|
||||
|
||||
_EPOCH_1 = diag_tickTime;
|
||||
_EPOCH_10 = diag_tickTime;
|
||||
_EPOCH_15 = diag_tickTime;
|
||||
_EPOCH_30 = diag_tickTime;
|
||||
_EPOCH_60 = diag_tickTime;
|
||||
_EPOCH_300 = diag_tickTime;
|
||||
_EPOCH_600 = diag_tickTime;
|
||||
|
||||
_prevEquippedItem = [];
|
||||
_damagePlayer = damage player;
|
||||
_panic = false;
|
||||
_prevEnergy = EPOCH_playerEnergy;
|
||||
|
||||
// init config data
|
||||
_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
|
||||
EPOCH_droneRndChance = ["CfgEpochClient", "droneRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_baseHTLoss = ["CfgEpochClient", "baseHTLoss", 8] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
EPOCH_chargeRate = 0;
|
||||
|
||||
// default data if mismatch
|
||||
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";
|
||||
|
||||
_thirst = _display displayCtrl 21201;
|
||||
_hunger = _display displayCtrl 21202;
|
||||
_broken = _display displayCtrl 21203;
|
||||
_oxygen = _display displayCtrl 21204;
|
||||
_hazzard = _display displayCtrl 21205;
|
||||
_emergency = _display displayCtrl 21206;
|
||||
|
||||
_config = 'CfgMasterLoop' call EPOCH_returnConfig;
|
||||
_build_sqf = preprocessFile getText (_config >> "Init" >> "file");
|
||||
_configs = "true" configClasses (_config >> "Events");
|
||||
_condition = getText (_config >> "Events" >> "condition");
|
||||
_file = getText (_config >> "Events" >> "file");
|
||||
{
|
||||
_x ctrlShow false;
|
||||
}forEach[_thirst,_hunger,_broken,_oxygen,_hazzard,_emergency];
|
||||
|
||||
// find radio
|
||||
{
|
||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) == "ItemRadio") exitWith{
|
||||
EPOCH_equippedItem_PVS = [_x, true, player];
|
||||
};
|
||||
} forEach assignedItems player;
|
||||
|
||||
// lootBubble Init
|
||||
_loots = ["CfgEpochClient", "lootClasses", EPOCH_lootClasses] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
_lootClasses = ('CfgBuildingLootPos' call EPOCH_returnConfig) call Bis_fnc_getCfgSubClasses;
|
||||
_lootClasses = _lootClasses - ["Default"];
|
||||
|
||||
_lootBubble = {
|
||||
private["_pos", "_others", "_objects", "_nearObjects", "_building", "_travelDir", "_lootDist", "_xPos", "_yPos", "_lootLoc", "_playerPos", "_distanceTraveled", "_class", "_dir", "_color", "_colors", "_item", "_randomColor", "_positions", "_lootBiasPos", "_lootType", "_config"];
|
||||
_playerPos = getPosATL vehicle player;
|
||||
_distanceTraveled = EPOCH_lastPlayerPos distance _playerPos;
|
||||
if (_distanceTraveled > 10 && _distanceTraveled < 200) then {
|
||||
_travelDir = [EPOCH_lastPlayerPos, _playerPos] call BIS_fnc_dirTo;
|
||||
_lootDist = 30 + _distanceTraveled;
|
||||
_xPos = (_playerPos select 0) + (_lootDist * sin(_travelDir));
|
||||
_yPos = (_playerPos select 1) + (_lootDist * cos(_travelDir));
|
||||
_lootLoc = [_xPos, _yPos, 0];
|
||||
|
||||
_objects = nearestObjects[_lootLoc, _lootClasses, 30];
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
||||
_jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH"], _buildingJammerRange];
|
||||
|
||||
if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then {
|
||||
|
||||
_building = _objects select(floor(random(count _objects)));
|
||||
|
||||
if !(_building in EPOCH_LootedBlds) then {
|
||||
|
||||
_pos = getPosATL _building;
|
||||
_others = _building nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 15];
|
||||
if (_others isEqualTo[]) then {
|
||||
|
||||
_nearObjects = nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 35];
|
||||
if (_nearObjects isEqualTo[]) then {
|
||||
|
||||
_config = ('CfgBuildingLootPos' call EPOCH_returnConfig) >> (typeOf _building);
|
||||
|
||||
if (isClass(_config)) then {
|
||||
|
||||
_lootBiasPos = getNumber(_config >> "lootBiasPos");
|
||||
_lootType = getText(_config >> "lootType");
|
||||
|
||||
EPOCH_LootedBlds pushBack _building;
|
||||
if (count EPOCH_LootedBlds >= 20) then {
|
||||
EPOCH_LootedBlds deleteAt 0;
|
||||
};
|
||||
|
||||
{
|
||||
_positions = [] + getArray(_config >> (_x select 0));
|
||||
if !(_positions isEqualTo[]) then {
|
||||
_class = _x select 1;
|
||||
_randomColor = _x select 2;
|
||||
{
|
||||
|
||||
if ((random 100) < _lootBiasPos) then {
|
||||
|
||||
_pos = _building modelToWorld(_x select 0);
|
||||
|
||||
if (nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 2] isEqualTo[]) then {
|
||||
|
||||
if ((typeName _class) == "ARRAY") then {
|
||||
_class = _class select(floor(random(count _class)));
|
||||
};
|
||||
|
||||
_dir = (_x select 1) + (getDir _building);
|
||||
if (_dir > 360) then {
|
||||
_dir = _dir - 360;
|
||||
};
|
||||
|
||||
// Temp for now till we get more
|
||||
if (_lootType == "mil" && _class == "Bed_EPOCH") then {
|
||||
_class = "Bunk_EPOCH";
|
||||
};
|
||||
|
||||
_item = createVehicle[_class, _pos, [], 0.0, "CAN_COLLIDE"];
|
||||
_item setDir _dir;
|
||||
|
||||
// force item to ground level is resulting z pos is below ground.
|
||||
if (_pos select 2 < 0) then {
|
||||
_pos set[2, 0];
|
||||
};
|
||||
|
||||
if (surfaceIsWater _pos) then {
|
||||
_item setPosASL _pos;
|
||||
} else {
|
||||
_item setPosATL _pos;
|
||||
};
|
||||
|
||||
if (typeName _randomColor isEqualTo "STRING") then {
|
||||
_randomColor = _randomColor isEqualTo "true";
|
||||
};
|
||||
|
||||
if (_randomColor) then {
|
||||
_colors = [] + getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures");
|
||||
if !(_colors isEqualTo[]) then {
|
||||
_color = _colors select floor(random(count _colors));
|
||||
_item setObjectTextureGlobal[0, _color];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}forEach _positions;
|
||||
};
|
||||
}forEach _loots;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
EPOCH_lastPlayerPos = _playerPos;
|
||||
};
|
||||
|
||||
// [control,bool] call _fadeUI;
|
||||
_fadeUI = {
|
||||
private ["_ctrl"];
|
||||
_ctrl = _this select 0;
|
||||
if (_this select 1) then {
|
||||
if (ctrlFade _ctrl == 0) then {
|
||||
_ctrl ctrlSetFade 1;
|
||||
_ctrl ctrlCommit 0.5;
|
||||
};
|
||||
if (ctrlFade _ctrl == 1) then {
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 0.5;
|
||||
};
|
||||
} else {
|
||||
if (ctrlFade _ctrl != 1) then {
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_cursorTarget = objNull;
|
||||
|
||||
// Master Loop Start
|
||||
while {alive player} do {
|
||||
|
||||
_configName = configName _x;
|
||||
_varName = format["_EPOCH_%1",_configName];
|
||||
_build_sqf = _build_sqf + '
|
||||
'+_varName+' = diag_tickTime;
|
||||
';
|
||||
}forEach _configs;
|
||||
_build_sqf = _build_sqf + '
|
||||
while {'+_condition+'} do {
|
||||
_tickTime = diag_tickTime;
|
||||
|
||||
// 1 second
|
||||
if ((_tickTime - _EPOCH_1) > 1) then {
|
||||
|
||||
_EPOCH_1 = _tickTime;
|
||||
|
||||
// current target
|
||||
|
||||
_currentTarget = objNull;
|
||||
_cursorTarget = ([10] call EPOCH_fnc_cursorTarget);
|
||||
if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then {
|
||||
if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{
|
||||
if (_cursorTarget isKindOf "Animal_Base_F") then {
|
||||
if !(alive _cursorTarget) then {
|
||||
_currentTarget = _cursorTarget;
|
||||
};
|
||||
} else {
|
||||
_currentTarget = _cursorTarget;
|
||||
};
|
||||
};
|
||||
};
|
||||
EPOCH_currentTarget = _currentTarget;
|
||||
|
||||
_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;
|
||||
hintsilent "BUILD MODE: DISABLED";
|
||||
EPOCH_Target = objNull;
|
||||
// EPOCH_SURVEY = [];
|
||||
};
|
||||
_increaseStamina = true;
|
||||
|
||||
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)]
|
||||
];
|
||||
_delay = getNumber(_x >> "delay");
|
||||
_configName = configName _x;
|
||||
_varName = format["_EPOCH_%1",_configName];
|
||||
_code = preprocessFile format ["%1\%2.sqf",_file,_configName];
|
||||
_build_sqf = _build_sqf + '
|
||||
if ((_tickTime - '+_varName+') > '+str(_delay)+') then {
|
||||
'+_varName+' = _tickTime;
|
||||
'+_code+'
|
||||
};
|
||||
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 (ctrlShown _thirst) then {
|
||||
[_thirst,_thirsty] call _fadeUI;
|
||||
_thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1];
|
||||
_thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1];
|
||||
};
|
||||
|
||||
_hunger ctrlShow (EPOCH_playerHunger <= 1250);
|
||||
if (ctrlShown _hunger) then {
|
||||
[_hunger,_hungry] call _fadeUI;
|
||||
_hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1];
|
||||
_hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1];
|
||||
};
|
||||
|
||||
_playerOxygen = getOxygenRemaining player;
|
||||
_oxygen ctrlShow (_playerOxygen < 1);
|
||||
if (ctrlShown _oxygen) then {
|
||||
[_oxygen,(_playerOxygen <= 0.55)] call _fadeUI;
|
||||
_oxygen ctrlSetTextColor [1, _playerOxygen, _playerOxygen, 1];
|
||||
};
|
||||
|
||||
_hazzard ctrlShow (EPOCH_playerToxicity > 1);
|
||||
if (ctrlShown _hazzard) then {
|
||||
[_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI;
|
||||
_toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1];
|
||||
_hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1];
|
||||
};
|
||||
|
||||
_broken ctrlShow ((player getHitPointDamage "HitLegs") >= 0.5);
|
||||
if (ctrlShown _broken) then {
|
||||
[_broken,true] call _fadeUI;
|
||||
};
|
||||
|
||||
if (_envCold || _envHot || _hungry || _thirsty) then {
|
||||
if (_envHot || _envCold) then {
|
||||
player setFatigue 1;
|
||||
};
|
||||
EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190;
|
||||
_increaseStamina = false;
|
||||
} else {
|
||||
if (EPOCH_playerStamina > 0) then {
|
||||
if !(_panic) then {
|
||||
if (!_warnbloodPressure) then {
|
||||
player setFatigue 0;
|
||||
};
|
||||
EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_critical = (damage player >= 0.7 || _warnbloodPressure);
|
||||
_emergency ctrlShow _critical;
|
||||
if (ctrlShown _emergency) then {
|
||||
[_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI;
|
||||
_emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1];
|
||||
_emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1];
|
||||
};
|
||||
|
||||
if (EPOCH_playerBloodP >= 180) then {
|
||||
true call EPOCH_pushCustomVar;
|
||||
};
|
||||
if (_increaseStamina && (getFatigue player) == 0) then {
|
||||
EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax;
|
||||
};
|
||||
if (EPOCH_debugMode) then {
|
||||
call EPOCH_debugMonitor;
|
||||
};
|
||||
|
||||
call EPOCH_TradeLoop;
|
||||
|
||||
//Good bye onEachFrame hacks ;)
|
||||
onEachFrame EPOCH_onEachFrame;
|
||||
};
|
||||
|
||||
// 10 seconds
|
||||
if ((_tickTime - _EPOCH_10) > 10) then {
|
||||
|
||||
_EPOCH_10 = _tickTime;
|
||||
|
||||
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
||||
EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2];
|
||||
EPOCH_arr_interactedObjs = [];
|
||||
};
|
||||
|
||||
if (damage player != _damagePlayer) then {
|
||||
if (alive player) then {
|
||||
true call EPOCH_pushCustomVar;
|
||||
_damagePlayer = damage player;
|
||||
};
|
||||
};
|
||||
|
||||
if ((rating player) < 0) then {
|
||||
player addRating abs(rating player);
|
||||
};
|
||||
|
||||
// calculate total available power
|
||||
// 1. number of power production devices within range 75m
|
||||
|
||||
// find share of power based on factors
|
||||
// 1. number of players
|
||||
// 2. Other sources of drain (Lights)
|
||||
|
||||
_energyValue = EPOCH_chargeRate min _energyRegenMax;
|
||||
_vehicle = vehicle player;
|
||||
if (_vehicle != player && isEngineOn _vehicle) then {
|
||||
_energyValue = _energyValue + 5;
|
||||
};
|
||||
|
||||
if (currentVisionMode player == 1) then { //NV enabled
|
||||
_energyValue = _energyValue - _energyCostNV;
|
||||
if (EPOCH_playerEnergy == 0) then {
|
||||
player action["nvGogglesOff", player];
|
||||
};
|
||||
};
|
||||
|
||||
EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0;
|
||||
|
||||
if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then {
|
||||
9993 cutRsc["EpochGameUI3", "PLAIN", 0, false];
|
||||
_display3 = uiNamespace getVariable "EPOCH_EpochGameUI3";
|
||||
_energyDiff = round(EPOCH_playerEnergy - _prevEnergy);
|
||||
_diffText = if (_energyDiff > 0) then {format["+%1",_energyDiff]} else {format["%1",_energyDiff]};
|
||||
// hint str [_energyValue,_prevEnergy,EPOCH_playerEnergy];
|
||||
(_display3 displayCtrl 21210) ctrlSetText format["%1/%2 %3", round(EPOCH_playerEnergy), EPOCH_playerEnergyMax, _diffText];
|
||||
_prevEnergy = EPOCH_playerEnergy;
|
||||
};
|
||||
|
||||
if (EPOCH_playerEnergy == 0) then {
|
||||
if (EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Mode Disabled: Need Energy< / t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
EPOCH_Target = objNull;
|
||||
EPOCH_Z_OFFSET = 0;
|
||||
EPOCH_X_OFFSET = 0;
|
||||
EPOCH_Y_OFFSET = 5;
|
||||
};
|
||||
};
|
||||
|
||||
_attackers = player nearEntities[["Snake_random_EPOCH", "GreatWhite_F", "Epoch_Cloak_F"], 30];
|
||||
if !(_attackers isEqualTo[]) then {
|
||||
(_attackers select 0) call EPOCH_client_bitePlayer;
|
||||
_panic = true;
|
||||
} else {
|
||||
// custom poision
|
||||
_toxicObjs = player nearobjects["SmokeShellCustom", 6];
|
||||
if!(_toxicObjs IsEqualTo[]) then {
|
||||
(_toxicObjs select 0) call EPOCH_client_bitePlayer;
|
||||
_panic = true;
|
||||
} else {
|
||||
_panic = false;
|
||||
};
|
||||
};
|
||||
|
||||
call EPOCH_fnc_Weather;
|
||||
|
||||
// Hunger / Thirst
|
||||
_HTlossRate = _baseHTLoss;
|
||||
if (EPOCH_playerStamina < 100) then {
|
||||
if ((getFatigue player) > 0) then {
|
||||
_HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player));
|
||||
};
|
||||
} else {
|
||||
_HTlossRate = (_HTlossRate / 2);
|
||||
};
|
||||
|
||||
EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0;
|
||||
EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0;
|
||||
|
||||
call _lootBubble;
|
||||
|
||||
EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500;
|
||||
};
|
||||
|
||||
if ((_tickTime - _EPOCH_15) > 15) then {
|
||||
_EPOCH_15 = _tickTime-10;
|
||||
|
||||
if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then {
|
||||
_EPOCH_15 = _tickTime;
|
||||
_prevEquippedItem = EPOCH_equippedItem_PVS;
|
||||
publicVariableServer "EPOCH_equippedItem_PVS";
|
||||
};
|
||||
};
|
||||
|
||||
if ((_tickTime - _EPOCH_30) > 30) then {
|
||||
_EPOCH_30 = _tickTime;
|
||||
|
||||
_nearByBobbersLocal = [];
|
||||
_nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12];
|
||||
{
|
||||
if (local _x) then {
|
||||
_nearByBobbersLocal pushBack _x
|
||||
}
|
||||
} forEach _nearByBobbers;
|
||||
|
||||
if !(_nearByBobbersLocal isEqualTo []) then {
|
||||
if ((random 100) < 50) then {
|
||||
_bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers));
|
||||
_bobber setVelocity [0,-1,-1];
|
||||
_bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
if ((_tickTime - _EPOCH_60) > 60) then {
|
||||
|
||||
_EPOCH_60 = _tickTime;
|
||||
_position = getPosATL player;
|
||||
|
||||
EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300];
|
||||
EPOCH_playerIsSwimming = false;
|
||||
|
||||
if !(surfaceIsWater _position) then {
|
||||
if (EPOCH_nearestLocations isEqualTo []) then{
|
||||
if (count(_position nearEntities["Animal_Base_F", 800]) < 2) then {
|
||||
// diag_log "DEBUG: Attempt to spawn animal";
|
||||
call EPOCH_client_loadAnimalBrain;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// spawn shark if player is deep water and not in vehicle
|
||||
if (vehicle player == player) then{
|
||||
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
|
||||
if (_offsetZ > 1.7) then {
|
||||
EPOCH_playerIsSwimming = true;
|
||||
};
|
||||
if (_offsetZ > 50) then {
|
||||
"GreatWhite_F" call EPOCH_unitSpawn;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// default power state
|
||||
EPOCH_nearPower = false;
|
||||
EPOCH_chargeRate = 0;
|
||||
|
||||
// energy Charge from nearby power plants
|
||||
_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange];
|
||||
if !(_powerSources isEqualTo[]) then {
|
||||
_totalCapacity = 0;
|
||||
{
|
||||
_powerClass = typeOf _x;
|
||||
_powerCap = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerCapacity");
|
||||
_powerType = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerType");
|
||||
if (_powerCap == 0) then {
|
||||
_powerCap = 100;
|
||||
};
|
||||
if (_powerType == 1) then {
|
||||
if (sunOrMoon < 1) then {
|
||||
_powerCap = _powerCap/2;
|
||||
};
|
||||
};
|
||||
_totalCapacity = _totalCapacity + _powerCap;
|
||||
} forEach _powerSources;
|
||||
if (_totalCapacity > 0) then {
|
||||
_players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange];
|
||||
if (_players isEqualTo []) then {
|
||||
EPOCH_chargeRate = ceil _totalCapacity;
|
||||
} else {
|
||||
EPOCH_chargeRate = ceil (_totalCapacity / (count _players));
|
||||
};
|
||||
EPOCH_nearPower = true;
|
||||
};
|
||||
};
|
||||
|
||||
EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer));
|
||||
EPOCH_clientAliveTimer = _tickTime;
|
||||
};
|
||||
|
||||
if ((_tickTime - _EPOCH_300) > 300) then {
|
||||
_EPOCH_300 = _tickTime;
|
||||
false call EPOCH_pushCustomVar;
|
||||
};
|
||||
|
||||
if ((_tickTime - _EPOCH_600) > 600) then{
|
||||
_EPOCH_600 = _tickTime;
|
||||
|
||||
if ((EPOCH_playerSpawnArray select(EPOCH_spawnIndex find "Epoch_Sapper_F")) <= 0) then{
|
||||
_sapperChance = 1 + (EPOCH_playerSoiled / 2);
|
||||
if !(EPOCH_nearestLocations isEqualTo[]) then{
|
||||
_sapperChance = _sapperChance + 2;
|
||||
};
|
||||
// 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper every 10 minutes
|
||||
if (random _sapperRndChance < _sapperChance) then{
|
||||
"Epoch_Sapper_F" call EPOCH_unitSpawnIncrease;
|
||||
};
|
||||
};
|
||||
|
||||
_spawnUnits = [];
|
||||
{
|
||||
if (_x > 0) then{
|
||||
_spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex);
|
||||
};
|
||||
} forEach EPOCH_playerSpawnArray;
|
||||
|
||||
// test spawning one antagonist every 10 minutes select one unit at random to spawn
|
||||
if !(_spawnUnits isEqualTo[]) then{
|
||||
(_spawnUnits select(floor random(count _spawnUnits))) call EPOCH_unitSpawn;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
';
|
||||
}forEach _configs;
|
||||
_build_sqf = _build_sqf + '
|
||||
if (vehicle player != player) then {
|
||||
if (isNull EPOCH_currentVehicle) then {
|
||||
EPOCH_currentVehicle = vehicle player;
|
||||
EPOCH_currentVehicle addEventHandler["GetOut", "_this call EPOCH_antiWall"];
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 0.1;
|
||||
};
|
||||
};';
|
||||
call compile _build_sqf;
|
||||
|
@ -1,40 +0,0 @@
|
||||
// EPOCHMOD.com
|
||||
disableSerialization;
|
||||
_config = 'CfgMasterLoop' call EPOCH_returnConfig;
|
||||
_build_sqf = preprocessFile getText (_config >> "Init" >> "file");
|
||||
_configs = "true" configClasses (_config >> "Events");
|
||||
_condition = getText (_config >> "Events" >> "condition");
|
||||
_file = getText (_config >> "Events" >> "file");
|
||||
{
|
||||
_configName = configName _x;
|
||||
_varName = format["_EPOCH_%1",_configName];
|
||||
_build_sqf = _build_sqf + '
|
||||
'+_varName+' = diag_tickTime;
|
||||
';
|
||||
}forEach _configs;
|
||||
_build_sqf = _build_sqf + '
|
||||
while {'+_condition+'} do {
|
||||
_tickTime = diag_tickTime;
|
||||
';
|
||||
{
|
||||
_delay = getNumber(_x >> "delay");
|
||||
_configName = configName _x;
|
||||
_varName = format["_EPOCH_%1",_configName];
|
||||
_code = preprocessFile format ["%1\%2.sqf",_file,_configName];
|
||||
_build_sqf = _build_sqf + '
|
||||
if ((_tickTime - '+_varName+') > '+str(_delay)+') then {
|
||||
'+_varName+' = _tickTime;
|
||||
'+_code+'
|
||||
};
|
||||
';
|
||||
}forEach _configs;
|
||||
_build_sqf = _build_sqf + '
|
||||
if (vehicle player != player) then {
|
||||
if (isNull EPOCH_currentVehicle) then {
|
||||
EPOCH_currentVehicle = vehicle player;
|
||||
EPOCH_currentVehicle addEventHandler["GetOut", "_this call EPOCH_antiWall"];
|
||||
};
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};';
|
||||
call compile _build_sqf;
|
@ -71,14 +71,14 @@
|
||||
_thirst ctrlShow (EPOCH_playerThirst <= 625);
|
||||
if (ctrlShown _thirst) then {
|
||||
[_thirst,_thirsty] call _fadeUI;
|
||||
_thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1];
|
||||
_thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1,true];
|
||||
_thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1];
|
||||
};
|
||||
|
||||
_hunger ctrlShow (EPOCH_playerHunger <= 1250);
|
||||
if (ctrlShown _hunger) then {
|
||||
[_hunger,_hungry] call _fadeUI;
|
||||
_hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1];
|
||||
_hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1,true];
|
||||
_hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1];
|
||||
};
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
_hazzard ctrlShow (EPOCH_playerToxicity > 1);
|
||||
if (ctrlShown _hazzard) then {
|
||||
[_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI;
|
||||
_toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1];
|
||||
_toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1,true];
|
||||
_hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1];
|
||||
};
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
_emergency ctrlShow _critical;
|
||||
if (ctrlShown _emergency) then {
|
||||
[_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI;
|
||||
_emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1];
|
||||
_emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1,true];
|
||||
_emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1];
|
||||
};
|
||||
|
||||
|
@ -92,3 +92,6 @@
|
||||
call _lootBubble;
|
||||
|
||||
EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500;
|
||||
|
||||
//player setAnimSpeedCoef 0.75;
|
||||
//player setCustomAimCoef 1;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
Author: Andrew Gregory - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
test code to spawn flocks (unused)
|
||||
|
||||
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/startFlock.sqf
|
||||
*/
|
||||
|
||||
//
|
||||
//Flocking (Emergent) Behaviour AI Test / Demo
|
||||
//
|
||||
|
@ -1,3 +1,27 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: He-Man
|
||||
|
||||
Description:
|
||||
NPC trade filter 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/traders/EPOCH_NPCTraderMenuFilter.sqf
|
||||
|
||||
Example:
|
||||
onLBSelChanged = "_this call EPOCH_NPCTraderMenuFilter";
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: CONTROL
|
||||
_this select 1: NUMBER - Index ID
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private ["_item","_index","_itemCount","_itemOfferCount","_config","_name","_picture","_type","_vehicles","_sizeOut","_offerArray","_itemName","_itemIcon","_qty","_items","_qtys","_aiItems","_filterArray","_filterWeapons","_filterMagazines","_filterItems","_filterVehicle","_slot","_control","_isPlayerFilter"];
|
||||
|
||||
disableSerialization;
|
||||
@ -72,6 +96,20 @@ if !(isNull EPOCH_lastNPCtradeTarget) then {
|
||||
lbSetPicture [41500, _index, _x call EPOCH_itemPicture];
|
||||
};
|
||||
} forEach items player;
|
||||
if (primaryWeapon player != "") then {
|
||||
_wpn = primaryWeapon player;
|
||||
_offerArray pushback _wpn;
|
||||
_index = lbAdd [41500, _wpn call EPOCH_itemDisplayName];
|
||||
lbSetData [41500, _index, _wpn];
|
||||
lbSetPicture [41500, _index, _wpn call EPOCH_itemPicture];
|
||||
};
|
||||
if (count backpackItems player == 0 && count backpackmagazines player == 0 && backpack player != "") then {
|
||||
_bpck = Backpack player;
|
||||
_offerArray pushback _bpck;
|
||||
_index = lbAdd [41500, _bpck call EPOCH_itemDisplayName];
|
||||
lbSetData [41500, _index, _bpck];
|
||||
lbSetPicture [41500, _index, _bpck call EPOCH_itemPicture];
|
||||
};
|
||||
};
|
||||
|
||||
if (_filterVehicle) then {
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: He-Man
|
||||
|
||||
Description:
|
||||
NPC trade 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/traders/EPOCH_startNpcTrade.sqf
|
||||
|
||||
Example:
|
||||
cursorTarget call EPOCH_startNpcTrade;
|
||||
|
||||
Parameter(s):
|
||||
_this: OBJECT
|
||||
|
||||
Returns:
|
||||
NOTHING
|
||||
*/
|
||||
private["_item", "_currQty", "_tradeType", "_itemWorth", "_aiItems", "_itemClasses", "_itemQtys", "_qtyIndex", "_tradeTotal", "_tradeQtyTotal", "_errorMsg", "_target", "_sizeOut", "_array", "_makeTrade", "_vehSlot", "_vehicle", "_vehicles", "_display", "_addWeaponToHands", "_type", "_tax"];
|
||||
|
||||
if (!isNil "EPOCH_TRADE_COMPLETE") exitWith {};
|
||||
@ -5,7 +28,6 @@ if (!isNil "EPOCH_TRADE_STARTED") exitWith{};
|
||||
|
||||
if (!isNull _this) then {
|
||||
|
||||
EPOCH_TRADE_STARTED = true;
|
||||
|
||||
_config = 'CfgPricing' call EPOCH_returnConfig;
|
||||
|
||||
@ -25,9 +47,18 @@ if (!isNull _this) then {
|
||||
if (_item in items player) then {
|
||||
player removeItem _item;
|
||||
_arrayIn pushBack _item;
|
||||
} else {
|
||||
if (_item == primaryweapon player) then {
|
||||
player removeweapon _item;
|
||||
_arrayIn pushBack _item;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then {
|
||||
if (_item == backpack player) then {
|
||||
removeBackpack player;
|
||||
_arrayIn pushBack _item;
|
||||
} else {
|
||||
_vehicles = _this nearEntities[[_item], 30];
|
||||
if (!(_vehicles isEqualTo[])) then {
|
||||
_vehicle = _vehicles select 0;
|
||||
@ -41,6 +72,7 @@ if (!isNull _this) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (_item in magazines player) then {
|
||||
player removeMagazine _item;
|
||||
@ -78,6 +110,7 @@ if (!isNull _this) then {
|
||||
};
|
||||
|
||||
if (!(_arrayIn isEqualTo[]) || !(_arrayOut isEqualTo[])) then {
|
||||
EPOCH_TRADE_STARTED = true;
|
||||
|
||||
// make trade
|
||||
EPOCH_MAKENPCTRADE = [_this, _arrayIn, _arrayOut, player, Epoch_personalToken];
|
||||
@ -133,7 +166,8 @@ if (!isNull _this) then {
|
||||
};
|
||||
if (_addWeaponToHands) then {
|
||||
player addWeapon _x;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
_x call EPOCH_fnc_addItemOverflow;
|
||||
};
|
||||
} else {
|
||||
@ -146,7 +180,6 @@ if (!isNull _this) then {
|
||||
};
|
||||
} forEach(_this select 1);
|
||||
|
||||
|
||||
_dt = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 0.4, 5, 2, 0, 2] spawn bis_fnc_dynamictext;
|
||||
}
|
||||
else {
|
||||
|
@ -1,3 +1,17 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
sets Fuel on local vehicle
|
||||
|
||||
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/vehicles/EPOCH_client_fillVehicle.sqf
|
||||
*/
|
||||
private["_vehicle","_value"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user