Merge remote-tracking branch 'origin/master' into tanoaWindDAta

This commit is contained in:
bux578 2016-06-12 07:01:14 +02:00
commit 68e2531af3
29 changed files with 1732 additions and 292 deletions

View File

@ -60,6 +60,7 @@ PREP(getFirstTerrainIntersection);
PREP(getForceWalkStatus);
PREP(getGunner);
PREP(getInPosition);
PREP(getMapData);
PREP(getMapGridData);
PREP(getMapGridFromPos);
PREP(getMapPosFromGrid);

View File

@ -22,83 +22,14 @@ private _long = getNumber (configFile >> "CfgWorlds" >> _map >> "longitude");
private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
_map = toLower _map;
if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; }; //Abbottabad elevation 1256m (Wikipedia)
if (_map in ["abramia"]) then { _lat = 60; _altitude = 0; };
if (_map in ["af_kandahar_province"]) then { _lat = 42; _altitude = 0; };
if (_map in ["altis"]) then { _lat = 40; _altitude = 0; };
if (_map in ["angel"]) then { _lat = 38; _altitude = 0; };
if (_map in ["anim_helvantis_v2"]) then { _lat = 50; _altitude = 0; };
if (_map in ["australia"]) then { _lat = -25; _altitude = 0; };
if (_map in ["bootcamp_acr"]) then { _lat = 50; _altitude = 0; };
if (_map in ["bornholm"]) then { _lat = 55; _altitude = 0; };
if (_map in ["bozcaada"]) then { _lat = 40; _altitude = 0; };
if (_map in ["caribou"]) then { _lat = 68; _altitude = 0; };
if (_map in ["catalina"]) then { _lat = 33; _altitude = 0; };
if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) then { _lat = 50; _altitude = 0; };
if (_map in ["chernobylzone", "chernobylzonea2"]) then { _lat = 51; _altitude = 0; };
if (_map in ["clafghan"]) then { _lat = 34; _altitude = 640; };
if (_map in ["dakrong"]) then { _lat = 17; _altitude = 0; }; //Unsung Mod
if (_map in ["desert_e"]) then { _lat = 40; _altitude = 800; };
if (_map in ["dya"]) then { _lat = 34; _altitude = 110; }; //Diyala Iraq - default elevationOffset
if (_map in ["esseker"]) then { _lat = 43; _altitude = 2000; };
if (_map in ["evergreen"]) then { _lat = 41; _altitude = 0; }; //Burgazada, Turkey - default elevationOffset
if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
if (_map in ["fata"]) then { _lat = 33; _altitude = 1347; };
if (_map in ["gorgona"]) then { _lat = 43; _altitude = 0; };
if (_map in ["hellskitchen", "hellskitchens"]) then { _lat = 32; _altitude = 900; }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
if (_map in ["hindukush"]) then { _lat = 36; _altitude = 0; };
if (_map in ["imrali", "imralispring"]) then { _lat = 40; _altitude = 0; };
if (_map in ["intro"]) then { _lat = 40; _altitude = 0; };
if (_map in ["isladuala3"]) then { _lat = -19; _altitude = 0; };
if (_map in ["jacobi"]) then { _lat = 34; _altitude = 2000; }; //default elevationOffset
if (_map in ["kapaulio"]) then { _lat = 0; _altitude = 0; };
if (_map in ["kerama"]) then { _lat = 26; _altitude = 0; }; //Kerama Islands, Japan - default elevationOffset
if (_map in ["kholm"]) then { _lat = 36; _altitude = 0; };
if (_map in ["koplic"]) then { _lat = 42; _altitude = 0; };
if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; };
if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; };
if (_map in ["lost", "lostw"]) then { _lat = 60; _altitude = 0; };
if (_map in ["mcn_aliabad"]) then { _lat = 36; _altitude = 0; };
if (_map in ["malvinas"]) then { _lat = -52; _altitude = 0; };
if (_map in ["namalsk"]) then { _lat = 65; _altitude = 0; };
if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; };
if (_map in ["mountains_acr"]) then { _lat = 35; _altitude = 2000; };
if (_map in ["napf", "napfwinter"]) then { _lat = 47; _altitude = 0; };
if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; };
if (_map in ["pianosa_aut"]) then { _lat = 43; _altitude = 0; }; //Pianosa, Italy - default elevationOffset
if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; }; //G.O.S N'Ziwasogo
if (_map in ["pja306"]) then { _lat = 35; _altitude = 0; }; //G.O.S Kalu Khan
if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; }; //F.S.F Daryah
if (_map in ["pja308"]) then { _lat = 36; _altitude = 0; }; //G.O.S Gunkizli
if (_map in ["pja310"]) then { _lat = 36; _altitude = 0; }; //G.O.S Al Rayak
if (_map in ["pja312"]) then { _lat = 16; _altitude = 0; }; //G.O.S Song Bin Tanh
if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; };
if (_map in ["porto"]) then { _lat = 40; _altitude = 0; };
if (_map in ["provinggrounds_pmc"]) then { _lat = 35; _altitude = 100; };
if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
if (_map in ["sara", "sara_dbe1"]) then { _lat = 40; _altitude = 0; };
if (_map in ["saralite"]) then { _lat = 40; _altitude = 0; };
if (_map in ["sb3"]) then { _lat = 53; _altitude = 25; }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
if (_map in ["shapur_baf"]) then { _lat = 35; _altitude = 100; };
if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
if (_map in ["stratis"]) then { _lat = 40; _altitude = 0; };
if (_map in ["sugarlake"]) then { _lat = 29; _altitude = 0; };
if (_map in ["takistan"]) then { _lat = 35; _altitude = 2000; };
if (_map in ["thirsk"]) then { _lat = 65; _altitude = 0; };
if (_map in ["tilos"]) then { _lat = 36; _altitude = 0; };
if (_map in ["utes"]) then { _lat = 50; _altitude = 0; };
if (_map in ["vt5"]) then { _lat = 61; _altitude = 100; }; //Vt5, Suomi Finland - default elevationOffset
if (_map in ["wake"]) then { _lat = 19; _altitude = 0; };
if (_map in ["waziristan"]) then { _lat = 33; _altitude = 0; };
if (_map in ["wintermap"]) then { _lat = 61; _altitude = 0; }; //Nordkvingo - default elevationOffset
if (_map in ["wintertown", "wintertowna3"]) then { _lat = 39; _altitude = 600; }; //U.S. state Kansas mean elevation 610m (Wikipedia)
if (_map in ["woodland_acr"]) then { _lat = 50; _altitude = 0; };
if (_map in ["xcam_prototype"]) then { _lat = 35; _altitude = 0; };
if (_map in ["zargabad"]) then { _lat = 35; _altitude = 2000; };
private _mapData = _map call FUNC(getMapData);
if (!(_mapData isEqualTo [])) then {
_lat = _mapData select 0;
_alt = _mapData select 1;
};
TRACE_2("Latitude and Altitude",_lat,_alt);
private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
private _UTM = [_long, _lat] call BIS_fnc_posDegToUTM;
private _easting = _UTM select 0;
private _northing = _UTM select 1;
//private _zone = _UTM select 2;

View File

@ -0,0 +1,98 @@
/*
* Author: VKing, bux
* Gets the current latitude and altitude offset for the map.
*
* Argument:
* 0: Map name (default: worldName) <STRING>
*
* Return Value:
* 0: Latitude <NUMBER>
* 1: Altitude <NUMBER>
*
* Public: No
*/
params ["_map"];
_map = toLower _map;
// [latitude, altitude]
// the more important ones
if (_map in ["tanoa"]) exitWith { [-18, 0] };
if (_map in ["altis"]) exitWith { [40, 0] };
if (_map in ["stratis"]) exitWith { [40, 0] };
if (_map in ["abbottabad"]) exitWith { [34, 1256] }; //Abbottabad elevation 1256m (Wikipedia)
if (_map in ["abramia"]) exitWith { [60, 0] };
if (_map in ["af_kandahar_province"]) exitWith { [42, 0] };
if (_map in ["angel"]) exitWith { [38, 0] };
if (_map in ["anim_helvantis_v2"]) exitWith { [50, 0] };
if (_map in ["australia"]) exitWith { [-25, 0] };
if (_map in ["bootcamp_acr"]) exitWith { [50, 0] };
if (_map in ["bornholm"]) exitWith { [55, 0] };
if (_map in ["bozcaada"]) exitWith { [40, 0] };
if (_map in ["caribou"]) exitWith { [68, 0] };
if (_map in ["catalina"]) exitWith { [33, 0] };
if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) exitWith { [50, 0] };
if (_map in ["chernobylzone", "chernobylzonea2"]) exitWith { [51, 0] };
if (_map in ["clafghan"]) exitWith { [34, 640] };
if (_map in ["dakrong"]) exitWith { [17, 0] }; //Unsung Mod
if (_map in ["desert_e"]) exitWith { [40, 800] };
if (_map in ["dya"]) exitWith { [34, 110] }; //Diyala Iraq - default elevationOffset
if (_map in ["esseker"]) exitWith { [43, 2000] };
if (_map in ["evergreen"]) exitWith { [41, 0] }; //Burgazada, Turkey - default elevationOffset
if (_map in ["fallujah"]) exitWith { [33, 0] };
if (_map in ["fata"]) exitWith { [33, 1347] };
if (_map in ["gorgona"]) exitWith { [43, 0] };
if (_map in ["hellskitchen", "hellskitchens"]) exitWith { [32, 900] }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
if (_map in ["hindukush"]) exitWith { [36, 0] };
if (_map in ["imrali", "imralispring"]) exitWith { [40, 0] };
if (_map in ["intro"]) exitWith { [40, 0] };
if (_map in ["isladuala3"]) exitWith { [-19, 0] };
if (_map in ["jacobi"]) exitWith { [34, 2000] }; //default elevationOffset
if (_map in ["kapaulio"]) exitWith { [0, 0] };
if (_map in ["kerama"]) exitWith { [26, 0] }; //Kerama Islands, Japan - default elevationOffset
if (_map in ["kholm"]) exitWith { [36, 0] };
if (_map in ["koplic"]) exitWith { [42, 0] };
if (_map in ["kunduz"]) exitWith { [37, 0] };
if (_map in ["lingor", "lingor3"]) exitWith { [-4, 0] };
if (_map in ["lost", "lostw"]) exitWith { [60, 0] };
if (_map in ["mcn_aliabad"]) exitWith { [36, 0] };
if (_map in ["malvinas"]) exitWith { [-52, 0] };
if (_map in ["namalsk"]) exitWith { [65, 0] };
if (_map in ["mef_alaska"]) exitWith { [60, 5] };
if (_map in ["mountains_acr"]) exitWith { [35, 2000] };
if (_map in ["napf", "napfwinter"]) exitWith { [47, 0] };
if (_map in ["panthera3"]) exitWith { [46, 0] };
if (_map in ["pianosa_aut"]) exitWith { [43, 0] }; //Pianosa, Italy - default elevationOffset
if (_map in ["pja305"]) exitWith { [0, 0] }; //G.O.S N'Ziwasogo
if (_map in ["pja306"]) exitWith { [35, 0] }; //G.O.S Kalu Khan
if (_map in ["pja307"]) exitWith { [17, 0] }; //F.S.F Daryah
if (_map in ["pja308"]) exitWith { [36, 0] }; //G.O.S Gunkizli
if (_map in ["pja310"]) exitWith { [36, 0] }; //G.O.S Al Rayak
if (_map in ["pja312"]) exitWith { [16, 0] }; //G.O.S Song Bin Tanh
if (_map in ["porquerolles"]) exitWith { [43, 0] };
if (_map in ["porto"]) exitWith { [40, 0] };
if (_map in ["provinggrounds_pmc"]) exitWith { [35, 100] };
if (_map in ["reshmaan"]) exitWith { [35, 2000] };
if (_map in ["sara", "sara_dbe1"]) exitWith { [40, 0] };
if (_map in ["saralite"]) exitWith { [40, 0] };
if (_map in ["sb3"]) exitWith { [53, 25] }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
if (_map in ["shapur_baf"]) exitWith { [35, 100] };
if (_map in ["sfp_sturko"]) exitWith { [56, 0] };
if (_map in ["sfp_wamako"]) exitWith { [14, 0] };
if (_map in ["sugarlake"]) exitWith { [29, 0] };
if (_map in ["takistan"]) exitWith { [35, 2000] };
if (_map in ["thirsk"]) exitWith { [65, 0] };
if (_map in ["tilos"]) exitWith { [36, 0] };
if (_map in ["utes"]) exitWith { [50, 0] };
if (_map in ["vt5"]) exitWith { [61, 100] }; //Vt5, Suomi Finland - default elevationOffset
if (_map in ["wake"]) exitWith { [19, 0] };
if (_map in ["waziristan"]) exitWith { [33, 0] };
if (_map in ["wintermap"]) exitWith { [61, 0] }; //Nordkvingo - default elevationOffset
if (_map in ["wintertown", "wintertowna3"]) exitWith { [39, 600] }; //U.S. state Kansas mean elevation 610m (Wikipedia)
if (_map in ["woodland_acr"]) exitWith { [50, 0] };
if (_map in ["xcam_prototype"]) exitWith { [35, 0] };
if (_map in ["zargabad"]) exitWith { [35, 2000] };
[] //Return empty array if we have no specific data for the map

View File

@ -11,6 +11,12 @@ class Extended_PreInit_EventHandlers {
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_InitPost_EventHandlers {
class AllVehicles {
class ADDON {

View File

@ -25,7 +25,7 @@ class CfgVehicles {
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = "SilentSpike";
author = ECSTRING(common,ACETeam);
class Arguments {
class zeusAscension {
displayName = CSTRING(ascension_DisplayName);
@ -84,7 +84,7 @@ class CfgVehicles {
};
};
class GVAR(moduleBase): Module_F {
author = "SilentSpike";
author = ECSTRING(common,ACETeam);
category = "ACE";
functionPriority = 1;
isGlobal = 1;
@ -92,104 +92,86 @@ class CfgVehicles {
scope = 1;
scopeCurator = 2;
};
class GVAR(moduleCaptive): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleCaptive_DisplayName);
function = QFUNC(moduleCaptive);
icon = QPATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa);
class ModuleDescription {
description = "Flips the capture state of the specified unit.";
sync[] = {};
};
};
class GVAR(moduleSurrender): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSurrender_DisplayName);
function = QFUNC(moduleSurrender);
icon = QPATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa);
class ModuleDescription {
description = "Flips the surrender state of the specified unit.";
sync[] = {};
};
};
class GVAR(moduleUnconscious): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleUnconscious_DisplayName);
function = QFUNC(moduleUnconscious);
icon = QPATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa);
class ModuleDescription {
description = "Flips the unconscious state of the specified unit.";
sync[] = {};
};
};
class GVAR(moduleSetMedic): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSetMedic_DisplayName);
function = QFUNC(moduleSetMedic);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);
class ModuleDescription {
description = "";
sync[] = {};
};
};
class GVAR(moduleSetMedicalVehicle): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSetMedicalVehicle_DisplayName);
function = QFUNC(moduleSetMedicalVehicle);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);
class ModuleDescription {
description = "";
sync[] = {};
};
};
class GVAR(moduleSetMedicalFacility): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSetMedicalFacility_DisplayName);
function = QFUNC(moduleSetMedicalFacility);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);
class ModuleDescription {
description = "";
sync[] = {};
};
};
class GVAR(moduleAddSpareTrack): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleAddSpareTrack_DisplayName);
function = QFUNC(moduleAddSpareTrack);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo
class ModuleDescription {
description = CSTRING(ModuleAddSpareTrack_Description);
sync[] = {};
};
};
class GVAR(moduleAddSpareWheel): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleAddSpareWheel_DisplayName);
function = QFUNC(moduleAddSpareWheel);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo
class ModuleDescription {
description = CSTRING(ModuleAddSpareWheel_Description);
sync[] = {};
};
};
// class GVAR(moduleSetSuppression): GVAR(moduleBase) {
// curatorCanAttach = 1;
// displayName = CSTRING(ModuleSetSupp_DisplayName);
// function = QFUNC(moduleSetSuppression);
// class ModuleDescription {
// description = "Set group of units to supressed.";
// sync[] = {};
// };
// };
// class GVAR(moduleDisableSuppression): GVAR(moduleBase) {
// curatorCanAttach = 1;
// displayName = CSTRING(ModuleDisableSupp_DisplayName);
// function = QFUNC(moduleDisableSuppression);
// class ModuleDescription {
// description = "Remove suppression for units in group";
// sync[] = {};
// };
// };
class GVAR(moduleCaptive): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleCaptive_DisplayName);
function = QFUNC(moduleCaptive);
icon = QPATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa);
};
class GVAR(moduleDefendArea): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleDefendArea_DisplayName);
curatorInfoType = QGVAR(RscDefendArea);
};
class GVAR(moduleGlobalSetSkill): GVAR(moduleBase) {
displayName = CSTRING(ModuleGlobalSetSkill_DisplayName);
curatorInfoType = QGVAR(RscGlobalSetSkill);
};
class GVAR(moduleGroupSide): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleGroupSide_DisplayName);
curatorInfoType = QGVAR(RscGroupSide);
};
class GVAR(modulePatrolArea): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModulePatrolArea_DisplayName);
curatorInfoType = QGVAR(RscPatrolArea);
};
class GVAR(moduleSearchArea): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSearchArea_DisplayName);
curatorInfoType = QGVAR(RscSearchArea);
};
class GVAR(moduleSearchNearby): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSearchNearby_DisplayName);
function = QFUNC(moduleSearchNearby);
};
class GVAR(moduleSetMedic): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSetMedic_DisplayName);
function = QFUNC(moduleSetMedic);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);
};
class GVAR(moduleSetMedicalFacility): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSetMedicalFacility_DisplayName);
function = QFUNC(moduleSetMedicalFacility);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);
};
class GVAR(moduleSetMedicalVehicle): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSetMedicalVehicle_DisplayName);
function = QFUNC(moduleSetMedicalVehicle);
icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);
};
class GVAR(moduleSurrender): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleSurrender_DisplayName);
function = QFUNC(moduleSurrender);
icon = QPATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa);
};
class GVAR(moduleTeleportPlayers): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleTeleportPlayers_DisplayName);
curatorInfoType = QGVAR(RscTeleportPlayers);
};
class GVAR(moduleUnconscious): GVAR(moduleBase) {
curatorCanAttach = 1;
displayName = CSTRING(ModuleUnconscious_DisplayName);
function = QFUNC(moduleUnconscious);
icon = QPATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa);
};
};

View File

@ -8,9 +8,23 @@ PREP(handleZeusUnitAssigned);
PREP(moduleAddSpareTrack);
PREP(moduleAddSpareWheel);
PREP(moduleCaptive);
PREP(moduleGlobalSetSkill);
PREP(moduleGroupSide);
PREP(moduleSearchNearby);
PREP(moduleSetMedic);
PREP(moduleSetMedicalVehicle);
PREP(moduleSetMedicalFacility);
PREP(moduleSurrender);
PREP(moduleTeleportPlayers);
PREP(moduleUnconscious);
PREP(moduleZeusSettings);
PREP(ui_attributeCargo);
//PREP(ui_attributePosition);
PREP(ui_attributeRadius);
PREP(ui_defendArea);
PREP(ui_globalSetSkill);
PREP(ui_groupSide);
PREP(ui_patrolArea);
PREP(ui_searchArea);
PREP(ui_teleportPlayers);
PREP(zeusAttributes);

View File

@ -0,0 +1,9 @@
#include "script_component.hpp"
// Global skill module PVs values for persistence, just listen for the PV
QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill);
[QGVAR(moduleDefendArea), CBA_fnc_taskDefend] call CBA_fnc_addEventHandler;
[QGVAR(modulePatrolArea), CBA_fnc_taskPatrol] call CBA_fnc_addEventHandler;
[QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler;
[QGVAR(moduleSearchArea), CBA_fnc_taskSearchArea] call CBA_fnc_addEventHandler;

View File

@ -8,4 +8,6 @@ if (isServer) then {
[QGVAR(zeusUnitAssigned), FUNC(handleZeusUnitAssigned)] call CBA_fnc_addEventHandler;
};
GVAR(GlobalSkillAI) = [0.5,0.5,0.5,0.5,true,true];
ADDON = true;

View File

@ -2,7 +2,15 @@
class CfgPatches {
class ADDON {
units[] = {};
units[] = {
QGVAR(moduleDefendArea),
QGVAR(moduleGlobalSetSkill),
QGVAR(moduleGroupSide),
QGVAR(modulePatrolArea),
QGVAR(moduleSearchArea),
QGVAR(moduleSearchNearby),
QGVAR(moduleTeleportPlayers)
};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
@ -43,6 +51,7 @@ class ACE_Curator {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "ACE_Settings.hpp"
#include "ui\RscAttributes.hpp"
class ACE_newEvents {
zeusUnitAssigned = QGVAR(zeusUnitAssigned);

View File

@ -24,13 +24,13 @@ _activated = _this select 2;
if (_activated) then {
//--- Terminate when not created on the server
if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitWith {
if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitwith {
[format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp;
deletevehicle _logic;
};
//--- Get curator owner
_ownerVar = _logic getVariable ["owner",""];
_ownerVar = _logic getvariable ["owner",""];
_ownerUID = parsenumber _ownerVar;
if (cheatsenabled) then {
_ownerVarArray = toarray _ownerVar;
@ -47,7 +47,7 @@ if (_activated) then {
_isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted";
//--- Wipe out the variable so clients can't access it
_logic setVariable ["owner",nil];
_logic setvariable ["owner",nil];
//--- Server
if (isserver) then {
@ -62,13 +62,13 @@ if (_activated) then {
};
//--- Get allowed addons
_addonsType = _logic getVariable ["Addons",0];
_addonsType = _logic getvariable ["Addons",2];
_addons = [];
switch _addonsType do {
//--- All (including unofficial ones)
case 3: {
_cfgPatches = configFile >> "Cfgpatches";
_cfgPatches = configfile >> "cfgpatches";
for "_i" from 0 to (count _cfgPatches - 1) do {
_class = _cfgPatches select _i;
if (isclass _class) then {_addons set [count _addons,configname _class];};
@ -85,8 +85,8 @@ if (_activated) then {
case 1: {
_addonsList = [];
{
_addonsList = _addonsList + (unitaddons typeOf _x);
} forEach (entities "all");
_addonsList = _addonsList + (unitaddons typeof _x);
} foreach (entities "all");
removeallcuratoraddons _logic;
_logic addcuratoraddons _addonsList;
};
@ -108,8 +108,8 @@ if (_activated) then {
if (_adminVar != "") then {_ownerVar = _adminVar;};
_forced = _logic getVariable ["forced",0] > 0;
_name = _logic getVariable ["name",""];
_forced = _logic getvariable ["forced",0] > 0;
_name = _logic getvariable ["name",""];
if (_name == "") then {_name = localize "STR_A3_curator";};
//--- Wait until mission starts
@ -124,43 +124,42 @@ if (_activated) then {
//--- Wait for player to become Zeus
switch true do {
case (_ownerUID > 0): {
waitUntil {
waituntil {
sleep 0.01;
{getplayeruid _x == _ownerVar} count playableunits > 0 || isnull _logic
};
};
default {
waitUntil {isplayer (missionnamespace getVariable [_ownerVar,objnull]) || isnull _logic};
waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic};
};
};
if (isnull _logic) exitWith {};
if (isnull _logic) exitwith {};
//--- Assign
_player = objnull;
switch true do {
case (_ownerUID > 0): {
{
if (getplayeruid _x == _ownerVar) exitWith {_player = _x;};
} forEach playableunits;
if (getplayeruid _x == _ownerVar) exitwith {_player = _x;};
} foreach playableunits;
};
default {
_player = missionnamespace getVariable [_ownerVar,objnull];
_player = missionnamespace getvariable [_ownerVar,objnull];
};
};
waitUntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic};
waitUntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic};
if (isnull _logic) exitWith {};
waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic};
waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic};
if (isnull _logic) exitwith {};
//--- Add radio channels
{
_x radiochanneladd [_player];
} forEach (_logic getVariable ["channels",[]]);
} foreach (_logic getvariable ["channels",[]]);
// Added by ace_zeus to delay ascension message at mission start
[{
_logic = _this select 0;
_player = _this select 1;
// Added by ace_zeus to delay ascension message code
private _msgCode = {
params ["_logic","_player"];
//--- Sent notification to all assigned players
if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then {
@ -170,61 +169,48 @@ if (_activated) then {
};
} forEach (curatoreditableobjects _logic);
};
},[_logic,_player]] call CBA_fnc_execNextFrame;
};
// Added by ace_zeus to hide ascension messages
if !(EGVAR(common,settingsInitFinished)) then {
EGVAR(common,runAtSettingsInitialized) pushBack [_msgCode, [_logic,_player]];
} else {
[_logic,_player] call _msgCode;
};
[_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler;
// Added by ace_zeus
[QGVAR(zeusUnitAssigned), [_logic,_player]] call CBA_fnc_globalEvent;
//--- Forced interface
//if (_forced) then {
// [[true,true],"bis_fnc_forceCuratorInterface",_player] call bis_fnc_mp;
//};
//--- Wait for player to stop being Zeus
switch true do {
case (_ownerUID > 0): {
waitUntil {
waituntil {
sleep 0.01;
{getplayeruid _x == _ownerVar} count playableunits == 0 || isnull _logic
};
};
default {
waitUntil {_player != missionnamespace getVariable [_ownerVar,objnull] || isnull _logic};
waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic};
};
};
if (isnull _logic) exitWith {};
if (isnull _logic) exitwith {};
//--- Add radio channels
{
_x radiochannelremove [_player];
} forEach (_logic getVariable ["channels",[]]);
} foreach (_logic getvariable ["channels",[]]);
//--- Unassign
waitUntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic};
if (isnull _logic) exitWith {};
waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic};
if (isnull _logic) exitwith {};
};
};
//--- Activated all future addons
_addons = [];
{
if (typeOf _x == "ModuleCuratorAddAddons_F") then {
_paramAddons = call compile ("[" + (_x getVariable ["addons",""]) + "]");
{
if !(_x in _addons) then {_addons set [count _addons,_x];};
{
if !(_x in _addons) then {_addons set [count _addons,_x];};
} forEach (unitaddons _x);
} forEach _paramAddons;
};
} forEach (synchronizedobjects _logic);
_addons call bis_fnc_activateaddons;
// Added by ace_zeus to delay bird code
[{
_logic = _this select 0;
private _birdCode = {
params ["_logic"];
if (GVAR(zeusBird)) then {
//--- Create bird
@ -244,16 +230,38 @@ if (_activated) then {
}
];
};
},[_logic]] call CBA_fnc_execNextFrame;
};
// Added by ace_zeus to hide camera bird
if !(EGVAR(common,settingsInitFinished)) then {
EGVAR(common,runAtSettingsInitialized) pushBack [_birdCode, [_logic]];
} else {
[_logic] call _birdCode;
};
//--- Activated all future addons
_addons = [];
{
if (typeof _x == "ModuleCuratorAddAddons_F") then {
_paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]");
{
if !(_x in _addons) then {_addons set [count _addons,_x];};
{
if !(_x in _addons) then {_addons set [count _addons,_x];};
} foreach (unitaddons _x);
} foreach _paramAddons;
};
} foreach (synchronizedobjects _logic);
_addons call bis_fnc_activateaddons;
};
//--- Player
if (hasinterface) then {
waitUntil {local player};
waituntil {local player};
_serverCommand = if (_ownerVar == "#adminLogged") then {"#shutdown"} else {"#kick"};
//--- Black effect until the interface is open
_forced = _logic getVariable ["forced",0] > 0;
_forced = _logic getvariable ["forced",0] > 0;
if (_forced) then {
_isCurator = switch true do {
case (_ownerUID > 0): {
@ -263,7 +271,7 @@ if (_activated) then {
isserver || servercommandavailable _serverCommand
};
default {
player == missionnamespace getVariable [_ownerVar,objnull]
player == missionnamespace getvariable [_ownerVar,objnull]
};
};
if (_isCurator) then {
@ -274,11 +282,11 @@ if (_activated) then {
//--- Check if player is server admin
if (_isAdmin) then {
_adminVar = _logic getVariable ["adminVar",""];
_logic setVariable ["adminVar",nil];
_adminVar = _logic getvariable ["adminVar",""];
_logic setvariable ["adminVar",nil];
if (isserver) then {
//--- Host
missionnamespace setVariable [_adminVar,player];
missionnamespace setvariable [_adminVar,player];
} else {
//--- Client
[_logic,_adminVar,_serverCommand] spawn {
@ -288,13 +296,13 @@ if (_activated) then {
_adminVar = _this select 1;
_serverCommand = _this select 2;
while {true} do {
waitUntil {sleep 0.1; servercommandavailable _serverCommand};
missionnamespace setVariable [_adminVar,player];
waituntil {sleep 0.1; servercommandavailable _serverCommand};
missionnamespace setvariable [_adminVar,player];
publicvariable _adminVar;
_respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]];
waitUntil {sleep 0.1; !servercommandavailable _serverCommand};
missionnamespace setVariable [_adminVar,objnull];
waituntil {sleep 0.1; !servercommandavailable _serverCommand};
missionnamespace setvariable [_adminVar,objnull];
publicvariable _adminVar;
player removeeventhandler ["respawn",_respawn];
};
@ -305,7 +313,7 @@ if (_activated) then {
[_logic] spawn {
_logic = _this select 0;
sleep 1;
waitUntil {alive player};
waituntil {alive player};
//--- Show warning when Zeus key is not assigned
if (count (actionkeys "curatorInterface") == 0) then {
@ -319,7 +327,7 @@ if (_activated) then {
//--- Show hint about pinging for players
if (
isNil {profilenamespace getVariable "bis_fnc_curatorPinged_done"}
isnil {profilenamespace getvariable "bis_fnc_curatorPinged_done"}
&&
{isTutHintsEnabled}
&&

View File

@ -42,7 +42,6 @@ if (_activated) then {
_ammo = _logic getVariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")];
if (_ammo != "") then {
_CfgAmmo = configFile >> "CfgAmmo" >> _ammo;
//if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;};
_dirVar = _fnc_scriptname + typeOf _logic;
_logic setdir (missionnamespace getVariable [_dirVar,direction _logic]); //--- Restore custom direction
_pos = getposatl _logic;
@ -113,7 +112,7 @@ if (_activated) then {
} forEach _entities;
};
};
if (count _hint > 0) then {
if (count _hint > 0 && {count objectCurators _logic > 0}) then {
[[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp;
};
if (count _velocity == 3) then {

View File

@ -23,11 +23,11 @@ _activated = _this select 2;
if (_activated && local _logic && !isnull curatorcamera) then {
//--- Terminate when remote control is already in progress
if !(isnull (missionnamespace getVariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitWith {};
if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitwith {};
//--- Get unit under cursor
_unit = objnull;
_mouseOver = missionnamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]];
_mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]];
if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;};
_unit = effectivecommander _unit;
@ -37,7 +37,8 @@ if (_activated && local _logic && !isnull curatorcamera) then {
if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";};
if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";};
if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";};
if !(isnull (_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";};
if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";};
if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";};
if (_error == "") then {
_unit spawn {
@ -47,7 +48,7 @@ if (_activated && local _logic && !isnull curatorcamera) then {
_vehicleRole = str assignedvehiclerole _unit;
bis_fnc_moduleRemoteControl_unit = _unit;
_unit setVariable ["bis_fnc_moduleRemoteControl_owner",player,true];
_unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true];
// Added by ace_zeus to toggle remote control wind sound
if (GVAR(remoteWind)) then {
@ -76,7 +77,7 @@ if (_activated && local _logic && !isnull curatorcamera) then {
//--- Wait for interface to close
(finddisplay 312) closedisplay 2;
waitUntil {isnull curatorcamera};
waituntil {isnull curatorcamera};
//--- Switch
player remotecontrol _unit;
@ -106,7 +107,7 @@ if (_activated && local _logic && !isnull curatorcamera) then {
_vehicle = vehicle _unit;
_vehicleRole = str assignedvehiclerole _unit;
_rating = rating player;
waitUntil {
waituntil {
//--- Refresh when vehicle or vehicle role changes
if ((vehicle _unit != _vehicle || str assignedvehiclerole _unit != _vehicleRole) && {alive _unit}) then {
player remotecontrol _unit;
@ -123,43 +124,49 @@ if (_activated && local _logic && !isnull curatorcamera) then {
||
{!alive _unit} //--- Also isnull check, objNull is not alive
||
{!alive player}
||
{isnull getassignedcuratorlogic player}
//||
//{_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull] != player} //--- Another curator stole the unit
};
player addrating (-rating player + _rating);
objnull remotecontrol _unit;
_unit setVariable ["bis_fnc_moduleRemoteControl_owner",nil,true];
_unit setvariable ["bis_fnc_moduleRemoteControl_owner",nil,true];
//--- Death screen
if (
isnull curatorcamera
&&
{cameraon != vehicle player}
&&
{!isnull _unit}
&&
{!isnull getassignedcuratorlogic player}
//&&
//{(_unit getVariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)}
) then {
sleep 2;
("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",1];
sleep 1;
if (alive player) then {
//--- Death screen
if (
isnull curatorcamera
&&
{cameraon != vehicle player}
&&
{!isnull _unit}
&&
{!isnull getassignedcuratorlogic player}
//&&
//{(_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)}
) then {
sleep 2;
("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",1];
sleep 1;
};
if !(isnull _unit) then {
_unitPos = getposatl _unit;
_camPos = [_unitPos,10,direction _unit + 180] call bis_fnc_relpos;
_camPos set [2,(_unitPos select 2) + (getterrainheightasl _unitPos) - (getterrainheightasl _camPos) + 10];
//[_camPos,_unit] call bis_fnc_setcuratorcamera;
(getassignedcuratorlogic player) setvariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]];
};
sleep 0.1; //--- Engine needs a delay in case controlled unit was deleted
("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10];
opencuratorinterface;
ppeffectdestroy _color;
waituntil {!isnull curatorcamera};
} else {
ppeffectdestroy _color;
};
_unitPos = getposatl _unit;
_camPos = [_unitPos,10,direction _unit + 180] call bis_fnc_relpos;
_camPos set [2,(_unitPos select 2) + (getterrainheightasl _unitPos) - (getterrainheightasl _camPos) + 10];
//[_camPos,_unit] call bis_fnc_setcuratorcamera;
(getassignedcuratorlogic player) setVariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]];
sleep 0.1; //--- Engine needs a delay in case controlled unit was deleted
("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10];
opencuratorinterface;
ppeffectdestroy _color;
waitUntil {!isnull curatorcamera};
player switchcamera cameraview;
bis_fnc_moduleRemoteControl_unit = nil;
("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1];

View File

@ -0,0 +1,49 @@
/*
* Author: SilentSpike
* PV event handler to update the AI skill on all machines when set by zeus module
*
* Arguments:
* 0: Variable name <STRING>
* 1: Variable new value <ANY>
*
* Return Value:
* None <NIL>
*
* Example:
* "ace_zeus_GlobalSkillAI" addPublicVariableEventHandler ace_zeus_fnc_moduleGlobalSetSkill
*
* Public: No
*/
#include "script_component.hpp"
_this params ["_varName","_varValue"];
_varValue params ["_general","_accuracy","_handling","_spotting","_cover","_combat"];
TRACE_1("Params",_this);
TRACE_6("AI settings updated",GVAR(GlobalSkillAI));
{
if (local _x) then {
_unit setSkill ["general", _general];
_unit setSkill ["commanding", _general];
_unit setSkill ["courage", _general];
_unit setSkill ["aimingAccuracy", _accuracy];
_unit setSkill ["aimingShake", _handling];
_unit setSkill ["aimingSpeed", _handling];
_unit setSkill ["reloadSpeed", _handling];
_unit setSkill ["spotDistance", _spotting];
_unit setSkill ["spotTime", _spotting];
if (_cover) then {
_unit enableAI "COVER";
} else {
_unit disableAI "COVER";
};
if (_combat) then {
_unit enableAI "AUTOCOMBAT";
} else {
_unit disableAI "AUTOCOMBAT";
};
};
} forEach allUnits;

View File

@ -0,0 +1,45 @@
/*
* Author: SilentSpike
* Zeus module function to change side of a group on dialog confirmation
*
* Arguments:
* 0: Unit to target <OBJECT>
* 1: Chosen side <SIDE>
*
* Return Value:
* None <NIL>
*
* Example:
* [this, west] call ace_zeus_fnc_moduleGroupSide
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit","_newSide"];
private _side = side _unit;
// Nothing to do here
if (_side == _newSide) exitWith {};
private _oldGroup = group _unit;
private _newGroup = createGroup _newSide;
// Pretty hacky, will replace units return group with this new group if unconcious
if (GETVAR(_unit,ACE_isUnconscious,false) && {GETMVAR(EGVAR(medical,moveUnitsFromGroupOnUnconscious),false)}) then {
private _previousGroupsList = _unit getVariable [QEGVAR(common,previousGroupSwitchTo), []];
{
if ("ACE_isUnconscious" == (_x select 2)) exitWith {
_x set [0,_newGroup];
_x set [1,_newSide];
_previousGroupsList set [_forEachIndex, _x];
};
} forEach _previousGroupsList;
_unit setVariable [QEGVAR(common,previousGroupSwitchTo), _previousGroupsList, true];
} else {
(units _unit) joinSilent _newGroup;
deleteGroup _oldGroup;
};

View File

@ -0,0 +1,51 @@
/*
* Author: SilentSpike
* Commands the group the module is placed on to search the nearest building
*
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic","_units","_activated"];
if !(_activated && local _logic) exitWith {};
//Validate the module target:
private _unit = effectiveCommander (attachedTo _logic);
private _building = nearestBuilding (getPosASL _unit);
scopeName "Main";
private _fnc_errorAndClose = {
params ["_msg"];
deleteVehicle _logic;
[_msg] call EFUNC(common,displayTextStructured);
breakOut "Main";
};
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call _fnc_errorAndClose;
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call _fnc_errorAndClose;
};
case (alive _unit): {
[LSTRING(OnlyAlive)] call _fnc_errorAndClose;
};
case (_unit distance _building < 500): {
[LSTRING(BuildingTooFar)] call _fnc_errorAndClose;
};
};
//Perform the module function:
[QGVAR(moduleSearchNearby), [_unit], _unit] call CBA_fnc_targetEvent;
deleteVehicle _logic;

View File

@ -0,0 +1,43 @@
/*
* Author: SilentSpike
* Zeus module function to teleport players on dialog confirmation
*
* Arguments:
* 0: Teleport to <OBJECT>
* 1: Player UID <STRING>
* 2: Teleport group <BOOL>
*
* Return Value:
* None <NIL>
*
* Example:
* [player, "5854854754", false] call ace_zeus_fnc_moduleTeleportPlayers
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic","_uid","_group"];
// Get the chosen unit
private _player = [_uid] call BIS_fnc_getUnitByUID;
// Handle if group mode was selected
if (_group) then {
_player = units _player;
} else {
_player = [_player];
};
// Handle teleportation
{
moveOut _x;
private _attached = attachedTo _logic;
if (isNull _attached) then {
[_x, _logic] call BIS_fnc_moveToRespawnPosition;
} else {
[_x, _attached] call BIS_fnc_moveToRespawnPosition;
};
} forEach _player;

View File

@ -0,0 +1,33 @@
/*
* Author: PabstMirror
* Initalises the ace_cargo attribute of the zeus vehicle attributes display
* (the display shown on double click)
*
* Arguments:
* 0: ace_cargo controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Example:
* onSetFocus = "_this call ace_zeus_fnc_ui_vehCargo"
*
* Public: No
*/
#include "script_component.hpp"
params ["_control"];
TRACE_1("params",_control);
private _veh = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
TRACE_1("",_veh);
private _loaded = _veh getVariable [QEGVAR(cargo,loaded), []];
TRACE_1("",_loaded);
_control ctrlRemoveAllEventHandlers "setFocus";
{
(_control controlsGroupCtrl 80086) lbAdd (str _x);
} forEach _loaded;

View File

@ -0,0 +1,60 @@
/*
* Author: SilentSpike
* Initalises the `position` zeus module attribute
*
* Arguments:
* 0: position controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
//Generic Init:
params ["_control"];
private _display = ctrlParent _control;
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
_control ctrlRemoveAllEventHandlers "setFocus";
//Specific on-load stuff:
private _map = _control controlsGroupCtrl 26469;
// Centre map on the logic initially
_map ctrlMapAnimAdd [0, ctrlMapScale _map, _logic];
ctrlMapAnimCommit _map;
private _fnc_onDraw = {
params ["_map"];
private _display = ctrlParent _map;
private _pos = GETVAR(_display,GVAR(position),[]);
private _radius = GETVAR(_display,GVAR(radius),0);
if !(_pos isEqualTo []) then {
// Works alongside radius attribute
if (_radius == 0) then {
_map drawIcon ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,0,1], _pos, 19, 19, 0, "", 0, 0];
} else {
_map drawEllipse [_pos, _radius, _radius, 0, [0,0,0,1], ""];
};
};
};
private _fnc_onMapClick = {
params ["_map","_button","_x","_y","_shift","_ctrl","_alt"];
if (_button == 0) then {
private _display = ctrlParent _map;
SETVAR(_display,GVAR(position),_pos);
};
};
SETVAR(_display,GVAR(position),getPos _logic);
_map ctrlAddEventHandler ["draw",_fnc_onDraw];
_map ctrlAddEventHandler ["mouseButtonDown",_fnc_onMapClick];

View File

@ -0,0 +1,47 @@
/*
* Author: SilentSpike
* Initalises the `radius` zeus module attribute
*
* Arguments:
* 0: radius controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
//Generic Init:
params ["_control"];
private _display = ctrlParent _control;
_control ctrlRemoveAllEventHandlers "setFocus";
//Specific on-load stuff:
private _edit = _control controlsGroupCtrl 26467;
_edit ctrlSetText "100";
private _fnc_onKeyUp = {
params ["_display"];
private _edit = _display displayCtrl 26467;
private _radius = parseNumber (ctrlText _edit);
// Handle invalid radius (non-numerical input)
if (_radius == 0) then {
_edit ctrlSetTooltip (localize LSTRING(AttributeRadiusInvalid));
_edit ctrlSetTextColor [1,0,0,1];
} else {
_edit ctrlSetTooltip "";
_edit ctrlSetTextColor [1,1,1,1];
SETVAR(_display,GVAR(radius),_radius);
};
};
[_display] call _fnc_onKeyUp;
_display displayAddEventHandler ["keyUp", _fnc_onKeyUp];

View File

@ -0,0 +1,76 @@
/*
* Author: SilentSpike
* Initalises the `defend area` zeus module display
*
* Arguments:
* 0: dummy controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
//Generic Init:
params ["_control"];
private _display = ctrlParent _control;
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
_control ctrlRemoveAllEventHandlers "setFocus";
//Validate the module target:
private _unit = effectiveCommander (attachedTo _logic);
scopeName "Main";
private _fnc_errorAndClose = {
params ["_msg"];
_display closeDisplay 0;
deleteVehicle _logic;
[_msg] call EFUNC(common,displayTextStructured);
breakOut "Main";
};
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call _fnc_errorAndClose;
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call _fnc_errorAndClose;
};
case (alive _unit): {
[LSTRING(OnlyAlive)] call _fnc_errorAndClose;
};
};
private _fnc_onUnload = {
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
if (_this select 1 == 2) then {
deleteVehicle _logic;
};
};
private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]];
private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {};
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
private _unit = effectiveCommander (attachedTo _logic);
private _radius = GETVAR(_display,GVAR(radius),50);
private _position = GETVAR(_display,GVAR(position),getPos _logic);
[QGVAR(moduleDefendArea), [_unit,_position,_radius], _unit] call CBA_fnc_targetEvent;
deleteVehicle _logic;
};
_display displayAddEventHandler ["unload", _fnc_onUnload];
_control ctrlAddEventHandler ["buttonClick", _fnc_onConfirm];

View File

@ -0,0 +1,81 @@
/*
* Author: PabstMirror
* Initalises the `global skill` zeus module display
*
* Arguments:
* 0: globalSetSkill controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Example:
* onSetFocus = "_this call ace_zeus_fnc_ui_globalSetSkill"
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
params ["_control"];
TRACE_1("params",_control);
//Generic Init:
private _display = ctrlparent _control;
private _ctrlButtonOK = _display displayctrl 1; //IDC_OK
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
TRACE_1("logicObject",_logic);
_control ctrlRemoveAllEventHandlers "setFocus";
//Specific on-load stuff:
private _fnc_sliderMove = {
params ["_slider"];
private _idc = ctrlIDC _slider; // IDCs ∈ [16184,16187]
private _curVal = GVAR(GlobalSkillAI) select (_idc - 16184); // [0,3]
_slider ctrlSetTooltip format ["%1%3 (was %2%3)", round(sliderPosition _slider * 100), round(_curVal * 100), "%"];
};
{
private _slider = _display displayCtrl _x;
_slider sliderSetRange [0, 1];
_slider sliderSetSpeed [0.01,0.1];
_slider sliderSetPosition (GVAR(GlobalSkillAI) select _forEachIndex);
_slider ctrlAddEventHandler ["SliderPosChanged", _fnc_sliderMove];
_slider call _fnc_sliderMove;
} forEach [16184,16185,16186,16187];
(_display displayCtrl 16188) cbSetChecked (GVAR(GlobalSkillAI) select 4);
(_display displayCtrl 16189) cbSetChecked (GVAR(GlobalSkillAI) select 5);
private _fnc_onUnload = {
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
deleteVehicle _logic;
};
private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]];
TRACE_1("_fnc_onConfirm params",_this);
private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {};
GVAR(GlobalSkillAI) = [
sliderPosition (_display displayCtrl 16184), // General
sliderPosition (_display displayCtrl 16185), // Accuracy
sliderPosition (_display displayCtrl 16186), // Handling
sliderPosition (_display displayCtrl 16187), // Spotting
cbChecked (_display displayCtrl 16188), // Seek cover
cbChecked (_display displayCtrl 16189) // Autocombat
];
publicVariable QGVAR(GlobalSkillAI); // Values should persist for future use
// PV EH won't run on local machine
[QGVAR(GlobalSkillAI),GVAR(GlobalSkillAI)] call FUNC(moduleGlobalSetSkill);
};
_display displayAddEventHandler ["unload", _fnc_onUnload];
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];

View File

@ -0,0 +1,136 @@
/*
* Author: SilentSpike
* Initalises the `group side` zeus module display
*
* Arguments:
* 0: groupSide controls group <CONTROL>
*
* Return Value:
* NONE <NIL>
*
* Example:
* onSetFocus = "_this call ace_zeus_fnc_ui_groupSide"
*
* Public: No
*/
#include "script_component.hpp"
#define IDCs [31201,31200,31202,31203]
disableSerialization;
params ["_control"];
//Generic Init:
private _display = ctrlparent _control;
private _ctrlButtonOK = _display displayctrl 1; //IDC_OK
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
TRACE_1("logicObject",_logic);
_control ctrlRemoveAllEventHandlers "setFocus";
//Validate the module target:
private _unit = effectiveCommander (attachedTo _logic);
private _side = side _unit;
scopeName "Main";
private _fnc_errorAndClose = {
params ["_msg"];
_display closeDisplay 0;
deleteVehicle _logic;
[_msg] call EFUNC(common,displayTextStructured);
breakOut "Main";
};
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call _fnc_errorAndClose;
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call _fnc_errorAndClose;
};
case (alive _unit): {
[LSTRING(OnlyAlive)] call _fnc_errorAndClose;
};
case (_side in [west,east,independent,civilian]): {
[LSTRING(OnlySpecificSide)] call _fnc_errorAndClose;
};
};
//Specific on-load stuff:
private _idcActive = 31200 + ([west,east,independent,civilian] find _side);
SETVAR(_display,oldSide,_idcActive - 31200);
SETVAR(_display,newSide,_idcActive - 31200);
private _fnc_onSelection = {
params [["_activeCtrl", controlNull, [controlNull]]];
private _display = ctrlParent _activeCtrl;
if (isNull _display) exitWith {};
// Update the button scales and colours on selection
{
private _ctrl = _display displayCtrl _x;
private _color = _ctrl getVariable "color";
private _scale = 1;
if (ctrlIDC _activeCtrl == _x) then {
_color set [3,1];
_scale = 1.2
} else {
_color set [3,0.5];
};
_ctrl ctrlSetTextColor _color;
[_ctrl,_scale,0.1] call BIS_fnc_ctrlSetScale;
} forEach IDCs;
// Store selected button index for confirmation
SETVAR(_display,newSide,(ctrlIDC _activeCtrl) - 31200);
};
// Initalize buttons with colour and scale
{
private _ctrl = _display displayCtrl _x;
private _color = [_forEachIndex] call BIS_fnc_sideColor;
_ctrl setVariable ["color", _color];
_ctrl ctrlSetActiveColor _color;
_color set [3,0.5];
if (ctrlIDC _ctrl == _idcActive) then {
[_ctrl,1.2,0] call BIS_fnc_ctrlSetScale;
_color set [3,1];
};
_ctrl ctrlSetTextColor _color;
_ctrl ctrlAddEventHandler ["buttonclick", _fnc_onSelection];
} forEach IDCs;
private _fnc_onUnload = {
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
if (_this select 1 == 2) then {
deleteVehicle _logic;
};
};
private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]];
private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {};
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
private _unit = effectiveCommander (attachedTo _logic);
private _side = [west,east,independent,civilian] select (GETVAR(_display,newSide,GETVAR(_display,oldSide,0)));
[_unit, _side] call FUNC(moduleGroupSide);
deleteVehicle _logic;
};
_display displayAddEventHandler ["unload", _fnc_onUnload];
_ctrlButtonOK ctrlAddEventHandler ["buttonClick", _fnc_onConfirm];

View File

@ -0,0 +1,76 @@
/*
* Author: SilentSpike
* Initalises the `patrol area` zeus module display
*
* Arguments:
* 0: dummy controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
//Generic Init:
params ["_control"];
private _display = ctrlParent _control;
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
_control ctrlRemoveAllEventHandlers "setFocus";
//Validate the module target:
private _unit = effectiveCommander (attachedTo _logic);
scopeName "Main";
private _fnc_errorAndClose = {
params ["_msg"];
_display closeDisplay 0;
deleteVehicle _logic;
[_msg] call EFUNC(common,displayTextStructured);
breakOut "Main";
};
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call _fnc_errorAndClose;
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call _fnc_errorAndClose;
};
case (alive _unit): {
[LSTRING(OnlyAlive)] call _fnc_errorAndClose;
};
};
private _fnc_onUnload = {
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
if (_this select 1 == 2) then {
deleteVehicle _logic;
};
};
private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]];
private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {};
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
private _unit = effectiveCommander (attachedTo _logic);
private _radius = GETVAR(_display,GVAR(radius),50);
private _position = GETVAR(_display,GVAR(position),getPos _logic);
[QGVAR(modulePatrolArea), [_unit,_position,_radius,5], _unit] call CBA_fnc_targetEvent;
deleteVehicle _logic;
};
_display displayAddEventHandler ["unload", _fnc_onUnload];
_control ctrlAddEventHandler ["buttonClick", _fnc_onConfirm];

View File

@ -0,0 +1,82 @@
/*
* Author: SilentSpike
* Initalises the `search area` zeus module display
*
* Arguments:
* 0: dummy controls group <CONTROL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
//Generic Init:
params ["_control"];
private _display = ctrlParent _control;
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
_control ctrlRemoveAllEventHandlers "setFocus";
//Validate the module target:
private _unit = effectiveCommander (attachedTo _logic);
scopeName "Main";
private _fnc_errorAndClose = {
params ["_msg"];
_display closeDisplay 0;
deleteVehicle _logic;
[_msg] call EFUNC(common,displayTextStructured);
breakOut "Main";
};
switch (false) do {
case !(isNull _unit): {
[LSTRING(NothingSelected)] call _fnc_errorAndClose;
};
case (_unit isKindOf "CAManBase"): {
[LSTRING(OnlyInfantry)] call _fnc_errorAndClose;
};
case (alive _unit): {
[LSTRING(OnlyAlive)] call _fnc_errorAndClose;
};
};
private _fnc_onUnload = {
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
if (_this select 1 == 2) then {
deleteVehicle _logic;
};
};
private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]];
private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {};
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
private _unit = effectiveCommander (attachedTo _logic);
private _radius = GETVAR(_display,GVAR(radius),50);
private _position = GETVAR(_display,GVAR(position),getPos _logic);
private _marker = QGVAR(ModuleSearchArea) + str(_unit);
createMarker [_marker, _position];
_marker setMarkerAlpha 0;
_marker setMarkerShape "ELLIPSE";
_marker setMarkerSize [_radius,_radius];
[QGVAR(moduleSearchArea), [_unit,_marker], _unit] call CBA_fnc_targetEvent;
deleteVehicle _logic;
};
_display displayAddEventHandler ["unload", _fnc_onUnload];
_control ctrlAddEventHandler ["buttonClick", _fnc_onConfirm];

View File

@ -0,0 +1,70 @@
/*
* Author: SilentSpike
* Initalises the `teleport players` zeus module display
*
* Arguments:
* 0: teleportPlayers controls group <CONTROL>
*
* Return Value:
* NONE <NIL>
*
* Example:
* onSetFocus = "_this call ace_zeus_fnc_ui_teleportPlayers"
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
params ["_control"];
//Generic Init:
private _display = ctrlparent _control;
private _ctrlButtonOK = _display displayctrl 1; //IDC_OK
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
TRACE_1("logicObject",_logic);
_control ctrlRemoveAllEventHandlers "setFocus";
//Specific on-load stuff:
private _listbox = _display displayCtrl 16189;
{
if (alive _x) then {
_listbox lbSetData [_listbox lbAdd (name _x), getPlayerUID _x];
};
} forEach allPlayers;
_listbox lbSetCurSel 0;
(_display displayCtrl 16188) cbSetChecked (_logic getVariable ["tpGroup",false]);
private _fnc_onUnload = {
params ["_display"];
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
// Store checkbox value for reopening
_logic setVariable ["tpGroup", cbChecked (_display displayCtrl 16188)];
};
private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]];
private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {};
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
if (isNull _logic) exitWith {};
private _lb = _display displayCtrl 16189;
private _uid = _lb lbData (lbCurSel _lb);
private _group = cbChecked (_display displayCtrl 16188);
[_logic, _uid, _group] call FUNC(moduleTeleportPlayers);
};
_display displayAddEventHandler ["unload", _fnc_onUnload];
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];

View File

@ -0,0 +1,24 @@
/*
* Author: PabstMirror
* Dummy function to include BIS script file.
* Used in initalisation of zeus attribute displays.
*
* Arguments:
* 0: UI event string <STRING>
* 1: UI event parameters <ARRAY>
* 2: Display class name <STRING>
*
* Return Value:
* None <NIL>
*
* Example:
* onLoad = "['onLoad',_this,'RscDisplayExample'] call ace_zeus_fnc_zeusAttributes"
*
* Public: No
*/
#include "script_component.hpp"
TRACE_1("params",_this);
#include "\a3\ui_f_curator\UI\Displays\RscDisplayAttributes.sqf"

View File

@ -15,3 +15,11 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
// UI grid
#define SIZEX ((safezoneW / safezoneH) min 1.2)
#define SIZEY (SIZEX / 1.2)
#define W_PART(num) (num * (SIZEX / 40))
#define H_PART(num) (num * (SIZEY / 25))
#define X_PART(num) (W_PART(num) + (safezoneX + (safezoneW - SIZEX)/2))
#define Y_PART(num) (H_PART(num) + (safezoneY + (safezoneH - SIZEY)/2))

View File

@ -181,6 +181,54 @@
<Russian>Пленный (вкл./выкл.)</Russian>
<Italian>Apri Catturato</Italian>
</Key>
<Key ID="STR_ACE_Zeus_ModuleDefendArea_DisplayName">
<English>Defend Area</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_DisplayName">
<English>Global AI Skill</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_general">
<English>General Skill</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_general_desc">
<English>Changes: general, commanding, courage</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_accuracy">
<English>Accuracy</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_accuracy_desc">
<English>Changes: aimingAccuracy</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_handling">
<English>Weapon Handling</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_handling_desc">
<English>Changes: aimingShake, aimingSpeed, reloadSpeed</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_spotting">
<English>Spotting</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_spotting_desc">
<English>Changes: spotDistance, spotTime</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_cover">
<English>Seek Cover</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_cover_desc">
<English>Should AI seek cover</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_combat">
<English>Auto Combat</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGlobalSetSkill_combat_desc">
<English>Should AI automatically switch to combat mode</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleGroupSide_DisplayName">
<English>Group Side</English>
</Key>
<Key ID="STR_ACE_Zeus_ModulePatrolArea_DisplayName">
<English>Patrol Area</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleSurrender_DisplayName">
<English>Toggle Surrender</English>
<Polish>Przełącz kapitulację</Polish>
@ -193,6 +241,21 @@
<Russian>Сдавшийся (вкл./выкл.)</Russian>
<Italian>Apri Resa</Italian>
</Key>
<Key ID="STR_ACE_Zeus_ModuleTeleportPlayers_DisplayName">
<English>Teleport Players</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleTeleportPlayers_player">
<English>Player</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleTeleportPlayers_player_desc">
<English>Teleport selected player to module position</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleTeleportPlayers_group">
<English>Teleport Group</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleTeleportPlayers_group_desc">
<English>Teleports all units in group</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleUnconscious_DisplayName">
<English>Toggle Unconscious</English>
<Polish>Przełącz nieprzytomność</Polish>
@ -205,6 +268,12 @@
<Russian>Без сознания (вкл./выкл.)</Russian>
<Italian>Apri Incosciente</Italian>
</Key>
<Key ID="STR_ACE_Zeus_ModuleSearchArea_DisplayName">
<English>Search Area</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleSearchNearby_DisplayName">
<English>Search Nearby Building</English>
</Key>
<Key ID="STR_ACE_Zeus_ModuleSetMedic_DisplayName">
<English>Assign Medic</English>
<German>Sanitäter zuweisen.</German>
@ -249,17 +318,6 @@
<Spanish>Agregar rueda de auxilio</Spanish>
<French>Ajouter pièce de rechange</French>
</Key>
<Key ID="STR_ACE_Zeus_ModuleAddSpareWheel_Description">
<English>Adds a Spare Wheel to the vehicle</English>
<Portuguese>Adiciona uma roda sobressalente ao veículo</Portuguese>
<Polish>Dodaje koło zapasowe do pojazdu</Polish>
<Russian>Добавляет запасное колесо в транспорт</Russian>
<Czech>Přidá rezervní kolo do vozidla</Czech>
<Italian>Aggiungi una ruota di scorta al veicolo</Italian>
<German>Fügt dem Fahrzeug ein Ersatzrad hinzu</German>
<Spanish>Agrega una rueda de auxilio al vehículo</Spanish>
<French>Ajoute une roue de secours au véhicule</French>
</Key>
<Key ID="STR_ACE_Zeus_ModuleAddSpareTrack_DisplayName">
<English>Add Spare Track</English>
<Portuguese>Adicionar esteira sobressalente</Portuguese>
@ -271,17 +329,6 @@
<Spanish>Agregar oruga de repuesto</Spanish>
<French>Ajouter une chenille de secours</French>
</Key>
<Key ID="STR_ACE_Zeus_ModuleAddSpareTrack_Description">
<English>Adds a Spare Track to the vehicle</English>
<Portuguese>Adiciona uma esteira sobressalente ao veículo</Portuguese>
<Polish>Dodaje zapasową gąsienicę do pojazdu</Polish>
<Russian>Добавляет запасную гусеницу в транспорт</Russian>
<Czech>Přidá náhradní pás do vozidla</Czech>
<Italian>Aggiungi un cingolo di scorta al veicolo</Italian>
<German>Fügt dem Fahrzeug eine Ersatzkette hinzu</German>
<Spanish>Agrega una oruga de repuesto al vehículo</Spanish>
<French>Ajoute une chenille de reserve</French>
</Key>
<Key ID="STR_ACE_Zeus_OnlyAlive">
<English>Unit must be alive</English>
<French>Utiliser uniquement sur une unité vivante</French>
@ -362,6 +409,12 @@
<Russian>Юнит не должен быть пленным</Russian>
<Italian>L'unità non dev'essere un prigioniero</Italian>
</Key>
<Key ID="STR_ACE_Zeus_OnlySpecificSide">
<English>Unit must belong to an appropriate side</English>
</Key>
<Key ID="STR_ACE_Zeus_BuildingTooFar">
<English>Nearest building is too far away</English>
</Key>
<Key ID="STR_ACE_Zeus_NothingSelected">
<English>Place on a unit</English>
<French>Rien sous le curseur</French>
@ -408,5 +461,23 @@
<French>Ajoute n'importe quel objet spawné à tous les curateurs de la mission</French>
<German>Fügt jedes gespawnte Objekt allen Kuratoren der Mission hinzu</German>
</Key>
<Key ID="STR_ACE_Zeus_AttributeCargo">
<English>Cargo:</English>
</Key>
<Key ID="STR_ACE_Zeus_AttributePosition">
<English>Task Position</English>
</Key>
<Key ID="STR_ACE_Zeus_AttributePosition_desc">
<English>Select a position to perform the task at</English>
</Key>
<Key ID="STR_ACE_Zeus_AttributeRadius">
<English>Task Radius</English>
</Key>
<Key ID="STR_ACE_Zeus_AttributeRadius_desc">
<English>Radius to perform the task within</English>
</Key>
<Key ID="STR_ACE_Zeus_AttributeRadiusInvalid">
<English>Invalid radius entered</English>
</Key>
</Package>
</Project>

View File

@ -0,0 +1,422 @@
class RscControlsGroup;
class RscControlsGroupNoScrollbars;
class RscText;
class RscListbox;
class RscCombo;
class RscEdit;
class RscXSliderH;
class RscCheckBox;
class RscActivePicture;
class RscMapControl;
class RscDisplayAttributes {
class Controls {
class Background;
class Title;
class Content: RscControlsGroup {
class controls;
};
class ButtonOK;
class ButtonCancel;
};
};
class GVAR(AttributeRadius): RscControlsGroupNoScrollbars {
onSetFocus = QUOTE(_this call FUNC(ui_attributeRadius));
idc = 26466;
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(1.2);
class controls {
class Title1: RscText {
idc = -1;
text = CSTRING(AttributeRadius);
toolTip = CSTRING(AttributeRadius_desc);
x = 0;
y = H_PART(0.1);
w = W_PART(10);
h = H_PART(1);
colorBackground[] = {0,0,0,0.5};
};
class Radius: RscEdit {
idc = 26467;
x = W_PART(10.1);
y = H_PART(0.1);
w = W_PART(15.8);
h = H_PART(1);
autocomplete = "";
};
};
};
class GVAR(AttributePosition): RscControlsGroupNoScrollbars {
onSetFocus = QUOTE(_this call FUNC(ui_attributePosition));
idc = 26468;
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(26);
class controls {
class Title1: RscText {
idc = -1;
text = CSTRING(AttributePosition);
toolTip = CSTRING(AttributePosition_desc);
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(1);
colorBackground[] = {0,0,0,0.5};
};
class Position: RscMapControl {
idc = 26469;
x = W_PART(0.5);
y = H_PART(1.1);
w = W_PART(25);
h = H_PART(24.8);
};
};
};
class GVAR(RscDefendArea): RscDisplayAttributes {
onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscDefendArea)))] call FUNC(zeusAttributes));
onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscDefendArea)))] call FUNC(zeusAttributes));
class Controls: Controls {
class Background: Background {};
class Title: Title {};
class Content: Content {
class Controls {
class radius: GVAR(AttributeRadius) {};
//class position: GVAR(AttributePosition) {};
};
};
class ButtonOK: ButtonOK {
onSetFocus = QUOTE(_this call FUNC(ui_defendArea));
};
class ButtonCancel: ButtonCancel {};
};
};
class GVAR(RscGlobalSetSkill): RscDisplayAttributes {
onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes));
onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes));
class Controls: Controls {
class Background: Background {};
class Title: Title {};
class Content: Content {
class Controls {
class globalSetSkill: RscControlsGroupNoScrollbars {
onSetFocus = QUOTE(_this call FUNC(ui_globalSetSkill));
idc = 26422;
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(6.5);
class controls {
class Title1: RscText {
idc = -1;
text = CSTRING(ModuleGlobalSetSkill_general);
toolTip = CSTRING(ModuleGlobalSetSkill_general_desc);
x = 0;
y = 0;
w = W_PART(10);
h = H_PART(1);
colorBackground[] = {0,0,0,0.5};
};
class General: RscXSliderH {
idc = 16184;
x = W_PART(10.1);
y = 0;
w = W_PART(15.9);
h = H_PART(1);
};
class Title2: Title1 {
idc = -1;
text = CSTRING(ModuleGlobalSetSkill_accuracy);
toolTip = CSTRING(ModuleGlobalSetSkill_accuracy_desc);
y = H_PART(1.1);
};
class Accuracy: General {
idc = 16185;
y = H_PART(1.1);
};
class Title3: Title1 {
idc = -1;
text = CSTRING(ModuleGlobalSetSkill_handling);
toolTip = CSTRING(ModuleGlobalSetSkill_handling_desc);
y = H_PART(2.2);
};
class Handling: General {
idc = 16186;
y = H_PART(2.2);
};
class Title4: Title1 {
idc = -1;
text = CSTRING(ModuleGlobalSetSkill_spotting);
toolTip = CSTRING(ModuleGlobalSetSkill_spotting_desc);
y = H_PART(3.3);
};
class Spotting: General {
idc = 16187;
y = H_PART(3.3);
};
class Title5: Title1 {
idc = -1;
text = CSTRING(ModuleGlobalSetSkill_cover);
toolTip = CSTRING(ModuleGlobalSetSkill_cover_desc);
y = H_PART(4.4);
};
class Cover: RscCheckBox {
idc = 16188;
x = W_PART(10.1);
y = H_PART(4.4);
w = W_PART(1);
h = H_PART(1);
};
class Title6: Title5 {
idc = -1;
text = CSTRING(ModuleGlobalSetSkill_combat);
toolTip = CSTRING(ModuleGlobalSetSkill_combat_desc);
y = H_PART(5.5);
};
class Combat: Cover {
idc = 16189;
y = H_PART(5.5);
};
};
};
};
};
class ButtonOK: ButtonOK {};
class ButtonCancel: ButtonCancel {};
};
};
class GVAR(RscGroupSide): RscDisplayAttributes {
onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGroupSide)))] call FUNC(zeusAttributes));
onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGroupSide)))] call FUNC(zeusAttributes));
class Controls: Controls {
class Background: Background {};
class Title: Title {};
class Content: Content {
class Controls {
class groupSide: RscControlsGroupNoScrollbars {
onSetFocus = QUOTE(_this call FUNC(ui_groupSide));
idc = 26422;
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(2.5);
class controls {
class Title: RscText {
idc = 31002;
text = "$STR_disp_arcunit_side";
x = 0;
y = 0;
w = W_PART(10);
h = H_PART(2.5);
colorBackground[] = {0,0,0,0.5};
};
class Background: RscText {
idc = 31000;
x = W_PART(10);
y = 0;
w = W_PART(16);
h = H_PART(2.5);
colorBackground[] = {1,1,1,0.1};
};
class BLUFOR: RscActivePicture {
idc = 31200;
text = "\a3\Ui_f\data\Map\Markers\NATO\b_unknown.paa";
x = W_PART(12.5);
y = H_PART(0.25);
w = W_PART(2);
h = H_PART(2);
tooltip = "$STR_WEST";
};
class OPFOR: BLUFOR {
idc = 31201;
text = "\a3\Ui_f\data\Map\Markers\NATO\o_unknown.paa";
x = W_PART(15.5);
y = H_PART(0.25);
w = W_PART(2);
h = H_PART(2);
tooltip = "$STR_EAST";
};
class Independent: BLUFOR {
idc = 31202;
text = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";
x = W_PART(18.5);
y = H_PART(0.25);
w = W_PART(2);
h = H_PART(2);
tooltip = "$STR_guerrila";
};
class Civilian: BLUFOR {
idc = 31203;
text = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";
x = W_PART(21.5);
y = H_PART(0.25);
w = W_PART(2);
h = H_PART(2);
tooltip = "$STR_Civilian";
};
};
};
};
};
class ButtonOK: ButtonOK {};
class ButtonCancel: ButtonCancel {};
};
};
class GVAR(RscPatrolArea): RscDisplayAttributes {
onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscPatrolArea)))] call FUNC(zeusAttributes));
onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscPatrolArea)))] call FUNC(zeusAttributes));
class Controls: Controls {
class Background: Background {};
class Title: Title {};
class Content: Content {
class Controls {
class radius: GVAR(AttributeRadius) {};
//class position: GVAR(AttributePosition) {};
};
};
class ButtonOK: ButtonOK {
onSetFocus = QUOTE(_this call FUNC(ui_patrolArea));
};
class ButtonCancel: ButtonCancel {};
};
};
class GVAR(RscSearchArea): RscDisplayAttributes {
onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscSearchArea)))] call FUNC(zeusAttributes));
onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscSearchArea)))] call FUNC(zeusAttributes));
class Controls: Controls {
class Background: Background {};
class Title: Title {};
class Content: Content {
class Controls {
class radius: GVAR(AttributeRadius) {};
//class position: GVAR(AttributePosition) {};
};
};
class ButtonOK: ButtonOK {
onSetFocus = QUOTE(_this call FUNC(ui_searchArea));
};
class ButtonCancel: ButtonCancel {};
};
};
class GVAR(RscTeleportPlayers): RscDisplayAttributes {
onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscTeleportPlayers)))] call FUNC(zeusAttributes));
onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscTeleportPlayers)))] call FUNC(zeusAttributes));
class Controls: Controls {
class Background: Background {};
class Title: Title {};
class Content: Content {
class Controls {
class teleportPlayers: RscControlsGroupNoScrollbars {
onSetFocus = QUOTE(_this call FUNC(ui_teleportPlayers));
idc = 26422;
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(8.5);
class controls {
class Title: RscText {
idc = -1;
text = CSTRING(ModuleTeleportPlayers_player);
toolTip = CSTRING(ModuleTeleportPlayers_player_desc);
x = 0;
y = 0;
w = W_PART(26);
h = H_PART(1);
colorBackground[] = {0,0,0,0.5};
};
class Unit: RscListbox {
idc = 16189;
x = 0;
y = H_PART(1.1);
w = W_PART(26);
h = H_PART(5.9);
};
class Label: Title {
idc = -1;
text = CSTRING(ModuleTeleportPlayers_group);
toolTip = CSTRING(ModuleTeleportPlayers_group_desc);
y = H_PART(7.1);
w = W_PART(10);
};
class UseGroup: RscCheckBox {
idc = 16188;
x = W_PART(10.1);
y = H_PART(7.1);
w = W_PART(1);
h = H_PART(1);
};
};
};
};
};
class ButtonOK: ButtonOK {};
class ButtonCancel: ButtonCancel {};
};
};
class GVAR(AttributeCargo): RscControlsGroupNoScrollbars {
onSetFocus = QUOTE(_this call FUNC(ui_attributeCargo));
idc = -1;
x = X_PART(7);
y = Y_PART(10);
w = W_PART(26);
h = H_PART(3);
class controls {
class Title: RscText {
idc = -1;
text = CSTRING(AttributeCargo);
x = 0;
y = 0;
w = W_PART(10);
h = H_PART(3);
colorBackground[] = {0,0,0,0.5};
};
class Background: RscText {
idc = -1;
x = W_PART(10);
y = 0;
w = W_PART(16);
h = H_PART(3);
colorBackground[] = {1,1,1,0.1};
};
class Cargo: RscListBox {
idc = 80086;
x = W_PART(10);
y = 0;
w = W_PART(16);
h = H_PART(3);
};
};
};
class RscDisplayAttributesVehicle: RscDisplayAttributes {
class Controls: Controls {
class Content: Content {
class Controls: controls {
class ace_cargo: GVAR(AttributeCargo) { };
};
};
};
};
class RscDisplayAttributesVehicleEmpty: RscDisplayAttributes {
class Controls: Controls {
class Content: Content {
class Controls: controls {
class ace_cargo: GVAR(AttributeCargo) { };
};
};
};
};