Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/(0.0.8)'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kexanone committed Jun 15, 2017
2 parents beb7297 + 5bc29a0 commit 2bfc38a
Show file tree
Hide file tree
Showing 115 changed files with 2,342 additions and 525 deletions.
Binary file modified @AresModAchillesExpansion/addons/data_f_achilles.pbo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified @AresModAchillesExpansion/addons/data_f_ares.pbo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified @AresModAchillesExpansion/addons/functions_f_achilles.pbo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ class CfgFunctions
{
project = "Ares Mod - Achilles Expansion";
tag = "Achilles";

class Init
{
file = "\achilles\functions_f_achilles\functions\init";

class onCuratorStart;
}
class functions_f_common
{
file = "\achilles\functions_f_achilles\functions\common";

class sum;
class arrayMean;
class pushBack;
Expand All @@ -27,17 +27,30 @@ class CfgFunctions
class getVehicleAmmoDef;
class getUnitAmmoDef;
class setUnitAmmoDef;
class setVehicleAmmoDef;
class checkLineOfFire2D;
class matrixTranspose;
class vectorMap;
class dikToLetter;
class getCuratorSelected;
class deadlyExplosion;
class disablingExplosion;
class fakeExplosion;
class hasACEExplosives;
};

class selectUnit
{
file = "\achilles\functions_f_achilles\functions\selectUnit";

class switchUnit_start;
class switchUnit_exit;
};

class functions_f_features
{
file = "\achilles\functions_f_achilles\functions\features";

class ACS_toggleGrouping;
class ambientAnim;
class ambientAnimGetParams;
Expand All @@ -52,25 +65,30 @@ class CfgFunctions
class PasteObjectsFromClipboard;
class damageComponents;
class changePylonAmmo;
class changeSideAttribute;
class changeSkills;
class groupObjects;
class ungroupObjects;
class setCuratorVisionModes;
class setCuratorVisionModes;
class damageBuildings;
class preplaceMode;
class addBreachDoorAction;
class breachStun;
class setACEInjury;
class setVanillaInjury;
class SuppressiveFire;
class changeNVGBrightness;
class createIED;
class createSuicideBomber;
class IED_DamageHandler;
};
};

class A3_Mark
{
class Vehicles
{
delete garage;
delete garage;
};
class Achilles
{
Expand All @@ -85,13 +103,17 @@ class CfgFunctions
{
delete showCuratorAttributes;
delete curatorObjectPlaced;
delete curatorObjectEdited;
delete toggleCuratorVisionMode;
};
class Achilles
{
file = "\achilles\functions_f_achilles\functions\replacement";

class showCuratorAttributes;
class curatorObjectPlaced;
class curatorObjectEdited;
class toggleCuratorVisionMode;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Author: CreepPork_LV, shay_gman
Description:
Creates a deadly IED explosion.
Parameters:
_this select: 0 - ARRAY - Center of explosion
_this select: 1 - NUMBER - Explosion Size
Returns:
Nothing
*/

_spawnPos = _this select 0;
_explosionSize = _this select 1;

_explosiveClass = switch (_explosionSize) do {
case 0: {"DemoCharge_Remote_Ammo_Scripted"};
case 1: {"IEDUrbanSmall_Remote_Ammo"};
case 2: {"IEDUrbanBig_Remote_Ammo"};
};

_IED = _explosiveClass createVehicle _spawnPos;

hideObjectGlobal _IED;
_IED setPosATL _spawnPos;

sleep 0.1;

_IED setDamage 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
Author: CreepPork_LV, shay_gman
Description:
Creates a medium sized explosion that can disable units.
Parameters:
_this select: 0 - ARRAY - Spawn position
_this select: 1 - NUMBER - Explosion Size
Returns:
Nothing
*/

_spawnPos = _this select 0;
_explosionSize = _this select 1;
_random = 0;

switch (_explosionSize) do
{
case 0:
{
"SmallSecondary" createVehicle _spawnPos;
_hitRadius = 20;
_killRadius = 10;
};

case 1:
{
"M_AT" createVehicle _spawnPos;
_hitRadius = 30;
_killRadius = 20;
};

case 2:
{
"M_AT" createVehicle _spawnPos;
_hitRadius = 50;
_killRadius = 30;
};
};

_targetUnits = _spawnPos nearObjects _hitRadius;

{
_random = random 10;
if(_x isKindOf "Man") then
{
if (((_x distance _spawnPos) < _killRadius) && (_random > 1))then
{
_x setHit ["legs", 0.9];
_x setdamage 0.7;
};
};

if(_x isKindOf "Car") then
{
if (((_x distance _spawnPos) < _killRadius) && (_random > 1))then
{
_x setdamage 0.7;
sleep 15;
_x setdamage 1;
}
else
{
_x setdamage 0.4;
}
};

if(_x isKindOf "Tank") then
{
if (((_x distance _spawnPos) < _killRadius) && (_random > 1))then
{
_x setdamage 0.7;
sleep 15;
_x setdamage 1;
};
};
} forEach _targetUnits;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Author: CreepPork_LV, shay_gman
Description:
Creates a fake (very small) explosion.
Parameters:
_this select: 0 - ARRAY - Spawn position
Returns:
Nothing
*/

_spawnPos = _this select 0;

_explosive = "SmallSecondary" createVehicle _spawnPos;
_explosive setPos _spawnPos;
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ switch (_mode) do
};
} forEach (curatorSelected select 0);
};
case "object":
{
_selected = (curatorSelected select 0);
};
case "group":
{
_selected = (curatorSelected select 1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AUTHOR: Kex
// DATE: 9/2/16
// VERSION: 1.0
// FILE: functions_f_achilles\functions\common\fn_getVehicleAmmoDef.sqf
// DATE: 6/15/17
// VERSION: 2.0
// DESCRIPTION: estimate for inverse function of setVehicleAmmoDef command (not very accurate)
//
// ARGUMENTS:
Expand All @@ -17,6 +16,7 @@


_vehicle = _this;
_vehicleType = typeOf _vehicle;

// get current state of all turret magazines
_AllTurretCurrentMagazinesClassName = [];
Expand All @@ -26,10 +26,10 @@ _AllTurretCurrentMagazinesAmmoCount = [];
_AllTurretCurrentMagazinesAmmoCount pushBack (_x select 2);
} forEach (magazinesAllTurrets _vehicle);

_turretsCfg = [typeOf _vehicle] call Achilles_fnc_getAllTurretConfig;
_turretsCfg = [_vehicleType] call Achilles_fnc_getAllTurretConfig;

// append config path for driver magazines
_turretsCfg pushBack (configFile >> "CfgVehicles" >> typeOf _vehicle);
_turretsCfg pushBack (configFile >> "CfgVehicles" >> _vehicleType);

_AllTurretAmmoPercentages = [];

Expand Down Expand Up @@ -62,6 +62,28 @@ _AllTurretAmmoPercentages = [];

} forEach _turretsCfg;

// handle dynamic loadout
if (isClass (configFile >> "cfgVehicles" >> _vehicleType >> "Components" >> "TransportPylonsComponent")) then
{
_TurretAmmoPercentages = [];
{
if (_x != "") then
{
private _current_ammoCount = _vehicle ammoOnPylon (_forEachIndex + 1);
if (typeName _current_ammoCount == "BOOL") then
{
if (_current_ammoCount) then {_TurretAmmoPercentages pushBack 1} else {_TurretAmmoPercentages pushBack 0};
} else
{
private _cfg_ammoCount = getNumber (configfile >> "CfgMagazines" >> _x >> "count");
if (_cfg_ammoCount == 0) then {_TurretAmmoPercentages pushBack 1} else {_TurretAmmoPercentages pushBack (_current_ammoCount / _cfg_ammoCount)};
};
};
} forEach (getPylonMagazines _vehicle);
_AllTurretAmmoPercentages pushBack (_TurretAmmoPercentages call Achilles_fnc_arrayMean);
};


// return the overall mean of all percentages
if (count _AllTurretAmmoPercentages != 0) then
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Author: CreepPork_LV
Description:
Checks if ACE3 Explosives is present.
Parameters:
NONE
Returns:
BOOL - if present
*/

_hasACE = false;

if (isClass (configFile >> "CfgPatches" >> "ace_explosives")) then
{
_hasACE = true;
};

_hasACE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AUTHOR: Kex
// DATE: 9/2/16
// VERSION: 1.0
// FILE: functions_f_achilles\functions\common\fn_setUnitAmmoDef.sqf
// DESCRIPTION: set vehicle's magazine count based on given percentage
// In contrast to setUnitAmmoDef, it can handle custom dynamic loadouts
//
// ARGUMENTS:
// _this select 0: OBJECT - vehicle for which the ammo is changed
// _this select 1: SCALAR - ammo value in range [0,1]
//
// RETURNS:
// nothing (procedure)
//
// Example:
// [_vehicle, 0.9] call Achilles_fnc_setVehicleAmmoDef;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

params ["_vehicle",["_percentage",1,[1]]];

_pylonMags = getPylonMagazines _vehicle;
_vehicle setVehicleAmmoDef _percentage;
{
private _cfg_ammoCount = getNumber (configfile >> "CfgMagazines" >> _x >> "count");
_vehicle setPylonLoadOut [_forEachIndex + 1, _x];
_vehicle setAmmoOnPylon [_forEachIndex + 1, round (_cfg_ammoCount * _percentage)];
} forEach _pylonMags;



Loading

0 comments on commit 2bfc38a

Please sign in to comment.