Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/supporting_fires/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\arc_cfg\addons\supporting_fires
446 changes: 446 additions & 0 deletions addons/supporting_fires/ACE_Actions.hpp

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions addons/supporting_fires/ACE_ZeusActions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ACE_ZeusActions {
#include "ACE_Actions.hpp"
};
18 changes: 18 additions & 0 deletions addons/supporting_fires/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};

class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
9 changes: 9 additions & 0 deletions addons/supporting_fires/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class CfgVehicles {
class Man;

class CAManBase : Man {
class ACE_SelfActions {
#include "ACE_Actions.hpp"
};
};
};
40 changes: 40 additions & 0 deletions addons/supporting_fires/XEH_PREP.inc.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
PREP(ammoCheck);
PREP(barrage);
PREP(fireMission);
PREP(getTargetLocation);
PREP(getTargetName);
PREP(removeAmmo);
PREP(setTargetGrid);
PREP(ui_Grid_Button_Accept_action);
PREP(ui_Grid_Button_Apply_action);
PREP(ui_Grid_Button_Apply_onLoad);
PREP(ui_Grid_Target_X_onLoad);
PREP(ui_Grid_Target_Y_onLoad);
PREP(ui_conditionAdjust);
PREP(ui_conditionAmmoFlare);
PREP(ui_conditionAmmoHE);
PREP(ui_conditionAmmoSmoke);
PREP(ui_conditionAmmoVolume);
PREP(ui_conditionCheck);
PREP(ui_conditionFires);
PREP(ui_conditionFiring);
PREP(ui_conditionNumberOfGuns);
PREP(ui_conditionRepeatTarget);
PREP(ui_conditionTargets);
PREP(ui_conditionVisual);
PREP(ui_modifierTarget);
PREP(ui_statementAdjust);
PREP(ui_statementAmmoType);
PREP(ui_statementAmmoVolume);
PREP(ui_statementFireMission);
PREP(ui_statementFireMissionInProgress);
PREP(ui_statementFires);
PREP(ui_statementNumberOfGuns);
PREP(ui_statementRounds);
PREP(ui_statementSafety);
PREP(ui_statementTargetSelect);
PREP(ui_statementTargetSelectGrid);
PREP(ui_statementTargetSelectNumber);
PREP(ui_statementTargetSelectRepeat);
PREP(ui_statementTargetSelectVisual);
PREP(ui_statementVolumeOfFire);
293 changes: 293 additions & 0 deletions addons/supporting_fires/XEH_postInit.sqf

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions addons/supporting_fires/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.inc.sqf"
2 changes: 2 additions & 0 deletions addons/supporting_fires/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.inc.sqf"
18 changes: 18 additions & 0 deletions addons/supporting_fires/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"arc_cfg_main"};
author = ARC_AUTHOR;
VERSION_CONFIG;
};
};

#include "gui.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "ACE_ZeusActions.hpp"
55 changes: 55 additions & 0 deletions addons/supporting_fires/fnc_ammoCheck.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include "script_component.hpp"

// [] call FUNC(ammoCheck);

private ["_ammoCountHE", "_ammoCountSmoke", "_ammoCountFlare"];
// systemChat "ammo check started";

if (GVAR(isZEUS)) exitWith {
[["As Zeus you have unlimited rounds for all types."], true] call CBA_fnc_notify;
};

if (GVAR(isWest)) then {
// systemChat "west ammo counted";
_ammoCountHE = GVAR(shellsHE_AmmoCountWest);
_ammoCountSmoke = GVAR(shellsSmoke_AmmoCountWest);
_ammoCountFlare = GVAR(shellsFlare_AmmoCountWest);
};

if (GVAR(isEast)) then {
// systemChat "east ammo counted";
_ammoCountHE = GVAR(shellsHE_AmmoCountEast);
_ammoCountSmoke = GVAR(shellsSmoke_AmmoCountEast);
_ammoCountFlare = GVAR(shellsFlare_AmmoCountEast);
};

if (GVAR(isGuer)) then {
// systemChat "resistance ammo counted";
_ammoCountHE = GVAR(shellsHE_AmmoCountGuer);
_ammoCountSmoke = GVAR(shellsSmoke_AmmoCountGuer);
_ammoCountFlare = GVAR(shellsFlare_AmmoCountGuer);
};

// systemChat (str _ammoCountHE);
// systemChat (str _ammoCountSmoke);
// systemChat (str _ammoCountFlare);
// systemChat "ammo count passed";

[["Roger, checking ammunition."], true] call CBA_fnc_notify;

[
{
params ["_ammoCountHE", "_ammoCountSmoke", "_ammoCountFlare"];
[
["Available ammunition:"],
[(format ["%1 rounds HE, ", _ammoCountHE])],
[(format ["%1 rounds Smoke, ", _ammoCountSmoke])],
[(format ["%1 rounds Flare.", _ammoCountFlare])],
true
] call CBA_fnc_notify;
// systemChat "ammo hint finished";
},
[_ammoCountHE, _ammoCountSmoke, _ammoCountFlare],
5
] call CBA_fnc_waitAndExecute;
// systemChat "ammo check finshed";
109 changes: 109 additions & 0 deletions addons/supporting_fires/fnc_barrage.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#include "script_component.hpp"

params [
"_type",
"_targetXY",
"_targetName",
"_layingDelay"
];

private _targetX = _targetXY select 0;
private _targetY = _targetXY select 1;

private _timeToImpact = 0;
if (!GVAR(isZEUS)) then {
_timeToImpact = 30;
};

// systemChat str _this;
// systemChat ("_targetX - " + str _targetX);
// systemChat ("_targetY - " + str _targetY);
// systemChat "fake time to impact simulation started";

[
{
params ["_targetName", "_timeToImpact"];

[
[(format ["Shots out on %1.", _targetName])],
[(format ["%1 seconds to impact.", _timeToImpact])],
["Watch for splash."],
true
] call CBA_fnc_notify;
// systemChat "Shots Out";
},
[_targetName, _timeToImpact],
_layingDelay
] call CBA_fnc_waitAndExecute;

[
{
params [
"_type",
"_targetX",
"_targetY",
"_targetName"
];
// systemChat "fake time-to-impact simulation over";

private _bombType = GVAR(shellsHE_Type);
if (_type isEqualTo "Smoke") then {
_bombType = GVAR(shellsSmoke_Type);
};
if (_type isEqualTo "Flare") then {
_bombType = GVAR(shellsFlare_Type);
};
// systemChat (str _bombType);

private _shotDelay = (random [0.1, 0.2, 0.5]);
private _rounds_fired = 0;

[
[(format ["Splash out on %1.", _targetName])],
true
] call CBA_fnc_notify;
// systemChat "Splash out";

for "_i" from 1 to GVAR(volumeOfFire) do {
[
{
params [
"_bombType",
"_targetX",
"_targetY"
];

private _bomb = _bombType createVehicle [_targetX, _targetY, 300];
// systemChat ("_bombType - " + str _bombType);

private _bombPosition = _bomb getPos [random GVAR(shellDispersion), random 360];
// systemChat ("_bombPosition - " + str _bombPosition);

private _bombPositionX = (_bombPosition select 0);
// systemChat ("_bombPositionX - " + str _bombPositionX);

private _bombPositionY = (_bombPosition select 1);
// systemChat ("_bombPositionY - " + str _bombPositionY);

_bomb setPos [_bombPositionX, _bombPositionY, 300];
_bomb setVelocity [0, 0, -10];
},
[_bombType, _targetX, _targetY],
_shotDelay
] call CBA_fnc_waitAndExecute;

_rounds_fired = _rounds_fired + 1;
_shotDelay = _shotDelay + (random [0.1, 0.2, 0.5]);
// systemChat ("_rounds_fired - " + str _rounds_fired);
// systemChat ("_shotDelay - " + str _shotDelay);

if (_rounds_fired >= GVAR(numberOfGuns)) then {
_shotDelay = _shotDelay + 3;
_rounds_fired = 0;
};
};
},
[_type, _targetX, _targetY, _targetName],
_timeToImpact +_layingDelay
] call CBA_fnc_waitAndExecute;
// systemChat "Barrage over";
Loading