mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into captiveFFV
This commit is contained in:
commit
b5fb0daa9b
@ -3,8 +3,9 @@ ace_advanced_ballistics
|
||||
|
||||
The Advanced Ballistics module introduces advanced external- and internal ballistics to the game.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
||||
|
@ -1,9 +1,10 @@
|
||||
ace_aircraft
|
||||
============
|
||||
|
||||
Changes to air weaponry, flightmodels and HUDs.
|
||||
Changes to air weaponry, flight models and HUDs.
|
||||
|
||||
- Contributions by Kimi (geraldbolso1899) for HUD updates
|
||||
|
||||
* Contributations by Kimi (geraldbolso1899) for HUD updates
|
||||
|
||||
## Maintainers
|
||||
|
||||
@ -11,4 +12,4 @@ The people responsible for merging changes to this component or answering potent
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [jaynus](https://github.com/walterpearce)
|
||||
- [jaynus](https://github.com/walterpearce)
|
||||
|
11
addons/apl/README.md
Normal file
11
addons/apl/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
ace_apl
|
||||
============
|
||||
|
||||
Assets licensed under Arma Public License (APL).
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- None
|
@ -3,8 +3,9 @@ ace_atragmx
|
||||
|
||||
ATragMX - Handheld ballistics calculator
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
||||
|
@ -2,7 +2,9 @@ ace_attach
|
||||
==========
|
||||
|
||||
Introducing the ability to attach various throwables to yourself or vehicles, to mark your position and assist in IFF.
|
||||
Adds item `ACE_IR_Strobe_Item`.
|
||||
|
||||
#### Items Added:
|
||||
`ACE_IR_Strobe_Item`
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -5,7 +5,7 @@
|
||||
<English>Attach item >></English>
|
||||
<German>Gegenstand befestigen >></German>
|
||||
<Spanish>Acoplar objeto >></Spanish>
|
||||
<Polish>Przyczep przedmiot >></Polish>
|
||||
<Polish>Przyczep >></Polish>
|
||||
<French>Attacher l'objet >></French>
|
||||
<Czech>Připnout předmět >></Czech>
|
||||
<Portuguese>Fixar item >></Portuguese>
|
||||
@ -185,7 +185,7 @@
|
||||
<English>%1<br/>Attached</English>
|
||||
<German>%1<br/>befestigt</German>
|
||||
<Spanish>%1<br/>acoplada</Spanish>
|
||||
<Polish>%1<br/>przyczepiono</Polish>
|
||||
<Polish>Przyczepiono<br/>%1</Polish>
|
||||
<French>%1<br/>attachée</French>
|
||||
<Czech>%1<br/>Připnutý</Czech>
|
||||
<Portuguese>%1<br/>Fixada</Portuguese>
|
||||
@ -197,7 +197,7 @@
|
||||
<English>%1<br/>Detached</English>
|
||||
<German>%1<br/>entfernt</German>
|
||||
<Spanish>%1<br/>quitada</Spanish>
|
||||
<Polish>%1<br/>odczepiono</Polish>
|
||||
<Polish>Odczepiono<br/>%1</Polish>
|
||||
<French>%1<br/>détachée</French>
|
||||
<Czech>%1<br/>Odepnutý</Czech>
|
||||
<Portuguese>%1<br/>Separada</Portuguese>
|
||||
@ -206,4 +206,4 @@
|
||||
<Russian>%1<br/>отсоединен(-а)</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -1,7 +1,8 @@
|
||||
ace_backpacks
|
||||
=================
|
||||
|
||||
Adds indication when someone else opens your backpack (soundeffect / camShake).
|
||||
Adds indication when someone else opens your backpack (sound effect and camera shake).
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
|
@ -3,10 +3,11 @@ ace_ballistics
|
||||
|
||||
Changes to weapon, magazine and ammunition values.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
||||
|
@ -1,10 +1,10 @@
|
||||
ace_captives
|
||||
============
|
||||
|
||||
Allows taking people captive/handcuffed
|
||||
Adds ability to handcuff and surrender.
|
||||
|
||||
####Items:
|
||||
`ACE_CableTie` - adds ability to take someone captive
|
||||
#### Items Added:
|
||||
`ACE_CableTie`
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -223,15 +223,19 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_name">
|
||||
<English>Require surrendering</English>
|
||||
<Polish>Wymagaj kapitulacji</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_description">
|
||||
<English>Require Players to surrender before they can be arrested</English>
|
||||
<Polish>Wymagaj od graczy kapitulacji zanim będzie można ich zaaresztować</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_SurrenderOnly">
|
||||
<English>Surrendering only</English>
|
||||
<Polish>Tylko kapitulacja</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_SurrenderOrNoWeapon">
|
||||
<English>Surrendering or No weapon</English>
|
||||
<Polish>Kapitulacja lub brak broni</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
1
addons/cargo/$PBOPREFIX$
Normal file
1
addons/cargo/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\cargo
|
9
addons/cargo/ACE_Settings.hpp
Normal file
9
addons/cargo/ACE_Settings.hpp
Normal file
@ -0,0 +1,9 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(enable) {
|
||||
displayName = CSTRING(ModuleSettings_enable);
|
||||
description = CSTRING(ModuleSettings_enable_Description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
category = ECSTRING(OptionsMenu,CategoryLogistics);
|
||||
};
|
||||
};
|
97
addons/cargo/CfgEventHandlers.hpp
Normal file
97
addons/cargo/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,97 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class All {
|
||||
init = QUOTE(call FUNC(handleDestroyed));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Init_EventHandlers {
|
||||
class StaticWeapon {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
|
||||
class ReammoBox_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
|
||||
class Cargo_base_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class CargoNet_01_box_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Land_CargoBox_V1_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Land_PaperBox_closed_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Car {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Tank {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Helicopter {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Plane {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class Ship_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_RepairItem_Base {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_bodyBagObject {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_ConcertinaWireCoil {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
};
|
294
addons/cargo/CfgVehicles.hpp
Normal file
294
addons/cargo/CfgVehicles.hpp
Normal file
@ -0,0 +1,294 @@
|
||||
class CfgVehicles {
|
||||
class ACE_Module;
|
||||
class ACE_moduleCargoSettings: ACE_Module {
|
||||
scope = 2;
|
||||
displayName = CSTRING(SettingsModule_DisplayName);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Cargo_ca.paa));
|
||||
category = "ACE_Logistics";
|
||||
function = QFUNC(moduleSettings);
|
||||
functionPriority = 1;
|
||||
isGlobal = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
class Arguments {
|
||||
class enable {
|
||||
displayName = CSTRING(ModuleSettings_enable);
|
||||
description = CSTRING(ModuleSettings_enable_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = CSTRING(SettingsModule_Description);
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class LandVehicle;
|
||||
class Car: LandVehicle {
|
||||
GVAR(space) = 4;
|
||||
GVAR(hasCargo) = 1;
|
||||
class ACE_Cargo {
|
||||
/*
|
||||
class Cargo {
|
||||
class ACE_medicalSupplyCrate {
|
||||
type = "ACE_medicalSupplyCrate";
|
||||
amount = 1;
|
||||
};
|
||||
};*/
|
||||
};
|
||||
};
|
||||
class Tank: LandVehicle {
|
||||
GVAR(space) = 4;
|
||||
GVAR(hasCargo) = 1;
|
||||
};
|
||||
|
||||
class Car_F;
|
||||
class Truck_F: Car_F {
|
||||
GVAR(space) = 8;
|
||||
GVAR(hasCargo) = 1;
|
||||
};
|
||||
|
||||
class Air;
|
||||
class Helicopter: Air {
|
||||
GVAR(space) = 8;
|
||||
GVAR(hasCargo) = 1;
|
||||
};
|
||||
class Heli_Transport_02_base_F;
|
||||
class I_Heli_Transport_02_F : Heli_Transport_02_base_F {
|
||||
GVAR(space) = 20;
|
||||
GVAR(hasCargo) = 1;
|
||||
};
|
||||
class Plane: Air {
|
||||
GVAR(space) = 4;
|
||||
GVAR(hasCargo) = 1;
|
||||
};
|
||||
|
||||
class Ship;
|
||||
class Ship_F: Ship {
|
||||
GVAR(space) = 4;
|
||||
GVAR(hasCargo) = 1;
|
||||
};
|
||||
|
||||
// Static weapons
|
||||
class StaticWeapon: LandVehicle {
|
||||
GVAR(size) = 2; // 1 = small, 2 = large
|
||||
GVAR(canLoad) = 1;
|
||||
};
|
||||
|
||||
class StaticMortar;
|
||||
class Mortar_01_base_F: StaticMortar {
|
||||
GVAR(size) = 2; // 1 = small, 2 = large
|
||||
GVAR(canLoad) = 1;
|
||||
};
|
||||
|
||||
// Ammo boxes
|
||||
class ThingX;
|
||||
class ReammoBox_F: ThingX {
|
||||
GVAR(size) = 2; // 1 = small, 2 = large
|
||||
GVAR(canLoad) = 1;
|
||||
};
|
||||
|
||||
class Scrapyard_base_F;
|
||||
class Land_PaperBox_closed_F: Scrapyard_base_F {
|
||||
GVAR(space) = 10;
|
||||
GVAR(hasCargo) = 1;
|
||||
GVAR(size) = 11;
|
||||
GVAR(canLoad) = 1;
|
||||
XEH_ENABLED;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = ECSTRING(interaction,MainAction);
|
||||
distance = 5;
|
||||
condition = QUOTE(true);
|
||||
statement = "";
|
||||
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
|
||||
selection = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Cargo_base_F: ThingX {
|
||||
GVAR(space) = 4;
|
||||
GVAR(hasCargo) = 1;
|
||||
GVAR(size) = 4;
|
||||
GVAR(canLoad) = 1;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = ECSTRING(interaction,MainAction);
|
||||
distance = 5;
|
||||
condition = QUOTE(true);
|
||||
statement = "";
|
||||
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
|
||||
selection = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
class Cargo10_base_F: Cargo_base_F {
|
||||
GVAR(space) = 14;
|
||||
GVAR(size) = 15;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_blue_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_brick_red_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_cyan_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_grey_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_light_blue_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_light_green_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_military_green_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Ruins_F;
|
||||
class Land_Cargo20_military_ruins_F: Ruins_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_orange_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_red_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_sand_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_vr_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_white_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo20_yellow_F: Cargo_base_F {
|
||||
GVAR(space) = 49;
|
||||
GVAR(size) = 50;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
|
||||
|
||||
class Land_Cargo40_blue_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_brick_red_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_cyan_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_grey_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_light_blue_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_light_green_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_military_green_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_military_ruins_F: Ruins_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_orange_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_red_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_sand_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_vr_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_white_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
class Land_Cargo40_yellow_F: Cargo_base_F {
|
||||
GVAR(space) = 99;
|
||||
GVAR(size) = 100;
|
||||
XEH_ENABLED;
|
||||
};
|
||||
// small
|
||||
class Land_CargoBox_V1_F: ThingX {
|
||||
GVAR(space) = 7;
|
||||
GVAR(hasCargo) = 1;
|
||||
GVAR(size) = 7;
|
||||
XEH_ENABLED;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = ECSTRING(interaction,MainAction);
|
||||
distance = 5;
|
||||
condition = QUOTE(true);
|
||||
statement = "";
|
||||
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
|
||||
selection = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
12
addons/cargo/README.md
Normal file
12
addons/cargo/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_cargo
|
||||
============
|
||||
|
||||
Adds cargo menu to vehicles and allows loading and unloading of cargo items.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [Glowbal](https://github.com/Glowbal)
|
BIN
addons/cargo/UI/Icon_Module_Cargo_ca.paa
Normal file
BIN
addons/cargo/UI/Icon_Module_Cargo_ca.paa
Normal file
Binary file not shown.
BIN
addons/cargo/UI/Icon_load.paa
Normal file
BIN
addons/cargo/UI/Icon_load.paa
Normal file
Binary file not shown.
28
addons/cargo/XEH_preInit.sqf
Normal file
28
addons/cargo/XEH_preInit.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(canLoad);
|
||||
PREP(canLoadItemIn);
|
||||
PREP(canUnloadItem);
|
||||
PREP(findNearestVehicle);
|
||||
PREP(getCargoSpaceLeft);
|
||||
PREP(getSizeItem);
|
||||
PREP(handleDestroyed);
|
||||
PREP(initObject);
|
||||
PREP(initVehicle);
|
||||
PREP(loadItem);
|
||||
PREP(moduleSettings);
|
||||
PREP(onMenuOpen);
|
||||
PREP(startLoadIn);
|
||||
PREP(startUnload);
|
||||
PREP(unloadItem);
|
||||
PREP(validateCargoSpace);
|
||||
|
||||
GVAR(initializedItemClasses) = [];
|
||||
|
||||
if (isServer) then {
|
||||
["cargo_hideItem", {params ["_object", "_status"]; _object hideObjectGlobal _status;}] call EFUNC(common,addEventHandler);
|
||||
};
|
||||
|
||||
ADDON = true;
|
18
addons/cargo/config.cpp
Normal file
18
addons/cargo/config.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"commy2", "Glowbal"};
|
||||
authorUrl = "https://ace3mod.com/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "menu.hpp"
|
32
addons/cargo/functions/fnc_canLoad.sqf
Normal file
32
addons/cargo/functions/fnc_canLoad.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if player can load an item into the nearest vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Object to load <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Can load <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, object] call ace_cargo_fnc_canLoad
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_object"];
|
||||
|
||||
private ["_nearestVehicle"];
|
||||
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
|
||||
|
||||
if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then {
|
||||
{
|
||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x};
|
||||
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
};
|
||||
|
||||
if (isNull _nearestVehicle) exitWith {false};
|
||||
|
||||
[_object, _nearestVehicle] call FUNC(canLoadItemIn)
|
29
addons/cargo/functions/fnc_canLoadItemIn.sqf
Normal file
29
addons/cargo/functions/fnc_canLoadItemIn.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if item can be loaded into other Object.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Item Object <OBJECT>
|
||||
* 1: Holder Object (Vehicle) <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Can load in <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [item, holder] call ace_cargo_fnc_canLoadItemIn
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
|
||||
if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
|
||||
|
||||
private "_itemSize";
|
||||
_itemSize = ([_item] call FUNC(getSizeItem));
|
||||
|
||||
(_itemSize > 0) &&
|
||||
{alive _item && alive _vehicle} &&
|
||||
{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} &&
|
||||
{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))}
|
44
addons/cargo/functions/fnc_canUnloadItem.sqf
Normal file
44
addons/cargo/functions/fnc_canUnloadItem.sqf
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Author: Glowbal, ViperMaul
|
||||
* Check if item can be unloaded.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: loaded Object <OBJECT>
|
||||
* 1: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Can be unloaded <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [item, holder] call ace_cargo_fnc_canUnloadItem
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loaded", "_validVehiclestate", "_emptyPos"];
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
if !(_item in _loaded) exitWith {false};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
if (_vehicle isKindOf "Ship" ) then {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
|
||||
} else {
|
||||
if (_vehicle isKindOf "Air" ) then {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
|
||||
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
|
||||
} else {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]);
|
||||
};
|
||||
};
|
||||
|
||||
if (!_validVehiclestate) exitWith {false};
|
||||
|
||||
(count _emptyPos != 0)
|
37
addons/cargo/functions/fnc_findNearestVehicle.sqf
Normal file
37
addons/cargo/functions/fnc_findNearestVehicle.sqf
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Get nearest vehicle from unit, priority: Car-Air-Tank-Ship.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Vehicle in Distance <OBJECT>
|
||||
*
|
||||
* Example:
|
||||
* [unit] call ace_cargo_fnc_findNearestVehicle
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loadCar", "_loadHelicopter", "_loadTank", "_loadShip", "_loadContainer"];
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_loadCar = nearestObject [_unit, "car"];
|
||||
if (_unit distance _loadCar <= MAX_LOAD_DISTANCE) exitWith {_loadCar};
|
||||
|
||||
_loadHelicopter = nearestObject [_unit, "air"];
|
||||
if (_unit distance _loadHelicopter <= MAX_LOAD_DISTANCE) exitWith {_loadHelicopter};
|
||||
|
||||
_loadTank = nearestObject [_unit, "tank"];
|
||||
if (_unit distance _loadTank <= MAX_LOAD_DISTANCE) exitWith {_loadTank};
|
||||
|
||||
_loadShip = nearestObject [_unit, "ship"];
|
||||
if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip};
|
||||
|
||||
_loadContainer = nearestObject [_unit,"Cargo_base_F"];
|
||||
if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer};
|
||||
|
||||
objNull
|
20
addons/cargo/functions/fnc_getCargoSpaceLeft.sqf
Normal file
20
addons/cargo/functions/fnc_getCargoSpaceLeft.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Get the cargo space left on object.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Cargo space left <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [object] call ace_cargo_fnc_getCargoSpaceLeft
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object"];
|
||||
|
||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
|
28
addons/cargo/functions/fnc_getSizeItem.sqf
Normal file
28
addons/cargo/functions/fnc_getSizeItem.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Get the cargo size of an object.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Cargo size <NUMBER> (default: -1)
|
||||
*
|
||||
* Example:
|
||||
* [object] call ace_cargo_fnc_getSizeItem
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_config";
|
||||
|
||||
params ["_item"];
|
||||
|
||||
_config = (configFile >> "CfgVehicles" >> typeof _item >> QGVAR(size));
|
||||
|
||||
if (isNumber (_config)) exitWith {
|
||||
_item getVariable [QGVAR(size), getNumber (_config)]
|
||||
};
|
||||
|
||||
-1
|
31
addons/cargo/functions/fnc_handleDestroyed.sqf
Normal file
31
addons/cargo/functions/fnc_handleDestroyed.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Handle object being destroyed.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [object] call ace_cargo_fnc_handleDestroyed
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private["_loaded"];
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
if (count _loaded == 0) exitWith {};
|
||||
|
||||
{
|
||||
// TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment?
|
||||
deleteVehicle _x;
|
||||
//_x setDamage 1;
|
||||
} count _loaded;
|
||||
|
||||
[_vehicle] call FUNC(validateCargoSpace);
|
30
addons/cargo/functions/fnc_initObject.sqf
Normal file
30
addons/cargo/functions/fnc_initObject.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Initializes variables for loadable objects. Called from init EH.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [object] call ace_cargo_fnc_initObject
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object"];
|
||||
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(canLoad)) != 1) exitWith {};
|
||||
|
||||
private ["_type", "_action"];
|
||||
_type = typeOf _object;
|
||||
|
||||
// do nothing if the class is already initialized
|
||||
if (_type in GVAR(initializedItemClasses)) exitWith {};
|
||||
GVAR(initializedItemClasses) pushBack _type;
|
||||
|
||||
_action = [QGVAR(load), localize LSTRING(loadObject), QUOTE(PATHTOF(UI\Icon_load.paa)), {[_player, _target] call FUNC(startLoadIn)}, {GVAR(enable) && {[_player, _target] call FUNC(canLoad)}}] call EFUNC(interact_menu,createAction);
|
||||
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
|
60
addons/cargo/functions/fnc_initVehicle.sqf
Normal file
60
addons/cargo/functions/fnc_initVehicle.sqf
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Initializes vehicle, adds open caro menu action if available.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [vehicle] call ace_cargo_fnc_initVehicle
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle"];
|
||||
TRACE_1("params", _vehicle);
|
||||
|
||||
private ["_type", "_initializedClasses"];
|
||||
_type = typeOf _vehicle;
|
||||
_initializedClasses = GETMVAR(GVAR(initializedClasses),[]);
|
||||
|
||||
if (isServer) then {
|
||||
{
|
||||
if (isClass _x) then {
|
||||
private ["_className", "_amount","_position","_object"];
|
||||
_className = getText (_x >> "type");
|
||||
_amount = getNumber (_x >> "amount");
|
||||
_position = getPos _vehicle;
|
||||
_position set [1, (_position select 1) + 1];
|
||||
_position set [2, (_position select 2) + 7.5];
|
||||
for "_i" from 1 to _amount do {
|
||||
_object = createVehicle [_className, _position, [], 0, "CAN_COLLIDE"];
|
||||
if !([_object, _vehicle] call FUNC(loadItem)) exitWith {
|
||||
deleteVehicle _object;
|
||||
};
|
||||
};
|
||||
};
|
||||
nil
|
||||
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
|
||||
};
|
||||
|
||||
// do nothing if the class is already initialized
|
||||
if (_type in _initializedClasses) exitWith {};
|
||||
// set class as initialized
|
||||
_initializedClasses pushBack _type;
|
||||
SETMVAR(GVAR(initializedClasses),_initializedClasses);
|
||||
|
||||
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
|
||||
|
||||
private ["_text", "_condition", "_statement", "_icon", "_action"];
|
||||
_condition = {GVAR(enable)};
|
||||
_text = localize LSTRING(openMenu);
|
||||
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
|
||||
_icon = "";
|
||||
|
||||
_action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
|
||||
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
|
37
addons/cargo/functions/fnc_loadItem.sqf
Normal file
37
addons/cargo/functions/fnc_loadItem.sqf
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Load object into vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
* 1: Vehicle <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Object loaded <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [object, vehicle] call ace_cargo_fnc_loadItem
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loaded", "_space", "_itemSize"];
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
|
||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded pushback _item;
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
|
||||
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
|
||||
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,100]];
|
||||
["cargo_hideItem", [_item, true]] call EFUNC(common,serverEvent);
|
||||
|
||||
true
|
28
addons/cargo/functions/fnc_moduleSettings.sqf
Normal file
28
addons/cargo/functions/fnc_moduleSettings.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Module for adjusting the cargo settings
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* function = "ace_cargo_fnc_loadItem"
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if (!_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Cargo Module Initialized.";
|
48
addons/cargo/functions/fnc_onMenuOpen.sqf
Normal file
48
addons/cargo/functions/fnc_onMenuOpen.sqf
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Handle the UI data display.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Display <DISPLAY>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [display] call ace_cargo_fnc_onMenuOpen
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
disableSerialization;
|
||||
|
||||
params ["_display"];
|
||||
|
||||
uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
|
||||
[{
|
||||
private ["_display","_loaded", "_ctrl", "_label"];
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
if (isnil "_display") exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (isNull GVAR(interactionVehicle) || ACE_player distance GVAR(interactionVehicle) >= 10) exitWith {
|
||||
closeDialog 0;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
|
||||
_ctrl = _display displayCtrl 100;
|
||||
_label = _display displayCtrl 2;
|
||||
|
||||
lbClear _ctrl;
|
||||
{
|
||||
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> typeOf _x >> "displayName"));
|
||||
true
|
||||
} count _loaded;
|
||||
|
||||
_label ctrlSetText format[localize LSTRING(labelSpace), [GVAR(interactionVehicle)] call DFUNC(getCargoSpaceLeft)];
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
31
addons/cargo/functions/fnc_startLoadIn.sqf
Normal file
31
addons/cargo/functions/fnc_startLoadIn.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Start load item.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Object loaded <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [object] call ace_cargo_fnc_starLoadIn
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_object"];
|
||||
|
||||
private ["_nearestVehicle"];
|
||||
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
|
||||
|
||||
if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then {
|
||||
{
|
||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x};
|
||||
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
};
|
||||
|
||||
if (isNull _nearestVehicle) exitWith {false};
|
||||
|
||||
[_object, _nearestVehicle] call FUNC(loadItem)
|
35
addons/cargo/functions/fnc_startUnload.sqf
Normal file
35
addons/cargo/functions/fnc_startUnload.sqf
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Start unload action.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_cargo_fnc_startUnload
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_display", "_loaded", "_ctrl", "_selected", "_item"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
_display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
if (isnil "_display") exitWith {};
|
||||
|
||||
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
|
||||
if (count _loaded == 0) exitWith {};
|
||||
|
||||
_ctrl = _display displayCtrl 100;
|
||||
|
||||
_selected = (lbCurSel _ctrl) max 0;
|
||||
|
||||
if (count _loaded <= _selected) exitWith {};
|
||||
_item = _loaded select _selected;
|
||||
|
||||
[_item, GVAR(interactionVehicle)] call FUNC(unloadItem);
|
65
addons/cargo/functions/fnc_unloadItem.sqf
Normal file
65
addons/cargo/functions/fnc_unloadItem.sqf
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Author: Glowbal, ViperMaul
|
||||
* Unload object from vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
* 1: Vehicle <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* Object unloaded <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [object, vehicle] call ace_cargo_fnc_unloadItem
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"];
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
|
||||
if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
if (_vehicle isKindOf "Ship" ) then {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
TRACE_1("SHIP Ground Check", getPosATL _vehicle );
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
|
||||
} else {
|
||||
if (_vehicle isKindOf "Air" ) then {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
|
||||
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
|
||||
} else {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeOf _item]);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
if (!_validVehiclestate) exitWith {false};
|
||||
|
||||
if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded = _loaded - [_item];
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
|
||||
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
||||
|
||||
detach _item;
|
||||
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
["cargo_hideItem", [_item, false]] call EFUNC(common,serverEvent);
|
||||
|
||||
// TOOO maybe drag/carry the unloaded item?
|
||||
|
||||
true
|
38
addons/cargo/functions/fnc_validateCargoSpace.sqf
Normal file
38
addons/cargo/functions/fnc_validateCargoSpace.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Validate the vehicle cargo space.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [object] call ace_cargo_fnc_validateCargoSpace
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loaded", "_newLoaded", "_totalSpaceOccupied"];
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
|
||||
_newLoaded = [];
|
||||
_totalSpaceOccupied = 0;
|
||||
{
|
||||
if !(isNull _x) then {
|
||||
_newLoaded pushback _x;
|
||||
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
|
||||
};
|
||||
true
|
||||
} count _loaded;
|
||||
|
||||
if (count _loaded != count _newLoaded) then {
|
||||
_vehicle setVariable [QGVAR(loaded), _newLoaded, true];
|
||||
};
|
||||
|
||||
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
|
1
addons/cargo/functions/script_component.hpp
Normal file
1
addons/cargo/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\cargo\script_component.hpp"
|
103
addons/cargo/menu.hpp
Normal file
103
addons/cargo/menu.hpp
Normal file
@ -0,0 +1,103 @@
|
||||
#include "\z\ace\addons\common\define.hpp"
|
||||
|
||||
class GVAR(menu) {
|
||||
idd = 314614;
|
||||
movingEnable = true;
|
||||
onLoad = QUOTE([_this select 0] call FUNC(onMenuOpen));
|
||||
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];);
|
||||
class controlsBackground {
|
||||
class HeaderBackground: ACE_gui_backgroundBase{
|
||||
idc = -1;
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
text = "#(argb,8,8,3)color(0,0,0,0)";
|
||||
};
|
||||
class CenterBackground: HeaderBackground {
|
||||
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
h = "14 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
text = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||
colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
||||
colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
||||
};
|
||||
};
|
||||
|
||||
class controls {
|
||||
class HeaderName {
|
||||
idc = 1;
|
||||
type = CT_STATIC;
|
||||
x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
style = ST_LEFT + ST_SHADOW;
|
||||
font = "PuristaMedium";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
colorText[] = {0.95, 0.95, 0.95, 0.75};
|
||||
colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
||||
text = CSTRING(cargoMenu);
|
||||
};
|
||||
class SubHeader: HeaderName {
|
||||
idc = 2;
|
||||
x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
style = ST_CENTER;
|
||||
colorText[] = {1, 1, 1.0, 0.9};
|
||||
colorBackground[] = {0,0,0,0};
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
|
||||
text = "";
|
||||
};
|
||||
class cargoList: ACE_gui_listBoxBase {
|
||||
idc = 100;
|
||||
x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||
rowHeight = 0.03;
|
||||
colorBackground[] = {0, 0, 0, 0.2};
|
||||
colorText[] = {1, 1, 1, 1.0};
|
||||
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
|
||||
colorSelect[] = {1, 1, 1, 1.0};
|
||||
colorSelect2[] = {1, 1, 1, 1.0};
|
||||
colorSelectBackground[] = {0.3, 0.3, 0.3, 1.0};
|
||||
colorSelectBackground2[] = {0.3, 0.3, 0.3, 1.0};
|
||||
};
|
||||
class btnUnload: ACE_gui_buttonBase {
|
||||
text = "Cancel";
|
||||
idc = 11;
|
||||
x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "14.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
|
||||
color[] = {1, 1, 1, 1};
|
||||
color2[] = {0,0,0, 1};
|
||||
colorBackgroundFocused[] = {1,1,1,1};
|
||||
colorBackground[] = {1,1,1,1};
|
||||
colorbackground2[] = {1,1,1,1};
|
||||
colorDisabled[] = {1,1,1,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
periodFocus = 1;
|
||||
periodOver = 1;
|
||||
action = QUOTE(closeDialog 0);
|
||||
};
|
||||
class btnCancel: btnUnload {
|
||||
text = CSTRING(unloadObject);
|
||||
idc = 12;
|
||||
x = "20.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
action = QUOTE([] call FUNC(startUnload););
|
||||
};
|
||||
};
|
||||
};
|
14
addons/cargo/script_component.hpp
Normal file
14
addons/cargo/script_component.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#define COMPONENT cargo
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_CARGO
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_CARGO
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_CARGO
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define MAX_LOAD_DISTANCE 10
|
41
addons/cargo/stringtable.xml
Normal file
41
addons/cargo/stringtable.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Cargo">
|
||||
<Key ID="STR_ACE_Cargo_loadObject">
|
||||
<English>Load</English>
|
||||
<Polish>Załaduj</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_unloadObject">
|
||||
<English>Unload</English>
|
||||
<Polish>Wyładuj</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_openMenu">
|
||||
<English>Cargo</English>
|
||||
<Polish>Ładunek</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_cargoMenu">
|
||||
<English>Cargo Menu</English>
|
||||
<Polish>Menu ładunku</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_labelSpace">
|
||||
<English>Cargo space left: %1</English>
|
||||
<Polish>Pozostałe miejsce: %1</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_ModuleSettings_enable">
|
||||
<English>Enable Cargo</English>
|
||||
<Polish>Aktywuj cargo</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_ModuleSettings_enable_Description">
|
||||
<English>Enable the load in cargo module</English>
|
||||
<Polish>Aktywuj możliwość załadunku skrzyń i przedmiotów do pojazdów.</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_SettingsModule_DisplayName">
|
||||
<English>Cargo Settings</English>
|
||||
<Polish>Ustawienia cargo</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_SettingsModule_Description">
|
||||
<English>Configure the cargo module settings</English>
|
||||
<Polish>Skonfiguruj ustawienia modułu cargo.</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -11,6 +11,7 @@ PREP(addCanInteractWithCondition);
|
||||
PREP(addLineToDebugDraw);
|
||||
PREP(addSetting);
|
||||
PREP(addToInventory);
|
||||
PREP(assignObjectsInList);
|
||||
PREP(ambientBrightness);
|
||||
PREP(applyForceWalkStatus);
|
||||
PREP(ASLToPosition);
|
||||
|
50
addons/common/functions/fnc_assignObjectsInList.sqf
Normal file
50
addons/common/functions/fnc_assignObjectsInList.sqf
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Loops through a string and filters out object names/variables to assign a value for given variable.
|
||||
* Used by moduleAssign* within various parts of the ACE3 project.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: list <STRING>
|
||||
* 1: variableName <STRING>
|
||||
* 2: value <ANY>
|
||||
* 3: Global <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_splittedList", "_nilCheckPassedList"];
|
||||
params ["_list", "_variable", "_setting", "_global"];
|
||||
|
||||
if (typeName _list == "STRING") then {
|
||||
_splittedList = [_list, ","] call BIS_fnc_splitString;
|
||||
_nilCheckPassedList = "";
|
||||
{
|
||||
_x = [_x] call FUNC(stringRemoveWhiteSpace);
|
||||
if !(isnil _x) then {
|
||||
if (_nilCheckPassedList == "") then {
|
||||
_nilCheckPassedList = _x;
|
||||
} else {
|
||||
_nilCheckPassedList = _nilCheckPassedList + ","+ _x;
|
||||
};
|
||||
};
|
||||
}foreach _splittedList;
|
||||
|
||||
_list = [] call compile format["[%1]",_nilCheckPassedList];
|
||||
};
|
||||
|
||||
{
|
||||
if (!isnil "_x") then {
|
||||
if (typeName _x == typeName objNull) then {
|
||||
if (local _x) then {
|
||||
_x setvariable [_variable, _setting, _global];
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _list;
|
||||
|
||||
true
|
@ -84,7 +84,7 @@ if (_state) then {
|
||||
openMap true;
|
||||
};
|
||||
|
||||
if (serverCommandAvailable "#missions" || {player getVariable ["ACE_isUnconscious", false] && {(call FUNC(player)) getVariable [QEGVAR(medical,AllowChatWhileUnconscious), missionNamespace getVariable [QEGVAR(medical,AllowChatWhileUnconscious), false]]}}) then {
|
||||
if (isServer || {serverCommandAvailable "#kick"} || {player getVariable ["ACE_isUnconscious", false] && {(call FUNC(player)) getVariable [QEGVAR(medical,AllowChatWhileUnconscious), missionNamespace getVariable [QEGVAR(medical,AllowChatWhileUnconscious), false]]}}) then {
|
||||
if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then {
|
||||
_key = 0;
|
||||
};
|
||||
|
@ -18,6 +18,7 @@
|
||||
* 14-16: pistol (String, Array, Array)
|
||||
* 17: map, compass, watch, etc. (Array)
|
||||
* 18: binocluar (String)
|
||||
* 19: active weapon, active muzzle, active weaponMode (Array)
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
@ -34,7 +35,8 @@ if (isNull _unit) exitWith {[
|
||||
"", ["","","",""], [],
|
||||
"", ["","","",""], [],
|
||||
[],
|
||||
""
|
||||
"",
|
||||
["","",""]
|
||||
]};
|
||||
|
||||
[
|
||||
@ -47,5 +49,6 @@ if (isNull _unit) exitWith {[
|
||||
secondaryWeapon _unit, secondaryWeaponItems _unit, secondaryWeaponMagazine _unit,
|
||||
handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit,
|
||||
assignedItems _unit,
|
||||
binocular _unit
|
||||
binocular _unit,
|
||||
[currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit]
|
||||
]
|
||||
|
@ -41,14 +41,15 @@ _hitpointClasses = [_config >> "HitPoints"];
|
||||
while {isClass _class} do {
|
||||
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private ["_entry", "_selection"];
|
||||
if (isClass (_class select _i)) then {
|
||||
private ["_entry", "_selection"];
|
||||
_entry = configName (_class select _i);
|
||||
_selection = getText (_class select _i >> "name");
|
||||
|
||||
_entry = configName (_class select _i);
|
||||
_selection = getText (_class select _i >> "name");
|
||||
|
||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
_selections pushBack _selection;
|
||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
_selections pushBack _selection;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,31 +1,35 @@
|
||||
/*
|
||||
* Author: Sniperwolf572
|
||||
* Checks if one of the following common feature cameras is active:
|
||||
*
|
||||
* Checks if one of the following BI feature cameras are active:
|
||||
*
|
||||
* - Classic camera (BIS_fnc_cameraOld)
|
||||
* - Splendid camera (BIS_fnc_camera)
|
||||
* - Curator
|
||||
* - ACE Spectator
|
||||
* - Arsenal camera (BIS_fnc_arsenal)
|
||||
* - Animation viewer (BIS_fnc_animViewer)
|
||||
* - Establishing shot (BIS_fnc_establishingShot)
|
||||
* - Splendid camera (BIS_fnc_camera)
|
||||
* - Animation viewer (BIS_fnc_animViewer)
|
||||
* - Classic camera (BIS_fnc_cameraOld)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
* 0: None <NIL>
|
||||
*
|
||||
* Return value:
|
||||
* Is BI feature camera active (bool)
|
||||
* Return Value:
|
||||
* A feature camera is active <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* call ace_common_fnc_isFeatureCameraActive;
|
||||
* [] call ace_common_fnc_isFeatureCameraActive
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
(
|
||||
!isNull (missionNamespace getVariable ["BIS_DEBUG_CAM", objNull]) || // Classic camera
|
||||
{!isNull (missionNamespace getVariable ["BIS_fnc_camera_cam", objNull])} || // Splendid camera
|
||||
{!isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull])} || // Arsenal camera
|
||||
{!isNull (uiNamespace getVariable ["BIS_fnc_animViewer_cam", objNull])} || // Animation viewer camera
|
||||
{!isNull (missionNamespace getVariable ["BIS_fnc_establishingShot_fakeUAV", objNull])} // Establishing shot camera
|
||||
)
|
||||
!(
|
||||
isNull curatorCamera && // Curator
|
||||
{isNull (GETMVAR(EGVAR(spectator,camera),objNull))} && // ACE Spectator
|
||||
{isNull (GETUVAR(BIS_fnc_arsenal_cam, objNull))} && // Arsenal camera
|
||||
{isNull (GETMVAR(BIS_fnc_establishingShot_fakeUAV, objNull))} && // Establishing shot camera
|
||||
{isNull (GETMVAR(BIS_fnc_camera_cam, objNull))} && // Splendid camera
|
||||
{isNull (GETUVAR(BIS_fnc_animViewer_cam, objNull))} && // Animation viewer camera
|
||||
{isNull (GETMVAR(BIS_DEBUG_CAM, objNull))} // Classic camera
|
||||
)
|
||||
|
@ -15,17 +15,16 @@
|
||||
private ["_parseConfigForDisplayNames", "_name"];
|
||||
|
||||
_parseConfigForDisplayNames = {
|
||||
private "_optionEntry";
|
||||
private ["_optionEntry", "_values", "_text"];
|
||||
_optionEntry = _this select 0;
|
||||
if !(isClass _optionEntry) exitwith {false};
|
||||
_values = getArray (_optionEntry >> "values");
|
||||
_x set [3, getText (_optionEntry >> "displayName")];
|
||||
_x set [4, getText (_optionEntry >> "description")];
|
||||
_x set [5, _values];
|
||||
_x set [8, getText (_optionEntry >> "category")];
|
||||
|
||||
private "_values";
|
||||
_values = _x select 5;
|
||||
{
|
||||
private "_text";
|
||||
_text = _x;
|
||||
if (((typeName _text) == "STRING") && {(count _text) > 1} && {(_text select [0,1]) == "$"}) then {
|
||||
_text = localize (_text select [1, ((count _text) - 1)]); //chop off the leading $
|
||||
@ -42,7 +41,9 @@ _parseConfigForDisplayNames = {
|
||||
|
||||
if !([configFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
|
||||
if !([configFile >> "ACE_ServerSettings" >> _name] call _parseConfigForDisplayNames) then {
|
||||
[missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames;
|
||||
if !([missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
|
||||
diag_log text format ["[ACE] - Setting found, but couldn't localize [%1] (server has but we don't?)", _name];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -72,12 +72,12 @@ if (isNil _name) then {
|
||||
_name,
|
||||
_typeName,
|
||||
(getNumber (_optionEntry >> "isClientSettable")) > 0,
|
||||
getText (_optionEntry >> "displayName"),
|
||||
getText (_optionEntry >> "description"),
|
||||
getArray (_optionEntry >> "values"),
|
||||
"", //getText (_optionEntry >> "displayName"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
|
||||
"", //getText (_optionEntry >> "description"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
|
||||
[], //getArray (_optionEntry >> "values"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
|
||||
getNumber (_optionEntry >> "force") > 0,
|
||||
_value,
|
||||
getText (_optionEntry >> "category")
|
||||
"" //getText (_optionEntry >> "category") //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
|
||||
];
|
||||
|
||||
//Strings in the values array won't be localized from the config, so just do that now:
|
||||
|
@ -479,7 +479,6 @@
|
||||
<Portuguese>Verificar PBOs</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Description">
|
||||
<English></English>
|
||||
<Polish>Sprawdzaj spójność addonów z serwerem</Polish>
|
||||
<Spanish>Este módulo verifica la integridad de los addons con los que iniciamos el simulador</Spanish>
|
||||
<German>Dieses Modul überprüft ob jeder Spieler die richtigen PBO-Dateien hat.</German>
|
||||
@ -646,6 +645,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_VehiclesOnly">
|
||||
<English>Vehicles only</English>
|
||||
<Polish>Tylko pojazdy</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_DoNotForce">
|
||||
<English>Do Not Force</English>
|
||||
@ -680,4 +680,4 @@
|
||||
<Polish>ACE3 Pojazdy</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -3,7 +3,7 @@ class CfgVehicles {
|
||||
class Fence;
|
||||
class thingX;
|
||||
class NonStrategic;
|
||||
|
||||
|
||||
class ACE_ConcertinaWireNoGeo: Fence {
|
||||
XEH_ENABLED;
|
||||
scope = 1;
|
||||
@ -48,7 +48,7 @@ class CfgVehicles {
|
||||
class wire_16: wire_2{};
|
||||
class wire_17: wire_2{};
|
||||
class wire_18: wire_2{};
|
||||
|
||||
|
||||
class wire_2_1: wire_2 {
|
||||
animPeriod = 8;
|
||||
};
|
||||
@ -67,7 +67,7 @@ class CfgVehicles {
|
||||
class wire_15_1: wire_2_1 {};
|
||||
class wire_16_1: wire_2_1 {};
|
||||
class wire_17_1: wire_2_1 {};
|
||||
class wire_18_1: wire_2_1 {};
|
||||
class wire_18_1: wire_2_1 {};
|
||||
};
|
||||
};
|
||||
class ACE_ConcertinaWire: ACE_ConcertinaWireNoGeo {
|
||||
@ -113,6 +113,8 @@ class CfgVehicles {
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,0.5,0.5};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
EGVAR(cargo,size) = 1;
|
||||
EGVAR(cargo,canLoad) = 1;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
selection = "";
|
||||
@ -133,7 +135,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class Land_Razorwire_F: NonStrategic {
|
||||
XEH_ENABLED;
|
||||
};
|
||||
|
@ -3,8 +3,9 @@ ace_concertina_wire
|
||||
|
||||
Adds concertina wire.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
||||
|
@ -1,10 +1,11 @@
|
||||
ace_dagr
|
||||
===============
|
||||
|
||||
Defense Advanced GPS Receiver
|
||||
Adds Defense Advanced GPS Receiver.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
||||
|
@ -1,7 +1,7 @@
|
||||
ace_disposable
|
||||
==============
|
||||
|
||||
Makes the NLAW a disposable one-shot weapon.
|
||||
Makes the NLAW a disposable one-shot weapon and provides disposable launchers framework for use by other mods.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -28,6 +28,11 @@ class Extended_Init_EventHandlers {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
class ACE_RepairItem_Base {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
|
@ -83,4 +83,18 @@ class CfgVehicles {
|
||||
GVAR(canCarry) = 0;
|
||||
GVAR(canDrag) = 0;
|
||||
};
|
||||
|
||||
class ACE_RepairItem_Base: ThingX {};
|
||||
|
||||
class ACE_Track: ACE_RepairItem_Base {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(carryPosition[]) = {0,1,1};
|
||||
GVAR(carryDirection) = 0;
|
||||
};
|
||||
|
||||
class ACE_Wheel: ACE_RepairItem_Base {
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(carryPosition[]) = {0,1,1};
|
||||
GVAR(carryDirection) = 0;
|
||||
};
|
||||
};
|
||||
|
12
addons/dragging/README.md
Normal file
12
addons/dragging/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_dragging
|
||||
==============
|
||||
|
||||
Adds ability to drag and carry objects.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Garth "L-H" de Wet](https://github.com/CorruptedHeart)
|
||||
- [commy2](https://github.com/commy2)
|
@ -6,7 +6,7 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"Garth 'L-H' de Wet","commy2"};
|
||||
author[] = {"Garth 'L-H' de Wet", "commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
<English>Explosives</English>
|
||||
<German>Sprengstoffe</German>
|
||||
<Spanish>Explosivos</Spanish>
|
||||
<Polish>Ładunki wybuchowe</Polish>
|
||||
<Polish>Mat. wybuchowe</Polish>
|
||||
<French>Explosifs</French>
|
||||
<Czech>Výbušniny</Czech>
|
||||
<Italian>Esplosivi</Italian>
|
||||
|
@ -1,7 +1,7 @@
|
||||
ace_fcs
|
||||
=======
|
||||
|
||||
Adds a fire control system to armoured vehicles and helicoters, allowing the precise engagement of stationary and moving targets.
|
||||
Adds a fire control system to armoured vehicles and helicopters, allowing precise engagement of stationary and moving targets.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
11
addons/fonts/README.md
Normal file
11
addons/fonts/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
ace_fonts
|
||||
========
|
||||
|
||||
Custom fonts including fixed-width font.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [jaynus](https://github.com/jaynus/)
|
11
addons/hitreactions/README.md
Normal file
11
addons/hitreactions/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
ace_hitreactions
|
||||
===========
|
||||
|
||||
Adds reactions when getting shot.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
11
addons/huntir/README.md
Normal file
11
addons/huntir/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
ace_huntir
|
||||
===========
|
||||
|
||||
Adds High-altitude Unit Navigated Tactical Imaging Round and its Monitor.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
12
addons/interact_menu/README.md
Normal file
12
addons/interact_menu/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_interact_menu
|
||||
===========
|
||||
|
||||
Base framework for interaction menu.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [NouberNou](https://github.com/NouberNou)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
@ -548,7 +548,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class StaticMGWeapon: StaticWeapon {};
|
||||
class HMG_01_base_F: StaticMGWeapon {};
|
||||
class HMG_01_high_base_F: HMG_01_base_F {
|
||||
@ -557,14 +557,14 @@ class CfgVehicles {
|
||||
position = "[-0.172852,0.164063,-0.476091]";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class AA_01_base_F: StaticMGWeapon {
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
position = "[0,0.515869,-0.200671]";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class AT_01_base_F: StaticMGWeapon {
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
@ -592,4 +592,16 @@ class CfgVehicles {
|
||||
};
|
||||
class ACE_SelfActions {};
|
||||
};
|
||||
|
||||
class ACE_RepairItem_Base: thingX {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = CSTRING(MainAction);
|
||||
selection = "";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {};
|
||||
};
|
||||
};
|
||||
|
@ -3,6 +3,7 @@ ace_interaction
|
||||
|
||||
Provides interaction options between units.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
ace_inventory
|
||||
=============
|
||||
|
||||
Increases the size of the inventory dialog.
|
||||
Adds options to increase the size of the inventory dialog.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -1,10 +1,11 @@
|
||||
ace_kestrel4500
|
||||
===============
|
||||
|
||||
Kestrel 4500 Pocket Weather Tracker
|
||||
Adds Kestrel 4500 Pocket Weather Tracker.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
||||
- [Ruthberg](http://github.com/Ulteq)
|
||||
|
@ -1,7 +1,10 @@
|
||||
ace_logistics_uavbattery
|
||||
===========
|
||||
|
||||
Adds an item `ACE_UAVBattery` that allows refueling/recharging of the "Dartar" quadcopter UAVs.
|
||||
Adds an item that allows refueling/recharging of the Darter quadcopter UAVs.
|
||||
|
||||
#### Items Added:
|
||||
`ACE_UAVBattery`
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -16,6 +16,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_caller,_target);
|
||||
params ["_caller", "_target"];
|
||||
|
||||
("ACE_UAVBattery" in (items _caller)) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4}
|
||||
|
@ -15,23 +15,21 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_caller,_target);
|
||||
|
||||
private ["_onFinish", "_onFailure"];
|
||||
params ["_caller", "_target"];
|
||||
|
||||
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
|
||||
|
||||
_onFinish = {
|
||||
EXPLODE_2_PVT((_this select 0),_caller,_target);
|
||||
_caller removeItem "ACE_UAVBattery";
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10];
|
||||
["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local
|
||||
(_this select 0) params ["_caller", "_target"];
|
||||
_caller removeItem "ACE_UAVBattery";
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10];
|
||||
["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local
|
||||
};
|
||||
|
||||
_onFailure = {
|
||||
EXPLODE_2_PVT((_this select 0),_caller,_target);
|
||||
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
(_this select 0) params ["_caller", "_target"];
|
||||
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
[_caller, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||
|
@ -1,7 +1,10 @@
|
||||
ace_logistics_wirecutter
|
||||
===========
|
||||
|
||||
Adds an item `ACE_wirecutter` that allows cutting of fences in A3 and AiA maps.
|
||||
Adds an item that allows cutting of fences in Aarma 3 and AiA/CUP maps.
|
||||
|
||||
#### Items Added:
|
||||
`ACE_wirecutter`
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -1,7 +1,8 @@
|
||||
ace_magazinerepack
|
||||
==================
|
||||
|
||||
Adds the ability to consolidate multiple half-empty magazines.
|
||||
Adds the ability to consolidate multiple unfull magazines.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* ChildActiosn<ARRAY>
|
||||
* ChildActions <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [player, player] call ace_magazinerepack_fnc_getMagazineChildren
|
||||
@ -16,15 +16,17 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unitMagazines", "_unitMagCounts", "_xFullMagazineCount", "_index", "_actions", "_displayName", "_picture", "_action"];
|
||||
private ["_unitMagazines", "_unitMagCounts", "_index", "_actions", "_displayName", "_picture", "_action"];
|
||||
|
||||
PARAMS_2(_target,_player);
|
||||
params ["_target", "_player"];
|
||||
|
||||
// get all mags and ammo count
|
||||
_unitMagazines = [];
|
||||
_unitMagCounts = [];
|
||||
{
|
||||
EXPLODE_4_PVT(_x,_xClassname,_xCount,_xLoaded,_xType);
|
||||
private "_xFullMagazineCount";
|
||||
_x params ["_xClassname", "_xCount", "_xLoaded", "_xType"];
|
||||
|
||||
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
|
||||
|
||||
//for every partial magazine, that is either in inventory or can be moved there
|
||||
|
@ -10,7 +10,7 @@
|
||||
* 3: Error Code <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* (args from progressBar) call ace_magazinerepack_fnc_magazineRepackFinish
|
||||
@ -21,8 +21,9 @@
|
||||
|
||||
private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_fullMagazineCount"];
|
||||
|
||||
PARAMS_4(_args,_elapsedTime,_totalTime,_errorCode);
|
||||
EXPLODE_2_PVT(_args,_magazineClassname,_lastAmmoCount);
|
||||
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
|
||||
_args params ["_magazineClassname", "_lastAmmoCount"];
|
||||
|
||||
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
|
||||
|
||||
//Don't show anything if player can't interact:
|
||||
|
@ -20,17 +20,19 @@
|
||||
|
||||
private ["_currentAmmoCount", "_addedMagazines", "_missingAmmo", "_index", "_updateMagazinesOnPlayerFnc"];
|
||||
|
||||
PARAMS_3(_args,_elapsedTime,_totalTime);
|
||||
EXPLODE_3_PVT(_args,_magazineClassname,_lastAmmoCount,_simEvents);
|
||||
if ((count _simEvents) == 0) exitWith {ERROR("No Event"); false};
|
||||
EXPLODE_3_PVT((_simEvents select 0),_nextEventTime,_nextEventIsBullet,_nextEventMags);
|
||||
params ["_ars", "_elapsedTime", "_totalTime"];
|
||||
_args params ["_magazineClassname", "_lastAmmoCount", "_simEvents"];
|
||||
|
||||
if (_nextEventTime > _elapsedTime) exitWith {true};//waiting on next event
|
||||
if !((_simEvents select 0) params ["_nextEventTime", "_nextEventIsBullet", "_nextEventMags"]) exitWith { ERROR("No Event"); false };
|
||||
|
||||
|
||||
|
||||
if (_nextEventTime > _elapsedTime) exitWith { true };//waiting on next event
|
||||
|
||||
//Verify we aren't missing any ammo
|
||||
_currentAmmoCount = [];
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_xClassname,_xCount);
|
||||
_x params ["_xClassname", "_xCount"];
|
||||
if (_xClassname == _magazineClassname) then {
|
||||
_currentAmmoCount pushBack _xCount;
|
||||
};
|
||||
@ -50,7 +52,7 @@ _missingAmmo = false;
|
||||
};
|
||||
} forEach _lastAmmoCount;
|
||||
|
||||
if (_missingAmmo) exitWith {false}; //something removed ammo that was being repacked (could be other players or scripts)
|
||||
if (_missingAmmo) exitWith { false }; //something removed ammo that was being repacked (could be other players or scripts)
|
||||
|
||||
_updateMagazinesOnPlayerFnc = {
|
||||
ACE_player removeMagazines _magazineClassname; //remove inventory magazines
|
||||
@ -75,4 +77,4 @@ if (_nextEventIsBullet) then {
|
||||
|
||||
_simEvents deleteAt 0; //pop off the event
|
||||
|
||||
true;
|
||||
true
|
||||
|
@ -19,20 +19,20 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded", "_swapProgress"];
|
||||
private ["_fnc_newMag", "_time", "_events", "_fnc_swapAmmo", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded", "_swapProgress"];
|
||||
|
||||
PARAMS_3(_fullMagazineCount,_arrayOfAmmoCounts,_isBelt);
|
||||
params ["_fullMagazineCount", "_arrayOfAmmoCounts", "_isBelt"];
|
||||
|
||||
// Sort Ascending - Don't modify original
|
||||
_arrayOfAmmoCounts = +_arrayOfAmmoCounts;
|
||||
_arrayOfAmmoCounts sort true;
|
||||
|
||||
_newMagFnc = {
|
||||
_fnc_newMag = {
|
||||
_time = _time + GVAR(TimePerMagazine);
|
||||
_events pushBack [_time, false, +_arrayOfAmmoCounts];
|
||||
};
|
||||
|
||||
_swapAmmoFnc = if (_isBelt) then {
|
||||
_fnc_swapAmmo = if (_isBelt) then {
|
||||
{
|
||||
_time = _time + GVAR(TimePerBeltLink);
|
||||
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - _ammoSwaped)];
|
||||
@ -64,14 +64,14 @@ while {_lowIndex < _highIndex} do {
|
||||
|
||||
if (_ammoAvailable == 0) then {
|
||||
_lowIndex = _lowIndex + 1;
|
||||
call _newMagFnc;
|
||||
call _fnc_newMag;
|
||||
} else {
|
||||
if (_ammoNeeded == 0) then {
|
||||
_highIndex = _highIndex - 1;
|
||||
call _newMagFnc;
|
||||
call _fnc_newMag;
|
||||
} else {
|
||||
_ammoSwaped = _ammoAvailable min _ammoNeeded;
|
||||
call _swapAmmoFnc;
|
||||
call _fnc_swapAmmo;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts", "_simEvents", "_totalTime"];
|
||||
|
||||
PARAMS_3(_target,_player,_magazineClassname);
|
||||
params ["_target", "_player", "_magazineClassname"];
|
||||
|
||||
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
|
||||
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname;
|
||||
@ -63,11 +63,11 @@ _simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simula
|
||||
_totalTime = (_simEvents select ((count _simEvents) - 1) select 0);
|
||||
|
||||
[
|
||||
_totalTime,
|
||||
[_magazineClassname, _startingAmmoCounts, _simEvents],
|
||||
{_this call FUNC(magazineRepackFinish)},
|
||||
{_this call FUNC(magazineRepackFinish)},
|
||||
(localize LSTRING(RepackingMagazine)),
|
||||
{_this call FUNC(magazineRepackProgress)},
|
||||
["isNotInside", "isNotSitting"]
|
||||
_totalTime,
|
||||
[_magazineClassname, _startingAmmoCounts, _simEvents],
|
||||
{_this call FUNC(magazineRepackFinish)},
|
||||
{_this call FUNC(magazineRepackFinish)},
|
||||
(localize LSTRING(RepackingMagazine)),
|
||||
{_this call FUNC(magazineRepackProgress)},
|
||||
["isNotInside", "isNotSitting"]
|
||||
] call EFUNC(common,progressBar);
|
||||
|
@ -5,4 +5,7 @@ class CfgFactionClasses {
|
||||
priority = 2;
|
||||
side = 7;
|
||||
};
|
||||
class ACE_Logistics: ACE {
|
||||
displayName = CSTRING(Category_Logistics);
|
||||
};
|
||||
};
|
||||
|
5
addons/main/CfgVehicleClasses.hpp
Normal file
5
addons/main/CfgVehicleClasses.hpp
Normal file
@ -0,0 +1,5 @@
|
||||
class CfgVehicleClasses {
|
||||
class ACE_Logistics_Items {
|
||||
displayName = CSTRING(Category_Logistics);
|
||||
};
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
@ -587,3 +587,4 @@ class CfgSettings {
|
||||
};
|
||||
|
||||
#include "CfgModuleCategories.hpp"
|
||||
#include "CfgVehicleClasses.hpp"
|
||||
|
9
addons/main/stringtable.xml
Normal file
9
addons/main/stringtable.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Main">
|
||||
<Key ID="STR_ACE_Main_Category_Logistics">
|
||||
<English>ACE Logistics</English>
|
||||
<Polish>ACE Logistyka</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -1,12 +1,12 @@
|
||||
ace_map
|
||||
=======
|
||||
|
||||
Various tweaks to the in-game map. Including:
|
||||
Various tweaks to the in-game map, including:
|
||||
- Better map styling (countours, legend, hiding bushes and trees, etc).
|
||||
- Max zoom level (optional)
|
||||
- Map shaking while walking (optional)
|
||||
- Map illumination (optional)
|
||||
- Blufor tracker (optional)
|
||||
- Blue Force Tracker (optional)
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -1,11 +1,12 @@
|
||||
ace_maptools
|
||||
============
|
||||
|
||||
Map tools:
|
||||
Adds the following map tools:
|
||||
- Roamer
|
||||
- Map drawing
|
||||
- Showing GPS on map
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
@ -234,7 +234,7 @@ class ACE_Medical_Actions {
|
||||
};
|
||||
class SurgicalKit: fieldDressing {
|
||||
displayName = CSTRING(Use_SurgicalKit);
|
||||
displayNameProgress = CSTRING(TreatmentAction);
|
||||
displayNameProgress = CSTRING(Stitching);
|
||||
category = "advanced";
|
||||
items[] = {"ACE_surgicalKit"};
|
||||
treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)};
|
||||
|
@ -697,6 +697,8 @@ class CfgVehicles {
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,1.2,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
EGVAR(cargo,size) = 1;
|
||||
EGVAR(cargo,canLoad) = 1;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = ECSTRING(interaction,MainAction);
|
||||
|
@ -3,6 +3,7 @@ ace_medical
|
||||
|
||||
Provides a basic and advanced medical system.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
#define MAX_DISTANCE 10
|
||||
|
||||
// Exit for basic medical
|
||||
if (GVAR(level) < 2) exitWith {};
|
||||
@ -39,6 +40,11 @@ if (_show) then {
|
||||
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
|
||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getvariable QGVAR(DisplayInformation);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user