mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Port AGM: Logistics-UAV refuel/recharage
This commit is contained in:
parent
3b3944b56c
commit
4b1e40570e
1
addons/logistics_uavbattery/$PBOPREFIX$
Normal file
1
addons/logistics_uavbattery/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
|||||||
|
z\ace\addons\logistics_uavbattery
|
5
addons/logistics_uavbattery/CfgEventHandlers.hpp
Normal file
5
addons/logistics_uavbattery/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class Extended_PreInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
|
};
|
||||||
|
};
|
27
addons/logistics_uavbattery/CfgVehicles.hpp
Normal file
27
addons/logistics_uavbattery/CfgVehicles.hpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
class CfgVehicles {
|
||||||
|
class Helicopter_Base_F;
|
||||||
|
class UAV_01_base_F: Helicopter_Base_F {
|
||||||
|
class ACE_Actions {
|
||||||
|
class GVAR(RefuelUAV) {
|
||||||
|
displayName = "$STR_ACE_logistics_uavbattery_Recharge";
|
||||||
|
distance = 4;
|
||||||
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRefuelUAV));
|
||||||
|
statement = QUOTE([ARR_2(_player, _target)] call FUNC(refuelUAV));
|
||||||
|
showDisabled = 0; \
|
||||||
|
priority = 1.245; \
|
||||||
|
icon = QUOTE(PATHTOF(ui\UAV_battery.paa));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Misc box content
|
||||||
|
class Box_NATO_Support_F;
|
||||||
|
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||||
|
class TransportItems {
|
||||||
|
class _xx_ACE_UAVBattery {
|
||||||
|
count = 6;
|
||||||
|
name = "ACE_UAVBattery";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
addons/logistics_uavbattery/CfgWeapons.hpp
Normal file
15
addons/logistics_uavbattery/CfgWeapons.hpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
class CfgWeapons {
|
||||||
|
class InventoryItem_Base_F;
|
||||||
|
class ACE_ItemCore;
|
||||||
|
|
||||||
|
class ACE_UAVBattery: ACE_ItemCore {
|
||||||
|
scope = 2;
|
||||||
|
displayName = "$STR_ACE_logistics_uavbattery_Battery_Name";
|
||||||
|
descriptionShort = "$STR_ACE_logistics_uavbattery_Battery_Description";
|
||||||
|
model = QUOTE(PATHTOF(models\ace_battery.p3d));
|
||||||
|
picture = QUOTE(PATHTOF(ui\UAV_battery.paa));
|
||||||
|
class ItemInfo: InventoryItem_Base_F {
|
||||||
|
mass = 20;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
11
addons/logistics_uavbattery/README.md
Normal file
11
addons/logistics_uavbattery/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ace_logistics_uavbattery
|
||||||
|
===========
|
||||||
|
|
||||||
|
Adds an item `ACE_wirecutter` that allows cutting of fences in A3 and AiA maps.
|
||||||
|
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
The people responsible for merging changes to this component or answering potential questions.
|
||||||
|
|
||||||
|
- [PabstMirror](https://github.com/PabstMirror)
|
8
addons/logistics_uavbattery/XEH_preInit.sqf
Normal file
8
addons/logistics_uavbattery/XEH_preInit.sqf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(canRefuelUAV);
|
||||||
|
PREP(refuelUAV);
|
||||||
|
|
||||||
|
ADDON = true;
|
17
addons/logistics_uavbattery/config.cpp
Normal file
17
addons/logistics_uavbattery/config.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {"ACE_UAVBattery"};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"ace_common"};
|
||||||
|
author[] = {"marc_book"};
|
||||||
|
authorUrl = "";
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgEventHandlers.hpp"
|
||||||
|
#include "CfgVehicles.hpp"
|
||||||
|
#include "CfgWeapons.hpp"
|
19
addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf
Normal file
19
addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/* fnc_refuel.sqf
|
||||||
|
*
|
||||||
|
* Author: marc_book (modified by PabstMirror)
|
||||||
|
*
|
||||||
|
* Tests if unit can refuel the target UAV
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: OBJECT - Player unit
|
||||||
|
* 1: OBJECT - UAV to test
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* BOOL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_2(_caller,_target);
|
||||||
|
|
||||||
|
("ACE_UAVBattery" in (items _caller)) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4}
|
34
addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf
Normal file
34
addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/* fnc_refuel.sqf
|
||||||
|
*
|
||||||
|
* Author: marc_book (modified by PabstMirror)
|
||||||
|
*
|
||||||
|
* Starts refueling/recharging the 'Dartar' UAVs
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: OBJECT - Player unit
|
||||||
|
* 1: OBJECT - UAV
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* NOTHING
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_2(_caller,_target);
|
||||||
|
|
||||||
|
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
|
||||||
|
|
||||||
|
_onFinish = {
|
||||||
|
EXPLODE_2_PVT((_this select 0),_caller,_target);
|
||||||
|
_target setFuel 1;
|
||||||
|
_caller removeItem "ACE_UAVBattery";
|
||||||
|
};
|
||||||
|
|
||||||
|
_onFailure = {
|
||||||
|
EXPLODE_2_PVT((_this select 0),_caller,_target);
|
||||||
|
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
|
||||||
|
[_caller, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
|
[10, [_caller, _target], _onFinish, _onFailure, (localize "STR_ACE_logistics_uavbattery_Battery_Recharge"), {(_this select 0) call FUNC(canRefuelUAV)}] call EFUNC(common,progressBar);
|
@ -0,0 +1 @@
|
|||||||
|
#include "\z\ace\addons\logistics_uavbattery\script_component.hpp"
|
BIN
addons/logistics_uavbattery/models/ace_battery.p3d
Normal file
BIN
addons/logistics_uavbattery/models/ace_battery.p3d
Normal file
Binary file not shown.
79
addons/logistics_uavbattery/models/battery.rvmat
Normal file
79
addons/logistics_uavbattery/models/battery.rvmat
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
ambient[]={1,1,1,1};
|
||||||
|
diffuse[]={1,1,1,1};
|
||||||
|
forcedDiffuse[]={0,0,0,0};
|
||||||
|
emmisive[]={0,0,0,1};
|
||||||
|
specular[]={0.01,0.01,0.01,1}; //amount of glossiness - the higher the number, the higher the glossiness
|
||||||
|
specularPower=500; //area of glossiness - the higher the number, the smaller the area
|
||||||
|
PixelShaderID="Super";
|
||||||
|
VertexShaderID="Super";
|
||||||
|
|
||||||
|
class Stage1 {
|
||||||
|
texture="z\ace\addons\logistics_uavbattery\models\battery_nohq.paa";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,0};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage2 {
|
||||||
|
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,0};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage3 {
|
||||||
|
texture="#(argb,8,8,3)color(0,0,0,0,mc)";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,0};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage4 {
|
||||||
|
texture="z\ace\addons\logistics_uavbattery\models\default_as.paa";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,1};
|
||||||
|
pos[]={0,0,1};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage5 {
|
||||||
|
texture="z\ace\addons\logistics_uavbattery\models\battery_smdi.paa";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,0};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage6 {
|
||||||
|
texture="#(ai,64,64,1)fresnel(4.7,1.2)";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,1};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage7 {
|
||||||
|
texture="a3\data_f\env_land_ca.paa";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform {
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,1};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
BIN
addons/logistics_uavbattery/models/battery_co.paa
Normal file
BIN
addons/logistics_uavbattery/models/battery_co.paa
Normal file
Binary file not shown.
BIN
addons/logistics_uavbattery/models/battery_nohq.paa
Normal file
BIN
addons/logistics_uavbattery/models/battery_nohq.paa
Normal file
Binary file not shown.
BIN
addons/logistics_uavbattery/models/battery_smdi.paa
Normal file
BIN
addons/logistics_uavbattery/models/battery_smdi.paa
Normal file
Binary file not shown.
BIN
addons/logistics_uavbattery/models/default_as.paa
Normal file
BIN
addons/logistics_uavbattery/models/default_as.paa
Normal file
Binary file not shown.
12
addons/logistics_uavbattery/script_component.hpp
Normal file
12
addons/logistics_uavbattery/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define COMPONENT logistics_uavbattery
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_LOGISTICS_UAVBATTERY
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_SETTINGS_LOGISTICS_UAVBATTERY
|
||||||
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_LOGISTICS_UAVBATTERY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
78
addons/logistics_uavbattery/stringtable.xml
Normal file
78
addons/logistics_uavbattery/stringtable.xml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Edited with tabler - 2014-12-21 -->
|
||||||
|
<Project name="ACE">
|
||||||
|
<Package name="logistics_uavbattery">
|
||||||
|
<Key ID="STR_ACE_logistics_uavbattery_Full">
|
||||||
|
<English>Drone is full</English>
|
||||||
|
<German>Drohne ist voll</German>
|
||||||
|
<Spanish>El VANT está lleno</Spanish>
|
||||||
|
<French>L'UAV est chargé</French>
|
||||||
|
<Polish>Dron jest naładowany</Polish>
|
||||||
|
<Hungarian>A drón fel van töltve</Hungarian>
|
||||||
|
<Czech>Dron je nabitý</Czech>
|
||||||
|
<Portuguese>O VANT está cheio</Portuguese>
|
||||||
|
<Italian>Il drone è pieno</Italian>
|
||||||
|
<Russian>БПЛА заполнен</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_logistics_uavbattery_NoBattery">
|
||||||
|
<English>You need a UAV Battery</English>
|
||||||
|
<German>Du brauchst eine UAV-Batterie</German>
|
||||||
|
<Spanish>Necesitas una batería para VANT</Spanish>
|
||||||
|
<French>Pas de batterie UAV</French>
|
||||||
|
<Polish>Potrzebujesz baterii UAV</Polish>
|
||||||
|
<Hungarian>Szükséged van egy UAV akkumulátorra</Hungarian>
|
||||||
|
<Czech>Potřebuješ UAV-Baterii</Czech>
|
||||||
|
<Portuguese>Você precisa de uma Bateria para VANT</Portuguese>
|
||||||
|
<Italian>Hai bisogno di una Batteria UAV</Italian>
|
||||||
|
<Russian>Требуется аккумулятор БПЛА</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_logistics_uavbattery_Recharge">
|
||||||
|
<English>Recharge</English>
|
||||||
|
<German>Aufladen</German>
|
||||||
|
<Spanish>Recargar</Spanish>
|
||||||
|
<French>Recharger</French>
|
||||||
|
<Polish>Naładuj</Polish>
|
||||||
|
<Hungarian>Feltöltés</Hungarian>
|
||||||
|
<Czech>Dobít</Czech>
|
||||||
|
<Portuguese>Recarregar</Portuguese>
|
||||||
|
<Italian>Ricarica</Italian>
|
||||||
|
<Russian>Подзарядить</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_logistics_uavbattery_Battery_Name">
|
||||||
|
<English>UAV Battery</English>
|
||||||
|
<German>UAV-Batterie</German>
|
||||||
|
<Spanish>Batería para VANT</Spanish>
|
||||||
|
<French>Batterie UAV</French>
|
||||||
|
<Polish>Bateria UAV</Polish>
|
||||||
|
<Hungarian>UAV akkumulátor</Hungarian>
|
||||||
|
<Czech>UAV-Baterie</Czech>
|
||||||
|
<Portuguese>Bateria para VANT</Portuguese>
|
||||||
|
<Italian>Batteria UAV</Italian>
|
||||||
|
<Russian>Аккумулятор БПЛА</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_logistics_uavbattery_Battery_Description">
|
||||||
|
<English>Used to refuel Carried UAV's</English>
|
||||||
|
<German>Verwendet zum Aufladen von tragbaren UAV's</German>
|
||||||
|
<Spanish>Usada para reabastecer el VANT</Spanish>
|
||||||
|
<French>Utilisée pour recharger l'UAV</French>
|
||||||
|
<Polish>Używana do naładowania UAV</Polish>
|
||||||
|
<Hungarian>Hordozható UAV-ok működéséhez való akkumulátor</Hungarian>
|
||||||
|
<Czech>Používané k dobíjení UAV</Czech>
|
||||||
|
<Portuguese>Usada para reabastecer VANT</Portuguese>
|
||||||
|
<Italian>Usata per ricaricare la Batteria dell'UAV</Italian>
|
||||||
|
<Russian>Используется для подзарядки БПЛА</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_logistics_uavbattery_Battery_Recharge">
|
||||||
|
<English>Recharging ...</English>
|
||||||
|
<German>Aufladen ...</German>
|
||||||
|
<Spanish>Recargando ...</Spanish>
|
||||||
|
<French>Rechargement ...</French>
|
||||||
|
<Polish>Ładowanie ...</Polish>
|
||||||
|
<Hungarian>Akku feltöltése ...</Hungarian>
|
||||||
|
<Czech>Dobíjení ...</Czech>
|
||||||
|
<Portuguese>Recarregando ...</Portuguese>
|
||||||
|
<Italian>In ricarica ...</Italian>
|
||||||
|
<Russian>Подзаряжаем ...</Russian>
|
||||||
|
</Key>
|
||||||
|
</Package>
|
||||||
|
</Project>
|
BIN
addons/logistics_uavbattery/ui/UAV_battery.paa
Normal file
BIN
addons/logistics_uavbattery/ui/UAV_battery.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user