Skip to content

Commit

Permalink
(1.0.5)
Browse files Browse the repository at this point in the history
CHANGELOG:
> Dispensers now have a property for a specific barrel, so it's now
possible to add dispensers that give you different barrels.
> You can now spawn dispensers with Zeus.
> Added some safe distance between the helicopter and the barrel, as
some vehicles like Little Birds were a bit too close and would sometimes
be damaged.
> The mod is now available in German! Huge thanks to @nic547 .
  • Loading branch information
Neefay committed Sep 18, 2017
1 parent 4c2b9dc commit a9d343e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
8 changes: 5 additions & 3 deletions addons/barrelbombs/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ class CfgVehicles {

displayName = CSTRING(Object_Dispenser_01);
scope = 2;
vehicleClass = "Ammo";
scopeCurator = 2;
vehicleClass = "Supplies";
GVAR(limitExplosives) = 3000;
GVAR(limitClusters) = 200;
GVAR(dispenserBarrel) = CLASSNAME_DEFAULTBARREL;

class EventHandlers {
init = QUOTE(_this call FUNC(initializeDispenserMaterials));
Expand All @@ -47,8 +49,8 @@ class CfgVehicles {
statement = QUOTE([ARR_2(_target,_player)] call FUNC(openBombPrepMenu));
};
};
};
};
};
};
};


Expand Down
2 changes: 1 addition & 1 deletion addons/barrelbombs/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
units[] = {"ACE_BarrelBomb_Dispenser_01"};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common", "ace_interaction", "ace_interact_menu", "Extended_EventHandlers"};
Expand Down
5 changes: 3 additions & 2 deletions addons/barrelbombs/functions/fnc_createBarrelBomb.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
params ["_dropperObject", "_barrelClass", "_explosiveType", ["_fuseTime", 99], ["_clusterAmount", 0]];
TRACE_5("CreatedBarrel",_dropperObject,_barrelClass,_explosiveType,_fuseTime,_clusterAmount);

private _delayTime = 0.5;
private _dropperVelocity = velocity _dropperObject;
private _dropperObjectPos = getPosATL _dropperObject;

_dropperObjectPos set [2, (_dropperObjectPos select 2) - DISTANCE_CREATEBARREL_LOWER_Z];

private _barrelObject = _barrelClass createVehicle _dropperObjectPos;

[_barrelObject] call FUNC(addDetailsToBarrel);
Expand All @@ -33,4 +34,4 @@ _barrelObject setVelocity _dropperVelocity;
else { [_explosiveType, _endPosition] call FUNC(createExplosion) };

}, [_barrelObject, _explosiveType, _fuseTriggerTime, _fuseTime, _clusterAmount]] call CBA_fnc_waitUntilAndExecute;
}, [_barrelObject, _explosiveType, _fuseTime, _clusterAmount], _delayTime] call CBA_fnc_waitAndExecute;
}, [_barrelObject, _explosiveType, _fuseTime, _clusterAmount], DURATION_BARREL_ACTIVATION_MIN] call CBA_fnc_waitAndExecute;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
params ["_dispenserObject"];
TRACE_1("Params",_dispenserObject);

private _returnValue = switch (typeOf _dispenserObject) do {
case QGVAR(Dispenser_01): { CLASSNAME_DEFAULTBARREL };
default { CLASSNAME_DEFAULTBARREL };
};
_returnValue
private _dispenserBarrel = getText(configFile >> "CfgVehicles" >> (typeOf _dispenserObject) >> QGVAR(dispenserBarrel));

_dispenserBarrel
4 changes: 4 additions & 0 deletions addons/barrelbombs/numbers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

#define DISTANCE_DEVIATION_CREATEBARREL_X 2

#define DISTANCE_CREATEBARREL_LOWER_Z 2.5

// VOLUME -------------

#define VOLUME_BOMBMAKING_DISTANCE_METERS 20
Expand All @@ -59,6 +61,8 @@
#define DURATION_BOMBMAKING_SECONDS 12
#define DURATION_LOADINGBARREL_SECONDS 3.5

#define DURATION_BARREL_ACTIVATION_MIN 0.5

// INTERVALS -------------

#define INTERVAL_FALLINGSOUND_START_SECONDS 2
Expand Down
2 changes: 1 addition & 1 deletion mod.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "ACE Barrel Bombs";
description = "ACE Barrel Bombs - Version 1.0.1";
description = "ACE Barrel Bombs - Version 1.0.5";
author = "Nife";
picture = "data\picture.paa";
logo = "data\logo.paa";
Expand Down

0 comments on commit a9d343e

Please sign in to comment.