Zeus - Add module for burning units (#8624)

* Add Zeus module for burning units

* Add ACE_Curator

* Simplified module code

* Remove double module declaration

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
This commit is contained in:
BaerMitUmlaut 2021-11-07 17:52:47 +01:00 committed by GitHub
parent 62a91f8ebb
commit 9be0b8b6c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 60 additions and 0 deletions

View File

@ -324,6 +324,13 @@ class CfgVehicles {
class ModuleArsenal_F: Module_F {
function=QFUNC(bi_moduleArsenal);
};
class GVAR(moduleBurn): GVAR(moduleBase) {
curatorCanAttach = 1;
category = QGVAR(Medical);
displayName = CSTRING(ModuleBurn_DisplayName);
function = QFUNC(moduleBurn);
icon = QPATHTOF(ui\Icon_Module_Zeus_Burn_ca.paa);
};
class Man;
class CAManBase: Man {

View File

@ -13,6 +13,7 @@ PREP(moduleAddAceArsenal);
PREP(moduleAddSpareTrack);
PREP(moduleAddSpareWheel);
PREP(moduleAddOrRemoveFRIES);
PREP(moduleBurn);
PREP(moduleCaptive);
PREP(moduleCargoParadrop);
PREP(moduleConfigurePylons);

View File

@ -87,6 +87,11 @@ class CfgPatches {
QGVAR(RemoveFullAceArsenal)
};
};
class GVAR(fire): ADDON {
units[] = {
QGVAR(moduleBurn)
};
};
};
class ACE_Curator {
@ -98,6 +103,7 @@ class ACE_Curator {
GVAR(fastroping) = "ace_fastroping";
GVAR(pylons) = "ace_pylons";
GVAR(arsenal) = "ace_arsenal";
GVAR(fire) = "ace_fire";
};
#include "CfgFactionClasses.hpp"

View File

@ -0,0 +1,42 @@
#include "script_component.hpp"
/*
* Author: BaerMitUmlaut
* Inflames a unit.
*
* Arguments:
* 0: The module logic <OBJECT>
*
* Return Value:
* None
*
* Example:
* [LOGIC] call ace_zeus_fnc_moduleBurn
*
* Public: No
*/
params ["_logic"];
if !(local _logic) exitWith {};
private _unit = attachedTo _logic;
deleteVehicle _logic;
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call FUNC(showMessage);
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call FUNC(showMessage);
};
case (alive _unit): {
[LSTRING(OnlyAlive)] call FUNC(showMessage);
};
case (["ace_fire"] call EFUNC(common,isModLoaded)): {
[LSTRING(RequiresAddon)] call FUNC(showMessage);
};
default {
[QEGVAR(fire,burn), [_unit, 5]] call CBA_fnc_globalEvent;
};
};

View File

@ -1891,5 +1891,9 @@
<French>Aucune cargaison chargée</French>
<Turkish>Kargo yüklenmedi</Turkish>
</Key>
<Key ID="STR_ACE_Zeus_ModuleBurn_DisplayName">
<English>Burn Unit</English>
<German>Einheit anzünden</German>
</Key>
</Package>
</Project>

Binary file not shown.