diff --git a/AUTHORS.txt b/AUTHORS.txt
index f8dffede..e811d206 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -9,7 +9,11 @@
y0014984
Wasserstoff
-# CONTRIBUTORS
-Bilibagga (Russian translation)
+# CODE CONTRIBUTORS
+JulesVerner
+
+# TRANSLATION CONTRIBUTORS
+Bilibagga (Russian Translation)
PowerBOXx (Simplified Chinese Translation)
-alexisdu7589 (French translation)
+alexisdu7589 (French Translation)
+Seraf (Italian Translation)
diff --git a/README.md b/README.md
index 294c36ae..ae1831d5 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
-
+
@@ -12,7 +12,7 @@
- Requires the latest version of CBA A3 and ACE3 for server and client.
+ Requires the latest version of CBA_A3 and ACE3 for server and client.
**Advanced Equipment** is a mod for Arma 3, that is still under development. I wanted to create a mod, that allows you to really use a lot of the vanilla equipment like laptops and lamps.
@@ -21,35 +21,37 @@ This project is entirely **open-source** and all contributions are welcome. Feel
## Features
-- Power Management (Power Consumption, Batteries, Sun Collectors, Generators)
+- Power Management (Power Consumption, Batteries, Sun Collectors, Generators, Connections)
- Interaction (Turn On/Off/Standby/Adjust/Use things like Laptops and Lamps, Put in Inventory)
-- armaOS (Unique Terminal-like interface for computers; multiple designs)
-- Filesystem Managment (Files, Folders and Programs on Computers and USB-Sticks)
+- armaOS (Unique Terminal-like interface for computers; multiple designs, User Management)
+- Filesystem Managment (Files, Folders and Programs on Computers and USB-Sticks, incl. Permissions)
- Network Management (only basics implemented yet)
- Logistics (Fold and unfold objects, move them around, put them into vehicles)
-- 3DEN Modules (Easy Mission Making)
-- Localization (English, German, French, Russian, Simplified Chinese)
+- 3DEN Modules (Easy Mission Making by adding Connections, Files, Directories, Users, Commands and Games)
+- Zeus Support (Modules, Connections, Settings, Functions)
+- "UI on texture" for armaOS computers (every player sees the live screen)
+- Localization (English, German, French, Italian, Russian, Simplified Chinese)
## Wiki
-See Wiki pages for additional information on how to use Advanced Equipment.
+
+See Wiki pages for additional information on how to use Advanced Equipment.
## Installation
-Download the latest versions of Advanced Equipment, CBA_A3 and ACE. Unpack these mods in your Arma 3 and Arma 3 server installation folders.
+Download the latest versions of Advanced Equipment, CBA_A3 and ACE3. Unpack these mods in your Arma 3 and Arma 3 server installation folders.
Simply launch Arma 3 with `-mod=@CBA_A3;@ace;@AE3`. You can also get this mod on Steam Workshop .
## Known Issues
-* This mod is still under development and isn't recommended for productive use right now.
-* No Zeus support at the moment.
+- This mod is still under development and isn't recommended for productive use right now.
## Contact and Contribution
-If you want to contribute or have any questions, simply join my [Discord](https://discord.com/invite/JMmxXEx) We are always searching for contributors that help us on translations.
+If you want to contribute or have any questions, simply join my [Discord](https://discord.com/invite/JMmxXEx) We are always searching for contributors that help us with modelling, coding and translations.
## AE3 Developer Report
-See our AE3-DEVREP Developer Video Blog for letest changes, bugfixes and new features.
+See our AE3-DEVREP Developer Video Blog for latest changes, bugfixes and new features.
## License
diff --git a/addons/armaos/CfgFactionClasses.hpp b/addons/armaos/CfgFactionClasses.hpp
deleted file mode 100644
index 9fd3324c..00000000
--- a/addons/armaos/CfgFactionClasses.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-
-class CfgFactionClasses
-{
- class NO_CATEGORY;
- class AE3_armaosModules: NO_CATEGORY
- {
- displayName = "$STR_AE3_ArmaOS_Config_ArmaOSModulesKategoryDisplayName";
- };
-};
\ No newline at end of file
diff --git a/addons/armaos/CfgVehicles.hpp b/addons/armaos/CfgVehicles.hpp
index be981bda..962f3c5c 100644
--- a/addons/armaos/CfgVehicles.hpp
+++ b/addons/armaos/CfgVehicles.hpp
@@ -6,6 +6,12 @@ class CfgVehicles
class Land_Laptop_03_black_F;
class Land_Laptop_03_black_F_AE3: Land_Laptop_03_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
// Eden Editor Attributes
class Attributes
{
@@ -29,12 +35,6 @@ class CfgVehicles
};
};
- // Event Handlers
- class EventHandlers
- {
- //init = "params ['_entity']; call compile preprocessFileLineNumbers '\z\ae3\addons\main\init\initLaptop.sqf';";
- };
-
class AE3_Equipment
{
displayName = "$STR_AE3_ArmaOS_Config_LaptopDisplayName";
@@ -48,20 +48,20 @@ class CfgVehicles
closeAction = "_this call AE3_interaction_fnc_laptop_close;";
closeActionCondition = "isNull (_this getVariable ['AE3_computer_mutex', objNull])";
- class AE3_ace3Interactions
+ class AE3_ace3Interactions
{
- class AE3_aceCarrying
- {
- // Carrying
- ae3_dragging_canCarry = 1; // Can be dragged (0-no, 1-yes)
- ae3_dragging_carryPosition[] = {0, 1, 1}; // Offset of the model from the body while dragging (same as attachTo)
- ae3_dragging_carryDirection = 0; // Model direction while dragging (same as setDir after attachTo)
- };
- class AE3_aceCargo
- {
- ae3_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no)
- ae3_cargo_size = 1; // Cargo space the object takes
- };
+ class AE3_aceCarrying
+ {
+ // Carrying
+ ae3_dragging_canCarry = 1; // Can be dragged (0-no, 1-yes)
+ ae3_dragging_carryPosition[] = {0, 1, 1}; // Offset of the model from the body while dragging (same as attachTo)
+ ae3_dragging_carryDirection = 0; // Model direction while dragging (same as setDir after attachTo)
+ };
+ class AE3_aceCargo
+ {
+ ae3_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no)
+ ae3_cargo_size = 1; // Cargo space the object takes
+ };
};
};
@@ -134,7 +134,13 @@ class CfgVehicles
class Land_Laptop_03_olive_F;
class Land_Laptop_03_olive_F_AE3: Land_Laptop_03_olive_F
{
- // Eden Editor Attributes
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
+ // Eden Editor Attributes
class Attributes
{
class AE3_EdenAttribute_PowerLevel
@@ -157,12 +163,6 @@ class CfgVehicles
};
};
- // Event Handlers
- class EventHandlers
- {
- //init = "params ['_entity']; call compile preprocessFileLineNumbers '\z\ae3\addons\main\init\initLaptop.sqf';";
- };
-
class AE3_Equipment
{
displayName = "$STR_AE3_ArmaOS_Config_LaptopDisplayName";
@@ -176,7 +176,7 @@ class CfgVehicles
closeAction = "_this call AE3_interaction_fnc_laptop_close;";
closeActionCondition = "isNull (_this getVariable ['AE3_computer_mutex', objNull])";
- class AE3_ace3Interactions
+ class AE3_ace3Interactions
{
class AE3_aceCarrying
{
@@ -262,7 +262,13 @@ class CfgVehicles
class Land_Laptop_03_sand_F;
class Land_Laptop_03_sand_F_AE3: Land_Laptop_03_sand_F
{
- // Eden Editor Attributes
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
+ // Eden Editor Attributes
class Attributes
{
class AE3_EdenAttribute_PowerLevel
@@ -285,12 +291,6 @@ class CfgVehicles
};
};
- // Event Handlers
- class EventHandlers
- {
- //init = "params ['_entity']; call compile preprocessFileLineNumbers '\z\ae3\addons\main\init\initLaptop.sqf';";
- };
-
class AE3_Equipment
{
displayName = "$STR_AE3_ArmaOS_Config_LaptopDisplayName";
@@ -410,6 +410,7 @@ class CfgVehicles
{
// Standard object definitions
scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it.
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
displayName = "$STR_AE3_ArmaOS_Config_AddUserDisplayName"; // Name displayed in the menu
icon = "\z\ae3\addons\armaos\ui\AE3_Module_Icons_addUser.paa"; // Map icon. Delete this entry to use the default icon
category = "AE3_armaosModules";
@@ -428,7 +429,7 @@ class CfgVehicles
is3DEN = 0;
// Menu displayed when the module is placed or double-clicked on by Zeus
- curatorInfoType = "RscDisplayAttributeModuleUserlist";
+ curatorInfoType = "AE3_UserInterface_Zeus_Module_AddUser";
// Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific
class Attributes: AttributesBase
@@ -484,10 +485,13 @@ class CfgVehicles
{
// Standard object definitions
scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it.
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
displayName = "$STR_AE3_ArmaOS_Config_AddSecurityCommandsDisplayName"; // Name displayed in the menu
icon = "\z\ae3\addons\armaos\ui\AE3_Module_Icon_addSecurityCommands_v2.paa"; // Map icon. Delete this entry to use the default icon
category = "AE3_armaosModules";
+ portrait = "\z\ae3\addons\armaos\ui\AE3_Module_Icon_addSecurityCommands_v2.paa"; // seems to be used by Zeus as icon
+
// Name of function triggered once conditions are met
function = "AE3_armaos_fnc_module_addSecurityCommands";
// Execution priority, modules with lower number are executed first. 0 is used when the attribute is undefined
@@ -502,7 +506,7 @@ class CfgVehicles
is3DEN = 0;
// Menu displayed when the module is placed or double-clicked on by Zeus
- curatorInfoType = "RscDisplayAttributeModuleAddSecurityCommands";
+ curatorInfoType = "AE3_UserInterface_Zeus_Module_AddSecurityCommands";
// Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific
class Attributes: AttributesBase
@@ -563,6 +567,7 @@ class CfgVehicles
{
// Standard object definitions
scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it.
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
displayName = "$STR_AE3_ArmaOS_Config_AddGamesDisplayName"; // Name displayed in the menu
icon = "\z\ae3\addons\armaos\ui\AE3_Module_Icons_addGames.paa"; // Map icon. Delete this entry to use the default icon
category = "AE3_armaosModules";
@@ -581,11 +586,24 @@ class CfgVehicles
is3DEN = 0;
// Menu displayed when the module is placed or double-clicked on by Zeus
- curatorInfoType = "RscDisplayAttributeModuleAddGames";
+ curatorInfoType = "AE3_UserInterface_Zeus_Module_AddGames";
// Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific
class Attributes: AttributesBase
{
+
+ // Arguments shared by specific module type (have to be mentioned in order to be present)
+ class AE3_ModuleAddGames_IsSnake: Checkbox
+ {
+ property = "AE3_Module_AddGames_Snake";
+ displayName = "snake";
+ tooltip = "$STR_AE3_ArmaOS_Config_ModuleAddGamesSnakeTooltip";
+ typeName = "BOOL"; // Value type, can be "NUMBER", "STRING" or "BOOL"
+ // Default text filled in the input box
+ // Because it is an expression, to return a String one must have a string within a string
+ defaultValue = true;
+ };
+
class ModuleDescription: ModuleDescription{}; // Module description should be shown last
};
diff --git a/addons/armaos/XEH_PREP.hpp b/addons/armaos/XEH_PREP.hpp
index 2db8d833..4fd158ba 100644
--- a/addons/armaos/XEH_PREP.hpp
+++ b/addons/armaos/XEH_PREP.hpp
@@ -43,6 +43,10 @@ PREP(computer_standby);
PREP(computer_turnOn);
PREP(computer_turnOff);
+PREP(computer_addUser);
+PREP(computer_addSecurityCommands);
+PREP(computer_addGames);
+
PREP(computer_getLocality);
/* OS Link Functions */
@@ -80,6 +84,7 @@ PREP(os_lsusb);
/* Encryption Functions */
PREP(encryption_caesar);
+PREP(encryption_columnar);
/* Terminal Functions */
PREP(terminal_init);
@@ -102,9 +107,10 @@ PREP(terminal_setPrompt);
PREP(terminal_updateOutput);
PREP(terminal_getAllowedKeysDE);
PREP(terminal_getAllowedKeysFR);
+PREP(terminal_getAllowedKeysIT);
PREP(terminal_getAllowedKeysUS);
PREP(terminal_getHeaderText);
-PREP(terminal_updateBufferVisable);
+PREP(terminal_updateBufferVisible);
PREP(terminal_updatePromptPointer);
PREP(terminal_addToHistory);
PREP(terminal_setKeyboardLayout);
@@ -113,4 +119,12 @@ PREP(terminal_switchKeyboardLayout);
PREP(terminal_switchTerminalDesign);
PREP(terminal_setCommandLineByHistory);
PREP(terminal_setInputMode);
-PREP(terminal_updateBatteryStatus);
\ No newline at end of file
+PREP(terminal_updateBatteryStatus);
+
+PREP(terminal_uiOnTex_init);
+PREP(terminal_uiOnTex_updateAll);
+PREP(terminal_uiOnTex_updateOutput);
+PREP(terminal_uiOnTex_updateBatteryStatus);
+PREP(terminal_uiOnTex_setTerminalDesign);
+PREP(terminal_uiOnTex_setKeyboardLayout);
+PREP(terminal_uiOnTex_addUpdateAllEventHandler);
\ No newline at end of file
diff --git a/addons/armaos/XEH_preInit.sqf b/addons/armaos/XEH_preInit.sqf
index efea617c..7ba7569e 100644
--- a/addons/armaos/XEH_preInit.sqf
+++ b/addons/armaos/XEH_preInit.sqf
@@ -9,8 +9,8 @@
["STR_AE3_Main_CbaSettings_KeyboardLayoutName", "STR_AE3_Main_CbaSettings_KeyboardLayoutTooltip"],
"STR_AE3_ArmaOS_CbaSettings_ArmaOSCategoryName",
[
- ["US", "FR", "DE"],
- [["US", "United States"], ["FR", "France"], ["DE", "Deutschland"]],
+ ["US", "FR", "IT", "DE"],
+ [["US", "United States"], ["FR", "France"], ["IT", "Italia"], ["DE", "Deutschland"]],
0
],
nil, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer
@@ -65,4 +65,19 @@
false // Setting will be marked as needing mission restart after being changed. (optional, default false)
] call CBA_fnc_addSetting;
+/* ================================================================================ */
+
+[
+ "AE3_UiOnTexture",
+ "CHECKBOX",
+ ["STR_AE3_Main_CbaSettings_UiOnTextureName", "STR_AE3_Main_CbaSettings_UiOnTextureTooltip"],
+ "STR_AE3_ArmaOS_CbaSettings_ArmaOSCategoryName",
+ false,
+ nil, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer
+ {
+ params ["_value"];
+ }, // function that will be executed once on mission start and every time the setting is changed.
+ false // Setting will be marked as needing mission restart after being changed. (optional, default false)
+] call CBA_fnc_addSetting;
+
/* ================================================================================ */
\ No newline at end of file
diff --git a/addons/armaos/config.cpp b/addons/armaos/config.cpp
index c0dd5124..c418acee 100644
--- a/addons/armaos/config.cpp
+++ b/addons/armaos/config.cpp
@@ -5,7 +5,15 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {"AE3_Filesystem"};
+ units[] =
+ {
+ "Land_Laptop_03_black_F_AE3",
+ "Land_Laptop_03_olive_F_AE3",
+ "Land_Laptop_03_sand_F_AE3",
+ "AE3_AddUser",
+ "AE3_AddSecurityCommands",
+ "AE3_AddGames"
+ };
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main", "ae3_network", "ae3_filesystem", "ae3_interaction"};
@@ -15,7 +23,6 @@ class CfgPatches
};
#include "CfgEventHandlers.hpp"
-#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"
#include "Cfg3DEN.hpp"
@@ -29,5 +36,5 @@ class CfgPatches
// Grid Macros and Styles
#include "defines.inc"
-// Advanced Equipment 3 Dialog Definitions
+// Advanced Equipment Dialog Definitions
#include "dialog.hpp"
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_computer_addGames.sqf b/addons/armaos/functions/fnc_computer_addGames.sqf
new file mode 100644
index 00000000..cb23a14e
--- /dev/null
+++ b/addons/armaos/functions/fnc_computer_addGames.sqf
@@ -0,0 +1,27 @@
+/**
+ * PUBLIC
+ *
+ * Adds selected games to a given computer. Currently only Snake supported.
+ * Needs to run on server.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Snake
+ *
+ * Results:
+ * None
+ *
+ * Example:
+ * [_computer, true] call AE3_armaos_fnc_computer_addGames;
+ *
+ */
+
+params ["_computer", "_isSnake"];
+
+if (!isServer) exitWith {};
+
+if (_isSnake) then
+{
+ //--- add all games to all synced computers
+ [_computer, "CfgGames", ["snake"]] call AE3_armaos_fnc_link_init;
+};
diff --git a/addons/armaos/functions/fnc_computer_addSecurityCommands.sqf b/addons/armaos/functions/fnc_computer_addSecurityCommands.sqf
new file mode 100644
index 00000000..aec68ef5
--- /dev/null
+++ b/addons/armaos/functions/fnc_computer_addSecurityCommands.sqf
@@ -0,0 +1,33 @@
+/**
+ * PUBLIC
+ *
+ * Adds selected security commands to a given computer.
+ * Needs to run on server.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Crypto
+ * 3: Crack
+ *
+ * Results:
+ * None
+ *
+ * Example:
+ * [_computer, true, true] call AE3_armaos_fnc_computer_addSecurityCommands;
+ *
+ */
+
+params ["_computer", "_isCrypto", "_isCrack"];
+
+if (!isServer) exitWith {};
+
+if (_isCrypto) then
+{
+ //--- add 'crypto' command to all synced computers
+ [_computer, "CfgSecurityCommands", ["crypto"]] call AE3_armaos_fnc_link_init;
+};
+if (_isCrack) then
+{
+ //--- add 'crack' command to all synced computers
+ [_computer, "CfgSecurityCommands", ["crack"]] call AE3_armaos_fnc_link_init;
+};
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_computer_addUser.sqf b/addons/armaos/functions/fnc_computer_addUser.sqf
new file mode 100644
index 00000000..e1f3da63
--- /dev/null
+++ b/addons/armaos/functions/fnc_computer_addUser.sqf
@@ -0,0 +1,55 @@
+/**
+ * PUBLIC
+ *
+ * Adds a user to a given computer by providing username and password. Also a user directory will be created.
+ * Needs to run on server.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Username
+ * 3: Password
+ *
+ * Results:
+ * None
+ *
+ * Example:
+ * [_computer, "admin", "admin123"] call AE3_armaos_fnc_computer_addUser;
+ *
+ */
+
+params ["_computer", "_username", "_password"];
+
+if (!isServer) exitWith {};
+
+// Get userlist and filesystem from computer
+private _userlist = _computer getVariable ["AE3_Userlist", createHashMap];
+private _filesystem = _computer getVariable ["AE3_filesystem", []];
+
+// Add user to userlist
+_userlist set [_username, _password];
+
+// Add user directory in /home/
+if(!(_username isEqualTo "root")) then
+{
+ try
+ {
+ [[], _filesystem, "/home/" + _username, "root", _username] call AE3_filesystem_fnc_createDir;
+ }
+ catch
+ {
+ private _normalizedException = _exception regexReplace ["'(.+)'", "'%1'"];
+ if (_normalizedException isEqualTo (localize "STR_AE3_Filesystem_Exception_AlreadyExists")) then
+ {
+ diag_log format ["AE3 exception: %1", _exception];
+ ["AE3 exception: %1", _exception] call BIS_fnc_error;
+ }
+ else
+ {
+ throw _exception;
+ };
+ };
+};
+
+// resync userlist and filesystem
+_computer setVariable ["AE3_filesystem", _filesystem];
+_computer setVariable ["AE3_Userlist", _userlist, true];
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_encryption_columnar.sqf b/addons/armaos/functions/fnc_encryption_columnar.sqf
new file mode 100644
index 00000000..3865d55e
--- /dev/null
+++ b/addons/armaos/functions/fnc_encryption_columnar.sqf
@@ -0,0 +1,109 @@
+/**
+ * Encrypts/Decrypts string using a columnar tansposition cipher.
+ *
+ * Arguments:
+ * 1: Key
+ * 2: Mode
+ * 3: Message
+ *
+ * Results:
+ * 1: Encrypted/Decrypted Message
+ */
+
+params ["_key", "_mode", "_msg"];
+
+private _result = "";
+private _msgLen = count _msg;
+private _msgArr = _msg splitString "";
+// calculate column of the matrix
+private _numCol = count _key;
+// calculate maximum row of the matrix
+private _numRow = ceil(_msgLen / _numCol);
+
+// transform the key into an unicode-decimal array.
+private _keyArr = [];
+private _doubles = 1;
+{
+ private _dec = (toArray _x) select 0;
+ if ((_keyArr find _dec) != -1) then {
+ // to distinguish multiple occurences of the same character,
+ // slightly increase the decimal, without matching another unicode-character
+ _dec = _dec + 0.001 * _doubles;
+ _doubles = _doubles + 1;
+ };
+ _keyArr pushBack _dec;
+} forEach (_key splitString "");
+private _keyArrCopy = + _keyArr;
+
+// en- and decryption
+switch (_mode) do {
+ case "encrypt": {
+ private _cipher = "";
+
+ // amount of empty cells in the matrix
+ private _fillNull = floor((_numRow * _numCol) - _msgLen);
+
+ // adding underscores as padding for empty cells
+ for "_i" from 1 to _fillNull do {
+ _msgArr pushBack "_";
+ };
+
+ // create Matrix, insert message and
+ // add padding characters row-wise
+ private _matrix = [];
+ private _indx = 0;
+ for "_i" from 1 to _numRow do {
+ private _row = _msgArr select [_indx, _numCol];
+ _matrix pushBack _row;
+ _indx = _indx + _numCol;
+ };
+
+ // read matrix column-wise using key
+ for "_i" from 0 to (_numCol - 1) do {
+ private _min = selectMin _keyArrCopy;
+ private _indx = _keyArr find _min;
+ {
+ _cipher = _cipher + (_x select _indx);
+ } forEach _matrix;
+ _keyArrCopy deleteAt (_keyArrCopy find _min);
+ };
+ copyToClipboard _cipher;
+ _result = _cipher;
+ };
+
+ case "decrypt": {
+ // the message can't be decoded, if the key and message-lengths
+ // don't fit a complete transposition
+ if ((_msgLen mod _numCol) != 0) exitWith {};
+
+ private _plainText = "";
+
+ // extract the segments from the encrypted message
+ private _segments = [];
+ private _indx = 0;
+ for "_i" from 1 to _numCol do {
+ _segments pushBack (_msgArr select [_indx, _numRow]);
+ _indx = _indx + _numRow;
+ };
+
+ // sort the segments into the correct order,
+ // determined by the key
+ private _sortedSegments = [];
+ _keyArrCopy sort true;
+ {
+ private _keyDec = _keyArrCopy select _foreachIndex;
+ private _indx = _keyArr find _keyDec;
+ _sortedSegments set [_indx, _x];
+ } forEach _segments;
+
+ // create the decrypted message from the sorted segments
+ for "_i" from 0 to (_numRow - 1) do {
+ {
+ _plainText = _plainText + (_x select _i);
+ } forEach _sortedSegments;
+ };
+ _result = _plainText;
+ };
+};
+
+_result
diff --git a/addons/armaos/functions/fnc_module_addGames.sqf b/addons/armaos/functions/fnc_module_addGames.sqf
index 6c637a83..e5f115af 100644
--- a/addons/armaos/functions/fnc_module_addGames.sqf
+++ b/addons/armaos/functions/fnc_module_addGames.sqf
@@ -1,17 +1,44 @@
-params["_logic", "_units", "_activated"];
+/**
+ * PRIVATE
+ *
+ * This function is assigned in module config and will be triggered after mission start and if the module is placed by zeus on every computer.
+ * The function will only run on server and only if placed in eden editor. The module will be deleted after processing.
+ * The effect of this module applies to all syncted entities.
+ *
+ * Arguments:
+ * 1: Module
+ * 2: Synced Units <[OBJECT]>
+ * 3: Activated currently unused in this function
+ *
+ * Results:
+ * None
+ *
+ */
+
+params["_module", "_syncedUnits", "_activated"];
+
+// ignore this function if module is placed by curator/zeus
+if (_module getvariable ["BIS_fnc_moduleInit_isCuratorPlaced", false]) exitWith {};
if(!isServer) exitWith {};
-[_logic, _units] spawn
+if (_activated) then
{
- params["_logic", "_units"];
+ [_module, _syncedUnits] spawn
+ {
+ params["_module", "_syncedUnits"];
- waitUntil { !isNil "BIS_fnc_init" };
+ waitUntil { !isNil "BIS_fnc_init" };
- //--- Add Games to all synced Computers
- {
- [_x, "CfgGames", ["all"]] call AE3_armaos_fnc_link_init;
- } foreach _units;
+ //--- Extract the user defined module arguments
+ private _isSnake = _module getVariable ["AE3_ModuleAddGames_IsSnake", ""];
+
+ {
+ [_x, _isSnake] call AE3_armaos_fnc_computer_addGames;
+ } foreach _syncedUnits;
+
+ deleteVehicle _module;
+ };
};
true;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_module_addSecurityCommands.sqf b/addons/armaos/functions/fnc_module_addSecurityCommands.sqf
index f7c6f849..2f40d09e 100644
--- a/addons/armaos/functions/fnc_module_addSecurityCommands.sqf
+++ b/addons/armaos/functions/fnc_module_addSecurityCommands.sqf
@@ -1,30 +1,44 @@
-params["_logic", "_units", "_activated"];
+/**
+ * PRIVATE
+ *
+ * This function is assigned in module config and will be triggered after mission start and if the module is placed by zeus on every computer.
+ * The function will only run on server and only if placed in eden editor. The module will be deleted after processing.
+ * The effect of this module applies to all syncted entities.
+ *
+ * Arguments:
+ * 1: Module
+ * 2: Synced Units <[OBJECT]>
+ * 3: Activated currently unused in this function
+ *
+ * Results:
+ * None
+ *
+ */
-if(!isServer) exitWith {};
+params["_module", "_syncedUnits", "_activated"];
+
+// ignore this function if module is placed by curator/zeus
+if (_module getvariable ["BIS_fnc_moduleInit_isCuratorPlaced", false]) exitWith {};
-private _isCrypto = _logic getVariable ["AE3_ModuleAddSecurityCommands_IsCrypto", ""];
-private _isCrack = _logic getVariable ["AE3_ModuleAddSecurityCommands_IsCrack", ""];
+if(!isServer) exitWith {};
-[_logic, _units, _isCrypto, _isCrack] spawn
+if (_activated) then
{
- params["_logic", "_units", "_isCrypto", "_isCrack"];
+ [_module, _syncedUnits] spawn
+ {
+ params["_module", "_syncedUnits"];
- waitUntil { !isNil "BIS_fnc_init" };
+ waitUntil { !isNil "BIS_fnc_init" };
+
+ //--- Extract the user defined module arguments
+ private _isCrypto = _module getVariable ["AE3_ModuleAddSecurityCommands_IsCrypto", ""];
+ private _isCrack = _module getVariable ["AE3_ModuleAddSecurityCommands_IsCrack", ""];
- if (_isCrypto) then
- {
- //--- add 'crypto' command to all synced computers
{
- [_x, "CfgSecurityCommands", ["crypto"]] call AE3_armaos_fnc_link_init;
- } foreach _units;
- };
+ [_x, _isCrypto, _isCrack] call AE3_armaos_fnc_computer_addSecurityCommands;
+ } foreach _syncedUnits;
- if (_isCrack) then
- {
- //--- add 'crack' command to all synced computers
- {
- [_x, "CfgSecurityCommands", ["crack"]] call AE3_armaos_fnc_link_init;
- } foreach _units;
+ deleteVehicle _module;
};
};
diff --git a/addons/armaos/functions/fnc_module_addUser.sqf b/addons/armaos/functions/fnc_module_addUser.sqf
index 89300813..b42c6842 100644
--- a/addons/armaos/functions/fnc_module_addUser.sqf
+++ b/addons/armaos/functions/fnc_module_addUser.sqf
@@ -1,49 +1,53 @@
-params['_logic', '_units', '_activated'];
-
-if(!isServer) exitWith {};
-
-[_logic, _units] spawn {
- params['_logic', '_units'];
-
- waitUntil { !isNil "BIS_fnc_init" };
+/**
+ * PRIVATE
+ *
+ * This function is assigned in module config and will be triggered after mission start and if the module is placed by zeus on every computer.
+ * The function will only run on server and only if placed in eden editor. The module will be deleted after processing.
+ * The effect of this module applies to all syncted entities.
+ *
+ * Arguments:
+ * 1: Module
+ * 2: Synced Units <[OBJECT]>
+ * 3: Activated currently unused in this function
+ *
+ * Results:
+ * 1: Success true = success and false = error
+ *
+ */
+
+params["_module", "_syncedUnits", "_activated"];
+
+// ignore this function if module is placed by curator/zeus
+if (_module getvariable ["BIS_fnc_moduleInit_isCuratorPlaced", false]) exitWith { false; };
+
+if (!isServer) exitWith {};
+
+if (_activated) then
+{
+ [_module, _syncedUnits] spawn
+ {
+ params["_module", "_syncedUnits"];
- //--- Extract the user defined module arguments
- _user = _logic getVariable "AE3_ModuleUserlist_User";
- if(isNil "_user") exitWith {};
+ waitUntil { !isNil "BIS_fnc_init" };
- _pwd = _logic getVariable ["AE3_ModuleUserlist_Password", ""];
+ //--- Extract the user defined module arguments
+ private _username = _module getVariable ["AE3_ModuleUserlist_User", ""];
+ private _password = _module getVariable ["AE3_ModuleUserlist_Password", ""];
- //--- Add Users to Computer
- {
- _userlist = _x getVariable ["AE3_Userlist", createHashMap];
- _filesystem = _x getVariable "AE3_filesystem";
+ // check for empty username or password
+ if (_username isEqualTo "") exitWith { deleteVehicle _module; false; };
+ if (_password isEqualTo "") exitWith { deleteVehicle _module; false; };
- _userlist set [_user, _pwd];
+ // check for not allowed spaces in username
+ if((_username find " ") != -1) exitWith { deleteVehicle _module; false; };
- // Add user directory in /home/
- if(!(_user isEqualTo 'root')) then
{
- try
- {
- [[], _filesystem, "/home/" + _user, 'root', _user] call AE3_filesystem_fnc_createDir;
- }
- catch
- {
- private _normalizedException = _exception regexReplace ["'(.+)'", "'%1'"];
- if (_normalizedException isEqualTo (localize "STR_AE3_Filesystem_Exception_AlreadyExists")) then
- {
- diag_log format ["AE3 exception: %1", _exception];
- }
- else
- {
- throw _exception;
- };
- };
- };
-
- _x setVariable ["AE3_filesystem", _filesystem];
- _x setVariable ["AE3_Userlist", _userlist, true];
- } foreach _units;
+ //--- Add user to every synced computer
+ [_x, _username, _password] call AE3_armaos_fnc_computer_addUser;
+ } foreach _syncedUnits;
+
+ deleteVehicle _module;
+ };
};
-true
\ No newline at end of file
+true;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_os_crack.sqf b/addons/armaos/functions/fnc_os_crack.sqf
index 25b27d8a..ba9a7467 100644
--- a/addons/armaos/functions/fnc_os_crack.sqf
+++ b/addons/armaos/functions/fnc_os_crack.sqf
@@ -14,8 +14,8 @@ params ["_computer", "_options", "_commandName"];
private _commandOpts =
[
- ["_mode", "m", "mode", "stringSelect", "", true, localize "STR_AE3_ArmaOS_CommandHelp_Crack_mode", ["bruteforce", "statistics"]],
- ["_algorithm", "a", "algorithm", "stringSelect", "caesar", false, localize "STR_AE3_ArmaOS_CommandHelp_Crack_algorithm", ["caesar"]]
+ ["_mode", "m", "mode", "stringSelect", "", true, localize "STR_AE3_ArmaOS_CommandHelp_Crack_mode", ["bruteforce", "statistics", "key"]],
+ ["_algorithm", "a", "algorithm", "stringSelect", "caesar", false, localize "STR_AE3_ArmaOS_CommandHelp_Crack_algorithm", ["caesar", "columnar"]]
];
private _commandSyntax =
[
@@ -37,54 +37,108 @@ if (_message isEqualTo "") exitWith { [ _computer, format [localize "STR_AE3_Arm
private _result = [];
-private _allowedAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-
-// convert all characters to upper case
-_message = toUpper _message;
-
-// filter message with allowed characters
-_message = [_message, _allowedAlphabet + " "] call BIS_fnc_filterString;
+switch (_algorithm) do {
+ case "caesar": {
+ if (_mode isEqualTo "key") exitWith {
+ [_computer, localize "STR_AE3_ArmaOS_Exception_CaesarCipherKeyCrackNotAvailable"] call AE3_armaos_fnc_shell_stdout;
+ };
-if (_mode isEqualTo "bruteforce") then
-{
- if (_algorithm == "caesar") then
- {
- for "_i" from 1 to (count _allowedAlphabet) do
+ private _allowedAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ if (_mode isEqualTo "bruteforce") then
{
- private _test = format [localize "STR_AE3_ArmaOS_Result_BruteForceTest", _i, [_i, "decrypt", _message] call AE3_armaos_fnc_encryption_caesar];
- _result pushBack _test;
+ // convert all characters to upper case
+ _message = toUpper _message;
+ // filter message with allowed characters
+ _message = [_message, _allowedAlphabet + " "] call BIS_fnc_filterString;
+
+ for "_i" from 1 to (count _allowedAlphabet) do
+ {
+ private _test = format [localize "STR_AE3_ArmaOS_Result_BruteForceTest", _i, [_i, "decrypt", _message] call AE3_armaos_fnc_encryption_caesar];
+ _result pushBack _test;
+ };
};
- };
-};
-if (_mode isEqualTo "statistics") then
-{
- private _statistics = createHashMap;
-
- {
- if (!(_x isEqualTo " ")) then
+ if (_mode isEqualTo "statistics") then
{
- private _count = 0;
- if (_x in _statistics) then { _count = _statistics get _x; };
- _count = _count + 1;
+ private _statistics = createHashMap;
+
+ {
+ if (!(_x isEqualTo " ")) then
+ {
+ private _count = 0;
+ if (_x in _statistics) then { _count = _statistics get _x; };
+ _count = _count + 1;
+
+ _statistics set [_x, _count];
+ };
+ } forEach (_message splitString "");
+
+ private _foundChars = keys _statistics;
+
+ _foundChars sort true;
- _statistics set [_x, _count];
+ private _indexOfE = _allowedAlphabet find "E";
+ {
+ private _keyIfThisIsAnE = _allowedAlphabet find _x;
+
+ _keyIfThisIsAnE = ((_keyIfThisIsAnE + (count _allowedAlphabet)) - _indexOfE) % (count _allowedAlphabet);
+
+ private _found = format [localize "STR_AE3_ArmaOS_Result_CharacterFoundPossibleKey", _x, _statistics get _x, _keyIfThisIsAnE];
+ _result pushBack _found;
+ } forEach _foundChars;
};
- } forEach (_message splitString "");
+ };
+
- private _foundChars = keys _statistics;
+ case "columnar": {
+ if (_mode isEqualTo "statistics") exitWith {
+ [_computer, localize "STR_AE3_ArmaOS_Exception_ColumnarCipherStatisticsCrackNotAvailable"] call AE3_armaos_fnc_shell_stdout;
+ };
- _foundChars sort true;
+ private _keyLengths = [];
+ private _msgLength = count _message;
+ for "_i" from 2 to (_msgLength - 1) do {
+ if ((_msgLength mod _i) == 0) then {
+ _keyLengths pushBack _i;
+ };
+ };
- private _indexOfE = _allowedAlphabet find "E";
- {
- private _keyIfThisIsAnE = _allowedAlphabet find _x;
+ if (_keyLengths isEqualTo []) exitWith {
+ [_computer, format [localize "STR_AE3_ArmaOS_Exception_ColumnarCipherMessageLengthIsPrime", _msgLength]] call AE3_armaos_fnc_shell_stdout;
+ };
- _keyIfThisIsAnE = ((_keyIfThisIsAnE + (count _allowedAlphabet)) - _indexOfE) % (count _allowedAlphabet);
+ if (_mode isEqualTo "key") then {
+ _result pushBack (localize "STR_AE3_ArmaOS_Result_ColumnarKeyLengths");
+ {
+ _result pushBack (str _x);
+ } forEach _keyLengths;
+ };
- private _found = format [localize "STR_AE3_ArmaOS_Result_CharacterFoundPossibleKey", _x, _statistics get _x, _keyIfThisIsAnE];
- _result pushBack _found;
- } forEach _foundChars;
+ if (_mode isEqualTo "bruteforce") then {
+ {
+ private _col = _x;
+ private _rows = _msgLength / _col;
+ _result pushBack (format [localize "STR_AE3_ArmaOS_Result_ColumnarColRow", _col, _rows]);
+
+ // extract the segments from the encrypted message
+ private _msgArr = _message splitString "";
+ private _segments = [];
+ private _indx = 0;
+ for "_i" from 1 to _col do {
+ _segments pushBack (_msgArr select [_indx, _rows]);
+ _indx = _indx + _rows;
+ };
+ for "_i" from 0 to (_rows - 1) do {
+ private _colString = "";
+ for "_j" from 0 to (_col - 1) do {
+ _colString = _colString + (format ["%1 ", _segments select _j select _i]);
+ };
+ _result pushBack _colString;
+ };
+ _result pushBack "";
+ } forEach _keyLengths;
+ };
+ };
};
[_computer, _result] call AE3_armaos_fnc_shell_stdout;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_os_crypto.sqf b/addons/armaos/functions/fnc_os_crypto.sqf
index 1da2cdbe..ba451a34 100644
--- a/addons/armaos/functions/fnc_os_crypto.sqf
+++ b/addons/armaos/functions/fnc_os_crypto.sqf
@@ -16,7 +16,7 @@ params ["_computer", "_options", "_commandName"];
private _commandOpts =
[
["_mode", "m", "mode", "stringSelect", "", true, localize "STR_AE3_ArmaOS_CommandHelp_Crypto_mode", ["encrypt", "decrypt"]],
- ["_algorithm", "a", "algorithm", "stringSelect", "caesar", false, localize "STR_AE3_ArmaOS_CommandHelp_Crypto_algorithm", ["caesar"]],
+ ["_algorithm", "a", "algorithm", "stringSelect", "caesar", false, localize "STR_AE3_ArmaOS_CommandHelp_Crypto_algorithm", ["caesar", "columnar"]],
["_key", "k", "key", "string", "", true, localize "STR_AE3_ArmaOS_CommandHelp_Crypto_key"]
];
private _commandSyntax =
@@ -43,20 +43,41 @@ private _encryptedMessage = "";
if ((_mode isEqualTo "encrypt") || (_mode isEqualTo "decrypt")) then
{
// select algorythm
- if (_algorithm == "caesar") then
+ switch (_algorithm) do
{
- // no float
- _key = floor (parseNumber _key);
-
- if (_key > 0) then
- {
- private _processedMessage = [_key, _mode, _message] call AE3_armaos_fnc_encryption_caesar;
-
- [_computer, _processedMessage] call AE3_armaos_fnc_shell_stdout;
- }
- else
- {
- [_computer, localize "STR_AE3_ArmaOS_Exception_CaesarCypherNeedsIntegerGreaterNullAsKey"] call AE3_armaos_fnc_shell_stdout;
+ case "caesar": {
+ // no float
+ _key = floor (parseNumber _key);
+
+ if (_key > 0) then
+ {
+ private _processedMessage = [_key, _mode, _message] call AE3_armaos_fnc_encryption_caesar;
+
+ [_computer, _processedMessage] call AE3_armaos_fnc_shell_stdout;
+ }
+ else
+ {
+ [_computer, localize "STR_AE3_ArmaOS_Exception_CaesarCypherNeedsIntegerGreaterNullAsKey"] call AE3_armaos_fnc_shell_stdout;
+ };
+ };
+
+ case "columnar": {
+ if ((count _key) > 1) then
+ {
+ _message = _message regexReplace [" ", "_"];
+
+ private _processedMessage = [_key, _mode, _message] call AE3_armaos_fnc_encryption_columnar;
+
+ if (_processedMessage isEqualTo "") exitWith {
+ [_computer, localize "STR_AE3_ArmaOS_Exception_ColumnarCipherLengthOfKeyAndMessageDoNotMatch"] call AE3_armaos_fnc_shell_stdout;
+ };
+
+ [_computer, _processedMessage] call AE3_armaos_fnc_shell_stdout;
+ }
+ else
+ {
+ [_computer, localize "STR_AE3_ArmaOS_Exception_ColumnarCipherNeedsStringLengthGreaterOneAsKey"] call AE3_armaos_fnc_shell_stdout;
+ };
};
};
};
diff --git a/addons/armaos/functions/fnc_os_shutdown.sqf b/addons/armaos/functions/fnc_os_shutdown.sqf
index 41d543a7..7cc4b380 100644
--- a/addons/armaos/functions/fnc_os_shutdown.sqf
+++ b/addons/armaos/functions/fnc_os_shutdown.sqf
@@ -28,4 +28,10 @@ if (!_ae3OptsSuccess) exitWith {};
_computer setVariable ["AE3_computer_mutex", objNull, true];
closeDialog 1;
-private _handle = [_computer, [false]] call (_computer getVariable "AE3_power_fnc_turnOffWrapper");
\ No newline at end of file
+private _handle = [_computer, [false]] call (_computer getVariable "AE3_power_fnc_turnOffWrapper");
+
+/* ------------- UI on Texture ------------ */
+
+_computer setVariable ["AE3_UiOnTexActive", false, true]; // reset var for all clients
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_os_standby.sqf b/addons/armaos/functions/fnc_os_standby.sqf
index 1aad5e79..1af37e5b 100644
--- a/addons/armaos/functions/fnc_os_standby.sqf
+++ b/addons/armaos/functions/fnc_os_standby.sqf
@@ -28,4 +28,10 @@ if (!_ae3OptsSuccess) exitWith {};
_computer setVariable ["AE3_computer_mutex", objNull, true];
closeDialog 1;
-private _handle = [_computer] spawn (_computer getVariable "AE3_power_fnc_standbyWrapper");
\ No newline at end of file
+private _handle = [_computer] spawn (_computer getVariable "AE3_power_fnc_standbyWrapper");
+
+/* ------------- UI on Texture ------------ */
+
+_computer setVariable ["AE3_UiOnTexActive", false, true]; // reset var for all clients
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_addEventHandler.sqf b/addons/armaos/functions/fnc_terminal_addEventHandler.sqf
index 2eaca8b4..1555b070 100644
--- a/addons/armaos/functions/fnc_terminal_addEventHandler.sqf
+++ b/addons/armaos/functions/fnc_terminal_addEventHandler.sqf
@@ -214,6 +214,14 @@ private _result = _consoleDialog displayAddEventHandler
_handleUpdateBatteryStatus = _display getVariable "AE3_handleUpdateBatteryStatus";
[_handleUpdateBatteryStatus] call CBA_fnc_removePerFrameHandler;
+
+ /* ------------- UI on Texture ------------ */
+
+ _handleUpdateUiOnTexture = _display getVariable "AE3_handleUpdateUiOnTexture";
+ [_handleUpdateUiOnTexture] call CBA_fnc_removePerFrameHandler;
+
+ /* ---------------------------------------- */
+
// Updates terminal variable for all
_terminal = _computer getVariable "AE3_terminal";
_computer setVariable ["AE3_terminal", _terminal, 2];
diff --git a/addons/armaos/functions/fnc_terminal_getAllowedKeysDE.sqf b/addons/armaos/functions/fnc_terminal_getAllowedKeysDE.sqf
index 0cf3445f..eca2bb33 100644
--- a/addons/armaos/functions/fnc_terminal_getAllowedKeysDE.sqf
+++ b/addons/armaos/functions/fnc_terminal_getAllowedKeysDE.sqf
@@ -24,6 +24,7 @@ private _allowedKeys = createHashMapFromArray
[format ["%1-%2-%3-%4", DIK_D, true, false, false], "D"],
[format ["%1-%2-%3-%4", DIK_E, false, false, false], "e"],
[format ["%1-%2-%3-%4", DIK_E, true, false, false], "E"],
+ [format ["%1-%2-%3-%4", DIK_E, false, false, true], "€"],
[format ["%1-%2-%3-%4", DIK_F, false, false, false], "f"],
[format ["%1-%2-%3-%4", DIK_F, true, false, false], "F"],
[format ["%1-%2-%3-%4", DIK_G, false, false, false], "g"],
@@ -40,6 +41,7 @@ private _allowedKeys = createHashMapFromArray
[format ["%1-%2-%3-%4", DIK_L, true, false, false], "L"],
[format ["%1-%2-%3-%4", DIK_M, false, false, false], "m"],
[format ["%1-%2-%3-%4", DIK_M, true, false, false], "M"],
+ [format ["%1-%2-%3-%4", DIK_M, false, false, true], "µ"],
[format ["%1-%2-%3-%4", DIK_N, false, false, false], "n"],
[format ["%1-%2-%3-%4", DIK_N, true, false, false], "N"],
[format ["%1-%2-%3-%4", DIK_O, false, false, false], "o"],
@@ -48,6 +50,7 @@ private _allowedKeys = createHashMapFromArray
[format ["%1-%2-%3-%4", DIK_P, true, false, false], "P"],
[format ["%1-%2-%3-%4", DIK_Q, false, false, false], "q"],
[format ["%1-%2-%3-%4", DIK_Q, true, false, false], "Q"],
+ [format ["%1-%2-%3-%4", DIK_Q, false, false, true], "@"],
[format ["%1-%2-%3-%4", DIK_R, false, false, false], "r"],
[format ["%1-%2-%3-%4", DIK_R, true, false, false], "R"],
[format ["%1-%2-%3-%4", DIK_S, false, false, false], "s"],
diff --git a/addons/armaos/functions/fnc_terminal_getAllowedKeysIT.sqf b/addons/armaos/functions/fnc_terminal_getAllowedKeysIT.sqf
new file mode 100644
index 00000000..f252891c
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_getAllowedKeysIT.sqf
@@ -0,0 +1,145 @@
+/**
+ * Creates and returns a hashmap for IT keyboard layout.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Keyboard Layout
+ */
+
+#include "\a3\ui_f\hpp\definedikcodes.inc"
+
+// order: _shift, _ctrl, _alt
+
+// reference: https://www.farah.cl/Keyboardery/A-Visual-Comparison-of-Different-National-Layouts/#it
+
+// this is italian ID 141
+
+private _allowedKeys = createHashMapFromArray
+[
+ [format ["%1-%2-%3-%4", DIK_A, false, false, false], "a"], // 30
+ [format ["%1-%2-%3-%4", DIK_A, true, false, false], "A"], // 30
+ [format ["%1-%2-%3-%4", DIK_B, false, false, false], "b"],
+ [format ["%1-%2-%3-%4", DIK_B, true, false, false], "B"],
+ [format ["%1-%2-%3-%4", DIK_C, false, false, false], "c"],
+ [format ["%1-%2-%3-%4", DIK_C, true, false, false], "C"],
+ [format ["%1-%2-%3-%4", DIK_D, false, false, false], "d"],
+ [format ["%1-%2-%3-%4", DIK_D, true, false, false], "D"],
+ [format ["%1-%2-%3-%4", DIK_E, false, false, false], "e"], // 19
+ [format ["%1-%2-%3-%4", DIK_E, true, false, false], "E"], // 18
+ [format ["%1-%2-%3-%4", DIK_E, false, false, true], "€"], // 18
+ [format ["%1-%2-%3-%4", DIK_F, false, false, false], "f"],
+ [format ["%1-%2-%3-%4", DIK_F, true, false, false], "F"],
+ [format ["%1-%2-%3-%4", DIK_G, false, false, false], "g"],
+ [format ["%1-%2-%3-%4", DIK_G, true, false, false], "G"],
+ [format ["%1-%2-%3-%4", DIK_H, false, false, false], "h"],
+ [format ["%1-%2-%3-%4", DIK_H, true, false, false], "H"],
+ [format ["%1-%2-%3-%4", DIK_I, false, false, false], "i"],
+ [format ["%1-%2-%3-%4", DIK_I, true, false, false], "I"],
+ [format ["%1-%2-%3-%4", DIK_J, false, false, false], "j"],
+ [format ["%1-%2-%3-%4", DIK_J, true, false, false], "J"],
+ [format ["%1-%2-%3-%4", DIK_K, false, false, false], "k"],
+ [format ["%1-%2-%3-%4", DIK_K, true, false, false], "K"],
+ [format ["%1-%2-%3-%4", DIK_L, false, false, false], "l"],
+ [format ["%1-%2-%3-%4", DIK_L, true, false, false], "L"],
+ [format ["%1-%2-%3-%4", DIK_M, false, false, false], "m"], // 50
+ [format ["%1-%2-%3-%4", DIK_M, true, false, false], "M"], // 50
+ [format ["%1-%2-%3-%4", DIK_N, false, false, false], "n"],
+ [format ["%1-%2-%3-%4", DIK_N, true, false, false], "N"],
+ [format ["%1-%2-%3-%4", DIK_O, false, false, false], "o"],
+ [format ["%1-%2-%3-%4", DIK_O, true, false, false], "O"],
+ [format ["%1-%2-%3-%4", DIK_P, false, false, false], "p"],
+ [format ["%1-%2-%3-%4", DIK_P, true, false, false], "P"],
+ [format ["%1-%2-%3-%4", DIK_Q, false, false, false], "q"], // 16
+ [format ["%1-%2-%3-%4", DIK_Q, true, false, false], "Q"], // 16
+ [format ["%1-%2-%3-%4", DIK_R, false, false, false], "r"],
+ [format ["%1-%2-%3-%4", DIK_R, true, false, false], "R"],
+ [format ["%1-%2-%3-%4", DIK_S, false, false, false], "s"],
+ [format ["%1-%2-%3-%4", DIK_S, true, false, false], "S"],
+ [format ["%1-%2-%3-%4", DIK_T, false, false, false], "t"],
+ [format ["%1-%2-%3-%4", DIK_T, true, false, false], "T"],
+ [format ["%1-%2-%3-%4", DIK_U, false, false, false], "u"],
+ [format ["%1-%2-%3-%4", DIK_U, true, false, false], "U"],
+ [format ["%1-%2-%3-%4", DIK_V, false, false, false], "v"],
+ [format ["%1-%2-%3-%4", DIK_V, true, false, false], "V"],
+ [format ["%1-%2-%3-%4", DIK_W, false, false, false], "w"], // 17
+ [format ["%1-%2-%3-%4", DIK_W, true, false, false], "W"], // 17
+ [format ["%1-%2-%3-%4", DIK_X, false, false, false], "x"],
+ [format ["%1-%2-%3-%4", DIK_X, true, false, false], "X"],
+ [format ["%1-%2-%3-%4", DIK_Y, false, false, false], "y"], // 21
+ [format ["%1-%2-%3-%4", DIK_Y, true, false, false], "Y"], // 21
+ [format ["%1-%2-%3-%4", DIK_Z, false, false, false], "z"], // 44
+ [format ["%1-%2-%3-%4", DIK_Z, true, false, false], "Z"], // 44
+ [format ["%1-%2-%3-%4", DIK_1, false, false, false], "1"], // 2
+ [format ["%1-%2-%3-%4", DIK_1, true, false, false], "!"], // 2
+ [format ["%1-%2-%3-%4", DIK_2, false, false, false], "2"], // 3
+ [format ["%1-%2-%3-%4", DIK_2, true, false, false], """"], // 3
+ [format ["%1-%2-%3-%4", DIK_3, false, false, false], "3"], // 4
+ [format ["%1-%2-%3-%4", DIK_3, true, false, false], "£"], // 4
+ [format ["%1-%2-%3-%4", DIK_4, false, false, false], "4"], // 5
+ [format ["%1-%2-%3-%4", DIK_4, true, false, false], "$"], // 5
+ [format ["%1-%2-%3-%4", DIK_5, false, false, false], "5"], // 6
+ [format ["%1-%2-%3-%4", DIK_5, true, false, false], "%"], // 6
+ [format ["%1-%2-%3-%4", DIK_6, false, false, false], "6"], // 7
+ [format ["%1-%2-%3-%4", DIK_6, true, false, false], "&"], // 7
+ [format ["%1-%2-%3-%4", DIK_7, false, false, false], "7"], // 8
+ [format ["%1-%2-%3-%4", DIK_7, true, false, false], "/"], // 8
+ [format ["%1-%2-%3-%4", DIK_8, false, false, false], "8"], // 9
+ [format ["%1-%2-%3-%4", DIK_8, true, false, false], "("], // 9
+ [format ["%1-%2-%3-%4", DIK_9, false, false, false], "9"], // 10
+ [format ["%1-%2-%3-%4", DIK_9, true, false, false], ")"], // 10
+ [format ["%1-%2-%3-%4", DIK_0, false, false, false], "0"], // 11
+ [format ["%1-%2-%3-%4", DIK_0, true, false, false], "="], // 11
+ [format ["%1-%2-%3-%4", DIK_MINUS, false, false, false], "'"], // 12
+ [format ["%1-%2-%3-%4", DIK_MINUS, true, false, false], "?"], // 12
+ [format ["%1-%2-%3-%4", DIK_EQUALS, false, false, false], "ì"], // 13
+ [format ["%1-%2-%3-%4", DIK_EQUALS, true, false, false], "^"], // 13
+ [format ["%1-%2-%3-%4", DIK_SPACE, false, false, false], " "],
+ [format ["%1-%2-%3-%4", DIK_SPACE, true, false, false], " "],
+ [format ["%1-%2-%3-%4", DIK_SPACE, false, true, false], " "],
+ [format ["%1-%2-%3-%4", DIK_SPACE, false, false, true], " "],
+ [format ["%1-%2-%3-%4", DIK_LBRACKET, false, false, false], "è"],
+ [format ["%1-%2-%3-%4", DIK_LBRACKET, true, false, false], "é"],
+ [format ["%1-%2-%3-%4", DIK_LBRACKET, false, false, true], "["],
+ [format ["%1-%2-%3-%4", DIK_LBRACKET, true, false, true], "{"],
+ [format ["%1-%2-%3-%4", DIK_RBRACKET, false, false, false], "+"], // 27
+ [format ["%1-%2-%3-%4", DIK_RBRACKET, true, false, false], "*"], // 27
+ [format ["%1-%2-%3-%4", DIK_RBRACKET, false, false, true], "["], // 27
+ [format ["%1-%2-%3-%4", DIK_RBRACKET, true, false, true], "}"], // 27
+ [format ["%1-%2-%3-%4", DIK_SEMICOLON, false, false, false], "ò"], // 39
+ [format ["%1-%2-%3-%4", DIK_SEMICOLON, true, false, false], "ç"], // 39
+ [format ["%1-%2-%3-%4", DIK_SEMICOLON, false, false, true], "@"], // 39
+ [format ["%1-%2-%3-%4", DIK_APOSTROPHE, false, false, false], "à"], // 40
+ [format ["%1-%2-%3-%4", DIK_APOSTROPHE, true, false, false], "°"], // 40
+ [format ["%1-%2-%3-%4", DIK_APOSTROPHE, false, false, true], "#"], // 40
+ [format ["%1-%2-%3-%4", DIK_GRAVE, false, false, false], "\"], // 41
+ [format ["%1-%2-%3-%4", DIK_GRAVE, true, false, false], "|"], // 41
+ [format ["%1-%2-%3-%4", DIK_BACKSLASH, false, false, false], "ù"], // 43
+ [format ["%1-%2-%3-%4", DIK_BACKSLASH, true, false, false], "§"], // 43
+ [format ["%1-%2-%3-%4", DIK_COMMA, false, false, false], ","], // 51
+ [format ["%1-%2-%3-%4", DIK_COMMA, true, false, false], ";"], // 51
+ [format ["%1-%2-%3-%4", DIK_PERIOD, false, false, false], "."], // 52
+ [format ["%1-%2-%3-%4", DIK_PERIOD, true, false, false], ":"], // 52
+ [format ["%1-%2-%3-%4", DIK_SLASH, false, false, false], "-"], // 53
+ [format ["%1-%2-%3-%4", DIK_SLASH, true, false, false], "_"], // 53
+ [format ["%1-%2-%3-%4", DIK_OEM_102, false, false, false], "<"], // 86
+ [format ["%1-%2-%3-%4", DIK_OEM_102, true, false, false], ">"], // 86
+ [format ["%1-%2-%3-%4", DIK_NUMPAD0, false, false, false], "0"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD1, false, false, false], "1"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD2, false, false, false], "2"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD3, false, false, false], "3"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD4, false, false, false], "4"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD5, false, false, false], "5"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD6, false, false, false], "6"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD7, false, false, false], "7"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD8, false, false, false], "8"],
+ [format ["%1-%2-%3-%4", DIK_NUMPAD9, false, false, false], "9"],
+ [format ["%1-%2-%3-%4", DIK_MULTIPLY, false, false, false], "*"],
+ [format ["%1-%2-%3-%4", DIK_NUMPADSLASH, false, false, false], "/"],
+ [format ["%1-%2-%3-%4", DIK_ADD, false, false, false], "+"],
+ [format ["%1-%2-%3-%4", DIK_SUBTRACT, false, false, false], "-"],
+ [format ["%1-%2-%3-%4", DIK_DECIMAL, false, false, false], "."]
+];
+
+_allowedKeys
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_init.sqf b/addons/armaos/functions/fnc_terminal_init.sqf
index cbad0653..fbfa5b5d 100644
--- a/addons/armaos/functions/fnc_terminal_init.sqf
+++ b/addons/armaos/functions/fnc_terminal_init.sqf
@@ -23,14 +23,6 @@ private _consoleOutput = _consoleDialog displayCtrl 1100;
private _languageButton = _consoleDialog displayCtrl 1310;
private _designButton = _consoleDialog displayCtrl 1320;
-/*
-private _handle = [_computer] spawn AE3_power_fnc_showBatteryLevel;
-
-private _ip = _computer getVariable ["AE3_ipAddress", "127.0.0.1"];
-
-_consoleInput setVariable ["ip", _ip];
-*/
-
[_computer, "AE3_filesystem"] call AE3_main_fnc_getRemoteVar;
[_computer, "AE3_filepointer"] call AE3_main_fnc_getRemoteVar;
@@ -45,7 +37,7 @@ private _terminal = createHashMapFromArray
[
["AE3_terminalBuffer", []],
["AE3_terminalRenderedBuffer", []],
- ["AE3_terminalBufferVisable", []],
+ ["AE3_terminalBufferVisible", []],
["AE3_terminalScrollPosition", 0],
["AE3_terminalCursorLine", 0],
["AE3_terminalCursorPosition", 0],
@@ -133,6 +125,13 @@ private _currentDesign = _designs select _currentDesignIndex;
private _handleUpdateBatteryStatus = [_computer, _consoleDialog] call AE3_armaos_fnc_terminal_updateBatteryStatus;
_consoleDialog setVariable ["AE3_handleUpdateBatteryStatus", _handleUpdateBatteryStatus];
+/* ------------- UI on Texture ------------ */
+
+private _handleUpdateUiOnTexture = [_computer, _consoleDialog] call AE3_armaos_fnc_terminal_uiOnTex_addUpdateAllEventHandler;
+_consoleDialog setVariable ["AE3_handleUpdateUiOnTexture", _handleUpdateUiOnTexture];
+
+/* ---------------------------------------- */
+
[_consoleDialog, _consoleOutput, _languageButton, _designButton] call AE3_armaos_fnc_terminal_addEventHandler;
_terminalBuffer = _terminal get "AE3_terminalBuffer";
diff --git a/addons/armaos/functions/fnc_terminal_setKeyboardLayout.sqf b/addons/armaos/functions/fnc_terminal_setKeyboardLayout.sqf
index 926f39a6..911d9cc9 100644
--- a/addons/armaos/functions/fnc_terminal_setKeyboardLayout.sqf
+++ b/addons/armaos/functions/fnc_terminal_setKeyboardLayout.sqf
@@ -7,6 +7,7 @@ _computer setVariable ["AE3_terminalKeyboardLayout", _terminalKeyboardLayout];
private _terminalAllowedKeys = _terminal get "AE3_terminalAllowedKeys";
if (_terminalKeyboardLayout == "DE") then { _terminalAllowedKeys = [] call AE3_armaos_fnc_terminal_getAllowedKeysDE; };
if (_terminalKeyboardLayout == "FR") then { _terminalAllowedKeys = [] call AE3_armaos_fnc_terminal_getAllowedKeysFR; };
+if (_terminalKeyboardLayout == "IT") then { _terminalAllowedKeys = [] call AE3_armaos_fnc_terminal_getAllowedKeysIT; };
if (_terminalKeyboardLayout == "US") then { _terminalAllowedKeys = [] call AE3_armaos_fnc_terminal_getAllowedKeysUS; };
_terminal set ["AE3_terminalAllowedKeys", _terminalAllowedKeys];
@@ -25,4 +26,15 @@ else
["AE3_KeyboardLayout", _terminalKeyboardLayout, 0, "client", true] call CBA_settings_fnc_set;
};
-_computer setVariable ["AE3_terminal", _terminal];
\ No newline at end of file
+_computer setVariable ["AE3_terminal", _terminal];
+
+/* ------------- UI on Texture ------------ */
+
+if (AE3_UiOnTexture) then
+{
+ private _playersInRange = [3, _computer] call AE3_main_fnc_getPlayersInRange;
+
+ [_computer, _terminalKeyboardLayout] remoteExec ["AE3_armaos_fnc_terminal_uiOnTex_setKeyboardLayout", _playersInRange];
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_setTerminalDesign.sqf b/addons/armaos/functions/fnc_terminal_setTerminalDesign.sqf
index f2d2c51f..b2f3c93a 100644
--- a/addons/armaos/functions/fnc_terminal_setTerminalDesign.sqf
+++ b/addons/armaos/functions/fnc_terminal_setTerminalDesign.sqf
@@ -41,4 +41,17 @@ _consoleCtrl ctrlSetTextColor _fontColorConsole;
private _consoleOutput = _consoleDialog displayCtrl 1100;
// set focus to text field, otherwise focus stays on button and prohibits additional text input
-ctrlSetFocus _consoleOutput;
\ No newline at end of file
+ctrlSetFocus _consoleOutput;
+
+/* ------------- UI on Texture ------------ */
+
+if (AE3_UiOnTexture) then
+{
+ private _playersInRange = [3, _computer] call AE3_main_fnc_getPlayersInRange;
+
+ private _computer = _consoleOutput getVariable "AE3_computer";
+
+ [_computer, _bgColorHeader, _bgColorConsole, _fontColorHeader, _fontColorConsole] remoteExec ["AE3_armaos_fnc_terminal_uiOnTex_setTerminalDesign", _playersInRange];
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_switchKeyboardLayout.sqf b/addons/armaos/functions/fnc_terminal_switchKeyboardLayout.sqf
index e454334e..1a665da4 100644
--- a/addons/armaos/functions/fnc_terminal_switchKeyboardLayout.sqf
+++ b/addons/armaos/functions/fnc_terminal_switchKeyboardLayout.sqf
@@ -15,7 +15,7 @@ params ["_computer", "_languageButton", "_consoleOutput"];
private _terminal = _computer getVariable "AE3_terminal";
private _terminalKeyboardLayout = _computer getVariable "AE3_terminalKeyboardLayout";
-private _availableLanguages = ["DE", "FR", "US"];
+private _availableLanguages = ["DE", "FR", "IT", "US"];
private _actualLanguageIndex = _availableLanguages find _terminalKeyboardLayout;
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_addUpdateAllEventHandler.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_addUpdateAllEventHandler.sqf
new file mode 100644
index 00000000..e6f38e08
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_addUpdateAllEventHandler.sqf
@@ -0,0 +1,52 @@
+/**
+ * Adds an 5 Sec Per-Frame-Event-Handler for the "UI on texture" feature. This will update all contents regularly.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Console
+ *
+ * Results:
+ * None
+ */
+
+params ["_computer", "_consoleDialog"];
+
+private _updateInterval = 5;
+
+_handle =
+ [
+ {
+ (_this select 0) params ["_computer", "_consoleDialog"];
+
+ if (AE3_UiOnTexture) then
+ {
+ private _playersInRange = [3, _computer] call AE3_main_fnc_getPlayersInRange;
+
+ private _languageButtonCtrl = _consoleDialog displayCtrl 1310;
+ private _batteryButtonCtrl = _consoleDialog displayCtrl 1050;
+ private _headerBackgroundCtrl = _consoleDialog displayCtrl 900;
+ private _consoleBackgroundCtrl = _consoleDialog displayCtrl 910;
+ private _headerCtrl = _consoleDialog displayCtrl 1000;
+ private _consoleCtrl = _consoleDialog displayCtrl 1100;
+
+ private _output = ctrlText _consoleCtrl;
+ private _terminalKeyboardLayout = ctrlText _languageButtonCtrl;
+ private _value = ctrlText _batteryButtonCtrl;
+ private _bgColorHeader = ctrlBackgroundColor _headerBackgroundCtrl;
+ private _bgColorConsole = ctrlBackgroundColor _consoleBackgroundCtrl;
+ private _fontColorHeader = ctrlTextColor _headerCtrl;
+ private _fontColorConsole = ctrlTextColor _consoleCtrl;
+
+ private _terminal = _computer getVariable "AE3_terminal";
+
+ private _terminalBufferVisible = _terminal get "AE3_terminalBufferVisible";
+ private _size = _terminal get "AE3_terminalSize";
+
+ [_computer, _terminalBufferVisible, _size, _terminalKeyboardLayout, _bgColorHeader, _bgColorConsole, _fontColorHeader, _fontColorConsole, _value] remoteExec ["AE3_armaos_fnc_terminal_uiOnTex_updateAll", _playersInRange];
+ };
+ },
+ _updateInterval,
+ [_computer, _consoleDialog]
+ ] call CBA_fnc_addPerFrameHandler;
+
+_handle;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_init.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_init.sqf
new file mode 100644
index 00000000..7805c2be
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_init.sqf
@@ -0,0 +1,29 @@
+/**
+ * Initializes the texture on the given object for the "UI on texture" feature.
+ *
+ * Arguments:
+ * 1: Computer
+ *
+ * Results:
+ * None
+ */
+
+params ["_computer"];
+
+/* -------------- WORKAROUND -------------- */
+
+// Workaround: We need to preload the UI, so the used images are also preloaded; otherwise the
+// images creates a "Cannot load mipmap" error on first usage with the UI2Texture feature
+// See these tickets:
+// https://feedback.bistudio.com/T171035
+// https://feedback.bistudio.com/T170766
+
+private _tmpDisplay = findDisplay 46 createDisplay "AE3_ArmaOS_Main_Dialog";
+_tmpDisplay closeDisplay 1;
+
+/* ---------------------------------------- */
+
+_computer setObjectTexture [1, "#(rgb,1024,1024,1)ui('AE3_ArmaOS_Main_Dialog','AE3_UiOnTexture')"];
+
+_computer setVariable ["AE3_UiOnTexActive", true]; // local variable on computer object is sufficient
+
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_setKeyboardLayout.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_setKeyboardLayout.sqf
new file mode 100644
index 00000000..1a739cb7
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_setKeyboardLayout.sqf
@@ -0,0 +1,26 @@
+/**
+ * Updates the keyboard layout of the terminal for the "UI on texture" feature.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Keyboard Layout
+ *
+ * Results:
+ * None
+ */
+
+params ["_computer", "_terminalKeyboardLayout"];
+
+private _uiOnTexActive = _computer getVariable ["AE3_UiOnTexActive", false]; // local variable on computer object is sufficient
+
+if (!_uiOnTexActive) then { [_computer] spawn AE3_armaos_fnc_terminal_uiOnTex_init; };
+
+waitUntil { !isNull findDisplay "AE3_UiOnTexture" };
+
+private _uiOnTextureDisplay = findDisplay "AE3_UiOnTexture";
+
+private _uiOnTextureLanguageCtrl = _uiOnTextureDisplay displayCtrl 1310; // Language Control
+
+_uiOnTextureLanguageCtrl ctrlSetText _terminalKeyboardLayout;
+
+displayUpdate _uiOnTextureDisplay;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_setTerminalDesign.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_setTerminalDesign.sqf
new file mode 100644
index 00000000..d2e8cee2
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_setTerminalDesign.sqf
@@ -0,0 +1,47 @@
+/**
+ * Updates the design of the terminal for the "UI on texture" feature.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Background Color Header
+ * 3: Background Color Console
+ * 4: Font Color Header
+ * 5: Font Color Console
+ *
+ * Results:
+ * None
+ */
+
+params ["_computer", "_bgColorHeader", "_bgColorConsole", "_fontColorHeader", "_fontColorConsole"];
+
+private _uiOnTexActive = _computer getVariable ["AE3_UiOnTexActive", false]; // local variable on computer object is sufficient
+
+if (!_uiOnTexActive) then { [_computer] spawn AE3_armaos_fnc_terminal_uiOnTex_init; };
+
+waitUntil { !isNull findDisplay "AE3_UiOnTexture" };
+
+private _uiOnTextureDisplay = findDisplay "AE3_UiOnTexture";
+
+private _uiOnTextureHeaderBackgroundCtrl = _uiOnTextureDisplay displayCtrl 900;
+private _uiOnTextureConsoleBackgroundCtrl = _uiOnTextureDisplay displayCtrl 910;
+
+private _uiOnTextureHeaderCtrl = _uiOnTextureDisplay displayCtrl 1000;
+private _uiOnTextureConsoleCtrl = _uiOnTextureDisplay displayCtrl 1100;
+
+private _uiOnTextureLanguageButtonCtrl = _uiOnTextureDisplay displayCtrl 1310;
+private _uiOnTextureDesignButtonCtrl = _uiOnTextureDisplay displayCtrl 1320;
+private _uiOnTextureBatteryButtonCtrl = _uiOnTextureDisplay displayCtrl 1050;
+private _uiOnTextureCloseButtonCtrl = _uiOnTextureDisplay displayCtrl 1300;
+
+_uiOnTextureHeaderBackgroundCtrl ctrlSetBackgroundColor _bgColorHeader;
+_uiOnTextureConsoleBackgroundCtrl ctrlSetBackgroundColor _bgColorConsole;
+
+_uiOnTextureHeaderCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureLanguageButtonCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureDesignButtonCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureBatteryButtonCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureCloseButtonCtrl ctrlSetTextColor _fontColorHeader;
+
+_uiOnTextureConsoleCtrl ctrlSetTextColor _fontColorConsole;
+
+displayUpdate _uiOnTextureDisplay;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_updateAll.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_updateAll.sqf
new file mode 100644
index 00000000..7cdd2c5d
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_updateAll.sqf
@@ -0,0 +1,85 @@
+/**
+ * Updates all content of the terminal for the "UI on texture" feature.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Terminal Buffer Visible
+ * 3: Size
+ * 4: Keyboard Layout
+ * 5: Background Color Header
+ * 6: Background Color Console
+ * 7: Font Color Header
+ * 8: Font Color Console
+ * 9: Battery Symbol Path
+ *
+ * Results:
+ * None
+ */
+
+
+params ["_computer", "_terminalBufferVisible", "_size", "_terminalKeyboardLayout", "_bgColorHeader", "_bgColorConsole", "_fontColorHeader", "_fontColorConsole", "_value"];
+
+private _uiOnTexActive = _computer getVariable ["AE3_UiOnTexActive", false]; // local variable on computer object is sufficient
+
+if (!_uiOnTexActive) then { [_computer] spawn AE3_armaos_fnc_terminal_uiOnTex_init; };
+
+waitUntil { !isNull findDisplay "AE3_UiOnTexture" };
+
+private _uiOnTextureDisplay = findDisplay "AE3_UiOnTexture";
+
+/* ---------------------------------------- */
+
+private _uiOnTextureHeaderBackgroundCtrl = _uiOnTextureDisplay displayCtrl 900;
+private _uiOnTextureConsoleBackgroundCtrl = _uiOnTextureDisplay displayCtrl 910;
+
+private _uiOnTextureHeaderCtrl = _uiOnTextureDisplay displayCtrl 1000;
+private _uiOnTextureConsoleCtrl = _uiOnTextureDisplay displayCtrl 1100;
+
+private _uiOnTextureLanguageButtonCtrl = _uiOnTextureDisplay displayCtrl 1310;
+private _uiOnTextureDesignButtonCtrl = _uiOnTextureDisplay displayCtrl 1320;
+private _uiOnTextureBatteryButtonCtrl = _uiOnTextureDisplay displayCtrl 1050;
+private _uiOnTextureCloseButtonCtrl = _uiOnTextureDisplay displayCtrl 1300;
+
+_uiOnTextureHeaderBackgroundCtrl ctrlSetBackgroundColor _bgColorHeader;
+_uiOnTextureConsoleBackgroundCtrl ctrlSetBackgroundColor _bgColorConsole;
+
+_uiOnTextureHeaderCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureLanguageButtonCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureDesignButtonCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureBatteryButtonCtrl ctrlSetTextColor _fontColorHeader;
+_uiOnTextureCloseButtonCtrl ctrlSetTextColor _fontColorHeader;
+
+_uiOnTextureConsoleCtrl ctrlSetTextColor _fontColorConsole;
+
+/* ---------------------------------------- */
+
+private _uiOnTextureBatteryCtrl = _uiOnTextureDisplay displayCtrl 1050; // Battery Control
+
+_uiOnTextureBatteryCtrl ctrlSetText _value;
+
+/* ---------------------------------------- */
+
+private _uiOnTextureOutputCtrl = _uiOnTextureDisplay displayCtrl 1100; // Console Output Control
+
+// We need to compose the text again because we can't read the structuredText from the existing control,
+// like we do on the other controls. StructuredText is set-only.
+
+private _output = [];
+{
+ private _buffer = composeText [_x, lineBreak];
+ _buffer setAttributes ["size", str _size, "font", "EtelkaMonospacePro"];
+ _output pushBack _buffer;
+} forEach _terminalBufferVisible;
+
+_uiOnTextureOutputCtrl ctrlSetStructuredText (composeText _output);
+
+
+/* ---------------------------------------- */
+
+private _uiOnTextureLanguageCtrl = _uiOnTextureDisplay displayCtrl 1310; // Language Control
+
+_uiOnTextureLanguageCtrl ctrlSetText _terminalKeyboardLayout;
+
+/* ---------------------------------------- */
+
+displayUpdate _uiOnTextureDisplay;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_updateBatteryStatus.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_updateBatteryStatus.sqf
new file mode 100644
index 00000000..141f7bae
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_updateBatteryStatus.sqf
@@ -0,0 +1,26 @@
+/**
+ * Updates the battery symbol of the terminal for the "UI on texture" feature.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Battery Symbol Path
+ *
+ * Results:
+ * None
+ */
+
+params ["_computer", "_value"];
+
+private _uiOnTexActive = _computer getVariable ["AE3_UiOnTexActive", false]; // local variable on computer object is sufficient
+
+if (!_uiOnTexActive) then { [_computer] spawn AE3_armaos_fnc_terminal_uiOnTex_init; };
+
+waitUntil { !isNull findDisplay "AE3_UiOnTexture" };
+
+private _uiOnTextureDisplay = findDisplay "AE3_UiOnTexture";
+
+private _uiOnTextureBatteryCtrl = _uiOnTextureDisplay displayCtrl 1050; // Battery Control
+
+_uiOnTextureBatteryCtrl ctrlSetText format ["\z\ae3\addons\armaos\images\AE3_battery_%1_percent.paa", _value];
+
+displayUpdate _uiOnTextureDisplay;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_uiOnTex_updateOutput.sqf b/addons/armaos/functions/fnc_terminal_uiOnTex_updateOutput.sqf
new file mode 100644
index 00000000..1ac06a9c
--- /dev/null
+++ b/addons/armaos/functions/fnc_terminal_uiOnTex_updateOutput.sqf
@@ -0,0 +1,26 @@
+/**
+ * Updates terminal output for the "UI on texture" feature.
+ *
+ * Arguments:
+ * 1: Computer
+ * 2: Output
+ *
+ * Results:
+ * None
+ */
+
+params ["_computer", "_output"];
+
+private _uiOnTexActive = _computer getVariable ["AE3_UiOnTexActive", false]; // local variable on computer object is sufficient
+
+if (!_uiOnTexActive) then { [_computer] spawn AE3_armaos_fnc_terminal_uiOnTex_init; };
+
+waitUntil { !isNull findDisplay "AE3_UiOnTexture" };
+
+private _uiOnTextureDisplay = findDisplay "AE3_UiOnTexture";
+
+private _uiOnTextureOutputCtrl = _uiOnTextureDisplay displayCtrl 1100; // Console Output Control
+
+_uiOnTextureOutputCtrl ctrlSetStructuredText (composeText _output);
+
+displayUpdate _uiOnTextureDisplay;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_updateBatteryStatus.sqf b/addons/armaos/functions/fnc_terminal_updateBatteryStatus.sqf
index fb5df285..c8fb2be9 100644
--- a/addons/armaos/functions/fnc_terminal_updateBatteryStatus.sqf
+++ b/addons/armaos/functions/fnc_terminal_updateBatteryStatus.sqf
@@ -23,14 +23,14 @@ uiNamespace setVariable ["AE3_ConsoleOutput", _outputCtrl];
_handle =
[
{
- (_this select 0) params ["_battery", "_batteryCtrl"];
+ (_this select 0) params ["_computer", "_battery", "_batteryCtrl"];
// We have to use 'spawn' inside 'perFrameEventHandler' because this is a scheduled environment,
// but 'getRemoteVar' in 'getBatteryLevel' needs unscheduled environment to work properly.
// Otherwise throwing "suspending not allowd in this context" error.
- [_battery, _batteryCtrl] spawn
+ [_computer, _battery, _batteryCtrl] spawn
{
- params ["_battery", "_batteryCtrl"];
+ params ["_computer", "_battery", "_batteryCtrl"];
private _params = [_battery] call AE3_power_fnc_getBatteryLevel;
@@ -47,11 +47,25 @@ _handle =
_value = (floor (_batteryLevelPercent / 25)) * 25;
};
- _batteryCtrl ctrlSetText format ["\z\ae3\addons\armaos\images\AE3_battery_%1_percent.paa", _value];
+ private _oldValue = ctrlText _batteryCtrl;
+ private _newValue = format ["\z\ae3\addons\armaos\images\AE3_battery_%1_percent.paa", _value];
+
+ _batteryCtrl ctrlSetText _newValue;
+
+ /* ------------- UI on Texture ------------ */
+
+ if ((AE3_UiOnTexture) && !(_oldValue isEqualTo _newValue)) then
+ {
+ private _playersInRange = [3, _computer] call AE3_main_fnc_getPlayersInRange;
+
+ [_computer, _value] remoteExec ["AE3_armaos_fnc_terminal_uiOnTex_updateBatteryStatus", _playersInRange];
+ };
+
+ /* ---------------------------------------- */
};
},
60,
- [_battery, _batteryCtrl]
+ [_computer, _battery, _batteryCtrl]
] call CBA_fnc_addPerFrameHandler;
_handle;
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_updateBufferVisable.sqf b/addons/armaos/functions/fnc_terminal_updateBufferVisible.sqf
similarity index 69%
rename from addons/armaos/functions/fnc_terminal_updateBufferVisable.sqf
rename to addons/armaos/functions/fnc_terminal_updateBufferVisible.sqf
index d76c26b5..0290e9b6 100644
--- a/addons/armaos/functions/fnc_terminal_updateBufferVisable.sqf
+++ b/addons/armaos/functions/fnc_terminal_updateBufferVisible.sqf
@@ -1,6 +1,6 @@
/**
- * Updates/sets the visable buffer variable in the terminal settings of a given computer by cropping
- * the full terminal buffer to the visable size with respect of eventually scrolling position changes.
+ * Updates/sets the visible buffer variable in the terminal settings of a given computer by cropping
+ * the full terminal buffer to the visible size with respect of eventually scrolling position changes.
*
* Arguments:
* 1: Computer
@@ -32,26 +32,26 @@ private _terminalScrollPosition = _terminal get "AE3_terminalScrollPosition";
// + to preserve reference and force copy
-private _terminalRenderedBufferVisable = +_terminalRenderedBuffer;
+private _terminalRenderedBufferVisible = +_terminalRenderedBuffer;
private _buffer = +_terminalBuffer;
-// ENHANCEMENT: add block sign (needs new or modified font) instead of ¶ sign to the end of the _terminalRenderedBufferVisable
-private _lastBufferVisableLineIndex = (count _buffer) - 1;
-private _lastBufferVisableLine = _buffer # (_lastBufferVisableLineIndex);
+// ENHANCEMENT: add block sign (needs new or modified font) instead of ¶ sign to the end of the _terminalRenderedBufferVisible
+private _lastBufferVisibleLineIndex = (count _buffer) - 1;
+private _lastBufferVisibleLine = _buffer # (_lastBufferVisibleLineIndex);
if (_terminalApplication isEqualTo "PASSWORD") then
{
- _lastBufferVisableLine pushBack ((_terminalInputBuffer select 0) regexReplace [".", "*"]) + "¶" + ((_terminalInputBuffer select 1) regexReplace [".", "*"]);
+ _lastBufferVisibleLine pushBack ((_terminalInputBuffer select 0) regexReplace [".", "*"]) + "¶" + ((_terminalInputBuffer select 1) regexReplace [".", "*"]);
}else
{
- _lastBufferVisableLine pushBack (_terminalInputBuffer select 0) + "¶" + (_terminalInputBuffer select 1);
+ _lastBufferVisibleLine pushBack (_terminalInputBuffer select 0) + "¶" + (_terminalInputBuffer select 1);
};
-_terminalRenderedBufferVisable set [_lastBufferVisableLineIndex, [_computer, _lastBufferVisableLine] call AE3_armaos_fnc_terminal_renderLine];
+_terminalRenderedBufferVisible set [_lastBufferVisibleLineIndex, [_computer, _lastBufferVisibleLine] call AE3_armaos_fnc_terminal_renderLine];
// Flatten rendered buffer
-private _terminalBufferVisable = flatten _terminalRenderedBufferVisable;
-private _terminalRenderedBufferLength = count _terminalBufferVisable;
+private _terminalBufferVisible = flatten _terminalRenderedBufferVisible;
+private _terminalRenderedBufferLength = count _terminalBufferVisible;
if (_terminalScrollPosition > (_terminalRenderedBufferLength - _terminalMaxRows)) then
{
@@ -68,9 +68,9 @@ if (_terminalScrollPosition < 0) then
if (_terminalRenderedBufferLength > _terminalMaxRows) then
{
- _terminalBufferVisable = _terminalBufferVisable select [(_terminalRenderedBufferLength - _terminalMaxRows) - _terminalScrollPosition, _terminalMaxRows];
+ _terminalBufferVisible = _terminalBufferVisible select [(_terminalRenderedBufferLength - _terminalMaxRows) - _terminalScrollPosition, _terminalMaxRows];
};
-_terminal set ["AE3_terminalBufferVisable", _terminalBufferVisable];
+_terminal set ["AE3_terminalBufferVisible", _terminalBufferVisible];
_computer setVariable ["AE3_terminal", _terminal];
\ No newline at end of file
diff --git a/addons/armaos/functions/fnc_terminal_updateOutput.sqf b/addons/armaos/functions/fnc_terminal_updateOutput.sqf
index 0e4e893d..51bd7cfd 100644
--- a/addons/armaos/functions/fnc_terminal_updateOutput.sqf
+++ b/addons/armaos/functions/fnc_terminal_updateOutput.sqf
@@ -1,5 +1,5 @@
/**
- * Updates/sets the text for the terminal text field, stored in the visable buffer setting in terminal settings of a given computer.
+ * Updates/sets the text for the terminal text field, stored in the visible buffer setting in terminal settings of a given computer.
*
* Arguments:
* 1: Computer
@@ -11,12 +11,12 @@
params ["_computer", "_outputControl"];
-[_computer] call AE3_armaos_fnc_terminal_updateBufferVisable;
+[_computer] call AE3_armaos_fnc_terminal_updateBufferVisible;
private _terminal = _computer getVariable "AE3_terminal";
private _terminalBuffer = _terminal get "AE3_terminalBuffer";
-private _terminalBufferVisable = _terminal get "AE3_terminalBufferVisable";
+private _terminalBufferVisible = _terminal get "AE3_terminalBufferVisible";
private _size = _terminal get "AE3_terminalSize";
private _output = [];
@@ -24,9 +24,20 @@ private _output = [];
_buffer = composeText [_x, lineBreak];
_buffer setAttributes ["size", str _size, "font", "EtelkaMonospacePro"];
_output pushBack _buffer;
-} forEach _terminalBufferVisable;
+} forEach _terminalBufferVisible;
_outputControl ctrlSetStructuredText (composeText _output);
ctrlSetFocus _outputControl;
-_computer setVariable ["AE3_terminal", _terminal];
\ No newline at end of file
+_computer setVariable ["AE3_terminal", _terminal];
+
+/* ------------- UI on Texture ------------ */
+
+if (AE3_UiOnTexture) then
+{
+ private _playersInRange = [3, _computer] call AE3_main_fnc_getPlayersInRange;
+
+ [_computer, _output] remoteExec ["AE3_armaos_fnc_terminal_uiOnTex_updateOutput", _playersInRange];
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/armaos/readme.md b/addons/armaos/readme.md
index 3fb878e3..84f943e8 100644
--- a/addons/armaos/readme.md
+++ b/addons/armaos/readme.md
@@ -9,21 +9,20 @@ terminal | hashmap | Terminal settings (reference below)
filesystem | hashmap | [name, [content, owner, [[ownerX, ownerR, ownerW],[ otherX, otherR, otherW]]] | server
filepointer | array | Pointer to the current directory | server
Links | hashmap | Storing available system commands (name -> [path, desc, man]) | public
-Userlist | hashmap | Storing user -> pwd pairs | public
-terminalKeyboardLayout | string | Defining keyboard layout ("DE" or "US") | public
+Userlist | hashmap | Storing user -> pwd pairs | public
+terminalKeyboardLayout | string | Defining keyboard layout ("DE", "US", "FR, "IT") | public
### terminal
-
Name | Type | Desciption
---- | ----- | -----------
terminalComputer | object | referencing the computer, the current terminal is running on
terminalLoginUser | string | currently loged in user
terminalApplication | string | Terminal mode ("LOGIN" | "PASSWORD" | "SHELL" | "INPUT")
terminalPrompt | string | contains the current terminal prompt
-terminalInputBuffer | string |
+terminalInputBuffer | string |
terminalBuffer | array |
-terminalBufferVisable | array |
+terminalBufferVisible | array |
terminalCursorLine | int |
terminalCursorPosition | int |
terminalScrollPosition | int |
@@ -32,5 +31,5 @@ terminalMaxColumns | int |
terminalAllowedKeys | hashmap | format ["%1-%2-%3-%4", _key, _shift, _ctrl, _alt]
terminalProcess | int | Handler of the currently running programm
terminalCommandHistory | array | List of last commands
-terminalCommandHistoryIndex | int |
-terminalOutput | Control UI object | referencing the current ui control for output
\ No newline at end of file
+terminalCommandHistoryIndex | int |
+terminalOutput | Control UI object | referencing the current ui control for output
diff --git a/addons/armaos/stringtable.xml b/addons/armaos/stringtable.xml
index bfb71a25..e954874f 100644
--- a/addons/armaos/stringtable.xml
+++ b/addons/armaos/stringtable.xml
@@ -9,6 +9,7 @@
链接已存在!
Ссылка уже существует!
Le lien existe déjà!
+ Collegamento esiste già!
Too few options
@@ -17,6 +18,7 @@
参数过少
Слишком мало параметров
Pas assez de paramètres
+ Troppe poche opzioni
Command '%1' has too few options
@@ -25,6 +27,7 @@
命令 '%1' 参数过少
Команда '%1' имеет слишком мало параметров
Commande '%1' manque de paramètres
+ Comando '%1' ha troppe poche opzioni
Command '%1' has unknown or missing mode
@@ -33,6 +36,7 @@
命令 '%1' 包含未知模式或丢失模式
Команда '%1' имеет неизвестный или отсутствующий режим
Commande '%1' a un mode inconnu ou manquant
+ Comando '%1' ha modalità mancanti o sconosciuti
Command '%1' has unknown or missing message
@@ -41,6 +45,7 @@
命令 '%1' 包含未知信息或丢失信息
Command '%1' has unknown or missing message
Commande '%1' a un message inconnu ou manquant
+ Comando '%1' ha messaggi mancanti o sconosciuti
Command '%1' has unknown or missing algorythm
@@ -49,6 +54,7 @@
命令 '%1' 包含未知算法或丢失算法
Command '%1' has unknown or missing algorythm
Commande '%1' a un algorithme inconnu ou manquant
+ Comando '%1' ha algoritmi mancanti o sconosciti
Command '%1' has unknown or missing key
@@ -57,6 +63,7 @@
命令 '%1' 包含未知密钥或丢失密钥
Command '%1' has unknown or missing key
Commande '%1' a une clé inconnu ou manquant
+ Comando '%1' ha chiavi mancanti o sconosciute
Caesar Cypher needs an integer greater then 0 as key.
@@ -65,6 +72,47 @@
凯撒密码需要一个大于0的整数作为密钥.
Шифр Цезаря требует в качестве ключа целое число больше 0.
Le chiffrement de César a besoin d'un chiffre supérieur à 0 comme clé.
+ Caesar Cypeher ha bisogno di un numero intero superiore di 0 come chiave.
+
+
+ The key-method can not be used with the caesar cipher
+ The key-method can not be used with the caesar cipher
+ Die Schlüssel-Methode ist für die Cäsar Chiffre nicht verfügbar
+ 密钥方法不能与凯撒密码一起使用
+ The key-method can not be used with the caesar cipher
+ La méthode clé ne peut pas être utilisée avec le chiffrement César
+
+
+ The Columnar Transposition Cipher needs a key with at least 2 characters
+ The Columnar Transposition Cipher needs a key with at least 2 characters
+ Die Spaltentranspositions Chiffre benötigt einen Schlüssel der mindestens 2 Zeichen enthält
+ 列移位密码的密钥需要包含至少2个字符
+ The Columnar Transposition Cipher needs a key with at least 2 characters
+ Le chiffrement à transposition en colonne nécessite une clé d'au moins 2 caractères
+
+
+ The lengths of key and message do not match a complete transposition
+ The lengths of key and message do not match a complete transposition
+ Die Längen von Schlüssel und Nachricht stimmen nicht mit einer vollständigen Transposition überein
+ 秘钥和信息的长度不匹配完全变位
+ The lengths of key and message do not match a complete transposition
+ Les longueurs de clé et de message ne correspondent pas à une transposition complète
+
+
+ The statistics-method can not be used with the columnar cipher
+ The statistics-method can not be used with the columnar cipher
+ Die Statistik-Methode ist für die Spaltentransposition nicht verfügbar
+ 统计法不能与列移位密码一起使用
+ The statistics-method can not be used with the columnar cipher
+ La méthode statistique ne peut pas être utilisée avec le chiffrement en colonnes
+
+
+ The message is %1 characters long. Since %1 is a prime number, the message was not encrypted by a complete columnar transposition
+ The message is %1 characters long. Since %1 is a prime number, the message was not encrypted by a complete columnar transposition
+ Die Nachricht is %1 Zeichen lang. Da %1 eine Primzahl ist, kann die Nachricht nicht durch eine komplette Spaltentransposition verschlüsselt worden sein
+ 信息的长度是 %1 个字符.且由于 %1 是素数,所以消息没有通过完全列移位进行加密
+ The message is %1 characters long. Since %1 is a prime number, the message was not encrypted by a complete columnar transposition
+ Le message contient %1 caractères. Étant donné que %1 est un nombre premier, le message n'a pas été chiffré par une transposition en colonne complète
Too many options
@@ -73,6 +121,7 @@
参数过多
Слишком много параметров
Trop de paramètres
+ Tropper opzioni
Command '%1' has too many options
@@ -81,6 +130,7 @@
命令 '%1' 参数过多
Команда '%1' имеет слишком много параметров.
Commande '%1' a trop de paramètres
+ Comando '%1' ha troppe opzioni
Unable to read: %1
@@ -89,6 +139,7 @@
无法读取: %1
Unable to read: %1
Incapable de lire: %1
+ Impossibile leggere: %1
'%1' has no options
@@ -97,6 +148,7 @@
'%1' 不存在参数
'%1' has no options
'%1' n'a pas d'options
+ '%1' non ha opzioni
No address device attached
@@ -105,6 +157,7 @@
未连接设备地址
No address device attached
Aucun périphérique d'adresse connecté
+ Nessun indirizzo collegato al dispositivo
Command '%1' not found.
@@ -113,6 +166,7 @@
未找到 '%1' 命令.
Command '%1' not found.
Commande '%1' non trouvée.
+ Commande '%1' non trovato.
Invalid address!
@@ -121,6 +175,7 @@
无效地址!
Invalid address!
Adresse invalide!
+ indirizzo non valido!
Package dropped.
@@ -129,6 +184,7 @@
封包丢失
Package dropped.
Paquet perdu.
+ Pacchetto abbandonato.
root login disabled
@@ -137,6 +193,7 @@
Root登录已禁用
root login disabled
connexion root désactivée
+ login root disabilitato
User: '%1' not found
@@ -145,6 +202,7 @@
未找到用户: '%1'
Пользователь: '%1' не найден
Utilisateur: '%1' pas trouvé
+ Utente: '%1' non trovato
User: '%1' failed login attempt
@@ -153,6 +211,7 @@
用户: '%1' 尝试登陆失败
Пользователь: '%1' неудачная попытка входа
Utilisateur: '%1' tentative de connexion échouée
+ Utente: '%1' tentatito di login fallito
User: '%1' successfully logged in
@@ -161,6 +220,7 @@
用户: '%1' 登陆成功
Пользователь: '%1' успешно вошел в систему
Utiliseur: '%1' connecté avec succès
+ Utente: '%1' login effettuato con successo
Dialog couldn't be opened!
@@ -169,6 +229,7 @@
对话框无法打开
Dialog couldn't be opened!
Impossible d'ouvrir la boîte de dialogue !
+ il dialog non può essere aperto!
Can't scan %1 folders due to missing permissions.
@@ -177,6 +238,7 @@
缺少扫描 %1 文件夹的权限.
Не удается просканировать папки %1 из-за отсутствия разрешений.
Impossible d'analyser les dossiers %1 due à des autorisations manquantes.
+ impossibile scansionare %1 cartelle a causa di permessi mancanti.
@@ -187,6 +249,7 @@
缺少命令参数 '%1'!
Command option '%1' missing!
L'option de commande '%1' est manquante !
+ Opzioni comando '%1' mancanti!
Help: %1
@@ -195,6 +258,7 @@
帮助: %1
Help: %1
Aide: %1
+ Aiuto: %1
Syntax mismatch! See output of '%1 -h' for allowed syntax.
@@ -203,6 +267,7 @@
语法不匹配! 查看 '%1 -h' 以了解语法.
Syntax mismatch! See output of '%1 -h' for allowed syntax.
Erreur de syntaxe ! Voir le retour de '%1 -h' pour la syntaxe autorisée.
+ Errore di sintassi! vedi output di '%1 -h' per la sintassi permessa.
COMMAND SYNTAX
@@ -211,6 +276,7 @@
命令语法
COMMAND SYNTAX
SYNTAXE DE LA COMMANDE
+ SINTASSI COMANDO
COMMAND OPTIONS
@@ -219,6 +285,7 @@
命令参数
COMMAND OPTIONS
OPTION DE LA COMMANDE
+ OPZIONI COMANDO
history cleared
@@ -227,6 +294,7 @@
历史记录已清除
history cleared
historique effacé
+ history pulita
history element at index %1 deleted
@@ -235,6 +303,7 @@
索引 %1 处的历史记录元素已清除
history element at index %1 deleted
élément d'historique à l'index %1 supprimé
+ Elemento sulla history all'indice %1 eleminato
Fallen. Game over!
@@ -243,6 +312,7 @@
Fallen. 游戏结束!
Fallen. Game over!
Perdu. Jeu terminé!
+ Caduto. Game over!
Bitten. Game over!
@@ -251,6 +321,7 @@
Bitten. 游戏结束!
Bitten. Game over!
Mordu. Jeu terminé!
+ Morso. Game over!
snake length: %1
@@ -259,6 +330,7 @@
长度: %1
snake length: %1
longueur du serpent : %1
+ lunghezza Snake: %1
speed level: %1
@@ -267,6 +339,7 @@
速度: %1
speed level: %1
niveau de vitesse : %1
+ Livello di velocità: %1
duration: %1 s
@@ -275,6 +348,7 @@
持续时间: %1 s
duration: %1 s
durée: %1 s
+ durata: %1 s
IPv4 Address: %1
@@ -283,6 +357,7 @@
IPv4地址: %1
IPv4 Address: %1
Adresse IPv4 : %1
+ indirizzo IPv4: %1
Answer from %1: Time: %2 ms
@@ -291,6 +366,7 @@
来自 %1 的应答: 时间: %2 毫秒
Answer from %1: Time: %2 ms
Réponse de %1 : Temps: %2 ms
+ Risposta da %1: tempo: %2 ms
Date: %1-%2-%3 %4
@@ -299,6 +375,7 @@
日期: %1-%2-%3 %4
Date: %1-%2-%3 %4
Date: %1-%2-%3 %4
+ Data: %1-%2-%3 %4
Test %1: %2
@@ -307,6 +384,7 @@
测试 %1: %2
Test %1: %2
Test %1: %2
+ Test %1: %2
Character '%1' found %2 times (Possible key, if this is an 'E': %3)
@@ -315,6 +393,23 @@
找到字符 '%1' %2 次(如果这是 'E',可能的秘钥为: %3)
Character '%1' found %2 times (Possible key, if this is an 'E': %3)
Caractère '%1' trouvé %2 fois (Clé possible, s'il s'agit d'un 'E' : %3)
+ Carattere '%1' trovato %2 volte (Possibile chiave,se questa è una 'E': %3)
+
+
+ Columns: %1, Rows: %2
+ Columns: %1, Rows: %2
+ Spalten: %1, Zeilen: %2
+ Columns: %1, Rows: %2
+ Columns: %1, Rows: %2
+ Colonnes: %1, Lignes: %2
+
+
+ Possible Key-Lengths are:
+ Possible Key-Lengths are:
+ Mögliche Schlüssellängen sind:
+ Possible Key-Lengths are:
+ Possible Key-Lengths are:
+ Les longueurs de clé possibles sont :
@@ -325,6 +420,7 @@
输入'help'获取可用命令列表
Получить список доступных команд: 'help'
Obtenez une liste des commandes disponibles en tapant 'help'
+ Ricevi una lista di possibili comandi scrivento 'help' 'help'
@@ -343,6 +440,7 @@
显示此帮助并退出
display this help and exit
afficher cette aide et quitter
+ mostra questo aiuto ed esci
increases the pixel size
@@ -351,6 +449,7 @@
增加像素大小
increases the pixel size
augmente la taille des pixels
+ Aumenta la dimensione dei pixel
prints numbered output lines
@@ -359,6 +458,7 @@
打印带编号的输出行
prints numbered output lines
imprime des lignes de sortie numérotées
+ Mostra linee di output numerate
recursively changes owner
@@ -367,6 +467,7 @@
递归改变所有者
recursively changes owner
change récursivement de propriétaire
+ Cambia proprietario ricursivamente
sets the mode
@@ -375,6 +476,7 @@
设置模式
sets the mode
définit le mode
+ imposta la modalità
sets the algorithm
@@ -383,6 +485,7 @@
设置算法
sets the algorithm
définit l'algorithme
+ Imposta l'algoritmo
sets the mode
@@ -391,6 +494,7 @@
设置模式
sets the mode
définit le mode
+ Imposta la modalità
sets the algorithm
@@ -399,6 +503,7 @@
设置算法
sets the algorithm
définit l'algorithme
+ Imposta l'algoritmo
sets the key/password/pin
@@ -407,6 +512,7 @@
设置key/password/pin
sets the key/password/pin
définit la clé/le mot de passe/le code PIN
+ imposta la chiave/password/pin
enables interpretation of backslash escapes
@@ -415,6 +521,7 @@
启用对反斜杠转义的解释
enables interpretation of backslash escapes
permet l'interprétation des échappements antislash
+ Abilita interpretazione di backslash ESC
clears the history list
@@ -423,6 +530,7 @@
清除历史列表
clears the history list
efface la liste de l'historique
+ Pulisci la lista hystory
deletes a history entry at the given position offset
@@ -431,6 +539,7 @@
删除给定位置偏移量处的历史记录
deletes a history entry at the given position offset
supprime une entrée d'historique au décalage de position donné
+ Elimina un valore in history alla seguente posizione
prints folder content in long form
@@ -439,16 +548,18 @@
以长式打印文件夹内容
prints folder content in long form
affiche le contenu du dossier au format long
+ Mostra il contenuto di una cartella in forma estesa
-
+
AE3 armaOS Modules
AE3 armaOS Modules
AE3 armaOS Module
AE3 armaOS 模块
AE3 armaOS Module
Modules armaOS AE3
+ AE3 Modulo arma3OS
Retro Snake Game
@@ -457,6 +568,7 @@
贪吃蛇
Retro Snake Game
Jeu Rétro Snake
+ Retro Snake Game
Retro Snake Game - use option --big for doubled block size
@@ -465,7 +577,8 @@
贪吃蛇 - 使用参数 --big 使区块大小翻倍
Retro Snake Game - use option --big for doubled block size
Jeu Rétro Snake - utilisez l'option --big pour doubler la taille des blocs
-
+ Retro Snake Game - usa opzione --grande per dimensione blocco doppia
+
Prints usage information about a command.
Prints usage information about a command.
@@ -473,6 +586,7 @@
打印命令的说明信息.
Выводит информацию об использовании команды
Affiche les informations d'utilisation d'une commande.
+ Mostra informazioni su utilizzo del comando.
Usage man: 'man [command]' returns usage information for the command.
@@ -481,6 +595,7 @@
man说明:'man[command]'返回命令说明信息.
Использование man: 'man [command]' выводит информацию об использовании команды
Utilisation man: 'man [command]' renvoie les informations d'utilisation de la commande.
+ Utilizzo man: 'man [command]' mostra informazioni sull'utilizzo del comando.
Prints all installed programs.
@@ -489,6 +604,7 @@
打印所有已安装的程序.
Выводит все доступные Команды
Liste tous les programmes installés.
+ Mostra tutti i comandi installati.
Usage help: 'help' returns a list of available programs. No options needed.
@@ -497,6 +613,7 @@
help说明:'help'返回可用程序列表. 无需参数.
Использование help: 'help [command]' Выводит список всех доступных Команд
Utilisation help: 'help' renvoie une liste des programmes disponibles. Aucune option nécessaire.
+ Utilizzo help: mostra una lista di programmi disponibili. non richiede opzioni
Display the content of a directory.
@@ -505,6 +622,7 @@
显示目录的内容.
Показывает содержимое директории
Affiche le contenu d'un répertoire.
+ Mostra il contenuto di una directory.
Usage ls: 'ls [path]' returns a list of filesystem objects found in this path.
@@ -513,6 +631,7 @@
ls说明:'ls[path]返回在此路径中找到的文件系统对象的列表.
Использование ls: 'ls [path]' показывает список файлов найденных по этому пути
Utilisation ls: 'ls [path]' renvoie une liste des objets du système de fichiers trouvés dans ce chemin d'accès.
+ Utilizzo ls: 'ls [path]' mostra una lista di filesystem trovati in questo percorso.
Change the working directory.
@@ -521,6 +640,7 @@
更改工作目录.
Изменяет рабочую директорию
Changez le répertoire de travail.
+ Cambia la directory in uso.
Usage cd: 'cd [path]' sets path as the new working directory.
@@ -529,6 +649,7 @@
cd说明:'cd[path]'将路径设置为新的工作目录.
Использование cd: 'cd [path] делает путь новой рабочей директорией
Utilisation cd: 'cd [path]' définit le chemin d'accès comme nouveau répertoire de travail.
+ Utilizzo cd: 'cd [path]' Imposta il percorso come nuova directory.
Prints the content of a file.
@@ -537,6 +658,7 @@
打印文件内容.
Показывает содержимое файла
Affiche le contenu d'un fichier
+ Mostra il contenuto di un file.
Usage cat: 'cat [file]' shows the content of a file.
@@ -544,7 +666,8 @@
Verwendung cat: 'cat [Datei]' zeigt den Inhalt einer Datei.
cat说明:'cat[file]'显示文件内容.
Использование cat: 'cat [file] Показывает содержимое файла
- Utilisation cat: 'cat [file]' Affiche le cxontenu d'un fichier.
+ Utilisation cat: 'cat [file]' Affiche le contenu d'un fichier.
+ Utilizzo cat: 'cat [file]' mostra il contenuto di un file.
Prints the date.
@@ -553,6 +676,7 @@
打印日期.
Выводит текущую дату и время
Affiche la date.
+ Mostra la data.
Usage date: 'date' prints the actual date in format YYYY-MM-DD HH:MM:SS
@@ -561,6 +685,7 @@
date说明:'date'以YYYY-MM-DD HH:MM:SS格式打印实际日期.
Использование date: 'date' выводит текущую дату в формате ГОД-МЕСЯЦ-ДЕНЬ ЧАСЫ-МИНУТЫ-СЕКУНДЫ
Utilisation date: 'date' affiche la date actuelle au format AAAA-MM-JJ HH:MM:SS
+ utilizzo date: 'date' mostra la data attuale in formato YYYY-MM-DD HH:MM:SS
Prints the terminal history.
@@ -569,6 +694,7 @@
打印终端历史记录.
Выводит историю ввода Команд
Affiche l'historique du terminal.
+ Mostra la history del terminal.
Usage history: 'history' lists last commands since the start of the computer.
@@ -577,6 +703,7 @@
history说明:'history'列出自计算机启动以来的最后一个命令.
Использование history: 'history' выдаёт списко команд которые вводились после включение компьютера
Utilisation history: 'history' répertorie les dernières commandes depuis le démarrage de l'ordinateur.
+ Utilizzo history: 'history' mostra una lista di comandi dall'accensione del computer.
Clears the terminal window.
@@ -585,6 +712,7 @@
清除终端窗口.
Очищает окно терминала
Efface la fenêtre du terminal.
+ Pulisce la finestra del terminale.
Usage clear: 'clear' deletes most of the displayed text.
@@ -593,6 +721,7 @@
clear说明:'clear'删除大部分显示文本.
Использование clear: 'clear' очищает весь выведенный на экране текст
Utilisation clear: 'clear' supprime la majeure partie du texte affiché.
+ Utilizzao clear: 'clear' elimina il testo mostrato aschermo.
Removes a file.
@@ -601,6 +730,7 @@
删除文件.
Удаляет файл
Supprime un fichier.
+ Rimuovere un file.
Usage rm: 'rm [path]' deletes a file at the given path.
@@ -609,6 +739,7 @@
rm说明:'rm[path]'删除指定路径上的文件.
Использование rm: 'rm [path]' удаляет файл по указанному пути.
Utilisation rm: 'rm [chemin d'accès]' supprime un fichier au chemin d'accès donné.
+ Utilizzo rm: 'rm [path]' rimuove un file dal percorso indiao.
Moves a file or folder.
@@ -617,6 +748,7 @@
移动文件或文件夹.
Перемещает файл или папку
Déplace un fichier ou un dossier.
+ Muovi un file o una cartella.
Usage mv: 'mv [old path] [new path]' moves file to new path or renames the file.
@@ -625,6 +757,7 @@
mv说明:'mv[old path] [new path]'将文件移动到新路径或重命名文件.
Использование mv: "mv [old path] [new path] Перемещает файл или папку или переименовывает
Utilisation mv: 'mv [ancien chemin d'accès] [nouveau chemin d'accès]' déplace le fichier vers un nouveau chemin d'accès ou renomme le fichier.
+ Utilizzo mv: 'mv [old path] [new path]' muove un file su un nuovo percorso o lo rinominae.
Copies a file or folder.
@@ -632,7 +765,8 @@
Kopiert eine Datei oder ein Verzeichnis.
复制文件或文件夹.
Copies a file or folder.
- Copies a file or folder.
+ Copie un fichier ou un dossier.
+ Copia un file o una cartella.
Usage cp: 'cp [old path] [new path]' copies file to new path.
@@ -641,6 +775,7 @@
cp说明: 'cp [old path] [new path]' 将文件复制到新路径.
Usage cp: 'cp [old path] [new path]' copies file to new path.
Utilisation cp: 'cp [ancien chemin d'accès] [nouveau chemin d'accès]' copie un fichier vers un nouveau chemin d'accès.
+ utilizzo cp: 'cp [old path] [new path]' copa file su nuovo percorso.
Returns the current user.
@@ -649,6 +784,7 @@
返回当前用户.
Выводит текущего пользователя
Renvoie l'utilisateur actuel.
+ Ritorna all'utente attuale.
Usage whoami: 'whoami' returns the current user.
@@ -657,6 +793,7 @@
whoami说明:'whoami'返回当前用户.
Использование whoami: 'whoami' Выводит текущего пользователя
Utilisaton whoami: 'whoami' Renvoie l'utilisateur actuel.
+ Utilizzo whoami: 'whoami'mostral'utente attuale.
Creates a directory/folder.
@@ -665,6 +802,7 @@
创建目录或文件夹.
Создает директорию или папку
Crée un répertoire/dossier.
+ Crea una directory/cartella
Usage mkdir: 'mkdir [path]' creates a new folder/directory.
@@ -673,6 +811,7 @@
mkdir说明:'mkdir [path]'创建新目录或文件夹
Использование mkdir: 'mkdir [path]' создаёт новый файл или директорию
Utilisation mkdir: 'mkdir [répertoire]' crée un nouveau dossier/répertoire.
+ utilizza mkdir: 'mkdir [path]' crea una nuova cartlla o directory.
Pings the given address.
@@ -681,6 +820,7 @@
Ping指定地址
Пингует введенный адрес
Ping l'adresse donnée.
+ Pinga l'indirizzo indicato.
Usage ping: 'ping [address]' pings the given address.
@@ -689,6 +829,7 @@
ping说明:'ping [address]'ping指定地址.
Использование ping: 'ping [address]' пингует введенный адрес
Utilisation ping: 'ping [adresse]' Ping l'adresse donnée.
+ utilizza ping: 'ping [address]' pinga l'indirizzo indicato.
Returns the current ip configuration.
@@ -697,6 +838,7 @@
返回当前ip配置.
Выводит текущую конфигурацию IP
Renvoie la configuration IP actuelle.
+ Mostra l'attuale configurazione ip.
Usage ipconfig: 'ipconfig' returns the current ip configuration.
@@ -705,6 +847,7 @@
ipconfig说明:'ipconfig'返回当前ip配置.
Использование ipconfig: 'ipconfig' выводит текущую кофигурацию IP
Utilisation ipconfig: 'ipconfig' renvoie la configuration IP actuelle.
+ utilizza ipconfig: 'ipconfig' mostra l'attuale configurazione ip.
Log out of the user session.
@@ -713,6 +856,7 @@
退出用户会话.
Выйти из сессии
Déconnectez-vous de la session utilisateur.
+ Disconnetti dall asessione utente.
Usage exit: 'exit' brings you back to login screen.
@@ -721,6 +865,7 @@
exit说明:'exit'”返回登录界面.
Использование exit: 'exit' Возвращает вас на экран авторизации
Utilisation exit: 'exit' vous ramène à l'écran de connexion.
+ Utilizza exit: 'exit' riporta al login.
Shuts down the computer.
@@ -728,7 +873,8 @@
Fährt den Computer herunter.
关闭计算机.
Выключает компьютер
- Arrête l'ordinateur.
+ Arrêter l'ordinateur.
+ Spegne il computer.
Usage shutdown: 'shutdown' turns off the computer.
@@ -737,6 +883,7 @@
shutdown说明:'shutdown'关闭计算机.
Использование shutdown: 'shutdown' выключает компьютер
Utilisation shutdown: 'shutdown' éteint l'ordinateur.
+ Utilizza shutdown: 'shutdown' spegne il computer.
Puts the computer in standby mode.
@@ -745,6 +892,7 @@
切换至待机模式.
Переводит компьютер в режим ожидания
Met l'ordinateur en mode veille.
+ mette il computer in standby.
Usage standby: 'standby' activates the computers standby mode.
@@ -753,6 +901,7 @@
standby说明:'standby'切换至待机模式.
Использование standby: 'standby' переводит компьютер в режим ожидания
Utilisation standby: 'standby' active le mode veille de l'ordinateur.
+ utilizza standby: 'standby' attiva il computer in modalità standby.
Print/output a line of text to stdout.
@@ -761,6 +910,7 @@
将一行文本打印/输出到标准输出流.
Печать/вывод строки текста на stdout.
Affiche/retourne une ligne de texte sur stdout.
+ Stampa/Mostra una linea di test.
Usage echo: 'echo [text]' prints the given text to stdout.
@@ -769,6 +919,7 @@
echo说明: 'echo [text]' 打印指定的文本到标准输出流.
Использование echo: 'echo [text]' выводит данный текст на stdout
Utilisation echo: 'echo [texte]' affiche une ligne de texte sur stdout.
+ utilizza echo: 'echo [text]' mostra la linea di testo indicata.
Encrypts/decrypts text with a given algorythm and key.
@@ -777,6 +928,7 @@
使用指定的算法和密钥加密/解密文本.
Шифрует/дешифрует текст с заданным алгоритмом и ключом.
Chiffre/déchiffre du texte avec un algorithme et une clé donnés.
+ Encripta/Decrypta testo con un algoritmo e chiave fornito.
Usage crypto: 'crypto -a [algorythm] -k [key] -m [mode] [text]' prints the processed text to stdout.
@@ -785,6 +937,7 @@
crypto说明: 'crypto -a [algorythm] -k [key] -m [mode] [text]' 将处理后的文本打印到标准输出流.
Использование crypto: 'crypto -a [algorythm] -k [key] -m [mode] [text]' выводит обработанный текст на stdout.
Utilisation crypto: 'crypto -a [algorythme] -k [clé] -m [mode] [texte]' affiche le texte traité sur stdout.
+ utilizza crypto: 'crypto -a [algorythm] -k [key] -m [mode] [text]' mostra il processo in testo.
Trys to decrypt text with a given algorythm using multiple methods like bruteforce or statistics.
@@ -793,6 +946,7 @@
尝试使用多种指定算法(如bruteforce或statistics)解密文本.
Пытается расшифровать текст с заданным алгоритмом, используя брутфорс или статистику
Essaie de déchiffrer du texte avec un algorithme donné en utilisant plusieurs méthodes comme la force brute ou les statistiques.
+ Cerca di decriptare il testo con l'algoritmo indicato utilizzando multipli metodi come forza bruta o statistiche.
Usage crack: 'crack -a [algorythm] -m [mode] [text]' prints the results to stdout.
@@ -801,6 +955,7 @@
crack说明: 'crack -a [algorythm] -m [mode] [text]' 将结果打印到标准输出流.
Использование crack: crack -a [algorythm] -m [mode] [text]' выводит результаты на stdout
Utilisation crack: 'crack -a [algorythme] -m [mode] [textee]' affiche les résultats sur stdout.
+ Utilizzo crack: 'crack -a [algoritmo] -m [modalità] [testo]' mostra il risultato a console.
Searches in the current directory for a file/folder with the given name.
@@ -809,6 +964,7 @@
在当前目录中搜索具有指定名称的文件/文件夹.
Ищет в текущей директории файл/папку с заданным именем.
Recherche dans le répertoire courant un fichier/dossier portant le nom donné.
+ Cerca nella directory attualmente in uso per file/cartella con il nome indicato.
Usage find: 'find [Name]' prints the results to stdout.
@@ -817,6 +973,7 @@
find说明: 'find [Name]' 将结果打印到标准输出流.
Использование find: 'find [Name]' выводит результат на stdout
Utilisation find: 'find [Nom]' affiche le résultas sur stdout.
+ Utilizzo find: 'find [Name]' mostra il risultato a console.
Mounts a flash drive in the specified usb port.
@@ -825,6 +982,7 @@
在指定的usb端口装载一个闪盘驱动器.
Подключает флэш-накопитель к указанному порту USB.
Monte un lecteur flash dans le port USB spécifié.
+ Monta una chiavetta USB nella specifica porta USB.
Usage mount: 'mount [interface name]' mounts given interface.
@@ -833,6 +991,7 @@
mount说明: 'mount [interface name]' 装载给定的接口.
Использование mount: 'mount [interface name]' подключает usb-накопитель к заданному порту.
Utilisation mount: 'mount [nom interface]' monte l'interface donnée.
+ Utilizzo mount: 'mount [interface name]' monta l'interfaccia indicata.
Unmounts a flash drive from the specified usb port.
@@ -841,6 +1000,7 @@
在指定的usb端口卸载闪盘驱动器.
Отсоединяет флэш-накопитель от указанного USB-порта.
Ejecte un lecteur flash du port USB spécifié.
+ Smonta una chiavetta USB da una specifica porta usb.
Usage umount: 'umount [interface name]' unmounts given interface.
@@ -849,6 +1009,7 @@
umount说明: 'umount [interface name]'卸载给定的接口.
Использование umount: 'umount [interface name]' отключает usb-накопитель от заданного порта
Utilisation umount: 'umount [nom interface]' ejecte l'interface spécifié.
+ Utilizzo umount: 'umount [interface name]' smonta l'interfaccia indicata.
Changes the owner of a file or directory.
@@ -857,6 +1018,7 @@
更改文件或目录的所有者.
Изменяет владельца файла или каталога.
Modifie le propriétaire d'un fichier ou d'un répertoire.
+ Cambia il proprietario di un file o directory.
Usage chown: 'chown [path] [new owner]' changes the owner.
@@ -865,6 +1027,7 @@
chown说明: 'chown [path] [new owner]' 改变所有者.
Использование chown: 'chown [path] [new owner]' изменяет владельца
Utilisation chown: 'chown [répertoire] [nouveau propriétaire]' change le propriétaire.
+ Utilizzo chown: 'chown [path] [new owner]' cambia il proprietario.
Lists the available (usb) interfaces.
@@ -873,6 +1036,7 @@
列出可用的(usb)接口.
Перечисляет доступные интерфейсы (usb).
Liste les interfaces (usb) disponibles.
+ Lista delle interfacce USB disponibili.
Usage lsusb: 'lsusb' lists usb interfaces.
@@ -881,6 +1045,7 @@
lsusb说明: 'lsusb' 列出usb接口.
Использование lsusb: 'lsusb' отображает порты usb
Utilisation lsusb: 'lsusb' Liste les interfaces usb.
+ Utilizzo lsusb: 'lsusb' lista delle interfacce USB.
Black
@@ -889,6 +1054,7 @@
黑色
Black
Noir
+ Nero
Olive
@@ -897,6 +1063,7 @@
橄榄色
Olive
Olive
+ Oliva
Yellow
@@ -905,6 +1072,7 @@
黄色
Yellow
Jaune
+ Giallo
Sand
@@ -913,6 +1081,7 @@
沙色
Sand
Sable
+ Sabbia
Laptop
@@ -921,6 +1090,7 @@
笔记本电脑
Ноутбук
Ordinateur portable
+ Portatile
Battery
@@ -929,6 +1099,7 @@
电池
Батарея
Batterie
+ Batteria
ArmaOS
@@ -937,6 +1108,7 @@
ArmaOS
ArmaOS
ArmaOS
+ ArmaOS
Use
@@ -945,6 +1117,7 @@
使用
Использовать
Utiliser
+ Usa
AE3 Add User
@@ -953,6 +1126,7 @@
AE3添加用户
AE3 Add User
AE3 Ajouter un utilisateur
+ AE3 Aggiungi utente
AE3 Add Games
@@ -961,6 +1135,7 @@
AE3添加游戏
AE3 Add Games
AE3 Ajouter des jeux
+ AE3 Aggiungi giochi
AE3 Add Security Commands
@@ -969,6 +1144,7 @@
AE3添加安全命令
AE3 Add Security Commands
AE3 Ajouter des commandes de sécurité
+ AE3 Aggiungi comandi di sicurezza
AE3 Add Hacking Commands
@@ -977,13 +1153,16 @@
AE3添加黑客命令
AE3 Add Hacking Commands
AE3 Ajouter des commandes de piratage
+ AE3 Aggiungi comandi hacking
Username
Username
Benutzername
用户名
+ Username
Nom d'utilisateur
+ Username
Name of authorized user, for example 'admin', 'guest' or 'stavros'
@@ -992,6 +1171,7 @@
授权用户的名称,例如'admin','guest'或'stavros'.
Имя авторизованного пользователя, например 'admin', 'guest' or 'stavros'
Nom de l'utilisateur autorisé, par exemple 'admin', 'guest' ou 'stavros'
+ Nome di un utente autorizzato, per esempio 'admin', 'guest' o 'stavros'
Password
@@ -1000,6 +1180,7 @@
密码
Password
Mot de passe
+ Password
Password of authorized user, for example '123456', 'password' or 'Qf5:xxR12#fTG'
@@ -1008,6 +1189,7 @@
授权用户的密码,例如'114514','password'或'Qf5:xxR12#fTG'
Пароль для авторизации пользователя, например '123456', 'password' или 'Qf5:xxR12#fTG'
Mot de passe de l'utilisateur autorisé, par exemple '123456', 'password' ou 'Qf5:xxR12#fTG'
+ Password di un utente autorizzato, per esempio '123456', 'password' o 'Qf5:xxR12#fTG'
This module defines users for an armaOS computer. Simply sync one or more of these modules to a supported computer.
@@ -1016,6 +1198,7 @@
此模块定义armaOS计算机的用户.只需将这些模块中的一个或多个同步到指定的计算机.
Этот модуль определяет пользователей для компьютера с armaOS. Просто синхронизируйте один или несколько из этих модулей с поддерживаемым компьютером.
Ce module définit les utilisateurs pour un ordinateur armaOS. Synchronisez simplement un ou plusieurs de ces modules avec un ordinateur pris en charge.
+ Questo definisce gli utenti per i computer armaOS. Semplicemente sincronizza uno o più di questi moduli a computer supportati.
This module adds games to an armaOS computer. Simply sync this module to a supported computer.
@@ -1024,6 +1207,7 @@
这个模块将游戏添加到armaOS电脑中.只需将这个模块同步到目标电脑上.
Этот модуль добавляет компьютерные игры в armaOS. Просто синхронизируйте этот модуль с поддерживаемым компьютером.
Ce module ajoute des jeux à un ordinateur armaOS. Synchronisez simplement ce module avec un ordinateur pris en charge.
+ Questo modulo aggiunge giochi ad un computer armaOS. Semplicemente sincronizza questo modulo ad un computer supportato.
This module adds security commands to an armaOS computer. Simply sync this module to a supported computer.
@@ -1032,6 +1216,7 @@
这个模块将安全指令添加到armaOS电脑中.只需将这个模块同步到目标电脑上.
Этот модуль добавляет команды безопасности к компьютеру armaOS. Просто синхронизируйте этот модуль с поддерживаемым компьютером.
Ce module ajoute des commandes de sécurité à un ordinateur armaOS. Synchronisez simplement ce module avec un ordinateur pris en charge.
+ Questo modulo aggiunge comandi di security ad un computer armaOS. Semplicemente sincronizza il modulo con un computer supportato.
This module adds hacking commands to an armaOS computer. Simply sync this module to a supported computer.
@@ -1040,6 +1225,7 @@
这个模块将黑客命令添加到armaOS电脑中.只需将这个模块同步到目标电脑上.
Этот модуль добавляет команды взлома на компьютер armaOS. Просто синхронизируйте этот модуль с поддерживаемым компьютером.
Ce module ajoute des commandes de piratage à un ordinateur armaOS. Synchronisez simplement ce module avec un ordinateur pris en charge.
+ Questo modulo aggiunge i comandi di hacking ad un computer armaOS. Semplicemente sincronizza questo modulo con un computer supportato.
The 'crypto' command allows you to encrypt and decrypt messages.
@@ -1048,6 +1234,7 @@
'crypto' 命令能让你对信息进行加密和解密.
Команда "crypto" позволяет вам шифровать и расшифровывать сообщения.
La commande 'crypto' permet de chiffrer et de déchiffrer les messages.
+ Il comando 'crypto' permette di criptare e decryptare messaggi.
The 'crack' command allows you to crack encrypted messages.
@@ -1056,6 +1243,16 @@
'crack'命令能让你破解加密的信息.
Команда "взломать" позволяет вам взламывать зашифрованные сообщения.
La commande 'crack' vous permet de cracker des messages cryptés.
+ Il comando 'crack' permettte di craccare messaggi cryptati.
+
+
+ The 'snake' game. Eat fruits while getting longer and longer. Don't collide with yourself or the walls.
+ The 'snake' game. Eat fruits while getting longer and longer. Don't collide with yourself or the walls.
+ Das 'snake' Spiel. Iss Früchte während du immer länger wirst. Vermeide mit der Wand oder dir selbst zu kollidieren.
+ The 'snake' game. Eat fruits while getting longer and longer. Don't collide with yourself or the walls.
+ The 'snake' game. Eat fruits while getting longer and longer. Don't collide with yourself or the walls.
+ Le jeu du "serpent". Mangez des fruits en devenant de plus en plus long. N'entrez pas en collision avec vous-même ou les murs.
+ Il gioco 'snake'. mangia i frutti mentre diventa sempre più lungo. non scontrarti con te stesso o con i muri.
@@ -1066,6 +1263,7 @@
AE3 armaOS
AE3 armaOS
AE3 armaOS
+ AE3 armaOS
Keyboard Layout
@@ -1074,6 +1272,7 @@
键盘布局
Раскладка клавиатуры
Disposition clavier
+ Layout Tastiera
Keyboard Layout for armaOS. You can also change this in armaOS terminal.
@@ -1082,6 +1281,7 @@
armaOS键盘布局.您也可以在armaOS终端中更改此设置.
Раскладка клавиатуры для ArmaOS (Можно изменить в терминале ArmaOS)
Disposition du clavier pour armaOS. Vous pouvez également modifier cela dans le terminal armaOS.
+ Layout tastiera per armaOS. Puoi modificare questa impostazione in armaOS terminal.
Terminal Design
@@ -1090,6 +1290,7 @@
终端风格
Terminal Design
Design du Terminal
+ Design Terminale
Terminal Design for armaOS. You can also change this in armaOS terminal.
@@ -1098,6 +1299,7 @@
armaOS的终端风格.你也可以在armaOS终端中更改.
Дизайн терминала для armaOS. Вы также можете изменить это в терминале armaOS.
Design du terminal pour armaOS. Vous pouvez également modifier cela dans le terminal armaOS.
+ Design del terminale per armaOS. Puoi modificare questa impostazione in armaOS terminal.
armaOS default
@@ -1106,6 +1308,7 @@
armaOS默认
armaOS default
armaOS par défaut
+ Default armaOS
armaOS default design (dark theme)
@@ -1114,6 +1317,7 @@
armaOS默认风格 (dark theme)
armaOS default design (dark theme)
armaOS design par défaut (dark theme)
+ Design default di armaOS (Tema scuro)
C64
@@ -1122,6 +1326,7 @@
C64
C64
C64
+ C64
C64 design (blue on blue theme)
@@ -1130,6 +1335,7 @@
C64 风格 (blue on blue theme)
C64 design (blue on blue theme)
C64 design (thème bleu sur bleu)
+ C64 design (Blu su tema Blu)
Apple II
@@ -1138,6 +1344,7 @@
Apple II
Apple II
Apple II
+ Apple II
Apple II monochrome design (green on black)
@@ -1146,6 +1353,7 @@
Apple II 单色设计 (green on black)
Apple II monochrome design (green on black)
Apple II monochrome design (vert sur noir)
+ Apple II monochrome design (Verde su Nero)
Amber
@@ -1154,6 +1362,7 @@
Amber
Amber
Ambre
+ Amber
Amber monochrome design (amber on black)
@@ -1162,6 +1371,7 @@
Amber 单色设计 (amber on black)
Amber monochrome design (amber on black)
Ambre monochrome (ambre sur noir)
+ Amber monochrome design (Ambra su Nero)
Terminal Scroll Speed
@@ -1170,6 +1380,7 @@
终端滚动速度
Скорость прокрутки терминала
Vitesse de défilement du terminal
+ Velocità di scroll del Terminale
Determines the speed in lines for the mouse wheel scroll feature for the terminal.
@@ -1178,6 +1389,25 @@
确定终端鼠标滚轮滚动的速度(以行为单位).
Определяет скорость в строках для функции прокрутки колеса мыши в терминале
Détermine la vitesse en lignes de la fonction de défilement de la molette de la souris pour le terminal.
+ Determina la velocità in linee per la funzionalità di scroll della rotellina del mouse.
+
+
+ UI on texture
+ UI on texture
+ UI auf Textur
+ 贴图UI
+ UI on texture
+ UI on texture
+ UI nella texture
+
+
+ If enabled, surrounding players can see the armaOS interface on the computers texture.
+ If enabled, surrounding players can see the armaOS interface on the computers texture.
+ Wenn aktiviert, können Spieler in der Nähe das armaOS Interface auf der Textur des Computers sehen.
+ 启用后周围玩家可以在电脑贴图上看到armaOS的界面.
+ If enabled, surrounding players can see the armaOS interface on the computers texture.
+ Si activé, les joueurs environnants peuvent voir l'interface armaOS sur la texture de l'ordinateur.
+ Se abilitato, i giocatori vicini possono vedere l'interfaccia di armaOS nella texture del computer.
1 line
@@ -1186,6 +1416,7 @@
1行
1 line
1 ligne
+ 1 linea
2 lines
@@ -1194,6 +1425,7 @@
2行
2 lines
2 lignes
+ 2 linee
3 lines
@@ -1202,6 +1434,7 @@
3行
3 lines
3 lignes
+ 3 linee
diff --git a/addons/filesystem/CfgFactionClasses.hpp b/addons/filesystem/CfgFactionClasses.hpp
deleted file mode 100644
index e91d0d03..00000000
--- a/addons/filesystem/CfgFactionClasses.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-
-class CfgFactionClasses
-{
- class NO_CATEGORY;
- class AE3_armaosModules: NO_CATEGORY
- {
- displayName = "$STR_AE3_Filesystem_Config_ArmaOSModulesKategoryDisplayName";
- };
-};
\ No newline at end of file
diff --git a/addons/filesystem/CfgVehicles.hpp b/addons/filesystem/CfgVehicles.hpp
index f525d2d6..a1172928 100644
--- a/addons/filesystem/CfgVehicles.hpp
+++ b/addons/filesystem/CfgVehicles.hpp
@@ -11,6 +11,7 @@ class CfgVehicles
class Default;
class Edit; // Default edit box (i.e., text input field)
class Checkbox;
+ class Combo;
class ModuleDescription; // Module description
};
// Description base classes, for more information see below
@@ -25,15 +26,16 @@ class CfgVehicles
class AE3_AddFile: Module_F
{
// Standard object definitions
+
scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it.
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
displayName = "$STR_AE3_Filesystem_Config_AddFileDisplayName"; // Name displayed in the menu
icon = "\z\ae3\addons\filesystem\ui\AE3_Module_Icons_addFile.paa"; // Map icon. Delete this entry to use the default icon
- category = "AE3_armaosModules";
-
+ category = "AE3_filesystemModules";
// Name of function triggered once conditions are met
- function = "AE3_filesystem_fnc_moduleAddFile";
+ function = "AE3_filesystem_fnc_module_addFile";
// Execution priority, modules with lower number are executed first. 0 is used when the attribute is undefined
- functionPriority = 1;
+ functionPriority = 3;
// 0 for server only execution, 1 for global execution, 2 for persistent global execution
isGlobal = 1;
// 1 for module waiting until all synced triggers are activated
@@ -44,7 +46,7 @@ class CfgVehicles
is3DEN = 0;
// Menu displayed when the module is placed or double-clicked on by Zeus
- curatorInfoType = "RscDisplayAttributeModuleFilesystem";
+ curatorInfoType = "AE3_UserInterface_Zeus_Module_AddFile";
// Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific
class Attributes: AttributesBase
@@ -73,9 +75,9 @@ class CfgVehicles
validate = "none";
expression = "_this setVariable [""AE3_Module_AddFile_Content"", _value]";
};
- class AE3_Module_AddFile_IsFunction: Checkbox
+ class AE3_Module_AddFile_IsCode: Checkbox
{
- property = "AE3_Module_AddFile_IsFunction";
+ property = "AE3_Module_AddFile_IsCode";
displayName = "$STR_AE3_Filesystem_Config_IsCodeDisplayName";
tooltip = "$STR_AE3_Filesystem_Config_IsCodeTooltip";
typeName = "BOOL"; // Value type, can be "NUMBER", "STRING" or "BOOL"
@@ -159,6 +161,43 @@ class CfgVehicles
defaultValue = true;
};
+ class AE3_Module_AddFile_IsEncrypted: Checkbox
+ {
+ property = "AE3_Module_AddFile_IsEncrypted";
+ displayName = "$STR_AE3_Filesystem_Config_IsEncryptedDisplayName";
+ tooltip = "$STR_AE3_Filesystem_Config_IsEncryptedTooltip";
+ typeName = "BOOL"; // Value type, can be "NUMBER", "STRING" or "BOOL"
+ // Default text filled in the input box
+ // Because it is an expression, to return a String one must have a string within a string
+ defaultValue = false;
+ };
+ class AE3_Module_AddFile_EncryptionAlgorithm: Combo
+ {
+ property = "AE3_Module_AddFile_EncryptionAlgorithm";
+ displayName = "$STR_AE3_Filesystem_Config_EncryptionAlgorithmDisplayName";
+ tooltip = "$STR_AE3_Filesystem_Config_EncryptionAlgorithmTooltip";
+ typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL"
+ // Default text filled in the input box
+ // Because it is an expression, to return a String one must have a string within a string
+ defaultValue = """caesar""";
+
+ // Listbox items:
+ class Values
+ {
+ class caesar { name = "caesar"; value = "caesar"; };
+ class columnar { name = "columnar"; value = "columnar"; };
+ };
+ };
+ class AE3_Module_AddFile_EncryptionKey: Edit
+ {
+ property = "AE3_Module_AddFile_EncryptionKey";
+ displayName = "$STR_AE3_Filesystem_Config_EncryptionKeyDisplayName";
+ tooltip = "$STR_AE3_Filesystem_Config_EncryptionKeyTooltip";
+ typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL"
+ // Default text filled in the input box
+ // Because it is an expression, to return a String one must have a string within a string
+ defaultValue = """13""";
+ };
class ModuleDescription: ModuleDescription{}; // Module description should be shown last
};
@@ -189,14 +228,15 @@ class CfgVehicles
{
// Standard object definitions
scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it.
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
displayName = "$STR_AE3_Filesystem_Config_AddDirDisplayName"; // Name displayed in the menu
icon = "\z\ae3\addons\filesystem\ui\AE3_Module_Icons_addDir.paa"; // Map icon. Delete this entry to use the default icon
- category = "AE3_armaosModules";
+ category = "AE3_filesystemModules";
// Name of function triggered once conditions are met
- function = "AE3_filesystem_fnc_moduleAddDir";
+ function = "AE3_filesystem_fnc_module_addDir";
// Execution priority, modules with lower number are executed first. 0 is used when the attribute is undefined
- functionPriority = 1;
+ functionPriority = 2;
// 0 for server only execution, 1 for global execution, 2 for persistent global execution
isGlobal = 1;
// 1 for module waiting until all synced triggers are activated
@@ -207,7 +247,7 @@ class CfgVehicles
is3DEN = 0;
// Menu displayed when the module is placed or double-clicked on by Zeus
- curatorInfoType = "RscDisplayAttributeModuleFilesystem";
+ curatorInfoType = "AE3_UserInterface_Zeus_Module_AddDir";
// Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific
class Attributes: AttributesBase
diff --git a/addons/filesystem/XEH_PREP.hpp b/addons/filesystem/XEH_PREP.hpp
index c0f5a247..0f4765b0 100644
--- a/addons/filesystem/XEH_PREP.hpp
+++ b/addons/filesystem/XEH_PREP.hpp
@@ -1,6 +1,10 @@
+/* Device Functions */
+PREP(device_addFile);
+PREP(device_addDir);
+
/* Module Functions */
-PREP(moduleAddFile);
-PREP(moduleAddDir);
+PREP(module_addFile);
+PREP(module_addDir);
/* Base Functions */
PREP(initFilesystem);
diff --git a/addons/filesystem/config.cpp b/addons/filesystem/config.cpp
index 44064422..434344c6 100644
--- a/addons/filesystem/config.cpp
+++ b/addons/filesystem/config.cpp
@@ -5,7 +5,7 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {"AE3_AddFile"};
+ units[] = { "AE3_AddFile", "AE3_AddDir" };
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main"};
@@ -15,7 +15,6 @@ class CfgPatches
};
#include "CfgEventHandlers.hpp"
-#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"
#include "Cfg3DEN.hpp"
diff --git a/addons/filesystem/functions/fnc_chdir.sqf b/addons/filesystem/functions/fnc_chdir.sqf
index d5f18f63..9be23e65 100644
--- a/addons/filesystem/functions/fnc_chdir.sqf
+++ b/addons/filesystem/functions/fnc_chdir.sqf
@@ -48,7 +48,8 @@ if (_target find "/" == 0) then
if (count _path == 0) exitWith {[_pointer, _current]};
{
- _iteration = [_pointer, _current, _filesystem, _create, _user, _owner, _permissions, _path] call {
+ _iteration = [_pointer, _current, _filesystem, _create, _user, _owner, _permissions, _path] call
+ {
params['_pointer', '_current', '_filesystem', '_create', '_user', '_owner', '_permissions', '_path'];
if (_x isEqualTo ".") exitWith
@@ -101,17 +102,7 @@ if (count _path == 0) exitWith {[_pointer, _current]};
{
if(!_create) throw (format [localize "STR_AE3_Filesystem_Exception_NotFoundInDir", _x, "/" + (_pointer joinString "/")]);
- //Set R-Permissions as X-Permissions, so a newly created folder with a R-Only-File could be entered
- private _rOwner = (_permissions select 0) select 1;
- private _rOthers = (_permissions select 1) select 1;
- private _ownerPerms = +(_permissions select 0);
- private _othersPerms = +(_permissions select 1);
- _ownerPerms set [0, _rOwner];
- _othersPerms set [0, _rOthers];
- private _modifiedPerms = [_ownerPerms, _othersPerms];
-
- (_current select 0) set [_x, [createHashMap, _owner, _modifiedPerms]];
-
+ (_current select 0) set [_x, [createHashMap, _owner, _permissions]];
};
if(typeName (((_current select 0) get _x) select 0) != "HASHMAP") throw (format [localize "STR_AE3_Filesystem_Exception_IsNotADir", _x]);
@@ -121,10 +112,10 @@ if (count _path == 0) exitWith {[_pointer, _current]};
[_current, _pointer];
};
+
_current = _iteration select 0;
_pointer = _iteration select 1;
}forEach _path;
-
[_pointer, _current];
\ No newline at end of file
diff --git a/addons/filesystem/functions/fnc_createDir.sqf b/addons/filesystem/functions/fnc_createDir.sqf
index 83504c99..57446078 100644
--- a/addons/filesystem/functions/fnc_createDir.sqf
+++ b/addons/filesystem/functions/fnc_createDir.sqf
@@ -18,7 +18,17 @@
params['_pntr', '_filesystem', '_target', '_user', '_owner', ['_permissions', [[true, true, true], [false, false, false]]]];
-private _dir = [_pntr, _filesystem, _target, _user, true] call AE3_filesystem_fnc_getParentDir;
+// allow "x" and "r" on parent folder if directory has "r", "w" or "x"
+private _parentDirPermissions = +_permissions;
+{
+ if ((_x select 0) || (_x select 1) || (_x select 2)) then
+ {
+ _x set [0, true];
+ _x set [1, true];
+ };
+} forEach _parentDirPermissions;
+
+private _dir = [_pntr, _filesystem, _target, _user, true, _owner, _parentDirPermissions] call AE3_filesystem_fnc_getParentDir;
private _current = _dir select 1;
private _new = _dir select 2;
@@ -26,7 +36,8 @@ private _new = _dir select 2;
[_current, _user, 2] call AE3_filesystem_fnc_hasPermission;
_current = _current select 0;
-if(_new in _current) then {
+if(_new in _current) then
+{
throw format [localize "STR_AE3_Filesystem_Exception_AlreadyExists", _new];
};
diff --git a/addons/filesystem/functions/fnc_createFile.sqf b/addons/filesystem/functions/fnc_createFile.sqf
index b2b703f5..96e7435b 100644
--- a/addons/filesystem/functions/fnc_createFile.sqf
+++ b/addons/filesystem/functions/fnc_createFile.sqf
@@ -19,7 +19,17 @@
params['_pntr', '_filesystem', '_target', '_content', '_user', '_owner', ['_permissions', [[false, true, true], [false, false, false]]]];
-private _dir = [_pntr, _filesystem, _target, _user, true, _owner, _permissions] call AE3_filesystem_fnc_getParentDir;
+// allow "x" and "r" on parent folder if file has "r", "w" or "x"
+private _parentDirPermissions = +_permissions;
+{
+ if ((_x select 0) || (_x select 1) || (_x select 2)) then
+ {
+ _x set [0, true];
+ _x set [1, true];
+ };
+} forEach _parentDirPermissions;
+
+private _dir = [_pntr, _filesystem, _target, _user, true, _owner, _parentDirPermissions] call AE3_filesystem_fnc_getParentDir;
private _current = _dir select 1;
private _new = _dir select 2;
@@ -27,7 +37,8 @@ private _new = _dir select 2;
[_current, _user, 2] call AE3_filesystem_fnc_hasPermission;
_current = _current select 0;
-if(_new in _current) then {
+if(_new in _current) then
+{
throw format [localize "STR_AE3_Filesystem_Exception_AlreadyExists", _new];
};
diff --git a/addons/filesystem/functions/fnc_device_addDir.sqf b/addons/filesystem/functions/fnc_device_addDir.sqf
new file mode 100644
index 00000000..19ef7fd9
--- /dev/null
+++ b/addons/filesystem/functions/fnc_device_addDir.sqf
@@ -0,0 +1,57 @@
+/**
+ * PUBLIC
+ *
+ * Adds a directory to a given Device. Device could be a comupter or a flash drive.
+ * Logs and displays an error message if dir already exists; On other errors it throws an exception.
+ * Needs to run on server.
+ *
+ * Arguments:
+ * 1: Device
+ * 2: Path
+ * 3: Owner
+ * 4: Permissions <[ARRAY]>
+ *
+ * Results:
+ * none
+ *
+ * Example:
+ * [_device, "/tmp/new", "root", [[true, true, true], [true, true, true]]] call AE3_filesystem_fnc_device_addDir;
+ *
+ *
+ * Permissions:
+ * [[owner execute, owner read, owner write], [everyone execute, everyone read, everyone write]]
+ */
+
+params ["_device", "_path", "_owner", "_permissions"];
+
+if (!isServer) exitWith {};
+
+private _filesystem = _device getVariable "AE3_filesystem";
+
+// throws exception if directory already exists
+try
+{
+ [
+ [],
+ _filesystem,
+ _path,
+ "root",
+ _owner,
+ _permissions
+ ] call AE3_filesystem_fnc_createDir;
+}
+catch
+{
+ private _normalizedException = _exception regexReplace ["'(.+)'", "'%1'"];
+ if (_normalizedException isEqualTo (localize "STR_AE3_Filesystem_Exception_AlreadyExists")) then
+ {
+ diag_log format ["AE3 exception: %1", _exception];
+ ["AE3 exception: %1", _exception] call BIS_fnc_error;
+ }
+ else
+ {
+ throw _exception;
+ };
+};
+
+_device setVariable ["AE3_filesystem", _filesystem];
\ No newline at end of file
diff --git a/addons/filesystem/functions/fnc_device_addFile.sqf b/addons/filesystem/functions/fnc_device_addFile.sqf
new file mode 100644
index 00000000..21bc0f0f
--- /dev/null
+++ b/addons/filesystem/functions/fnc_device_addFile.sqf
@@ -0,0 +1,119 @@
+/**
+ * PUBLIC
+ *
+ * Adds a file to a given Device. Device could be a comupter or a flash drive.
+ * Logs and displays an error message if file already exists; On other errors it throws an exception.
+ * Needs to run on server.
+ *
+ * Arguments:
+ * 1: Device
+ * 2: Path
+ * 3: Content
+ * 4: isCode
+ * 5: Owner
+ * 6: Permissions <[ARRAY]>
+ * 7: isEncrypted Optional
+ * 8: encryptionAlgorithm Optional
+ * 9: encryptionKey Optional
+ *
+ * Results:
+ * none
+ *
+ * Examples:
+ * [_device, "/tmp/new/example.txt", "Lorem ipsum dolor sit amet", false, "root", [[false, true, true], [false, true, true]]] call AE3_filesystem_fnc_device_addFile;
+ * [_device, "/test.prg", "hint 'hello world';", true, "root", [[true, false, false], [true, false, false]]] call AE3_filesystem_fnc_device_addFile;
+ * [_device, "/tmp/password.txt", "secret", false, "root", [[false, true, true], [false, true, true]], true, "caesar", "13"] call AE3_filesystem_fnc_device_addFile;
+ *
+ * Permissions:
+ * [[owner execute, owner read, owner write], [everyone execute, everyone read, everyone write]]
+ */
+
+params ["_computer", "_path", "_content", "_isCode", "_owner", "_permissions", ["_isEncrypted", false], ["_encryptionAlgorithm", nil], ["_encryptionKey", nil]];
+
+if (!isServer) exitWith {};
+
+private _filesystem = _computer getVariable "AE3_filesystem";
+
+if(_isCode) then
+{
+ _content = compile _content;
+};
+
+if (_isEncrypted) then
+{
+ private _mode = "encrypt";
+
+ private _crypto_fnc = {};
+
+ switch (_encryptionAlgorithm) do
+ {
+ case "caesar":
+ {
+ _crypto_fnc =
+ {
+ params ["_encryptionKey", "_mode", "_row"];
+
+ _encryptionKey = _encryptionKey call BIS_fnc_parseNumber; // needs a number
+ _encryptionKey = round _encryptionKey; // needs an integer
+ if (_encryptionKey < 1) then { _encryptionKey = 1; }; // needs to be >= 1
+ if (_encryptionKey > 25) then { _encryptionKey = 25; }; // needs to be <= 25
+
+ [_encryptionKey, _mode, _row] call AE3_armaos_fnc_encryption_caesar;
+ };
+ };
+ case "columnar":
+ {
+ _crypto_fnc =
+ {
+ params ["_encryptionKey", "_mode", "_row"];
+
+ _row = _row regexReplace [" ", "_"];
+
+ while {(count _encryptionKey) < 2 } do
+ {
+ _encryptionKey = _encryptionKey + "_"; // min. length 2
+ };
+
+ [_encryptionKey, _mode, _row] call AE3_armaos_fnc_encryption_columnar;
+ };
+ };
+ };
+
+ _content = _content splitString endl;
+
+ {
+ private _row = [_encryptionKey, _mode, _x] call _crypto_fnc;
+ _content set [_forEachIndex, _row];
+ } forEach _content;
+
+ _content = _content joinString endl;
+};
+
+// throws exception if file already exists
+try
+{
+ [
+ [],
+ _filesystem,
+ _path,
+ _content,
+ "root",
+ _owner,
+ _permissions
+ ] call AE3_filesystem_fnc_createFile;
+}
+catch
+{
+ private _normalizedException = _exception regexReplace ["'(.+)'", "'%1'"];
+ if (_normalizedException isEqualTo (localize "STR_AE3_Filesystem_Exception_AlreadyExists")) then
+ {
+ diag_log format ["AE3 exception: %1", _exception];
+ ["AE3 exception: %1", _exception] call BIS_fnc_error;
+ }
+ else
+ {
+ throw _exception;
+ };
+};
+
+_computer setVariable ["AE3_filesystem", _filesystem];
\ No newline at end of file
diff --git a/addons/filesystem/functions/fnc_moduleAddDir.sqf b/addons/filesystem/functions/fnc_moduleAddDir.sqf
deleted file mode 100644
index 205567ab..00000000
--- a/addons/filesystem/functions/fnc_moduleAddDir.sqf
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Adds a directory, configured via addDir module, to the filesystem of every synced object.
- *
- * Arguments:
- * 0: Module
- * 1: Synced Units []
- *
- * Results:
- * None
- */
-
-params ["_module", "_syncedUnits"];
-
-if(!isServer) exitWith {};
-
-private _syncedObjects = synchronizedObjects _module;
-
-private _path = _module getVariable ["AE3_Module_AddDir_Path", ""];
-private _owner = _module getVariable ["AE3_Module_AddDir_Owner", ""];
-private _permissions = [
- [
- _module getVariable "AE3_Module_AddDir_OwnerExecute",
- _module getVariable "AE3_Module_AddDir_OwnerRead",
- _module getVariable "AE3_Module_AddDir_OwnerWrite"
- ],
- [
- _module getVariable "AE3_Module_AddDir_EveryoneExecute",
- _module getVariable "AE3_Module_AddDir_EveryoneRead",
- _module getVariable "AE3_Module_AddDir_EveryoneWrite"
- ]
-];
-
-if(_path isEqualTo "") exitWith {};
-
-[_syncedObjects, _path, _owner, _permissions] spawn
-{
- params ["_syncedObjects", "_path", "_owner", "_permissions"];
-
- waitUntil { !isNil "BIS_fnc_init" };
-
- {
- _filesystem = _x getVariable "AE3_filesystem";
-
- // throws exception if directory already exists
- try
- {
- [
- [],
- _filesystem,
- _path,
- "root",
- _owner,
- _permissions
- ] call AE3_filesystem_fnc_createDir;
- }
- catch
- {
- private _normalizedException = _exception regexReplace ["'(.+)'", "'%1'"];
- if (_normalizedException isEqualTo (localize "STR_AE3_Filesystem_Exception_AlreadyExists")) then
- {
- diag_log format ["AE3 exception: %1", _exception];
- }
- else
- {
- throw _exception;
- };
- };
-
- _x setVariable ["AE3_filesystem", _filesystem];
- } forEach _syncedObjects;
-};
\ No newline at end of file
diff --git a/addons/filesystem/functions/fnc_moduleAddFile.sqf b/addons/filesystem/functions/fnc_moduleAddFile.sqf
deleted file mode 100644
index 4e5d00b8..00000000
--- a/addons/filesystem/functions/fnc_moduleAddFile.sqf
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Adds a file, configured via addFile module, to the filesystem of every synced object.
- *
- * Arguments:
- * 0: Module
- * 1: Synced Units []
- *
- * Results:
- * None
- */
-
-params ["_module", "_syncedUnits"];
-
-if(!isServer) exitWith {};
-
-private _syncedObjects = synchronizedObjects _module;
-
-private _path = _module getVariable ["AE3_Module_AddFile_Path", ""];
-private _content = _module getVariable ["AE3_Module_AddFile_Content", ""];
-private _isFunction = _module getVariable ["AE3_Module_AddFile_IsFunction", ""];
-private _owner = _module getVariable ["AE3_Module_AddFile_Owner", ""];
-private _permissions = [
- [
- _module getVariable "AE3_Module_AddFile_OwnerExecute",
- _module getVariable "AE3_Module_AddFile_OwnerRead",
- _module getVariable "AE3_Module_AddFile_OwnerWrite"
- ],
- [
- _module getVariable "AE3_Module_AddFile_EveryoneExecute",
- _module getVariable "AE3_Module_AddFile_EveryoneRead",
- _module getVariable "AE3_Module_AddFile_EveryoneWrite"
- ]
-];
-
-if(_path isEqualTo "") exitWith {};
-
-if(_isFunction) then
-{
- _content = compile _content;
-};
-
-[_syncedObjects, _path, _content, _owner, _permissions] spawn
-{
- params ["_syncedObjects", "_path", "_content", "_owner", "_permissions"];
-
- waitUntil { !isNil "BIS_fnc_init" };
-
- {
- _filesystem = _x getVariable "AE3_filesystem";
-
- // throws exception if file already exists
- try
- {
- [
- [],
- _filesystem,
- _path,
- _content,
- "root",
- _owner,
- _permissions
- ] call AE3_filesystem_fnc_createFile;
- }
- catch
- {
- private _normalizedException = _exception regexReplace ["'(.+)'", "'%1'"];
- if (_normalizedException isEqualTo (localize "STR_AE3_Filesystem_Exception_AlreadyExists")) then
- {
- diag_log format ["AE3 exception: %1", _exception];
- }
- else
- {
- throw _exception;
- };
- };
-
- _x setVariable ["AE3_filesystem", _filesystem];
- } forEach _syncedObjects;
-};
\ No newline at end of file
diff --git a/addons/filesystem/functions/fnc_module_addDir.sqf b/addons/filesystem/functions/fnc_module_addDir.sqf
new file mode 100644
index 00000000..af1b22e2
--- /dev/null
+++ b/addons/filesystem/functions/fnc_module_addDir.sqf
@@ -0,0 +1,66 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned in module config and will be triggered after mission start and if the module is placed by zeus on every computer.
+ * The function will only run on server and only if placed in eden editor. The module will be deleted after processing.
+ * The effect of this module applies to all syncted entities.
+ *
+ * Arguments:
+ * 1: Module
+ * 2: Synced Units <[OBJECT]>
+ * 3: Activated currently unused in this function
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_module", "_syncedUnits", "_activated"];
+
+// ignore this function if module is placed by curator/zeus
+if (_module getvariable ["BIS_fnc_moduleInit_isCuratorPlaced", false]) exitWith {};
+
+if(!isServer) exitWith {};
+
+if (_activated) then
+{
+ private _syncedObjects = synchronizedObjects _module;
+
+ private _path = _module getVariable ["AE3_Module_AddDir_Path", ""];
+ private _owner = _module getVariable ["AE3_Module_AddDir_Owner", ""];
+ private _permissions = [
+ [
+ _module getVariable "AE3_Module_AddDir_OwnerExecute",
+ _module getVariable "AE3_Module_AddDir_OwnerRead",
+ _module getVariable "AE3_Module_AddDir_OwnerWrite"
+ ],
+ [
+ _module getVariable "AE3_Module_AddDir_EveryoneExecute",
+ _module getVariable "AE3_Module_AddDir_EveryoneRead",
+ _module getVariable "AE3_Module_AddDir_EveryoneWrite"
+ ]
+ ];
+
+ // check for empty path, owner and encryption key
+ if (_path isEqualTo "") exitWith { deleteVehicle _module; false; };
+ if (_owner isEqualTo "") exitWith { deleteVehicle _module; false; };
+
+ // check for not allowed spaces in path and owner
+ if((_path find " ") != -1) exitWith { deleteVehicle _module; false; };
+ if((_owner find " ") != -1) exitWith { deleteVehicle _module; false; };
+
+ [_module, _syncedObjects, _path, _owner, _permissions] spawn
+ {
+ params ["_module", "_syncedObjects", "_path", "_owner", "_permissions"];
+
+ waitUntil { !isNil "BIS_fnc_init" };
+
+ {
+ [_x, _path, _owner, _permissions] call AE3_filesystem_fnc_device_addDir;
+ } forEach _syncedObjects;
+
+ deleteVehicle _module;
+ };
+};
+
+true;
\ No newline at end of file
diff --git a/addons/filesystem/functions/fnc_module_addFile.sqf b/addons/filesystem/functions/fnc_module_addFile.sqf
new file mode 100644
index 00000000..26bb7611
--- /dev/null
+++ b/addons/filesystem/functions/fnc_module_addFile.sqf
@@ -0,0 +1,72 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned in module config and will be triggered after mission start and if the module is placed by zeus on every computer.
+ * The function will only run on server and only if placed in eden editor. The module will be deleted after processing.
+ * The effect of this module applies to all syncted entities.
+ *
+ * Arguments:
+ * 1: Module
+ * 2: Synced Units <[OBJECT]>
+ * 3: Activated currently unused in this function
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_module", "_syncedUnits", "_activated"];
+
+// ignore this function if module is placed by curator/zeus
+if (_module getvariable ["BIS_fnc_moduleInit_isCuratorPlaced", false]) exitWith {};
+
+if (!isServer) exitWith {};
+
+if (_activated) then
+{
+ private _syncedObjects = synchronizedObjects _module;
+
+ private _path = _module getVariable ["AE3_Module_AddFile_Path", ""];
+ private _content = _module getVariable ["AE3_Module_AddFile_Content", ""];
+ private _isCode = _module getVariable ["AE3_Module_AddFile_IsCode", ""];
+ private _owner = _module getVariable ["AE3_Module_AddFile_Owner", ""];
+ private _permissions = [
+ [
+ _module getVariable "AE3_Module_AddFile_OwnerExecute",
+ _module getVariable "AE3_Module_AddFile_OwnerRead",
+ _module getVariable "AE3_Module_AddFile_OwnerWrite"
+ ],
+ [
+ _module getVariable "AE3_Module_AddFile_EveryoneExecute",
+ _module getVariable "AE3_Module_AddFile_EveryoneRead",
+ _module getVariable "AE3_Module_AddFile_EveryoneWrite"
+ ]
+ ];
+ private _isEncrypted = _module getVariable "AE3_Module_AddFile_IsEncrypted";
+ private _encryptionAlgorithm = _module getVariable "AE3_Module_AddFile_EncryptionAlgorithm";
+ private _encryptionKey = _module getVariable "AE3_Module_AddFile_EncryptionKey";
+
+ // check for empty path, owner and encryption key
+ if (_path isEqualTo "") exitWith { deleteVehicle _module; false; };
+ if (_owner isEqualTo "") exitWith { deleteVehicle _module; false; };
+ if (_encryptionKey isEqualTo "") exitWith { deleteVehicle _module; false; };
+
+ // check for not allowed spaces in path and owner
+ if((_path find " ") != -1) exitWith { deleteVehicle _module; false; };
+ if((_owner find " ") != -1) exitWith { deleteVehicle _module; false; };
+
+ [_module, _syncedObjects, _path, _content, _isCode, _owner, _permissions, _isEncrypted, _encryptionAlgorithm, _encryptionKey] spawn
+ {
+ params ["_module", "_syncedObjects", "_path", "_content", "_isCode", "_owner", "_permissions", "_isEncrypted", "_encryptionAlgorithm", "_encryptionKey"];
+
+ waitUntil { !isNil "BIS_fnc_init" };
+
+ {
+ [_x, _path, _content, _isCode, _owner, _permissions, _isEncrypted, _encryptionAlgorithm, _encryptionKey] call AE3_filesystem_fnc_device_addFile;
+ } forEach _syncedObjects;
+
+ deleteVehicle _module;
+ };
+};
+
+true;
\ No newline at end of file
diff --git a/addons/filesystem/stringtable.xml b/addons/filesystem/stringtable.xml
index f8a49284..1f2aac8b 100644
--- a/addons/filesystem/stringtable.xml
+++ b/addons/filesystem/stringtable.xml
@@ -9,6 +9,7 @@
'%1' 不是目录!
'%1' не является директорией!
'%1' n'est pas un répertoire!
+ '%1' non è una directory!
'%1' not found in '%2'!
@@ -17,6 +18,7 @@
在 '%2'中找不到 '%1' !
'%1' не найден в '%2'!
'%1' introuvable dans '%2'!
+ '%1' non trovato in '%2'!
'%1' already exists!
@@ -25,6 +27,7 @@
'%1' 已存在!
'%1' уже существует!
'%1' existe déjà!
+ '%1' esiste già!
'%1' not found!
@@ -33,6 +36,7 @@
找不到 %1' !
'%1' не найден!
'%1' introuvable!
+ '%1' non trovato!
Missing permissions
@@ -41,6 +45,7 @@
缺少权限
недостаточно прав
Permissions manquantes
+ Permessi mancanti
Invalid directory
@@ -49,6 +54,7 @@
无效目录
Invalid directory
Répertoire invalide
+ directory non valida
@@ -59,6 +65,7 @@
AE3添加文件
AE3 Add File
AE3 Ajouter un fichier
+ AE3 Aggiungi files
Path
@@ -67,6 +74,7 @@
路径
Путь
Chemin d'accès
+ Percorso
Path and Name of Filesystem Object (File), for example /tmp/new/example.txt
@@ -75,6 +83,7 @@
文件系统对象(文件)的路径和名称,例如
Путь и имя объекта файловой системы (файла), например /tmp/new/example.txt
Chemin d'accès et nom de l'objet du système de fichiers (fichier), par exemple /tmp/new/example.txt
+ Percorso e nome del Filesystem Object (File), per esempio /tmp/new/example.txt
File content
@@ -83,6 +92,7 @@
文件内容
Содержимое файла
Contenu du fichier
+ Contenuto del file
Content of Filesystem Object, like text note oder path to image
@@ -91,6 +101,7 @@
文件系统对象内容,如文本注释或图像路径
Содержимое объекта файловой системы, например текстовое примечание или путь к изображению.
Contenu de l'objet du système de fichiers, comme une note textuelle ou un chemin d'accès vers l'image
+ Contenuto del Filesystem Object, come test note ordine percorso all'immagine
Is code?
@@ -99,6 +110,7 @@
是否为代码?
Это код?
Est du code?
+ E' code?
If the file content is a function or code which can be executed from terminal
@@ -107,6 +119,61 @@
如果文件内容是可以从终端执行的函数或代码
Если содержимое файла представляет собой функцию или код, который можно выполнить с терминала
Si le contenu du fichier est une fonction ou un code exécutable depuis le terminal
+ Se il contenuto del file è una funzione o codice che può essere eseguito dal terminale
+
+
+ Enable Encryption
+ Enable Encryption
+ Aktiviere Verschlüsselung
+ 启用加密
+ Enable Encryption
+ Activer le chiffrement
+ Ebilitare Criptazione
+
+
+ File content will be encrypted on mission start
+ File content will be encrypted on mission start
+ Dateiinhalt wird beim Missionsstart verschlüsselt
+ 文件内容将在任务开始时加密
+ File content will be encrypted on mission start
+ Le contenu du fichier sera crypté au début de la mission
+ Il contenuto del file verrà cryptato quando la missione si avvvia
+
+
+ Encryption Algorithm
+ Encryption Algorithm
+ Verschlüsselungsalorithmus
+ 加密算法
+ Encryption Algorithm
+ Algorithme de chiffrement
+ Alògoritmo di Criptazione
+
+
+ The available characters for your message depend on the chosen encryption algorithm.
+ The available characters for your message depend on the chosen encryption algorithm.
+ Die verfügbaren Zeichen für deine Nachricht hängen vom gewählten Verschlüsselungsalogithmus ab.
+ 信息的可见字符取决于你所选择的加密算法.
+ The available characters for your message depend on the chosen encryption algorithm.
+ Les caractères disponibles pour votre message dépendent de l'algorithme de chiffrement choisi.
+ I caratteri disponibili per il tuo messaggio dipendono dal tipo di criptazione avete scelto.
+
+
+ Encryption Key
+ Encryption Key
+ Verschlüsselungsschlüssel
+ 密钥
+ Encryption Key
+ Clé de chiffrement
+ Chiave criptazione
+
+
+ caesar: only use numeric keys between 1 and 25 || columnar: minimal key length 2
+ caesar: only use numeric keys between 1 and 25 || columnar: minimal key length 2
+ caesar: nur numerische Schlüssel zwischen 1 und 25 || columnar: minimale Schlüssellänge 2
+ 凯撒密码: 只能使用1到25之间的数字密钥 || 列移位密码: 密钥的最小长度为2
+ caesar: only use numeric keys between 1 and 25 || columnar: minimal key length 2
+ césar : utilisez uniquement les touches numériques comprises entre 1 et 25 || colonnaire : longueur de clé minimale 2
+ caesar: Usa solo numeri tra 1 e 25 || columnar: lunghezza minima 2
File owner
@@ -115,6 +182,7 @@
文件所有者
Владелец файла
Propriétaire du fichier
+ Proprietario file
Owner of the file
@@ -123,6 +191,7 @@
文件所有者
Владелец файла
Propriétaire du fichier
+ Proprietario del file
Can be executed by the owner
@@ -131,6 +200,7 @@
所有者可运行
Может быть выполнен владельцем
Peut être exécuté par le propriétaire
+ Può essere eseguito dal proprietario
Can be executed by the owner
@@ -139,6 +209,7 @@
所有者可运行
Может быть выполнен владельцем
Peut être exécuté par le propriétaire
+ Può essere eseguito dal proprietario
Can be read by the owner
@@ -147,6 +218,7 @@
所有者可读取
Может просматриваться только владельцем
Peut être lu par le propriétaire
+ Può essere letto dal proprietario
Can be read by the owner
@@ -155,6 +227,7 @@
所有者可读取
Может просматриваться только владельцем
Peut être lu par le propriétaire
+ Può essere letto dal proprietario
Can be modified by the owner
@@ -163,6 +236,7 @@
所有者可修改
Может изменяться владельцем
Peut être modifié par le propriétaire
+ Può essere modificato dal proprietario
Can be modified by the owner
@@ -171,6 +245,7 @@
所有者可修改
Может изменяться владельцем
Peut être modifié par le propriétaire
+ Può essere modificato dal proprietario
Can be executed by everyone
@@ -179,6 +254,7 @@
任何人可运行
Может быть выполнен всеми
Peut être exécuté par tout le monde
+ Può essere eseguito da chiunque
Can be executed by everyone
@@ -187,6 +263,7 @@
任何人可运行
Может быть выполнен всеми
Peut être exécuté par tout le monde
+ Può essere eseguito da chiunque
Can be read by everyone
@@ -195,6 +272,7 @@
任何人可读取
Может просматриваться всеми
Peut être lu par tout le monde
+ Può essere letto da chiunque
Can be read by everyone
@@ -203,6 +281,7 @@
任何人可读取
Может просматриваться всеми
Peut être lu par tout le monde
+ Può essere letto da chiunque
Can be modified by everyone
@@ -211,6 +290,7 @@
任何人可修改
Может модифицироваться всеми
Peut être modifié par tout le monde
+ Può essere modificato da chiuqnue
Can be modified by everyone
@@ -219,6 +299,7 @@
任何人可修改
Может модифицироваться всеми
Peut être modifié par tout le monde
+ Può essere modificato da chiunque
This module adds a file to a object which supports filesystems, like computers. Simply sync one or more of these modules to a supported object.
@@ -227,6 +308,7 @@
此模块将文件添加到支持文件系统的对象(如计算机). 只需一个或多个此模块同步到支持的对象.
Этот модуль добавляет файл к объекту, который поддерживает файловую систему (например компьютер). Просто синхронизируйте один или несколько этих модулей с поддерживаем объектом
Ce module ajoute un fichier à un objet qui prend en charge les systèmes de fichiers, comme les ordinateurs. Synchronisez simplement un ou plusieurs de ces modules avec un objet pris en charge.
+ Questo modulo aggiunge un file o un oggetto che supporta filesystem, come computers. Semplicemente sincronizza uno o più di questi moduli a un oggetto supportato.
AE3 Add Directory
@@ -235,6 +317,7 @@
AE3添加目录
AE3 Add Directory
AE3 Ajouter un répertoire
+ AE3 Aggiungi Directory
Path
@@ -243,6 +326,7 @@
路径
Путь
Chemin d'accès
+ Percorso
Path of Filesystem Object (Directory), for example /tmp/new
@@ -251,6 +335,7 @@
文件系统对象(目录)的路径, 例如/tmp/new
Путь к объекту файловой системы (директории), например /tmp/new
Chemin de l'objet du système de fichiers (répertoire), par exemple /tmp/new
+ Percorso del Filesystem(Directory), per esempio /tmp/new
Directory owner
@@ -259,6 +344,7 @@
目录所有者
Владелец директории
Propriétaire du répertoire
+ proprietario directory
Owner of the directory
@@ -267,6 +353,7 @@
目录所有者
Владелец директории
Propriétaire du répertoire
+ Proprietario della directory
This module adds a directory to a object which supports filesystems, like computers. Simply sync one or more of these modules to a supported object.
@@ -275,14 +362,7 @@
此模块将目录添加到支持文件系统的对象(如计算机). 只需一个或多个此模块同步到支持的对象.
Этот модуль добавляет директорию к объекту, который поддерживает файловую систему (например компьютер). Просто синхронизируйте один или несколько этих модулей с поддерживаем объектом
Ce module ajoute un répertoire à un objet qui prend en charge les systèmes de fichiers, comme les ordinateurs. Synchronisez simplement un ou plusieurs de ces modules avec un objet pris en charge.
-
-
- AE3 armaOS Modules
- AE3 armaOS Modules
- AE3 armaOS Module
- AE3 armaOS 模块
- AE3 armaOS Modules
- AE3 armaOS Modules
+ Questo modulo aggiunge una directory ad un oggetto che supporta i filesystems, come i computer. Semplicemente sincronizzare uno o più di questi moduli ad un oggetto supportato.
diff --git a/addons/flashdrive/CfgVehicles.hpp b/addons/flashdrive/CfgVehicles.hpp
index 051137ef..83c353b7 100644
--- a/addons/flashdrive/CfgVehicles.hpp
+++ b/addons/flashdrive/CfgVehicles.hpp
@@ -5,7 +5,12 @@ class CfgVehicles
class Land_USB_Dongle_01_F;
class Land_USB_Dongle_01_F_AE3: Land_USB_Dongle_01_F
{
- scope=2;
+ scope = 2;
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+ scopeArsenal = 2; // Virtual Arsenal visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
ae3_item = Item_FlashDisk_AE3;
class EventHandlers
diff --git a/addons/flashdrive/XEH_preInit.sqf b/addons/flashdrive/XEH_preInit.sqf
index a41a861b..7dfe2a79 100644
--- a/addons/flashdrive/XEH_preInit.sqf
+++ b/addons/flashdrive/XEH_preInit.sqf
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
-["All", "init", {_this call AE3_flashdrive_fnc_compileDevice}] call CBA_fnc_addClassEventHandler;
\ No newline at end of file
+["All", "InitPost", {_this call AE3_flashdrive_fnc_compileDevice}] call CBA_fnc_addClassEventHandler;
\ No newline at end of file
diff --git a/addons/flashdrive/config.cpp b/addons/flashdrive/config.cpp
index 566b6d09..40945548 100644
--- a/addons/flashdrive/config.cpp
+++ b/addons/flashdrive/config.cpp
@@ -5,10 +5,10 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {};
+ units[] = { "Land_USB_Dongle_01_F_AE3" };
weapons[] = {RADIO_WEAPON_LIST_STR(Item_FlashDisk_AE3)};
requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main"};
+ requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main", "ae3_armaos", "ae3_filesystem"};
author = "y0014984|Wasserstoff";
VERSION_CONFIG;
};
diff --git a/addons/flashdrive/stringtable.xml b/addons/flashdrive/stringtable.xml
index 5e70c894..f329eb45 100644
--- a/addons/flashdrive/stringtable.xml
+++ b/addons/flashdrive/stringtable.xml
@@ -6,9 +6,10 @@
Connect Flash Drive
Connect Flash Drive
USB Stick verbinden
- 连接闪盘驱动器
+ 连接U盘驱动器
Подключить флэш накопитель
Connecter la clé USB
+ Connetti la chiavetta USB
Take
@@ -17,6 +18,7 @@
拿取
Взять
Prendre
+ Prendi
@@ -27,6 +29,7 @@
接口未推出!
Интерфейс не существует
L'interface n'existe pas!
+ L'interfaccia non esiste!
Interface is empty!
@@ -35,6 +38,7 @@
接口为空!
Интерфейс пуст
L'interface est vide !
+ L'interfaccia è vuota!
@@ -42,25 +46,28 @@
Flash drive
Flash drive
Flash drive
- 闪盘驱动器
+ U盘驱动器
Флэш накопитель
Clé usb
+ Chiavetta USB
Flash drive
Flash drive
Flash Drive
- 闪盘驱动器
+ U盘驱动器
Флэш накопитель
Clé usb
+ Chiavetta USB
AE3: Pick up flash drive
AE3: Pick up flash drive
AE3: Flash Drive aufnehmen
- AE3: 拾取闪盘驱动器
+ AE3: 拾取U盘驱动器
AE3: Подобрать лэш накопитель
AE3: Prendre une clé USB
+ AE3: prendi la Chiavetta USB
diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp
index 41d4cae0..e2407000 100644
--- a/addons/interaction/CfgVehicles.hpp
+++ b/addons/interaction/CfgVehicles.hpp
@@ -5,6 +5,12 @@ class CfgVehicles
class Land_PortableLight_single_F;
class Land_PortableLight_single_F_AE3: Land_PortableLight_single_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
init = "params['_entity']; [_entity] call AE3_interaction_fnc_initLamp;";
@@ -57,6 +63,12 @@ class CfgVehicles
class Land_PortableLight_double_F;
class Land_PortableLight_double_F_AE3: Land_PortableLight_double_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
init = "params['_entity']; [_entity] call AE3_interaction_fnc_initLamp;";
@@ -111,6 +123,12 @@ class CfgVehicles
class Land_PortableLight_02_single_yellow_F;
class Land_PortableLight_02_single_yellow_F_AE3: Land_PortableLight_02_single_yellow_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -189,9 +207,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -201,6 +220,12 @@ class CfgVehicles
class Land_PortableLight_02_single_olive_F;
class Land_PortableLight_02_single_olive_F_AE3: Land_PortableLight_02_single_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -279,9 +304,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -291,6 +317,12 @@ class CfgVehicles
class Land_PortableLight_02_single_black_F;
class Land_PortableLight_02_single_black_F_AE3: Land_PortableLight_02_single_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -369,9 +401,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -381,6 +414,12 @@ class CfgVehicles
class Land_PortableLight_02_single_sand_F;
class Land_PortableLight_02_single_sand_F_AE3: Land_PortableLight_02_single_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -459,9 +498,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -471,6 +511,12 @@ class CfgVehicles
class Land_PortableLight_02_double_yellow_F;
class Land_PortableLight_02_double_yellow_F_AE3: Land_PortableLight_02_double_yellow_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -582,9 +628,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -594,6 +641,12 @@ class CfgVehicles
class Land_PortableLight_02_double_olive_F;
class Land_PortableLight_02_double_olive_F_AE3: Land_PortableLight_02_double_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -705,9 +758,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -717,6 +771,12 @@ class CfgVehicles
class Land_PortableLight_02_double_black_F;
class Land_PortableLight_02_double_black_F_AE3: Land_PortableLight_02_double_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -828,9 +888,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -840,6 +901,12 @@ class CfgVehicles
class Land_PortableLight_02_double_sand_F;
class Land_PortableLight_02_double_sand_F_AE3: Land_PortableLight_02_double_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -951,9 +1018,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -963,6 +1031,12 @@ class CfgVehicles
class Land_PortableLight_02_quad_yellow_F;
class Land_PortableLight_02_quad_yellow_F_AE3: Land_PortableLight_02_quad_yellow_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -1140,9 +1214,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -1152,6 +1227,12 @@ class CfgVehicles
class Land_PortableLight_02_quad_olive_F;
class Land_PortableLight_02_quad_olive_F_AE3: Land_PortableLight_02_quad_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -1329,9 +1410,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -1341,6 +1423,12 @@ class CfgVehicles
class Land_PortableLight_02_quad_black_F;
class Land_PortableLight_02_quad_black_F_AE3: Land_PortableLight_02_quad_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -1518,9 +1606,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -1530,6 +1619,12 @@ class CfgVehicles
class Land_PortableLight_02_quad_sand_F;
class Land_PortableLight_02_quad_sand_F_AE3: Land_PortableLight_02_quad_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_LampDisplayName";
@@ -1707,9 +1802,10 @@ class CfgVehicles
};
};
+ // Workaround: The CBA XEH Class Event Handler does not work for this class
class EventHandlers
{
- init = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
+ postInit = "_this call AE3_interaction_fnc_compileEquipment; _this call AE3_power_fnc_compileDevice;";
};
};
@@ -1719,6 +1815,12 @@ class CfgVehicles
class Land_PortableDesk_01_olive_F;
class Land_PortableDesk_01_olive_F_AE3: Land_PortableDesk_01_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_DeskDisplayName";
@@ -1848,6 +1950,12 @@ class CfgVehicles
class Land_PortableDesk_01_black_F;
class Land_PortableDesk_01_black_F_AE3: Land_PortableDesk_01_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_DeskDisplayName";
@@ -1977,6 +2085,12 @@ class CfgVehicles
class Land_PortableDesk_01_sand_F;
class Land_PortableDesk_01_sand_F_AE3: Land_PortableDesk_01_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Equipment
{
displayName = "$STR_AE3_Interaction_Config_DeskDisplayName";
@@ -2105,6 +2219,10 @@ class CfgVehicles
class Land_DeskChair_01_olive_F;
class Land_DeskChair_01_olive_F_AE3: Land_DeskChair_01_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
//Sitting
acex_sitting_canSit = 1; // Enable sitting
acex_sitting_interactPosition[] = {0, 0, 0.3};
@@ -2137,6 +2255,10 @@ class CfgVehicles
class Land_DeskChair_01_black_F;
class Land_DeskChair_01_black_F_AE3: Land_DeskChair_01_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
//Sitting
acex_sitting_canSit = 1; // Enable sitting
acex_sitting_interactPosition[] = {0, 0, 0.3};
@@ -2169,6 +2291,10 @@ class CfgVehicles
class Land_DeskChair_01_sand_F;
class Land_DeskChair_01_sand_F_AE3: Land_DeskChair_01_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
//Sitting
acex_sitting_canSit = 1; // Enable sitting
acex_sitting_interactPosition[] = {0, 0, 0.3};
diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf
index 1c1b8d8f..f28ff0c9 100644
--- a/addons/interaction/XEH_preInit.sqf
+++ b/addons/interaction/XEH_preInit.sqf
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
-["All", "init", {_this call AE3_interaction_fnc_compileEquipment}] call CBA_fnc_addClassEventHandler;
\ No newline at end of file
+["All", "InitPost", {_this call AE3_interaction_fnc_compileEquipment}] call CBA_fnc_addClassEventHandler;
\ No newline at end of file
diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp
index 9c425906..0ecbffdc 100644
--- a/addons/interaction/config.cpp
+++ b/addons/interaction/config.cpp
@@ -5,7 +5,29 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {};
+ units[] =
+ {
+ "Land_PortableLight_single_F_AE3",
+ "Land_PortableLight_double_F_AE3",
+ "Land_PortableLight_02_single_yellow_F_AE3",
+ "Land_PortableLight_02_single_olive_F_AE3",
+ "Land_PortableLight_02_single_black_F_AE3",
+ "Land_PortableLight_02_single_sand_F_AE3",
+ "Land_PortableLight_02_double_yellow_F_AE3",
+ "Land_PortableLight_02_double_olive_F_AE3",
+ "Land_PortableLight_02_double_black_F_AE3",
+ "Land_PortableLight_02_double_sand_F_AE3",
+ "Land_PortableLight_02_quad_yellow_F_AE3",
+ "Land_PortableLight_02_quad_olive_F_AE3",
+ "Land_PortableLight_02_quad_black_F_AE3",
+ "Land_PortableLight_02_quad_sand_F_AE3",
+ "Land_PortableDesk_01_olive_F_AE3",
+ "Land_PortableDesk_01_black_F_AE3",
+ "Land_PortableDesk_01_sand_F_AE3",
+ "Land_DeskChair_01_olive_F_AE3",
+ "Land_DeskChair_01_black_F_AE3",
+ "Land_DeskChair_01_sand_F_AE3"
+ };
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main", "ae3_power"};
diff --git a/addons/interaction/functions/fnc_initDesk.sqf b/addons/interaction/functions/fnc_initDesk.sqf
index 902fd1bf..683ad85b 100644
--- a/addons/interaction/functions/fnc_initDesk.sqf
+++ b/addons/interaction/functions/fnc_initDesk.sqf
@@ -17,4 +17,12 @@ if (_desk getVariable "AE3_interaction_closeState" == 1) then
else
{
[_desk] call (_desk getVariable "AE3_interaction_fnc_open");
-};
\ No newline at end of file
+};
+
+// Workaround to know in Zeus UI if the asset initialized completely.
+// The desk is currently the only asset that has Zeus UI but no power functions.
+// TODO: We should introduce a mechanism that allows to determine easily, if an asset is
+// initalized by all modules ort not.
+// See this issue: https://github.com/y0014984/Advanced-Equipment/issues/367
+
+_desk setVariable ["AE3_power_hasInternal", false];
\ No newline at end of file
diff --git a/addons/interaction/functions/fnc_initLaptop.sqf b/addons/interaction/functions/fnc_initLaptop.sqf
index 06570975..7c75ac8a 100644
--- a/addons/interaction/functions/fnc_initLaptop.sqf
+++ b/addons/interaction/functions/fnc_initLaptop.sqf
@@ -30,7 +30,7 @@ if(!isDedicated) then
private _useAction =
[
"AE3_UseAction", // internal name
- localize "STR_AE3_ArmaOS_Config_UseDisplayName", // visable name
+ localize "STR_AE3_ArmaOS_Config_UseDisplayName", // visible name
"", // icon
{
// statement
diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml
index 10dd9a69..990ff18a 100644
--- a/addons/interaction/stringtable.xml
+++ b/addons/interaction/stringtable.xml
@@ -9,6 +9,7 @@
打开
Открыть
Ouvrir
+ Apri
Close
@@ -17,6 +18,7 @@
关闭
Закрыть
Fermer
+ Chiudi
Exit interaction
@@ -25,6 +27,7 @@
退出交互
Завершить взаимодействие
Quitter l'interaction
+ Interazione Uscita
@@ -35,6 +38,7 @@
灯
Лампа
Lampe
+ Lampada
lamp 1
@@ -43,6 +47,7 @@
灯1
Лампа 1
lampe 1
+ Lampada 1
extend lamp 1
@@ -51,6 +56,7 @@
展开灯1
Выдвинуть лампу 1
déployer lampe 1
+ Estendi lampada 1
pitch lamp 1
@@ -59,6 +65,7 @@
倾斜灯1
Наклонить лампу 1
Basculer lampe 1
+ Inclina lampada 1
yaw lamp 1
@@ -67,6 +74,7 @@
偏转灯1
Повернуть лампу 1
Tourner lampe 1
+ Ruota lampada 1
lamp 2
@@ -75,6 +83,7 @@
灯2
Лампа 2
lampe 2
+ lampada 2
extend lamp 2
@@ -83,6 +92,7 @@
展开灯2
Выдвинуть лампу 2
déployer lampe 2
+ Estendi lampada 2
pitch lamp 2
@@ -91,6 +101,7 @@
倾斜灯2
Наклонить лампу 2
Basculer lampe 2
+ inclina lampada 2
yaw lamp 2
@@ -99,6 +110,7 @@
偏转灯2
Повернуть лампу 2
Tourner lampe 2
+ Ruota lampada 2
lamp 3
@@ -107,6 +119,7 @@
灯3
Лампа 3
lampe 3
+ Lampada 3
extend lamp 3
@@ -115,6 +128,7 @@
展开灯3
Выдвинуть лампу 3
Déployer lampe 3
+ Estendi lampada 3
pitch lamp 3
@@ -123,6 +137,7 @@
倾斜灯3
Наклонить лампу 3
Basculer lampe 3
+ Inclina lampada 3
yaw lamp 3
@@ -131,6 +146,7 @@
偏转灯3
Повернуть лампу 3
Tourner lampe 3
+ Ruota lampada 3
lamp 4
@@ -139,6 +155,7 @@
灯4
Лампа 4
lampe 4
+ Lampada 4
extend lamp 4
@@ -147,6 +164,7 @@
展开灯4
Выдвинуть лампу 4
Déployer lampe 4
+ Estendi lampada 4
pitch lamp 4
@@ -155,6 +173,7 @@
倾斜灯4
Наклонить лампу 4
Basculer lampe 4
+ Inclina lampada 4
yaw lamp 4
@@ -163,6 +182,7 @@
偏转灯4
Повернуть лампу 4
Tourner lampe 4
+ Ruota lampada 4
desk
@@ -171,6 +191,7 @@
桌子
Стол
bureau
+ Scrivania
Black
@@ -179,6 +200,7 @@
黑色
Black
Noir
+ Nero
Olive
@@ -187,6 +209,7 @@
橄榄色
Olive
Olive
+ Oliva
Yellow
@@ -195,6 +218,7 @@
黄色
Yellow
Jaune
+ Giallo
Sand
@@ -203,6 +227,7 @@
沙色
Sand
Sable
+ Sabbia
diff --git a/addons/main/Cfg3DEN.hpp b/addons/main/Cfg3DEN.hpp
index ca55ddbe..fe61a25b 100644
--- a/addons/main/Cfg3DEN.hpp
+++ b/addons/main/Cfg3DEN.hpp
@@ -30,7 +30,7 @@ class Cfg3DEN
data = "AE3_PowerConnection"; // _type parameter in "OnConnectionStart/End" Event Handlers
color[] = {0.835,0.345,0.345,1}; // Color of connection line
cursor = "3DENConnectSync"; // cursor type; don't know what is available
- expression = "[_type, _entity0, _entity1] call AE3_main_fnc_3den_doPowerConnection;"; // seems to be executed on mission start
+ expression = "[_entity0, _entity1] call AE3_power_fnc_createPowerConnection;"; // seems to be executed on mission start
};
class AE3_NetworkConnection
@@ -42,7 +42,7 @@ class Cfg3DEN
data = "AE3_NetworkConnection"; // _type parameter in "OnConnectionStart/End" Event Handlers
color[] = {0.357,0.666,0.671,1}; // Color of connection line
cursor = "3DENConnectSync"; // cursor type; don't know what is available
- expression = "[_type, _entity0, _entity1] call AE3_main_fnc_3den_doNetworkConnection;"; // seems to be executed on mission start
+ expression = "[_entity0, _entity1] call AE3_network_fnc_createNetworkConnection;"; // seems to be executed on mission start
};
};
diff --git a/addons/main/CfgEditorCategories.hpp b/addons/main/CfgEditorCategories.hpp
new file mode 100644
index 00000000..4d6b0b06
--- /dev/null
+++ b/addons/main/CfgEditorCategories.hpp
@@ -0,0 +1,11 @@
+/* ================================================================================ */
+
+class CfgEditorCategories
+{
+ class AE3_Assets // Category class, you point to it in editorCategory property
+ {
+ displayName = "$STR_AE3_Main_AdvancedEquipmentObjectsCategoryDisplayName"; // Name visible in the list
+ };
+};
+
+/* ================================================================================ */
\ No newline at end of file
diff --git a/addons/main/CfgFactionClasses.hpp b/addons/main/CfgFactionClasses.hpp
new file mode 100644
index 00000000..d7b12cde
--- /dev/null
+++ b/addons/main/CfgFactionClasses.hpp
@@ -0,0 +1,17 @@
+
+class CfgFactionClasses
+{
+ class NO_CATEGORY;
+ class AE3_mainModules: NO_CATEGORY
+ {
+ displayName = "$STR_AE3_Main_MainModulesCategoryDisplayName";
+ };
+ class AE3_armaosModules: NO_CATEGORY
+ {
+ displayName = "$STR_AE3_Main_ArmaOSModulesCategoryDisplayName";
+ };
+ class AE3_filesystemModules: NO_CATEGORY
+ {
+ displayName = "$STR_AE3_Main_FilesystemModulesCategoryDisplayName";
+ };
+};
\ No newline at end of file
diff --git a/addons/main/CfgUserInterfaceZeus.hpp b/addons/main/CfgUserInterfaceZeus.hpp
new file mode 100644
index 00000000..b86ee2fe
--- /dev/null
+++ b/addons/main/CfgUserInterfaceZeus.hpp
@@ -0,0 +1,1527 @@
+/* ================================================================================ */
+
+class RscText;
+class RscEdit;
+class RscCheckBox;
+class RscButton;
+class RscCombo;
+class RscXSliderH;
+class RscButtonMenuOK;
+class RscButtonMenuCancel;
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Asset_Details
+{
+ idd = 16986;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display] call AE3_main_fnc_zeus_initAttributes;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode] call AE3_main_fnc_zeus_updateAttributes;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_AssetDetails";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "$STR_AE3_Main_Zeus_BatteryLevel";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1002: RscText
+ {
+ idc = 1002;
+
+ text = "$STR_AE3_Main_Zeus_FuelLevel";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscSlider_1900: RscXSliderH
+ {
+ idc = 1900;
+ sliderPosition = 0;
+ sliderRange[] = {0,100};
+ sliderStep = 1;
+
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 28 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['batterySliderCtrl', _control]; _control ctrlEnable false;";
+ onSliderPosChanged = "params ['_control', '_newValue']; private _display = ctrlParent _control; private _text = _display getVariable 'batteryTextCtrl'; _text ctrlSetText format ['%1%2', _newValue, '%'];";
+ };
+
+ class RscSlider_1901: RscXSliderH
+ {
+ idc = 1901;
+ sliderPosition = 0;
+ sliderRange[] = {0,100};
+ sliderStep = 1;
+
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 28 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['fuelSliderCtrl', _control]; _control ctrlEnable false;";
+ onSliderPosChanged = "params ['_control', '_newValue']; private _display = ctrlParent _control; private _text = _display getVariable 'fuelTextCtrl'; _text ctrlSetText format ['%1%2', _newValue, '%'];";
+ };
+
+ class RscEdit_1401: RscEdit
+ {
+ idc = 1401;
+ text = "0%";
+ x = 36.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['batteryTextCtrl', _control]; _control ctrlEnable false;";
+ //onEditChanged = "params ['_control', '_newText']; private _display = ctrlParent _control; private _slider = _display getVariable 'batterySliderCtrl'; private _newValue = (round (_newText call BIS_fnc_parseNumber)); _slider sliderSetPosition _newValue; _control ctrlSetText format ['%1%2', _newValue, '%'];";
+ onKillFocus = "params ['_control']; private _newText = ctrlText _control; _newText = [_newText, '0123456789.,'] call BIS_fnc_filterString; private _display = ctrlParent _control; private _slider = _display getVariable 'batterySliderCtrl'; private _newValue = ((round (_newText call BIS_fnc_parseNumber)) min 100); _slider sliderSetPosition _newValue; _control ctrlSetText format ['%1%2', _newValue, '%'];";
+ };
+
+ class RscEdit_1402: RscEdit
+ {
+ idc = 1402;
+ text = "0%";
+ x = 36.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['fuelTextCtrl', _control]; _control ctrlEnable false;";
+ //onEditChanged = "params ['_control', '_newText']; private _display = ctrlParent _control; private _slider = _display getVariable 'batterySliderCtrl'; private _newValue = (round (_newText call BIS_fnc_parseNumber)); _slider sliderSetPosition _newValue; _control ctrlSetText format ['%1%2', _newValue, '%'];";
+ onKillFocus = "params ['_control']; private _newText = ctrlText _control; _newText = [_newText, '0123456789.,'] call BIS_fnc_filterString; private _display = ctrlParent _control; private _slider = _display getVariable 'fuelSliderCtrl'; private _newValue = ((round (_newText call BIS_fnc_parseNumber)) min 100); _slider sliderSetPosition _newValue; _control ctrlSetText format ['%1%2', _newValue, '%'];";
+ };
+
+ class RscButton_2100: RscButton
+ {
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ text = "$STR_AE3_Main_Zeus_Close";
+
+ onButtonClick = "params ['_control']; [] call AE3_main_fnc_zeus_closeObject;";
+ };
+
+ class RscButton_2200: RscButton
+ {
+ x = 4 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ text = "$STR_AE3_Main_Zeus_Open";
+
+ onButtonClick = "params ['_control']; [] call AE3_main_fnc_zeus_openObject;";
+ };
+
+ class RscButton_2300: RscButton
+ {
+ x = 7.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 4 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ text = "$STR_AE3_Main_Zeus_Standby";
+
+ onButtonClick = "params ['_control']; [] call AE3_main_fnc_zeus_standbyDevice;";
+ };
+
+ class RscButton_2400: RscButton
+ {
+ x = 12 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 4 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ text = "$STR_AE3_Main_Zeus_TurnOff";
+
+ onButtonClick = "params ['_control']; [] call AE3_main_fnc_zeus_turnOffDevice;";
+ };
+
+ class RscButton_2500: RscButton
+ {
+ x = 16.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 4 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ text = "$STR_AE3_Main_Zeus_TurnOn";
+
+ onButtonClick = "params ['_control']; [] call AE3_main_fnc_zeus_turnOnDevice;";
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Module_AddUser
+{
+ idd = 16987;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display, 0, 'onLoad'] spawn AE3_main_fnc_zeus_module_addUser;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode, 'onUnload'] call AE3_main_fnc_zeus_module_addUser;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_Module_AddUser";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "$STR_AE3_Main_Zeus_Module_AddUser_Description";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "$STR_AE3_Main_Zeus_Username";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1002: RscText
+ {
+ idc = 1002;
+
+ text = "$STR_AE3_Main_Zeus_Password";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1401: RscEdit
+ {
+ idc = 1401;
+ text = "admin";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; private _newText = ctrlText _control; _display setVariable ['username', _newText];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _newText = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['username', _newText]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _password = _display getVariable ['password', '']; if ((_newText isEqualTo '') || (_password isEqualTo '') || ((_newText find ' ') != -1)) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscEdit_1402: RscEdit
+ {
+ idc = 1402;
+ text = "admin123";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; private _newText = ctrlText _control; _display setVariable ['password', _newText];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _newText = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['password', _newText]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _username = _display getVariable ['username', '']; if ((_newText isEqualTo '') || (_username isEqualTo '') || ((_username find ' ') != -1)) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['okCtrl', _control];";
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Module_AddSecurityCommands
+{
+ idd = 16988;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display, 0, 'onLoad'] spawn AE3_main_fnc_zeus_module_addSecurityCommands;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode, 'onUnload'] call AE3_main_fnc_zeus_module_addSecurityCommands;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_Module_AddSecurityCommands";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "$STR_AE3_Main_Zeus_Module_AddSecurityCommands_Description";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "crypto";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1002: RscText
+ {
+ idc = 1002;
+
+ text = "crack";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscCheckBox_1401: RscCheckBox
+ {
+ idc = 1401;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1402: RscCheckBox
+ {
+ idc = 1402;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Module_AddGames
+{
+ idd = 16989;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display, 0, 'onLoad'] spawn AE3_main_fnc_zeus_module_addGames;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode, 'onUnload'] call AE3_main_fnc_zeus_module_addGames;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_Module_AddGames";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "$STR_AE3_Main_Zeus_Module_AddGames_Description";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "snake";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscCheckBox_1401: RscCheckBox
+ {
+ idc = 1401;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Module_AddFile
+{
+ idd = 16990;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display, 0, 'onLoad'] spawn AE3_main_fnc_zeus_module_addFile;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode, 'onUnload'] call AE3_main_fnc_zeus_module_addFile;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_Module_AddFile";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "$STR_AE3_Main_Zeus_Module_AddFile_Description";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "$STR_AE3_Main_Zeus_Path";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1401: RscEdit
+ {
+ idc = 1401;
+ text = "/tmp/new/example.txt";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; private _newText = ctrlText _control; _display setVariable ['path', _newText];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _newText = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['path', _newText]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _username = _display getVariable ['username', '']; private _key = _display getVariable ['key', '']; if ((_newText isEqualTo '') || (_username isEqualTo '') || (_key isEqualTo '') || ((_newText find ' ') != -1) || ((_username find ' ') != -1)) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscText_1002: RscText
+ {
+ idc = 1002;
+
+ text = "$STR_AE3_Main_Zeus_FileContent";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1402: RscEdit
+ {
+ idc = 1402;
+ text = "Lorem ipsum dolor sit amet";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 4 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1003: RscText
+ {
+ idc = 1003;
+
+ text = "$STR_AE3_Main_Zeus_IsCode";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscCheckBox_1301: RscCheckBox
+ {
+ idc = 1301;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 0;
+ };
+
+ class RscText_1004: RscText
+ {
+ idc = 1004;
+
+ text = "$STR_AE3_Main_Zeus_FileOwner";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 16.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1403: RscEdit
+ {
+ idc = 1403;
+ text = "root";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 16.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 11 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; private _newText = ctrlText _control; _display setVariable ['username', _newText];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _newText = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['username', _newText]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _path = _display getVariable ['path', '']; private _key = _display getVariable ['key', '']; if ((_newText isEqualTo '') || (_path isEqualTo '') || (_key isEqualTo '') || ((_newText find ' ') != -1) || ((_path find ' ') != -1)) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscText_1005: RscText
+ {
+ idc = 1005;
+
+ text = "$STR_AE3_Main_Zeus_Permissions";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1006: RscText
+ {
+ idc = 1006;
+
+ text = "R";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 19.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1007: RscText
+ {
+ idc = 1007;
+
+ text = "W";
+ x = 10 * GUI_GRID_W + GUI_GRID_X;
+ y = 19.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1008: RscText
+ {
+ idc = 1008;
+
+ text = "X";
+ x = 12 * GUI_GRID_W + GUI_GRID_X;
+ y = 19.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1009: RscText
+ {
+ idc = 1009;
+
+ text = "R";
+ x = 14 * GUI_GRID_W + GUI_GRID_X;
+ y = 19.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1010: RscText
+ {
+ idc = 1010;
+
+ text = "W";
+ x = 16 * GUI_GRID_W + GUI_GRID_X;
+ y = 19.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1011: RscText
+ {
+ idc = 1011;
+
+ text = "X";
+ x = 18 * GUI_GRID_W + GUI_GRID_X;
+ y = 19.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1012: RscText
+ {
+ idc = 1012;
+
+ text = "$STR_AE3_Main_Zeus_Owner";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 18 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1013: RscText
+ {
+ idc = 1013;
+
+ text = "$STR_AE3_Main_Zeus_Everyone";
+ x = 14 * GUI_GRID_W + GUI_GRID_X;
+ y = 18 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscCheckBox_1302: RscCheckBox
+ {
+ idc = 1302;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1303: RscCheckBox
+ {
+ idc = 1303;
+ x = 10 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1304: RscCheckBox
+ {
+ idc = 1304;
+ x = 12 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 0;
+ };
+
+ class RscCheckBox_1305: RscCheckBox
+ {
+ idc = 1305;
+ x = 14 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1306: RscCheckBox
+ {
+ idc = 1306;
+ x = 16 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1307: RscCheckBox
+ {
+ idc = 1307;
+ x = 18 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 0;
+ };
+
+ class RscText_1014: RscText
+ {
+ idc = 1014;
+
+ text = "$STR_AE3_Main_Zeus_EnableEncryption";
+ x = 21 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 8 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscCheckBox_1308: RscCheckBox
+ {
+ idc = 1308;
+ x = 29.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 0;
+
+ onCheckedChanged = "params ['_control', '_checked']; private _display = ctrlParent _control; private _algorithmCtrl = _display getVariable ['algorithmCtrl', objNull]; private _keyCtrl = _display getVariable ['keyCtrl', objNull]; if (_checked == 1) then { _checked = true; } else { _checked = false; }; _algorithmCtrl ctrlEnable _checked; _keyCtrl ctrlEnable _checked;";
+ };
+
+ class RscText_1015: RscText
+ {
+ idc = 1015;
+
+ text = "$STR_AE3_Main_Zeus_EncryptionAlgorithm";
+ x = 21 * GUI_GRID_W + GUI_GRID_X;
+ y = 16.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 8 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscCombo_1501: RscCombo
+ {
+ idc = 1501;
+ x = 29.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 16.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 10 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ class Items
+ {
+ class ItemPower
+ {
+ text = "$STR_AE3_Main_Zeus_Caesar";
+ default = 1;
+ };
+ class ItemNetwork
+ {
+ text = "$STR_AE3_Main_Zeus_Columnar";
+ };
+ };
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['algorithmCtrl', _control]; _control ctrlEnable false;";
+ };
+
+ class RscText_1016: RscText
+ {
+ idc = 1016;
+
+ text = "$STR_AE3_Main_Zeus_EncryptionKey";
+ x = 21 * GUI_GRID_W + GUI_GRID_X;
+ y = 18 * GUI_GRID_H + GUI_GRID_Y;
+ w = 8 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1405: RscEdit
+ {
+ idc = 1405;
+ text = "13";
+ x = 29.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 18 * GUI_GRID_H + GUI_GRID_Y;
+ w = 10 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['keyCtrl', _control]; _control ctrlEnable false; private _key = ctrlText _control; _display setVariable ['key', _key];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _key = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['key', _key]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _username = _display getVariable ['username', '']; private _path = _display getVariable ['path', '']; if ((_key isEqualTo '') || (_username isEqualTo '') || (_path isEqualTo '')) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['okCtrl', _control];";
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Module_AddDir
+{
+ idd = 16991;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display, 0, 'onLoad'] spawn AE3_main_fnc_zeus_module_addDir;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode, 'onUnload'] call AE3_main_fnc_zeus_module_addDir;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_Module_AddDir";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "$STR_AE3_Main_Zeus_Module_AddDir_Description";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "$STR_AE3_Main_Zeus_Path";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1401: RscEdit
+ {
+ idc = 1401;
+ text = "/tmp/new";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; private _newText = ctrlText _control; _display setVariable ['path', _newText];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _newText = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['path', _newText]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _username = _display getVariable ['username', '']; if ((_newText isEqualTo '') || (_username isEqualTo '') || ((_newText find ' ') != -1) || ((_username find ' ') != -1)) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscText_1004: RscText
+ {
+ idc = 1004;
+
+ text = "$STR_AE3_Main_Zeus_DirOwner";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscEdit_1403: RscEdit
+ {
+ idc = 1403;
+ text = "root";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; private _newText = ctrlText _control; _display setVariable ['username', _newText];";
+ onKeyUp = "params ['_control', '_key', '_shift', '_ctrl', '_alt']; private _newText = ctrlText _control; private _display = ctrlParent _control; _display setVariable ['username', _newText]; private _okCtrl = _display getVariable ['okCtrl', objNull]; private _path = _display getVariable ['path', '']; if ((_newText isEqualTo '') || (_path isEqualTo '') || ((_newText find ' ') != -1) || ((_path find ' ') != -1)) then { _okCtrl ctrlEnable false; } else { _okCtrl ctrlEnable true; };";
+ // With release of Arma 3 2.14, the onEditChanged event handler is available
+ //onEditChanged = "params ['_control', '_newText'];";
+ };
+
+ class RscText_1005: RscText
+ {
+ idc = 1005;
+
+ text = "$STR_AE3_Main_Zeus_Permissions";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1006: RscText
+ {
+ idc = 1006;
+
+ text = "R";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1007: RscText
+ {
+ idc = 1007;
+
+ text = "W";
+ x = 10 * GUI_GRID_W + GUI_GRID_X;
+ y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1008: RscText
+ {
+ idc = 1008;
+
+ text = "X";
+ x = 12 * GUI_GRID_W + GUI_GRID_X;
+ y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1009: RscText
+ {
+ idc = 1009;
+
+ text = "R";
+ x = 14 * GUI_GRID_W + GUI_GRID_X;
+ y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1010: RscText
+ {
+ idc = 1010;
+
+ text = "W";
+ x = 16 * GUI_GRID_W + GUI_GRID_X;
+ y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1011: RscText
+ {
+ idc = 1011;
+
+ text = "X";
+ x = 18 * GUI_GRID_W + GUI_GRID_X;
+ y = 13.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1012: RscText
+ {
+ idc = 1012;
+
+ text = "$STR_AE3_Main_Zeus_Owner";
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 12 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscText_1013: RscText
+ {
+ idc = 1013;
+
+ text = "$STR_AE3_Main_Zeus_Everyone";
+ x = 14 * GUI_GRID_W + GUI_GRID_X;
+ y = 12 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_CENTER;
+ };
+
+ class RscCheckBox_1302: RscCheckBox
+ {
+ idc = 1302;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1303: RscCheckBox
+ {
+ idc = 1303;
+ x = 10 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1304: RscCheckBox
+ {
+ idc = 1304;
+ x = 12 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1305: RscCheckBox
+ {
+ idc = 1305;
+ x = 14 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1306: RscCheckBox
+ {
+ idc = 1306;
+ x = 16 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscCheckBox_1307: RscCheckBox
+ {
+ idc = 1307;
+ x = 18 * GUI_GRID_W + GUI_GRID_X;
+ y = 15 * GUI_GRID_H + GUI_GRID_Y;
+ w = 1 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ checked = 1;
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['okCtrl', _control];";
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
+
+class AE3_UserInterface_Zeus_Module_AddConnection
+{
+ idd = 16992;
+ movingEnable = true;
+ enableSimulation = true;
+
+ onLoad = "params ['_display', ['_config', configNull]]; [_display, 0, 'onLoad'] call AE3_main_fnc_zeus_module_addConnection;";
+ onUnload = "params ['_display', '_exitCode']; [_display, _exitCode, 'onUnload'] call AE3_main_fnc_zeus_module_addConnection;";
+
+ class controlsBackground
+ {
+ // size 40x25
+ class RscText_900: RscText
+ {
+ // Background
+ idc = 900;
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 2 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 21 * GUI_GRID_H;
+ colorBackground[] = {0.2,0.2,0.2,1}; // light grey
+ };
+ };
+
+ class controls
+ {
+ class RscText_1000: RscText
+ {
+ idc = 1000;
+ text = "$STR_AE3_Main_Zeus_Module_AddConnection";
+ x = 0 * GUI_GRID_W + GUI_GRID_X;
+ y = 0 * GUI_GRID_H + GUI_GRID_Y;
+ w = 40 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,1};
+ };
+
+ class RscText_1400: RscText
+ {
+ idc = 1400;
+ text = "$STR_AE3_Main_Zeus_Module_AddConnection_Description";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 39 * GUI_GRID_W;
+ h = 6 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ style = ST_MULTI;
+ lineSpacing = 1;
+ };
+
+ class RscText_1001: RscText
+ {
+ idc = 1001;
+
+ text = "$STR_AE3_Main_Zeus_FromConsumer";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1401: RscText
+ {
+ idc = 1401;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 9 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ };
+
+ class RscText_1004: RscText
+ {
+ idc = 1004;
+
+ text = "$STR_AE3_Main_Zeus_ToProvider";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscText_1402: RscText
+ {
+ idc = 1402;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 10.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+ };
+
+ class RscText_1005: RscText
+ {
+ idc = 1005;
+
+ text = "$STR_AE3_Main_Zeus_ConnectionType";
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 12 * GUI_GRID_H + GUI_GRID_Y;
+ w = 7 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+
+ style = ST_RIGHT;
+ };
+
+ class RscCombo_1501: RscCombo
+ {
+ idc = 1501;
+ x = 8 * GUI_GRID_W + GUI_GRID_X;
+ y = 12 * GUI_GRID_H + GUI_GRID_Y;
+ w = 31.5 * GUI_GRID_W;
+ h = 1 * GUI_GRID_H;
+ colorBackground[] = {-1,-1,-1,0.5};
+
+ class Items
+ {
+ class ItemPower
+ {
+ text = "$STR_AE3_Main_Zeus_Power";
+ default = 1;
+ };
+ class ItemNetwork
+ {
+ text = "$STR_AE3_Main_Zeus_Network";
+ };
+ };
+ };
+
+ class RscButton_2100: RscButton
+ {
+ x = 0.5 * GUI_GRID_W + GUI_GRID_X;
+ y = 21 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ text = "$STR_AE3_Main_Zeus_Switch";
+
+ onButtonClick = "params ['_control']; private _display = ctrlParent _control; private _switch = _display getVariable ['switch', false]; if (_switch) then { _switch = false; } else { _switch = true; }; _display setVariable ['switch', _switch]; private _fromCtrl = _display displayCtrl 1401; private _toCtrl = _display displayCtrl 1402; private _fromText = ctrlText _fromCtrl; private _toText = ctrlText _toCtrl; _fromCtrl ctrlSetText _toText; _toCtrl ctrlSetText _fromText;";
+ };
+
+ class RscButtonMenuOK_2600: RscButtonMenuOK
+ {
+ x = 37 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 3 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+
+ onLoad = "params ['_control']; private _display = ctrlParent _control; _display setVariable ['okCtrl', _control];";
+ };
+
+ class RscButtonMenuCancel_2700: RscButtonMenuCancel
+ {
+ x = 31 * GUI_GRID_W + GUI_GRID_X;
+ y = 23.5 * GUI_GRID_H + GUI_GRID_Y;
+ w = 5 * GUI_GRID_W;
+ h = 1.5 * GUI_GRID_H;
+ };
+ };
+};
+
+/* ================================================================================ */
\ No newline at end of file
diff --git a/addons/main/CfgVehicles.hpp b/addons/main/CfgVehicles.hpp
index 5988cef4..6378238d 100644
--- a/addons/main/CfgVehicles.hpp
+++ b/addons/main/CfgVehicles.hpp
@@ -1,3 +1,71 @@
class CfgVehicles
{
+ /* ================================================================================ */
+
+ class Logic;
+ class Module_F: Logic
+ {
+ class AttributesBase
+ {
+ class Default;
+ class Edit; // Default edit box (i.e., text input field)
+ class Checkbox;
+ class ModuleDescription; // Module description
+ };
+ // Description base classes, for more information see below
+ class ModuleDescription
+ {
+ class AnyBrain;
+ };
+ };
+
+ /* ================================================================================ */
+
+ // MODULE ADD CONNECTION (ZEUS ONLY MODULE)
+ class AE3_AddConnection: Module_F
+ {
+ // Standard object definitions
+ scope = 1; // Editor visibility; 2 will show it in the menu, 1 will hide it.
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+ displayName = "$STR_AE3_Main_Config_ModuleAddConnectionDisplayName"; // Name displayed in the menu
+ icon = "\z\ae3\addons\main\ui\AE3_Module_Icon_addConnection.paa"; // Map icon. Delete this entry to use the default icon
+ category = "AE3_mainModules";
+
+ // Name of function triggered once conditions are met
+ function = "";
+ // Execution priority, modules with lower number are executed first. 0 is used when the attribute is undefined
+ functionPriority = 1;
+ // 0 for server only execution, 1 for global execution, 2 for persistent global execution
+ isGlobal = 1;
+ // 1 for module waiting until all synced triggers are activated
+ isTriggerActivated = 1;
+ // 1 if modules is to be disabled once it is activated (i.e., repeated trigger activation won't work)
+ isDisposable = 1;
+ // 1 to run init function in Eden Editor as well
+ is3DEN = 0;
+
+ // Menu displayed when the module is placed or double-clicked on by Zeus
+ curatorInfoType = "AE3_UserInterface_Zeus_Module_AddConnection";
+
+ // Module description. Must inherit from base class, otherwise pre-defined entities won't be available
+ class ModuleDescription: ModuleDescription
+ {
+ description = "$STR_AE3_Main_Config_ModuleAddConnectionDescription"; // Short description, will be formatted as structured text
+ sync[] = { "Land_Laptop_03_sand_F_AE3" }; // LocationArea_F // Array of synced entities (can contain base classes)
+
+ class Land_Laptop_03_sand_F_AE3
+ {
+ description[] = { // Multi-line descriptions are supported
+ "First line",
+ "Second line"
+ };
+ position = 1; // Position is taken into effect
+ direction = 1; // Direction is taken into effect
+ optional = 0; // Synced entity is optional
+ duplicate = 0; // Multiple entities of this type can be synced
+ };
+ };
+ };
+
+ /* ================================================================================ */
};
\ No newline at end of file
diff --git a/addons/main/XEH_PREP.hpp b/addons/main/XEH_PREP.hpp
index dea3d2c3..ab20949a 100644
--- a/addons/main/XEH_PREP.hpp
+++ b/addons/main/XEH_PREP.hpp
@@ -1,18 +1,43 @@
-// Object exchange
+/* Object Exchange */
PREP(replace);
-// Remote Server Var Functions
+/* Remote Server Var Functions */
PREP(getRemoteVar);
PREP(sendVarToRemote);
-// Debug Mobe and Overlay
+/* Debug Mode and Overlay */
PREP(manageDebugMode);
PREP(initDebugOverlay);
PREP(killDebugOverlay);
-// Eden Editor Connections
+/* Eden Editor Functions */
PREP(3denEventHandlers_onConnectionEnd);
PREP(3den_checkConnection);
-PREP(3den_doNetworkConnection);
-PREP(3den_doPowerConnection);
-PREP(killDebugOverlay);
+
+/* Misc */
+PREP(getPlayersInRange);
+
+/* Terminate */
+PREP(terminateDevice);
+
+/* Zeus/Curator Functions */
+PREP(zeus_initAttributes);
+PREP(zeus_updateAttributes);
+
+PREP(zeus_turnOnDevice);
+PREP(zeus_turnOffDevice);
+PREP(zeus_standbyDevice);
+
+PREP(zeus_openObject);
+PREP(zeus_closeObject);
+
+PREP(zeus_module_addUser);
+PREP(zeus_module_addSecurityCommands);
+PREP(zeus_module_addGames);
+PREP(zeus_module_addFile);
+PREP(zeus_module_addDir);
+PREP(zeus_module_addConnection);
+
+PREP(zeus_checkForComputer);
+
+PREP(zeus_isConnectionAllowed);
\ No newline at end of file
diff --git a/addons/main/XEH_preInit.sqf b/addons/main/XEH_preInit.sqf
index 8c028878..d74ba119 100644
--- a/addons/main/XEH_preInit.sqf
+++ b/addons/main/XEH_preInit.sqf
@@ -1,6 +1,8 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
+["All", "deleted", {_this call AE3_main_fnc_terminateDevice}] call CBA_fnc_addClassEventHandler;
+
[
"AE3_DebugMode", // Settings internal name
"CHECKBOX", // Settings type
diff --git a/addons/main/config.cpp b/addons/main/config.cpp
index f1bf7e3a..4c7fea54 100644
--- a/addons/main/config.cpp
+++ b/addons/main/config.cpp
@@ -5,7 +5,10 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {};
+ units[] =
+ {
+ "AE3_AddConnection"
+ };
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main"};
@@ -15,5 +18,13 @@ class CfgPatches
};
#include "CfgEventHandlers.hpp"
+#include "CfgFactionClasses.hpp"
+#include "cfgEditorCategories.hpp"
#include "CfgVehicles.hpp"
-#include "Cfg3DEN.hpp"
\ No newline at end of file
+#include "Cfg3DEN.hpp"
+
+// Grid Macros and Styles
+#include "defines.inc"
+
+// Advanced Equipment Zeus User Interface
+#include "CfgUserInterfaceZeus.hpp"
\ No newline at end of file
diff --git a/addons/main/defines.inc b/addons/main/defines.inc
new file mode 100644
index 00000000..2516e7dc
--- /dev/null
+++ b/addons/main/defines.inc
@@ -0,0 +1,103 @@
+// Grid Macros and Styles exported from GUI Editor - CTRL-S
+
+#define GUI_GRID_X (0)
+#define GUI_GRID_Y (0)
+#define GUI_GRID_W (0.025)
+#define GUI_GRID_H (0.04)
+#define GUI_GRID_WAbs (1)
+#define GUI_GRID_HAbs (1)
+
+
+///////////////////////////////////////////////////////////////////////////
+/// Styles
+///////////////////////////////////////////////////////////////////////////
+
+// Control types
+#define CT_STATIC 0
+#define CT_BUTTON 1
+#define CT_EDIT 2
+#define CT_SLIDER 3
+#define CT_COMBO 4
+#define CT_LISTBOX 5
+#define CT_TOOLBOX 6
+#define CT_CHECKBOXES 7
+#define CT_PROGRESS 8
+#define CT_HTML 9
+#define CT_STATIC_SKEW 10
+#define CT_ACTIVETEXT 11
+#define CT_TREE 12
+#define CT_STRUCTURED_TEXT 13
+#define CT_CONTEXT_MENU 14
+#define CT_CONTROLS_GROUP 15
+#define CT_SHORTCUTBUTTON 16
+#define CT_XKEYDESC 40
+#define CT_XBUTTON 41
+#define CT_XLISTBOX 42
+#define CT_XSLIDER 43
+#define CT_XCOMBO 44
+#define CT_ANIMATED_TEXTURE 45
+#define CT_OBJECT 80
+#define CT_OBJECT_ZOOM 81
+#define CT_OBJECT_CONTAINER 82
+#define CT_OBJECT_CONT_ANIM 83
+#define CT_LINEBREAK 98
+#define CT_USER 99
+#define CT_MAP 100
+#define CT_MAP_MAIN 101
+#define CT_LISTNBOX 102
+#define CT_CHECKBOX 77
+
+// Static styles
+#define ST_POS 0x0F
+#define ST_HPOS 0x03
+#define ST_VPOS 0x0C
+#define ST_LEFT 0x00
+#define ST_RIGHT 0x01
+#define ST_CENTER 0x02
+#define ST_DOWN 0x04
+#define ST_UP 0x08
+#define ST_VCENTER 0x0C
+
+#define ST_TYPE 0xF0
+#define ST_SINGLE 0x00
+#define ST_MULTI 0x10
+#define ST_TITLE_BAR 0x20
+#define ST_PICTURE 0x30
+#define ST_FRAME 0x40
+#define ST_BACKGROUND 0x50
+#define ST_GROUP_BOX 0x60
+#define ST_GROUP_BOX2 0x70
+#define ST_HUD_BACKGROUND 0x80
+#define ST_TILE_PICTURE 0x90
+#define ST_WITH_RECT 0xA0
+#define ST_LINE 0xB0
+
+#define ST_SHADOW 0x100
+#define ST_NO_RECT 0x200
+#define ST_KEEP_ASPECT_RATIO 0x800
+
+#define ST_TITLE ST_TITLE_BAR + ST_CENTER
+
+// Slider styles
+#define SL_DIR 0x400
+#define SL_VERT 0
+#define SL_HORZ 0x400
+
+#define SL_TEXTURES 0x10
+
+// progress bar
+#define ST_VERTICAL 0x01
+#define ST_HORIZONTAL 0
+
+// Listbox styles
+#define LB_TEXTURES 0x10
+#define LB_MULTI 0x20
+
+// Tree styles
+#define TR_SHOWROOT 1
+#define TR_AUTOCOLLAPSE 2
+
+// MessageBox styles
+#define MB_BUTTON_OK 1
+#define MB_BUTTON_CANCEL 2
+#define MB_BUTTON_USER 4
\ No newline at end of file
diff --git a/addons/main/functions/fnc_3den_checkConnection.sqf b/addons/main/functions/fnc_3den_checkConnection.sqf
index ce7142bc..b27f2b61 100644
--- a/addons/main/functions/fnc_3den_checkConnection.sqf
+++ b/addons/main/functions/fnc_3den_checkConnection.sqf
@@ -1,3 +1,22 @@
+/**
+ * PRIVATE
+ *
+ * This function checks wether or not a network or power connection in Eden Editor is valid or not.
+ * If connection is not valid, it will be removed. Gives visual feeedback in Eden Editor.
+ * This function is private because it only makes sense in context of Eden Editor Event Handlers.
+ *
+ * Arguments:
+ * 1: Type
+ * 2: From
+ * 3: To
+ * 4: Allowed From Classes <[STRING]>
+ * 5: Allowed To Classes <[STRING]>
+ *
+ * Results:
+ * Visual Feedback in Eden Editor; Potentially removed connection
+ *
+ */
+
params ["_type", "_from", "_to", "_allowedFromClasses", "_allowedToClasses"];
private _removeConnection = false;
@@ -9,19 +28,19 @@ private _messageAnimate = true;
if (!((typeOf _from) in _allowedFromClasses)) then
{
_removeConnection = true;
- [(format [localize "STR_AE3_Main_EdenConnections_Forbidden1", _type]), _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
+ [(format [localize "STR_AE3_Main_Connections_Forbidden1", _type]), _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
};
if (!((typeOf _to) in _allowedToClasses)) then
{
_removeConnection = true;
- [(format [localize "STR_AE3_Main_EdenConnections_Forbidden2", _type]), _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
+ [(format [localize "STR_AE3_Main_Connections_Forbidden2", _type]), _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
};
if (_from isEqualTo _to) then
{
_removeConnection = true;
- [localize "STR_AE3_Main_EdenConnections_Forbidden3", _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
+ [localize "STR_AE3_Main_Connections_Forbidden3", _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
};
// get all 3DEN connections for asset '_from', including the new connection
@@ -50,5 +69,5 @@ if (_removeConnection) exitWith
if (_typeCounter > 1) then
{
_messageType = 0;
- [(format [localize "STR_AE3_Main_EdenConnections_Warning", _type]), _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
+ [(format [localize "STR_AE3_Main_Connections_Warning", _type]), _messageType, _messageDuration, _messageAnimate] call BIS_fnc_3DENNotification;
};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_3den_doNetworkConnection.sqf b/addons/main/functions/fnc_3den_doNetworkConnection.sqf
deleted file mode 100644
index 45a58a1d..00000000
--- a/addons/main/functions/fnc_3den_doNetworkConnection.sqf
+++ /dev/null
@@ -1,23 +0,0 @@
-params ["_type", "_entity0", "_entity1"];
-
-// _entity0 = from object
-// _entity1 = to object
-
-//diag_log [_type, _entity0, _entity1];
-
-[_entity0, _entity1] spawn
-{
- params ["_entity0", "_entity1"];
-
- // wait until both devices have relevant variables set; this indicates that the init process is done
- waitUntil { !(isNil { _entity0 getVariable "AE3_network_address"; }) && !(isNil { _entity1 getVariable "AE3_network_children"; }) };
-
- if (isNil { _entity0 getVariable "AE3_network_children"; }) then
- {
- [_entity0, _entity1] call AE3_network_fnc_connect_device2router;
- }
- else
- {
- [_entity0, _entity1] call AE3_network_fnc_connect_router2router;
- };
-};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_3den_doPowerConnection.sqf b/addons/main/functions/fnc_3den_doPowerConnection.sqf
deleted file mode 100644
index f3960ee5..00000000
--- a/addons/main/functions/fnc_3den_doPowerConnection.sqf
+++ /dev/null
@@ -1,22 +0,0 @@
-params ["_type", "_entity0", "_entity1"];
-
-// _entity0 = from object
-// _entity1 = to object
-
-//diag_log [_type, _entity0, _entity1];
-
-[_entity0, _entity1] spawn
-{
- params ["_entity0", "_entity1"];
-
- // wait until both devices have relevant variables set; this indicates that the init process is done
- waitUntil { !(isNil { _entity0 getVariable "AE3_power_hasInternal"; }) && !(isNil { _entity1 getVariable "AE3_power_connectedDevices"; }) };
-
- private _hasInternal = _entity0 getVariable "AE3_power_hasInternal";
-
- private _device = objNull;
-
- if (_hasInternal) then { _device = _entity0 getVariable "AE3_power_internal"; } else { _device = _entity0; };
-
- [_device, _entity1] call AE3_power_fnc_connectToGeneratorAction;
-};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_getPlayersInRange.sqf b/addons/main/functions/fnc_getPlayersInRange.sqf
new file mode 100644
index 00000000..903b720f
--- /dev/null
+++ b/addons/main/functions/fnc_getPlayersInRange.sqf
@@ -0,0 +1,18 @@
+/**
+ * Returns all players within a radius around the given object.
+ *
+ * Arguments:
+ * 0: Range
+ * 1: Object
+ *
+ * Return:
+ * Nothing
+ */
+
+params ["_range", "_object"];
+
+private _allPlayers = [] call BIS_fnc_listPlayers; // Only players, not headless clients
+
+private _playersInRange = _allPlayers select {(_x distance _object) < _range};
+
+_playersInRange;
\ No newline at end of file
diff --git a/addons/main/functions/fnc_terminateDevice.sqf b/addons/main/functions/fnc_terminateDevice.sqf
new file mode 100644
index 00000000..ab86a4ad
--- /dev/null
+++ b/addons/main/functions/fnc_terminateDevice.sqf
@@ -0,0 +1,69 @@
+/**
+ * PUBLIC
+ *
+ * This function handles the deletion of an AE3 asset. If the asset gets deleted for example by zeus, this function is triggered,
+ * but you can also trigger this function standalone.
+ * If applicable the function turns off the device and removes all power and network connections, both incoming and outgoing.
+ *
+ * Arguments:
+ * 1: Device
+ *
+ * Results:
+ * None
+ *
+ * Example:
+ * [_device] call AE3_main_fnc_terminateDevice;
+ *
+ */
+
+params ["_device"];
+
+private _powerState = _device getVariable ["AE3_power_powerState", nil];
+
+// if the device has a powerState, then it's a power device and can be turned off
+// Also connections can be removed if in place
+if (!isNil "_powerState") then
+{
+ /* ================================================================================ */
+
+ // turn off device
+ [_device] call AE3_power_fnc_turnOffDevice;
+
+ /* ================================================================================ */
+
+ // if _device == power provider (has connected power devices) then remove all power connections from connected power consumers
+ private _connectedPowerConsumers = _device getVariable ["AE3_power_connectedDevices", []];
+ {
+ [_x] call AE3_power_fnc_removePowerConnection;
+ } forEach _connectedPowerConsumers;
+ // safely remove all power connections from power provider itself
+ _connectedPowerConsumers = [];
+ _device setVariable ["AE3_power_connectedDevices", _connectedPowerConsumers, true];
+
+ // if _device == power consumer (has a connected power cable device) then remove power connection
+ private _powerProvider = _device getVariable ["AE3_power_powerCableDevice", objNull];
+ if(!(isNull _powerProvider)) then
+ {
+ [_device] call AE3_power_fnc_removePowerConnection;
+ };
+
+ /* ================================================================================ */
+
+ // if _device == network provider (has connected network devices) then remove all network connections from connected network consumers
+ private _connectedNetworkConsumers = _device getVariable ["AE3_network_children", []];
+ {
+ [_x] call AE3_network_fnc_removeNetworkConnection;
+ } forEach _connectedNetworkConsumers;
+ // safely remove all network connections from network provider itself
+ _connectedNetworkConsumers = [];
+ _device setVariable ["AE3_network_children", _connectedNetworkConsumers, true];
+
+ // if _device == network consumer (has a network parent) then remove network connection
+ private _networkProvider = _device getVariable ["AE3_network_parent", objNull];
+ if(!(isNull _networkProvider)) then
+ {
+ [_device] call AE3_power_fnc_removeNetworkConnection;
+ };
+
+ /* ================================================================================ */
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_checkForComputer.sqf b/addons/main/functions/fnc_zeus_checkForComputer.sqf
new file mode 100644
index 00000000..91d17a0b
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_checkForComputer.sqf
@@ -0,0 +1,52 @@
+/**
+ * PRIVATE
+ *
+ * This function is a helper function for the zeus module functions. It checks, after a module is placed,
+ * if the module is placed an an entity that is an object and has a filesystem and is not currently used by
+ * a player a a computer. In case of an error, zeus messages will appear, telling about the error.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * 1: Status
+ * 2: Computer
+ *
+ */
+
+private _mouseOver = missionNamespace getVariable ["BIS_fnc_curatorObjectPlaced_mouseOver", [""]];
+_mouseOver params ["_mouseOverType", "_mouseOverUnit"];
+
+// check if module was placed on top of another object
+if (_mouseOverType != "OBJECT") exitWith
+{
+ [objNull, localize "STR_AE3_Main_Zeus_NoComputer"] call BIS_fnc_showCuratorFeedbackMessage;
+
+ ["ERROR", objNull];
+};
+
+// check if filesystem exists, which means that _mouseOverUnit is a computer
+// ??? Is this also true for a USB Stick?
+// TODO: Add a simple identifier to distinguish between device classes
+private _computer = _mouseOverUnit;
+
+// get filesystem var from server
+[_computer, "AE3_filesystem"] call AE3_main_fnc_getRemoteVar;
+
+private _filesystem = _computer getVariable ["AE3_filesystem", []];
+if (_filesystem isEqualTo []) exitWith
+{
+ [objNull, localize "STR_AE3_Main_Zeus_NoComputer"] call BIS_fnc_showCuratorFeedbackMessage;
+
+ ["ERROR", objNull];
+};
+
+// check if computer is currently used by checking the mutex variable
+if (!isNull (_computer getVariable ['AE3_computer_mutex', objNull])) exitWith
+{
+ [objNull, localize "STR_AE3_Main_Zeus_ComputerInUse"] call BIS_fnc_showCuratorFeedbackMessage;
+
+ ["ERROR", objNull];
+};
+
+["SUCCESS", _computer];
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_closeObject.sqf b/addons/main/functions/fnc_zeus_closeObject.sqf
new file mode 100644
index 00000000..86057413
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_closeObject.sqf
@@ -0,0 +1,51 @@
+/**
+ * PRIVATE
+ *
+ * This function is triggered by a button in the default AE3 Zeus Asset Attributes Interface.
+ * The mechanism is similar to the code that allows this action in the ACE3 Interaction of the object.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus Interface
+ *
+ * Example:
+ * [] call AE3_main_fnc_zeus_closeObject;
+ *
+ */
+
+private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _entity) exitWith {};
+
+[_entity] spawn
+{
+ params ["_entity"];
+
+ private _closeCondition =
+ (
+ (_entity call (_entity getVariable ["AE3_interaction_fnc_closeActionCondition", {true}])) and
+ (alive _entity) and
+ (_entity getVariable ["AE3_interaction_closeState", -1] == 0)
+ );
+
+ if (_closeCondition && !((_entity getVariable ["AE3_interaction_fnc_close", {}]) isEqualTo {})) then
+ {
+ _entity setVariable ["AE3_power_mutex", true, true];
+
+ [_entity] call (_entity getVariable "AE3_interaction_fnc_closeWrapper");
+
+ if (_entity getVariable "AE3_power_powerState" == 1) then
+ {
+ [_entity] call (_entity getVariable "AE3_power_fnc_standbyWrapper");
+ };
+
+ _entity setVariable ["AE3_power_mutex", false, true];
+
+ ["Advanced Equipment", localize "STR_AE3_Main_Zeus_ObjectClosed", 5] call BIS_fnc_curatorHint;
+ }
+ else
+ {
+ [objNull, localize "STR_AE3_Main_Zeus_CantCloseObject"] call BIS_fnc_showCuratorFeedbackMessage;
+ };
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_initAttributes.sqf b/addons/main/functions/fnc_zeus_initAttributes.sqf
new file mode 100644
index 00000000..2f93338a
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_initAttributes.sqf
@@ -0,0 +1,159 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' Event of the default AE3 Asset Attributes Zeus Interface, called AE3_UserInterface_Zeus_Asset_Details
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * This function will gather information about the current placed/opened asset in Zeus if it's an AE3 asset.
+ * The provided Information contains Power Status, Power Output, Power Req, IP Address, Fuel Level and Bettery Level
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus UI Window
+ *
+ */
+
+params ["_display"];
+
+private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _entity) exitWith {};
+
+// The interface is shown up too fast; waitUntil the variables are valid
+// The interface is faster then our init process for object variables
+// on my test system it takes 3 waitUntil cycles for the variables to be available
+
+[_display, _entity] spawn
+{
+ params ["_display", "_entity"];
+
+ private _counter = 0;
+
+ /* ======================================== */
+
+ private _headlineCtrl = _display displayCtrl 1000;
+
+ //private _config = configFile >> "CfgVehicles" >> (typeOf _entity);
+ //private _displayName = getText (_config >> "displayName");
+ private _displayName = [_entity, true] call ace_cargo_fnc_getNameItem;
+ _headlineCtrl ctrlSetText format [localize "STR_AE3_Main_Zeus_ObjectHeader", _displayName];
+
+ waitUntil { !isNil { _entity getVariable "AE3_power_isDevice" }; };
+ private _isPowerDevice = _entity getVariable ["AE3_power_isDevice", false];
+
+ // This could be the case for the desk
+ if (!_isPowerDevice) exitWith {};
+
+ // wait for asset init to finish
+ waitUntil { !isNil { _entity getVariable "AE3_power_initDone" }; };
+
+ /* ======================================== */
+
+ private _statusUpdateHandle = [_display, _entity] spawn
+ {
+ params ["_display", "_entity"];
+
+ while { true; } do
+ {
+ private _statusCtrl = _display displayCtrl 1400;
+ private _status = [];
+
+ _status pushBack localize "STR_AE3_Main_Zeus_ObjectStatus";
+ _status pushBack "------------";
+
+ // Class Name
+ private _className = typeOf _entity;
+ _status pushBack (format [localize "STR_AE3_Main_Zeus_ClassName", _className]);
+
+ // Power State
+ private _powerState = [_entity] call AE3_power_fnc_getPowerState;
+ _status pushBack (format [localize "STR_AE3_Power_Interaction_PowerStateHint", _powerState]);
+
+ // Power Output
+ private _powerOutput = [_entity] call AE3_power_fnc_getPowerOutput;
+ private _powerCap = _entity getVariable ['AE3_power_powerCapacity', 0];
+ private _prefix = "k"; // kWatts
+ _powerCap = _powerCap * 3600;
+ if (_powerCap < 1.0) then
+ {
+ _powerCap = _powerCap * 1000;
+ _prefix = "";
+ };
+ _status pushBack (format [localize "STR_AE3_Power_Interaction_PowerOutputHint", _powerCap, _prefix]);
+
+ // Power Required
+ private _powerReq = _entity getVariable ["AE3_power_powerReq", 0];
+ private _prefix = "k"; // kWatts
+ _powerReq = _powerReq * 3600;
+ if (_powerReq < 1.0) then
+ {
+ _powerReq = _powerReq * 1000;
+ _prefix = "";
+ };
+ _status pushBack (format [localize "STR_AE3_Power_Interaction_PowerReqHint", _powerReq, _prefix]);
+
+ // IP Address
+ private _ip = _entity getVariable ["AE3_network_address", []];
+ private _ipString = [_ip] call AE3_network_fnc_ip2str;
+ _status pushBack (format ["%1: %2", localize "STR_AE3_Network_General_IpAddress", _ipString]);
+
+ private _statusString = _status joinString endl;
+ _statusCtrl ctrlSetText _statusString;
+
+ sleep 1;
+ };
+ };
+
+ _display setVariable ["AE3_statusUpdateHandle", _statusUpdateHandle];
+
+ /* ======================================== */
+
+ private _batteryLevelSliderCtrl = _display displayCtrl 1900;
+ private _batteryLevelCtrl = _display displayCtrl 1401;
+ private _fuelLevelSliderCtrl = _display displayCtrl 1901;
+ private _fuelLevelCtrl = _display displayCtrl 1402;
+
+ private _battery = _entity;
+ private _hasInternal = _entity getVariable "AE3_power_hasInternal";
+ if (_hasInternal) then { _battery = _entity getVariable "AE3_power_internal"; };
+
+ private _generator = _entity;
+
+ /* ======================================== */
+
+ // if asset has battery, init battery level controls
+ if (!isNil { _battery getVariable "AE3_power_batteryCapacity" }) then
+ {
+ // enable controls
+ _batteryLevelSliderCtrl ctrlEnable true;
+ _batteryLevelCtrl ctrlEnable true;
+
+ private _result = [_battery] call AE3_power_fnc_getBatteryLevel;
+ _result params ["_batteryLevel", "_batteryLevelPercent", "_batteryCapacity"];
+
+ _batteryLevelPercent = round _batteryLevelPercent;
+
+ _batteryLevelSliderCtrl sliderSetPosition _batteryLevelPercent;
+ _batteryLevelCtrl ctrlSetText format ['%1%2', _batteryLevelPercent, '%'];
+ };
+
+ /* ======================================== */
+
+ // if asset has fuel, init fuel level controls
+ if (!isNil { _generator getVariable "AE3_power_fuelCapacity" }) then
+ {
+ // enable controls
+ _fuelLevelSliderCtrl ctrlEnable true;
+ _fuelLevelCtrl ctrlEnable true;
+
+ private _result = [_generator] call AE3_power_fnc_getFuelLevel;
+ _result params ["_fuelLevel", "_fuelLevelPercent", "_fuelCapacity"];
+
+ _fuelLevelPercent = round _fuelLevelPercent;
+
+ _fuelLevelSliderCtrl sliderSetPosition _fuelLevelPercent;
+ _fuelLevelCtrl ctrlSetText format ['%1%2', _fuelLevelPercent, '%'];
+ };
+
+ /* ======================================== */
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_isConnectionAllowed.sqf b/addons/main/functions/fnc_zeus_isConnectionAllowed.sqf
new file mode 100644
index 00000000..95942357
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_isConnectionAllowed.sqf
@@ -0,0 +1,52 @@
+/**
+ * PRIVATE
+ *
+ * This function checks wether or not a network or power connection in Zeus is valid or not.
+ * If connection is not valid, it will be removed. Gives visual feeedback in Zeus.
+ * This function is private because it only makes sense in context of Zeus UI.
+ *
+ * Arguments:
+ * 1: Type
+ * 2: From
+ * 3: To
+ * 4: Allowed From Classes <[STRING]>
+ * 5: Allowed To Classes <[STRING]>
+ *
+ * Results:
+ * 1: Result
+ *
+ */
+
+params ["_type", "_from", "_to", "_allowedFromClasses", "_allowedToClasses"];
+
+private _notAllowed = false;
+
+if (!((typeOf _from) in _allowedFromClasses)) then
+{
+ _notAllowed = true;
+ [objNull, format [localize "STR_AE3_Main_Connections_Forbidden1", _type]] call BIS_fnc_showCuratorFeedbackMessage;
+};
+
+if (!((typeOf _to) in _allowedToClasses)) then
+{
+ _notAllowed = true;
+ [objNull, format [localize "STR_AE3_Main_Connections_Forbidden2", _type]] call BIS_fnc_showCuratorFeedbackMessage;
+};
+
+if (_from isEqualTo _to) then
+{
+ _notAllowed = true;
+ [objNull, format [localize "STR_AE3_Main_Connections_Forbidden3", _type]] call BIS_fnc_showCuratorFeedbackMessage;
+};
+
+/* if _from isequalto _module or _to is equalto _module then remove connection */
+
+if (_notAllowed) exitWith
+{
+ // if connection is not allowed then return 'false'
+ false;
+};
+
+// if connection is allowed then return 'true'
+true;
+
diff --git a/addons/main/functions/fnc_zeus_module_addConnection.sqf b/addons/main/functions/fnc_zeus_module_addConnection.sqf
new file mode 100644
index 00000000..7e2cb22e
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_module_addConnection.sqf
@@ -0,0 +1,202 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' and 'onUnload' Events of the Zeus Module Interface: addConnection
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * The function makes changes to the asset according the the user input.
+ * This module needs to be placed individually and needs two synced objects.
+ * After processing the module will be deleted.
+ *
+ * Arguments:
+ * 1: Display
+ * 2: Exit Code
+ * 3: Event
+ *
+ * Results:
+ * Visual Feedback in Zeus
+ *
+ */
+
+params ["_display", "_exitCode", "_event"];
+
+// der folgende Code funktioniert irgendwie nicht
+private _module = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _module) exitWith {};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onLoad") then
+{
+ private _syncedObjects = synchronizedObjects _module;
+
+ // remove connection to itself
+ _module synchronizeObjectsRemove [_module];
+
+ // remove all unnecessary connections
+ if ((count _syncedObjects) > 2) then
+ {
+ private _connectionsToDelete = _syncedObjects deleteRange [2, (count _syncedObjects) - 1];
+ _module synchronizeObjectsRemove _connectionsToDelete;
+ };
+
+ // set ok button state
+ private _okCtrl = _display getVariable ["okCtrl", objNull];
+ if ((count _syncedObjects) > 1) then
+ {
+ _okCtrl ctrlEnable true;
+ }
+ else
+ {
+ _okCtrl ctrlEnable false;
+ };
+
+ // fill 'From' field
+ if ((count _syncedObjects) > 0) then
+ {
+ private _from = _syncedObjects select 0;
+ private _fromNameWithAceCargoName = [_from, true] call ace_cargo_fnc_getNameItem;
+ private _fromCtrl = _display displayCtrl 1401;
+ _fromCtrl ctrlSetText _fromNameWithAceCargoName;
+ _display setVariable ["entity1", _from];
+ };
+
+ // fill 'To' field
+ if ((count _syncedObjects) > 1) then
+ {
+ private _to = _syncedObjects select 1;
+ private _toNameWithAceCargoName = [_to, true] call ace_cargo_fnc_getNameItem;
+ private _toCtrl = _display displayCtrl 1402;
+ _toCtrl ctrlSetText _toNameWithAceCargoName;
+ _display setVariable ["entity2", _to];
+ };
+
+ // close display on first start because there are no connections set up and configuring makes no sense without connections
+ private _firstStart = _module getVariable ["firstStart", nil];
+ if ( isNil "_firstStart") then { _firstStart = true; } else { _firstStart = false; };
+ _module setVariable ["firstStart", _firstStart];
+ if (_firstStart) exitWith { _display closeDisplay 2; }; // 2 = cancel
+};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onUnload") then
+{
+ // 2 = canceled dialog
+ if (_exitCode == 2) exitWith {};
+
+ // get Settings from UI
+ private _typeCtrl = _display displayCtrl 1501;
+ private _type = lbCurSel _typeCtrl; // 0 = Power Connection; 1 = Network Connection
+ if (_type == 0) then { _type = "AE3_PowerConnection"; } else { _type = "AE3_NetworkConnection"; };
+
+ // get Data from Display namespace
+ private _from = _display getVariable ["entity1", objNull];
+ private _to = _display getVariable ["entity2", objNull];
+ private _switch = _display getVariable ['switch', false];
+
+ // check for empty but mandatory input fields
+ // module is still there an could be opened and filled in with valid input
+ // but currently, this case will be catched by UI logic, defined directly in config
+ if(isNull _from) exitWith { [objNull, localize "STR_AE3_Main_Zeus_FromMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if(isNull _to) exitWith { [objNull, localize "STR_AE3_Main_Zeus_ToMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ if (_switch) then
+ {
+ private _tmpFrom = _from;
+ private _tmpTo = _to;
+ _from = _tmpTo;
+ _to = _tmpFrom;
+ };
+
+ private _fromNameWithAceCargoName = [_from, true] call ace_cargo_fnc_getNameItem;
+ private _toNameWithAceCargoName = [_to, true] call ace_cargo_fnc_getNameItem;
+
+ private _message = format ["'%1': %2 '%3': %4", localize "STR_AE3_Main_Zeus_From", _fromNameWithAceCargoName, localize "STR_AE3_Main_Zeus_To", _toNameWithAceCargoName];
+
+ // add connection: type == 0 is power connection and type == 1 is network connection
+ if (_type isEqualTo "AE3_PowerConnection") then
+ {
+ // get all classes defined in CfgVehicles
+ private _config = configFile >> "CfgVehicles";
+
+ // filter classes to those, that contain AE3_Device and AE3_Consumer or AE_Battery config
+ private _powerConsumers =
+ "
+ isClass (_x >> 'AE3_Device' >> 'AE3_Consumer') ||
+ isClass (_x >> 'AE3_Device' >> 'AE3_Battery')
+ " configClasses _config;
+
+ // convert configs to class names
+ {
+ _powerConsumers set [_forEachIndex, configName _x];
+ } forEach _powerConsumers;
+
+ // filter classes to those, that contain AE3_Device and AE3_Generator or AE3_SolarGenerator or AE3_Battery config
+ private _powerProducers =
+ "
+ isClass (_x >> 'AE3_Device' >> 'AE3_Generator') ||
+ isClass (_x >> 'AE3_Device' >> 'AE3_SolarGenerator') ||
+ isClass (_x >> 'AE3_Device' >> 'AE3_Battery')
+
+ " configClasses _config;
+
+ // convert configs to class names
+ {
+ _powerProducers set [_forEachIndex, configName _x];
+ } forEach _powerProducers;
+
+ // unnecessary assignment but easier to read
+ private _allowedPowerFromClasses = _powerConsumers;
+ private _allowedPowerToClasses = _powerProducers;
+
+ if ([_type, _from, _to, _allowedPowerFromClasses, _allowedPowerToClasses] call AE3_main_fnc_zeus_isConnectionAllowed) then
+ {
+ [_from, _to] call AE3_power_fnc_createPowerConnection;
+ [localize "STR_AE3_Main_Zeus_PowerConnectionAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ }
+ else
+ {
+ // remove connections
+ _module synchronizeObjectsRemove [_from, _to];
+ };
+ };
+
+ if (_type isEqualTo "AE3_NetworkConnection") then
+ {
+ private _allowedNetworkFromClasses =
+ [
+ "Land_Laptop_03_sand_F_AE3",
+ "Land_Laptop_03_black_F_AE3",
+ "Land_Laptop_03_olive_F_AE3",
+ "Land_Router_01_sand_F_AE3",
+ "Land_Router_01_black_F_AE3",
+ "Land_Router_01_olive_F_AE3"
+ ];
+
+ private _allowedNetworkToClasses =
+ [
+ "Land_Router_01_sand_F_AE3",
+ "Land_Router_01_black_F_AE3",
+ "Land_Router_01_olive_F_AE3"
+ ];
+
+ if ([_type, _from, _to, _allowedNetworkFromClasses, _allowedNetworkToClasses] call AE3_main_fnc_zeus_isConnectionAllowed) then
+ {
+ [_from, _to] call AE3_network_fnc_createNetworkConnection;
+ [localize "STR_AE3_Main_Zeus_NetworkConnectionAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ }
+ else
+ {
+ // remove connections
+ _module synchronizeObjectsRemove [_from, _to];
+ };
+ };
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_module_addDir.sqf b/addons/main/functions/fnc_zeus_module_addDir.sqf
new file mode 100644
index 00000000..4a6ce106
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_module_addDir.sqf
@@ -0,0 +1,94 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' and 'onUnload' Events of the Zeus Module Interface: addDir
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * The function makes changes to the asset according the the user input.
+ * This module needs to be placed onto a asset with an filesystem.
+ * After processing the module will be deleted.
+ *
+ * Arguments:
+ * 1: Display
+ * 2: Exit Code
+ * 3: Event
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_display", "_exitCode", "_event"];
+
+private _module = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _module) exitWith {};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onLoad") exitWith
+{
+ private _result = [_display] call AE3_main_fnc_zeus_checkForComputer;
+ _result params ["_status", "_computer"];
+
+ if (_status isEqualTo "SUCCESS") then
+ {
+ // add computer variable to display namespace
+ _display setVariable ["AE3_linkedComputer", _computer];
+ }
+ else
+ {
+ // close display
+ _display closeDisplay 2; // 2 = cancel
+ };
+};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onUnload") exitWith
+{
+ private _computer = _display getVariable ["AE3_linkedComputer", objNull];
+ if ((isNull _computer) || (_exitCode == 2)) exitWith
+ {
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ };
+
+ // get values from UI
+ private _pathCtrl = _display displayCtrl 1401;
+ private _ownerCtrl = _display displayCtrl 1403;
+ private _ownerReadCtrl = _display displayCtrl 1302;
+ private _ownerWriteCtrl = _display displayCtrl 1303;
+ private _ownerExecuteCtrl = _display displayCtrl 1304;
+ private _everyoneReadCtrl = _display displayCtrl 1305;
+ private _everyoneWriteCtrl = _display displayCtrl 1306;
+ private _everyoneExecuteCtrl = _display displayCtrl 1307;
+ private _path = ctrlText _pathCtrl;
+ private _owner = ctrlText _ownerCtrl;
+ private _ownerRead = cbChecked _ownerReadCtrl;
+ private _ownerWrite = cbChecked _ownerWriteCtrl;
+ private _ownerExecute = cbChecked _ownerExecuteCtrl;
+ private _everyoneRead = cbChecked _everyoneReadCtrl;
+ private _everyoneWrite = cbChecked _everyoneWriteCtrl;
+ private _everyoneExecute = cbChecked _everyoneExecuteCtrl;
+ private _permissions = [[_ownerExecute, _ownerRead, _ownerWrite], [_everyoneExecute, _everyoneRead, _everyoneWrite]];
+
+ // check for empty but mandatory input fields
+ // module is still there an could be opened and filled in with valid input
+ // but currently, this case will be catched by UI logic, defined directly in config
+ if(_path isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_PathMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if(_owner isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_OwnerMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ // check for not allowed spaces in path and owner
+ if((_path find " ") != -1) exitWith { [objNull, localize "STR_AE3_Main_Zeus_PathContainsSpaces"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if((_owner find " ") != -1) exitWith { [objNull, localize "STR_AE3_Main_Zeus_OwnerContainsSpaces"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ // add directory to computer
+ [_computer, _path, _owner, _permissions] remoteExecCall ["AE3_filesystem_fnc_device_addDir", 2];
+
+ private _message = format ["%1: %2", localize "STR_AE3_Main_Zeus_Path", _path];
+ [localize "STR_AE3_Main_Zeus_DirectoryAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_module_addFile.sqf b/addons/main/functions/fnc_zeus_module_addFile.sqf
new file mode 100644
index 00000000..b36a06e5
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_module_addFile.sqf
@@ -0,0 +1,107 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' and 'onUnload' Events of the Zeus Module Interface: addFile
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * The function makes changes to the asset according the the user input.
+ * This module needs to be placed onto a asset with an filesystem.
+ * After processing the module will be deleted.
+ *
+ * Arguments:
+ * 1: Display
+ * 2: Exit Code
+ * 3: Event
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_display", "_exitCode", "_event"];
+
+private _module = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _module) exitWith {};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onLoad") exitWith
+{
+ private _result = [_display] call AE3_main_fnc_zeus_checkForComputer;
+ _result params ["_status", "_computer"];
+
+ if (_status isEqualTo "SUCCESS") then
+ {
+ // add computer variable to display namespace
+ _display setVariable ["AE3_linkedComputer", _computer];
+ }
+ else
+ {
+ // close display
+ _display closeDisplay 2; // 2 = cancel
+ };
+};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onUnload") exitWith
+{
+ private _computer = _display getVariable ["AE3_linkedComputer", objNull];
+ if ((isNull _computer) || (_exitCode == 2)) exitWith
+ {
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ };
+
+ // get values from UI
+ private _pathCtrl = _display displayCtrl 1401;
+ private _contentCtrl = _display displayCtrl 1402;
+ private _isCodeCtrl = _display displayCtrl 1301;
+ private _ownerCtrl = _display displayCtrl 1403;
+ private _ownerReadCtrl = _display displayCtrl 1302;
+ private _ownerWriteCtrl = _display displayCtrl 1303;
+ private _ownerExecuteCtrl = _display displayCtrl 1304;
+ private _everyoneReadCtrl = _display displayCtrl 1305;
+ private _everyoneWriteCtrl = _display displayCtrl 1306;
+ private _everyoneExecuteCtrl = _display displayCtrl 1307;
+ private _enableEncryptionCtrl = _display displayCtrl 1308;
+ private _encryptionAlgorithmCtrl = _display displayCtrl 1501;
+ private _encryptionKeyCtrl = _display displayCtrl 1405;
+ private _path = ctrlText _pathCtrl;
+ private _content = ctrlText _contentCtrl;
+ private _isCode = cbChecked _isCodeCtrl;
+ private _owner = ctrlText _ownerCtrl;
+ private _ownerRead = cbChecked _ownerReadCtrl;
+ private _ownerWrite = cbChecked _ownerWriteCtrl;
+ private _ownerExecute = cbChecked _ownerExecuteCtrl;
+ private _everyoneRead = cbChecked _everyoneReadCtrl;
+ private _everyoneWrite = cbChecked _everyoneWriteCtrl;
+ private _everyoneExecute = cbChecked _everyoneExecuteCtrl;
+ private _permissions = [[_ownerExecute, _ownerRead, _ownerWrite], [_everyoneExecute, _everyoneRead, _everyoneWrite]];
+ private _enableEncryption = cbChecked _enableEncryptionCtrl;
+ private _encryptionAlgorithm = lbCurSel _encryptionAlgorithmCtrl; // 0 = Caesar; 1 = Columnar
+ private _encryptionKey = ctrlText _encryptionKeyCtrl;
+
+ if (_encryptionAlgorithm == 0) then { _encryptionAlgorithm = "caesar"; } else { _encryptionAlgorithm = "columnar"; };
+
+ // check for empty but mandatory input fields
+ // module is still there an could be opened and filled in with valid input
+ // but currently, this case will be catched by UI logic, defined directly in config
+ if(_path isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_PathMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if(_owner isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_OwnerMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if(_encryptionKey isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_KeyMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ // check for not allowed spaces in path and owner
+ if((_path find " ") != -1) exitWith { [objNull, localize "STR_AE3_Main_Zeus_PathContainsSpaces"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if((_owner find " ") != -1) exitWith { [objNull, localize "STR_AE3_Main_Zeus_OwnerContainsSpaces"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ // add file to computer
+ [_computer, _path, _content, _isCode, _owner, _permissions, _enableEncryption, _encryptionAlgorithm, _encryptionKey] remoteExecCall ["AE3_filesystem_fnc_device_addFile", 2];
+
+ private _message = format ["%1: %2", localize "STR_AE3_Main_Zeus_Path", _path];
+ [localize "STR_AE3_Main_Zeus_FileAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_module_addGames.sqf b/addons/main/functions/fnc_zeus_module_addGames.sqf
new file mode 100644
index 00000000..64bd75c0
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_module_addGames.sqf
@@ -0,0 +1,69 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' and 'onUnload' Events of the Zeus Module Interface: addGames
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * The function makes changes to the asset according the the user input.
+ * This module needs to be placed onto a computer.
+ * After processing the module will be deleted.
+ *
+ * Arguments:
+ * 1: Display
+ * 2: Exit Code
+ * 3: Event
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_display", "_exitCode", "_event"];
+
+private _module = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _module) exitWith {};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onLoad") exitWith
+{
+ private _result = [_display] call AE3_main_fnc_zeus_checkForComputer;
+ _result params ["_status", "_computer"];
+
+ if (_status isEqualTo "SUCCESS") then
+ {
+ // add computer variable to display namespace
+ _display setVariable ["AE3_linkedComputer", _computer];
+ }
+ else
+ {
+ // close display
+ _display closeDisplay 2; // 2 = cancel
+ };
+};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onUnload") exitWith
+{
+ private _computer = _display getVariable ["AE3_linkedComputer", objNull];
+ if ((isNull _computer) || (_exitCode == 2)) exitWith
+ {
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ };
+
+ // get isSnake from UI
+ private _isSnakeCtrl = _display displayCtrl 1401;
+ private _isSnake = cbChecked _isSnakeCtrl;
+
+ // add security commands to computer
+ [_computer, _isSnake] remoteExecCall ["AE3_armaos_fnc_computer_addGames", 2];
+
+ private _message = format ["snake: %1 ", _isSnake];
+ [localize "STR_AE3_Main_Zeus_GamesAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_module_addSecurityCommands.sqf b/addons/main/functions/fnc_zeus_module_addSecurityCommands.sqf
new file mode 100644
index 00000000..09d4f658
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_module_addSecurityCommands.sqf
@@ -0,0 +1,71 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' and 'onUnload' Events of the Zeus Module Interface: addSecurityCommands
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * The function makes changes to the asset according the the user input.
+ * This module needs to be placed onto a computer.
+ * After processing the module will be deleted.
+ *
+ * Arguments:
+ * 1: Display
+ * 2: Exit Code
+ * 3: Event
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_display", "_exitCode", "_event"];
+
+private _module = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _module) exitWith {};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onLoad") exitWith
+{
+ private _result = [_display] call AE3_main_fnc_zeus_checkForComputer;
+ _result params ["_status", "_computer"];
+
+ if (_status isEqualTo "SUCCESS") then
+ {
+ // add computer variable to display namespace
+ _display setVariable ["AE3_linkedComputer", _computer];
+ }
+ else
+ {
+ // close display
+ _display closeDisplay 2; // 2 = cancel
+ };
+};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onUnload") exitWith
+{
+ private _computer = _display getVariable ["AE3_linkedComputer", objNull];
+ if ((isNull _computer) || (_exitCode == 2)) exitWith
+ {
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ };
+
+ // get isCrack and isCrypto from UI
+ private _isCryptoCtrl = _display displayCtrl 1401;
+ private _isCrackCtrl = _display displayCtrl 1402;
+ private _isCrypto = cbChecked _isCryptoCtrl;
+ private _isCrack = cbChecked _isCrackCtrl;
+
+ // add security commands to computer
+ [_computer, _isCrypto, _isCrack] remoteExecCall ["AE3_armaos_fnc_computer_addSecurityCommands", 2];
+
+ private _message = format ["crypto: %1 crack: %2", _isCrypto, _isCrack];
+ [localize "STR_AE3_Main_Zeus_SecurityCommandsAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_module_addUser.sqf b/addons/main/functions/fnc_zeus_module_addUser.sqf
new file mode 100644
index 00000000..ed1f800e
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_module_addUser.sqf
@@ -0,0 +1,80 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onLoad' and 'onUnload' Events of the Zeus Module Interface: addUser
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * The function makes changes to the asset according the the user input.
+ * This module needs to be placed onto a computer.
+ * After processing the module will be deleted.
+ *
+ * Arguments:
+ * 1: Display
+ * 2: Exit Code
+ * 3: Event
+ *
+ * Results:
+ * None
+ *
+ */
+
+params ["_display", "_exitCode", "_event"];
+
+private _module = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _module) exitWith {};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onLoad") exitWith
+{
+ private _result = [_display] call AE3_main_fnc_zeus_checkForComputer;
+ _result params ["_status", "_computer"];
+
+ if (_status isEqualTo "SUCCESS") then
+ {
+ // add computer variable to display namespace
+ _display setVariable ["AE3_linkedComputer", _computer];
+ }
+ else
+ {
+ // close display
+ _display closeDisplay 2; // 2 = cancel
+ };
+};
+
+/* ---------------------------------------- */
+
+if (_event isEqualTo "onUnload") exitWith
+{
+ private _computer = _display getVariable ["AE3_linkedComputer", objNull];
+ if ((isNull _computer) || (_exitCode == 2)) exitWith
+ {
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+ };
+
+ // get username and password from UI
+ private _usernameCtrl = _display displayCtrl 1401;
+ private _passwordCtrl = _display displayCtrl 1402;
+ private _username = ctrlText _usernameCtrl;
+ private _password = ctrlText _passwordCtrl;
+
+ // check for empty but mandatory input fields
+ // module is still there an could be opened and filled in with valid input
+ // but currently, this case will be catched by UI logic, defined directly in config
+ if(_username isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_UsernameMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+ if(_password isEqualTo "") exitWith { [objNull, localize "STR_AE3_Main_Zeus_PasswordMissing"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ // check for not allowed spaces in username
+ if((_username find " ") != -1) exitWith { [objNull, localize "STR_AE3_Main_Zeus_UsernameContainsSpaces"] call BIS_fnc_showCuratorFeedbackMessage; };
+
+ // add user to computer
+ [_computer, _username, _password] remoteExecCall ["AE3_armaos_fnc_computer_addUser", 2];
+
+ private _message = format ["'%1': %2 '%3': %2", localize "STR_AE3_Main_Zeus_Username", _username, localize "STR_AE3_Main_Zeus_Password", _password];
+ [localize "STR_AE3_Main_Zeus_UserAdded", _message, 5] call BIS_fnc_curatorHint;
+
+ // delete module if dialog cancelled or computer not linked to module
+ deleteVehicle _module;
+};
+
+/* ---------------------------------------- */
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_openObject.sqf b/addons/main/functions/fnc_zeus_openObject.sqf
new file mode 100644
index 00000000..0f1bc134
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_openObject.sqf
@@ -0,0 +1,51 @@
+/**
+ * PRIVATE
+ *
+ * This function is triggered by a button in the default AE3 Zeus Asset Attributes Interface.
+ * The mechanism is similar to the code that allows this action in the ACE3 Interaction of the object.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus Interface
+ *
+ * Example:
+ * [] call AE3_main_fnc_zeus_openObject;
+ *
+ */
+
+private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _entity) exitWith {};
+
+[_entity] spawn
+{
+ params ["_entity"];
+
+ private _openCondition =
+ (
+ (_entity call (_entity getVariable ["AE3_interaction_fnc_openActionCondition", {true}])) and
+ (alive _entity) and
+ (_entity getVariable ["AE3_interaction_closeState", -1] == 1)
+ );
+
+ if (_openCondition && !((_entity getVariable ["AE3_interaction_fnc_open", {}]) isEqualTo {})) then
+ {
+ _entity setVariable ["AE3_power_mutex", true, true];
+
+ [_entity] call (_entity getVariable "AE3_interaction_fnc_openWrapper");
+
+ if (_entity getVariable "AE3_power_powerState" == 2) then
+ {
+ [_entity] call (_entity getVariable "AE3_power_fnc_turnOnWrapper");
+ };
+
+ _entity setVariable ["AE3_power_mutex", false, true];
+
+ ["Advanced Equipment", localize "STR_AE3_Main_Zeus_ObjectOpened", 5] call BIS_fnc_curatorHint;
+ }
+ else
+ {
+ [objNull, localize "STR_AE3_Main_Zeus_CantOpenObject"] call BIS_fnc_showCuratorFeedbackMessage;
+ };
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_standbyDevice.sqf b/addons/main/functions/fnc_zeus_standbyDevice.sqf
new file mode 100644
index 00000000..106ef2c9
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_standbyDevice.sqf
@@ -0,0 +1,35 @@
+/**
+ * PRIVATE
+ *
+ * This function is triggered by a button in the default AE3 Zeus Asset Attributes Interface.
+ * The mechanism is similar to the code that allows this action in the ACE3 Interaction of the object.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus Interface
+ *
+ * Example:
+ * [] call AE3_main_fnc_zeus_standbyDevice;
+ *
+ */
+
+private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _entity) exitWith {};
+
+[_entity] spawn
+{
+ params ["_entity"];
+
+ private _success = [_entity] call AE3_power_fnc_standbyDevice;
+
+ if (_success) then
+ {
+ ["Advanced Equipment", localize "STR_AE3_Main_Zeus_StandbyDevice", 5] call BIS_fnc_curatorHint;
+ }
+ else
+ {
+ [objNull, localize "STR_AE3_Main_Zeus_CantStandbyDevice"] call BIS_fnc_showCuratorFeedbackMessage;
+ };
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_turnOffDevice.sqf b/addons/main/functions/fnc_zeus_turnOffDevice.sqf
new file mode 100644
index 00000000..e07d4716
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_turnOffDevice.sqf
@@ -0,0 +1,35 @@
+/**
+ * PRIVATE
+ *
+ * This function is triggered by a button in the default AE3 Zeus Asset Attributes Interface.
+ * The mechanism is similar to the code that allows this action in the ACE3 Interaction of the object.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus Interface
+ *
+ * Example:
+ * [] call AE3_main_fnc_zeus_turnOffDevice;
+ *
+ */
+
+private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _entity) exitWith {};
+
+[_entity] spawn
+{
+ params ["_entity"];
+
+ private _success = [_entity] call AE3_power_fnc_turnOffDevice;
+
+ if (_success) then
+ {
+ ["Advanced Equipment", localize "STR_AE3_Main_Zeus_TurnedOffDevice", 5] call BIS_fnc_curatorHint;
+ }
+ else
+ {
+ [objNull, localize "STR_AE3_Main_Zeus_CantTurnOffDevice"] call BIS_fnc_showCuratorFeedbackMessage;
+ };
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_turnOnDevice.sqf b/addons/main/functions/fnc_zeus_turnOnDevice.sqf
new file mode 100644
index 00000000..41ba0b23
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_turnOnDevice.sqf
@@ -0,0 +1,35 @@
+/**
+ * PRIVATE
+ *
+ * This function is triggered by a button in the default AE3 Zeus Asset Attributes Interface.
+ * The mechanism is similar to the code that allows this action in the ACE3 Interaction of the object.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus Interface
+ *
+ * Example:
+ * [] call AE3_main_fnc_zeus_turnOnDevice;
+ *
+ */
+
+private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+if (isNull _entity) exitWith {};
+
+[_entity] spawn
+{
+ params ["_entity"];
+
+ private _success = [_entity] call AE3_power_fnc_turnOnDevice;
+
+ if (_success) then
+ {
+ ["Advanced Equipment", localize "STR_AE3_Main_Zeus_TurnedOnDevice", 5] call BIS_fnc_curatorHint;
+ }
+ else
+ {
+ [objNull, localize "STR_AE3_Main_Zeus_CantTurnOnDevice"] call BIS_fnc_showCuratorFeedbackMessage;
+ };
+};
\ No newline at end of file
diff --git a/addons/main/functions/fnc_zeus_updateAttributes.sqf b/addons/main/functions/fnc_zeus_updateAttributes.sqf
new file mode 100644
index 00000000..83376ce6
--- /dev/null
+++ b/addons/main/functions/fnc_zeus_updateAttributes.sqf
@@ -0,0 +1,72 @@
+/**
+ * PRIVATE
+ *
+ * This function is assigned to the 'onUnload' Event of the default AE3 Asset Attributes Zeus Interface, called AE3_UserInterface_Zeus_Asset_Details
+ * This function runs local on the computer of the curator/zeus because it is UI triggered.
+ * This function will update Battery Level and/or Fuel Level for the given device.
+ *
+ * Arguments:
+ * None
+ *
+ * Results:
+ * Visual Feedback in Zeus
+ *
+ */
+
+params ["_display", "_exitCode"];
+// _exitCode: ok = 1, cancel = 2
+
+/* ======================================== */
+
+private _statusUpdateHandle = _display getVariable ["AE3_statusUpdateHandle", scriptNull];
+if (!isNull _statusUpdateHandle) then { terminate _statusUpdateHandle; };
+
+if (_exitCode == 1) then
+{
+ /* ======================================== */
+
+ private _entity = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull];
+ if (isNull _entity) exitWith {};
+
+ private _battery = _entity;
+ private _hasInternal = _entity getVariable "AE3_power_hasInternal";
+ if (_hasInternal) then { _battery = _entity getVariable "AE3_power_internal"; };
+
+ private _generator = _entity;
+
+ /* ======================================== */
+
+ private _message = "";
+
+ /* ======================================== */
+
+ // if asset has battery, update battery level
+ if (!isNil { _battery getVariable "AE3_power_batteryCapacity" }) then
+ {
+ private _batteryLevelCtrl = _display displayCtrl 1900;
+ private _batteryLevelPercent = sliderPosition _batteryLevelCtrl;
+
+ _message = _message + format [localize "STR_AE3_Main_Zeus_NewBatteryLevel", _batteryLevelPercent, "%"];
+
+ [_battery, _batteryLevelPercent] remoteExecCall ["AE3_power_fnc_setBatteryLevel", 2];
+ };
+
+ /* ======================================== */
+
+ // if asset has fuel, update fuel level
+ if (!isNil { _generator getVariable "AE3_power_fuelCapacity" }) then
+ {
+ private _fuelLevelCtrl = _display displayCtrl 1901;
+ private _fuelLevelPercent = sliderPosition _fuelLevelCtrl;
+
+ _message = _message + format [localize "STR_AE3_Main_Zeus_NewFuelLevel", _fuelLevelPercent, "%"];
+
+ [_generator, _fuelLevelPercent] call AE3_power_fnc_setFuelLevel;
+ };
+
+ /* ======================================== */
+
+ ["AE3 Asset Attributes changed", _message, 5] call BIS_fnc_curatorHint;
+
+ /* ======================================== */
+};
\ No newline at end of file
diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp
index 225562a3..6dcc2c7b 100644
--- a/addons/main/script_mod.hpp
+++ b/addons/main/script_mod.hpp
@@ -6,4 +6,5 @@
#define VERSION MAJOR.MINOR.PATCH.BUILD
#define VERSION_AR MAJOR,MINOR,PATCH,BUILD
-#define REQUIRED_VERSION 1.88
+// UI on Texture feature comes with Arma 3 v2.12
+#define REQUIRED_VERSION 2.12
diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp
index c0f116a3..80a946a7 100644
--- a/addons/main/script_version.hpp
+++ b/addons/main/script_version.hpp
@@ -1,4 +1,4 @@
#define MAJOR 0
#define MINOR 5
-#define PATCH 2
+#define PATCH 3
#define BUILD 0
diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml
index 44aa53cc..8643cc93 100644
--- a/addons/main/stringtable.xml
+++ b/addons/main/stringtable.xml
@@ -9,6 +9,7 @@
是
Да
oui
+ Si
no
@@ -17,6 +18,43 @@
否
Нет
non
+ No
+
+
+ Advanced Equipment Objects (AE3)
+ Advanced Equipment Objects (AE3)
+ Advanced Equipment Gegenstände (AE3)
+ Advanced Equipment 对象 (AE3)
+ Advanced Equipment Objects (AE3)
+ Advanced Equipment Objects (AE3)
+ Advanced Equipment Objects (AE3)
+
+
+ AE3 armaOS Modules
+ AE3 armaOS Modules
+ AE3 armaOS Module
+ AE3 armaOS 模块
+ AE3 armaOS Modules
+ AE3 armaOS Modules
+ AE3 Modulo ArmaOS
+
+
+ AE3 main Modules
+ AE3 main Modules
+ AE3 allgemeine Module
+ AE3 主模块
+ AE3 main Modules
+ AE3 modules principaux
+ AE3 main Modules
+
+
+ AE3 filesystem Modules
+ AE3 filesystem Modules
+ AE3 allgemeine Module
+ AE3 文件系统模块
+ AE3 filesystem Modules
+ AE3 Modules de système de fichiers
+ AE3 filesystem Modules
@@ -26,7 +64,8 @@
AE3 DEBUG MODUS AKTIVIERT
AE3调试模式已启用
АЕ3 РЕЖИМ ОТЛАДКИ ВКЛЮЧЕН
- AE3 MODE DEBUG ACTIVE
+ AE3 MODE DEBUG ACTIF
+ AE3 DEBUG MODE ABILITATO
AE3 DEBUG MODE DISABLED
@@ -35,6 +74,7 @@
AE3调试模式已禁用
АЕ3 РЕЖИМ ОТЛАДКИ ВЫКЛЮЧЕН
AE3 MODE DEBUG DESACTIVE
+ AE3 DEBUG MODE DISABILITATO
ACE3 Cargo Name: %1
@@ -43,6 +83,7 @@
ACE3 货物名称: %1
ACE3 Cargo Name: %1
ACE3 Nom de la cargaison: %1
+ Nome ACE3 Cargo: %1
Device Class: %1
@@ -51,6 +92,7 @@
设备类: %1
Device Class: %1
Classe de l'appareil: %1
+ Classe Dispositivo: %1
Power State: %1
@@ -59,6 +101,7 @@
电力状态: %1
Состояние питания: %1
État d'alimentation: %1
+ Stato Accensione: %1
Fuel Level: %1 l (%2%3 of %4 l)
@@ -67,6 +110,7 @@
燃料: %1 l (%2%3 of %4 l)
Уровень топлива: %1 l (%2%3 of %4 l)
Niveau de carburant: %1 l (%2%3 de %4 l)
+ Livello carburante: %1 l (%2%3 di %4 l)
Connected Power Devices: %1
@@ -75,6 +119,7 @@
已连接的电力设备: %1
Подключенные устройства (Питание): %1
Dispositifs d'alimentation connectés: %1
+ Dispositivi elettrici collegati: %1
Battery Level: %1 Wh (%2%3 of %4 Wh)
@@ -83,6 +128,7 @@
电量: %1 Wh (%2%3 of %4 Wh)
Уровень заряда батареи: %1 Wh (%2%3 of %4 Wh)
Niveau de batterie: %1 Wh (%2%3 de %4 Wh)
+ Livello batteria: %1 Wh (%2%3 di %4 Wh)
Power Output: %1 W)
@@ -91,6 +137,7 @@
输出: %1 W
Power Output: %1 W
Puissance de sortie: %1 W
+ Potenza elettrica in uscita: %1 W)
@@ -101,6 +148,7 @@
AE3属性
Атрибуты AE3
AE3 Attributs
+ Attributi AE3
Power Level
@@ -109,6 +157,7 @@
功率等级
Уровень мощности
Niveau d'énergie
+ Livello potenza elettrica
Power Level set at the beginning of the mission
@@ -117,6 +166,7 @@
任务开始时设定的功率等级
Уровень мощности, установленный в начале миссии
Niveau de puissance défini au début de la mission
+ Livello potenza elettrica impostata all'inizio della missione
Fuel Level
@@ -125,6 +175,7 @@
燃料
Уровень топлива
Niveau de carburant
+ Livello carburante
Fuel Level set at the beginning of the mission
@@ -133,40 +184,45 @@
任务开始时设定的燃料
Уровень топлива установленный в начале миссии
Niveau de carburant défini au début de la mission
+ Livello carburante impostato all'inizio della missione
-
+
Forbidden connection removed: this source asset is not allowed for connection type: %1
Forbidden connection removed: this source asset is not allowed for connection type: %1
Unzulässige Verbindung entfernt: für dieses Ausgangsgerät sind Verbindungen diesen Typs unzulässig: %1
已移除非法连接: 此来源不适用于连接类型: %1
Удалено недопустимое соединение: для этого устройства вывода соединения такого типа недопустимы: %1
Connexion interdite supprimée : cet élément source n'est pas autorisé pour le type de connexion: %1
+ Rimosse connessioni proibita:Questa fonte non è permessa per questo tipo di connessione: %1
-
+
Forbidden connection removed: this destination asset is not allowed for connection type: %1
Forbidden connection removed: this destination asset is not allowed for connection type: %1
Unzulässige Verbindung entfernt: für dieses Zielgerät sind Verbindungen diesen Typs unzulässig: %1
已移除非法连接: 此目标不适用于连接类型: %1
Удалено запрещенное подключение: этот целевой ресурс не разрешен для типа подключения: %1
Connexion interdite supprimée : cet élément de destination n'est pas autorisé pour le type de connexion: %1
+ Rimossa connessione proibita: Questa destinazione non è permessa per questo tipo di connessione: %1
-
+
Forbidden connection removed: source and destination are identical
Forbidden connection removed: source and destination are identical
Unzulässige Verbindung entfernt: Ausgang und Ziel sind identisch
已移除非法连接: 来源和目标重复
Удалено недопустимое соединение: выход и пункт назначения идентичны
Connexion interdite supprimée : la source et la destination sont identiques
+ Rimossa connessione proibita: fonte e destinazione sono identiche
-
+
Connection warning: this asset already has a connection of type: %1
Connection warning: this asset already has a connection of type: %1
Verbindungswarnung: dieses Gerät hat bereits eine Verbindung vom Typ: %1
连接警告: 此资产已有一个类型为 %1 的连接
Предупреждение о подключении: у этого устройства уже есть подключение такого типа: %1
Avertissement de connexion : cet actif a déjà une connexion de type: %1
+ Avviso connessione: Questo asset hanno già una connessione del tipo: %1
@@ -177,6 +233,7 @@
AE3 主体
AE3 Общие
AE3 principal
+ AE3 main
Debug Mode
@@ -185,6 +242,7 @@
调试模式
Режим отладки
Mode Debug
+ Modalità DEBUG
By enabling the AE3 Debug Mode you will get additional information about the internal structure of AE3.
@@ -193,7 +251,723 @@
你可以通过AE3调试模式获得更多有关AE3内部结构的信息.
Включив режим отладки AE3, вы получите дополнительную информацию о внутренней структуре AE3.
En activant le mode de débogage AE3, vous obtiendrez des informations supplémentaires sur la structure interne d'AE3.
+ Abilitando la modalità DEBUG AE3 riceverai informazioni addizionali riguardo la struttura interna di AE3.
+
+
+
+
+ AE3 Add Connection
+ AE3 Add Connection
+ AE3 Verbindung hinzufügen
+ AE3 添加连接
+ AE3 Add Connection
+ AE3 Ajouter une connexion
+ AE3 Aggiungi Connessione
+
+
+ This module allows you to add a power or network connection between two devices. Sync two devices to this module, setup direction and connection type and press 'OK'.
+ This module allows you to add a power or network connection between two devices. Sync two devices to this module, setup direction and connection type and press 'OK'.
+ Dieses Modul ermöglicht dir eine Strom- oder Netzwerkverbindung zwischen zwei Geräten herzustellen. Synchronisiere zwei Geräte mit diesem Modul, stelle Richtung und Verbindungstyp ein und drücke 'OK'.
+ 此模块允许您在两个设备之间添加电源或网络连接,将两个设备同步到此模块,设置方向和连接类型,然后按"确定".
+ This module allows you to add a power or network connection between two devices. Sync two devices to this module, setup direction and connection type and press 'OK'.
+ Ce module permet d'ajouter une alimentation ou une connexion réseau entre deux appareils. Synchronisez deux appareils avec ce module, configurez la direction et le type de connexion et appuyez sur « OK ».
+ Questo modulo permette di aggiungere una connessione elettrica o di rete tra 2 dispositivi. Sincronizza due dispositivi con questo modulo,imposta il tipo di connessione e direzione e premi 'OK'.
+
+
+ AE3 Object Details
+ AE3 Object Details
+ AE3 Gegenstandsdetails
+ AE3 对象细节
+ AE3 Object Details
+ AE3 Détails de l'objet
+ AE3 Dettagli Oggetti
+
+
+ Battery Level
+ Battery Level
+ Batterieladestand
+ 电量
+ Уровень заряда батареи
+ Niveau de batterie
+ Livello batteria
+
+
+ Fuel Level
+ Fuel Level
+ Treibstofffüllstand
+ 燃料
+ Уровень топлива
+ Niveau de carburant
+ Livello carburante
+
+
+ Close
+ Close
+ Schließen
+ 关闭
+ Закрыть
+ Fermer
+ Chiudi
+
+
+ Open
+ Open
+ Öffnen
+ 打开
+ Открыть
+ Ouvrir
+ Apri
+
+
+ Standby
+ Standby
+ Ruhezustand
+ 待机
+ Ожидание (Standby)
+ Veille
+ Attesa
+
+
+ Turn off
+ Turn off
+ Ausschalten
+ 关闭
+ Выключить
+ Éteindre
+ Spegni
+
+
+ Turn on
+ Turn on
+ Einschalten
+ 打开
+ Включить
+ Allumer
+ Accendi
+
+
+ AE3 Add User
+ AE3 Add User
+ AE3 Benutzer hinzufügen
+ AE3添加用户
+ AE3 Add User
+ AE3 Ajouter un utilisateur
+ AE3 Aggiungi utente
+
+
+ AE3 Add Security Commands
+ AE3 Add Security Commands
+ AE3 Security-Befehle hinzufügen
+ AE3添加安全命令
+ AE3 Add Security Commands
+ AE3 Ajouter des commandes de sécurité
+ AE3 Aggiungi comandi di sicurezza
+
+
+ AE3 Add Games
+ AE3 Add Games
+ AE3 Spiele hinzufügen
+ AE3添加游戏
+ AE3 Add Games
+ AE3 Ajouter des jeux
+ AE3 Aggiungi giochi
+
+
+ AE3 Add File
+ AE3 Add File
+ AE3 Datei hinzufügen
+ AE3添加文件
+ AE3 Add File
+ AE3 Ajouter un fichier
+ AE3 Aggiungi files
+
+
+ AE3 Add Directory
+ AE3 Add Directory
+ AE3 Verzeichnis hinzufügen
+ AE3添加目录
+ AE3 Add Directory
+ AE3 Ajouter un répertoire
+ AE3 Aggiungi Directory
+
+
+ AE3 Add Connection
+ AE3 Add Connection
+ AE3 Verbindung hinzufügen
+ AE3 添加连接
+ AE3 Add Connection
+ AE3 Ajouter une connexion
+ AE3 Aggiungi Connessione
+
+
+ This module defines users for an armaOS computer.
+ This module defines users for an armaOS computer.
+ Dieses Modul definiert Benutzer für einen armaOS Computer.
+ 此模块定义armaOS计算机的用户.
+ Этот модуль определяет пользователей для компьютера с armaOS.
+ Ce module définit les utilisateurs pour un ordinateur armaOS.
+ Questo definisce gli utenti per i computer armaOS.
+
+
+ This module adds security commands to an armaOS computer.
+ This module adds security commands to an armaOS computer.
+ Dieses Modul fügt Security-Befehle zu einem armaOS Computer hinzu.
+ 这个模块将安全指令添加到armaOS电脑中.
+ Этот модуль добавляет команды безопасности к компьютеру armaOS.
+ Ce module ajoute des commandes de sécurité à un ordinateur armaOS.
+ Questo modulo aggiunge comandi di security ad un computer armaOS.
+
+
+ This module adds games to an armaOS computer.
+ This module adds games to an armaOS computer.
+ Dieses Modul fügt einem armaOS Computer Spiele hinzu.
+ 这个模块将游戏添加到armaOS电脑中.
+ Этот модуль добавляет компьютерные игры в armaOS.
+ Ce module ajoute des jeux à un ordinateur armaOS.
+ Questo modulo aggiunge giochi ad un computer armaOS.
+
+
+ This module adds a file to a object which supports filesystems, like computers.
+ This module adds a file to a object which supports filesystems, like computers.
+ Dieses Modul fügt eine Datei zu einem Objekt hinzu, das Dateisysteme unterstützt, wie Computer.
+ 此模块将文件添加到支持文件系统的对象(如计算机).
+ Этот модуль добавляет файл к объекту, который поддерживает файловую систему (например компьютер).
+ Ce module ajoute un fichier à un objet qui prend en charge les systèmes de fichiers, comme les ordinateurs.
+ Questo modulo aggiunge un file o un oggetto che supporta filesystem, come computers.
+
+
+ This module adds a directory to a object which supports filesystems, like computers.
+ This module adds a directory to a object which supports filesystems, like computers.
+ Dieses Modul fügt ein Verzeichnis zu einem Objekt hinzu, das Dateisysteme unterstützt, wie Computer.
+ 此模块将目录添加到支持文件系统的对象(如计算机).
+ Этот модуль добавляет директорию к объекту, который поддерживает файловую систему (например компьютер).
+ Ce module ajoute un répertoire à un objet qui prend en charge les systèmes de fichiers, comme les ordinateurs.
+ Questo modulo aggiunge una directory ad un oggetto che supporta i filesystems, come i computer.
+
+
+ This module allows you to add a power or network connection between two devices. Sync two devices to this module, setup direction and connection type and press 'OK'.
+ This module allows you to add a power or network connection between two devices. Sync two devices to this module, setup direction and connection type and press 'OK'.
+ Dieses Modul ermöglicht dir eine Strom- oder Netzwerkverbindung zwischen zwei Geräten herzustellen. Synchronisiere zwei Geräte mit diesem Modul, stelle Richtung und Verbindungstyp ein und drücke 'OK'.
+ 此模块允许您在两个设备之间添加电源或网络连接,将两个设备同步到此模块,设置方向和连接类型,然后按"确定".
+ This module allows you to add a power or network connection between two devices. Sync two devices to this module, setup direction and connection type and press 'OK'.
+ Ce module permet d'ajouter une alimentation ou une connexion réseau entre deux appareils. Synchronisez deux appareils avec ce module, configurez la direction et le type de connexion et appuyez sur « OK ».
+ Questo modulo permette di aggiungere una connessione elettrica o di rete tra 2 dispositivi. Sincronizza due dispositivi con questo modulo,imposta il tipo di connessione e direzione e premi 'OK'.
+
+
+ Username
+ Username
+ Benutzername
+ 用户名
+ Username
+ Nom d'utilisateur
+ Username
+
+
+ Password
+ Password
+ Kennwort
+ 密码
+ Password
+ Mot de passe
+ Password
+
+
+ Path
+ Path
+ Pfad
+ 路径
+ Путь
+ Chemin d'accès
+ Percorso
+
+
+ File content
+ File content
+ Dateiinhalt
+ 文件内容
+ Содержимое файла
+ Contenu du fichier
+ Contenuto del file
+
+
+ Is code?
+ Is code?
+ Ist Code?
+ 是否为代码?
+ Это код?
+ Est du code?
+ E' code?
+
+
+ File owner
+ File owner
+ Dateibesitzer
+ 文件所有者
+ Владелец файла
+ Propriétaire du fichier
+ Proprietario file
+
+
+ Directory owner
+ Directory owner
+ Verzeichnisbesitzer
+ 目录所有者
+ Владелец директории
+ Propriétaire du répertoire
+ proprietario directory
+
+
+ Permissions
+ Permissions
+ Zugriffsrechte
+ 权限
+ Permissions
+ Permissions
+ Permessi
+
+
+ Owner
+ Owner
+ Besitzer
+ 所有者
+ Owner
+ propriétaire
+ Proprietario
+
+
+ Everyone
+ Everyone
+ Jeder
+ 所有人
+ Everyone
+ tout le monde
+ Chiunque
+
+
+ From (Consumer)
+ From (Consumer)
+ Von (Verbraucher)
+ From (Consumer)
+ From (Consumer)
+ De (Consommateur)
+ DA (utilizzatore)
+
+
+ From
+ From
+ Von
+ From
+ From
+ De
+ Da
+
+
+ To (Provider)
+ To (Provider)
+ Nach (Lieferant)
+ To (Provider)
+ To (Provider)
+ A (Provider)
+ A (Fornitore)
+
+
+ To
+ To
+ Nach
+ To
+ To
+ A
+ A
+
+
+ Connection Type
+ Connection Type
+ Verbindungstyp
+ 连接类型
+ Connection Type
+ Type de connexion
+ Tipo di connessione
+
+
+ Power
+ Power
+ Strom
+ 电源
+ Power
+ Allimentation
+ Energia
+
+
+ Network
+ Network
+ Netzwerk
+ 网络
+ Network
+ Réseau
+ Rete
+
+
+ Switch
+ Switch
+ Tauschen
+ 开关
+ Switch
+ changer
+ Switch
+
+
+ Object Status (Click on text and use up/down arrow keys to scroll)
+ Object Status (Click on text and use up/down arrow keys to scroll)
+ Status Gegenstand (Klicke auf den text und benutze die hoch/runter Pfeiltasten zum scrollen)
+ 对象状态 (单击文本并使用上/下箭头键滚动)
+ Object Status (Click on text and use up/down arrow keys to scroll)
+ Statut de l'objet (Cliquez sur le texte et utilisez les touches fléchées haut/bas pour faire défiler)
+ Stato oggetto (Clicca sul testo e usa le frecce su/giù per scorrere)
+
+
+ Enable Encryption
+ Enable Encryption
+ Aktiviere Verschlüsselung
+ 启用加密
+ Enable Encryption
+ Activer le chiffrement
+ Abilita Criptazione
+
+
+ Encryption Algorithm
+ Encryption Algorithm
+ Verschlüsselungsalorithmus
+ 加密算法
+ Encryption Algorithm
+ Algorithme de chiffrement
+ Algoritmo di Criptazione
+
+
+ Encryption Key
+ Encryption Key
+ Verschlüsselungsschlüssel
+ 密钥
+ Encryption Key
+ Clé de chiffrement
+ Chiavi di Criptazione
+
+
+ Caesar
+ Caesar
+ Caesar
+ 凯撒
+ Caesar
+ César
+ Caesar
+
+
+ Columnar
+ Columnar
+ Columnar
+ 列移位
+ Columnar
+ Colonnaire
+ Columnar
+
+
+ Object closed.
+ Object closed.
+ Gegenstand geschlossen.
+ 对象已关闭.
+ Object closed.
+ Objet fermé.
+ Oggetto chiuso.
+
+
+ Object opened.
+ Object opened.
+ Gegenstand geöffnet.
+ 对象已开启.
+ Object opened.
+ Objet ouvert.
+ Oggetto aperto.
+
+
+ Can't close object.
+ Can't close object.
+ Kann Gegenstand nicht schließen.
+ 不能关闭对象.
+ Can't close object.
+ Impossible de fermer l'objet.
+ Non puoi chiudere l'oggetto.
+
+
+ Can't open object.
+ Can't open object.
+ Kann Gegenstand nicht öffnen.
+ 不能打开对象.
+ Can't open object.
+ Impossible d'ouvrir l'objet.
+ Non puoi aprire l'oggetto.
+
+
+ Device put into standby mode.
+ Device put into standby mode.
+ Gerät in den Ruhezustand versetzt.
+ 设备进入待机模式.
+ Device put into standby mode.
+ Appareil mis en mode veille.
+ Dispositivo in modalità standby.
+
+
+ Device turned off.
+ Device turned off.
+ Gerät ausgeschaltet.
+ 关闭设备.
+ Device turned off.
+ Appareil éteint.
+ Dispositivo spento..
+
+
+ Device turned on.
+ Device turned on.
+ Gerät eingeschaltet.
+ 打开设备.
+ Device turned on.
+ Appareil allumé.
+ Dispositivo acceso.
+
+
+ Device cannot be put into standby mode.
+ Device cannot be put into standby mode.
+ Gerät kann nicht in den Ruhezustand versetzt werden.
+ 设备不能进入待机模式.
+ Device cannot be put into standby mode.
+ L'appareil ne peut pas être mis en mode veille.
+ Dispositivo non può essere messo in modalità standby
+
+
+ Can't turn off device.
+ Can't turn off device.
+ Gerät kann nicht ausgeschaltet werden.
+ 不能关闭设备.
+ Can't turn off device.
+ Impossible d'éteindre l'appareil.
+ Non posso spegnere il dispositivo.
+
+
+ Can't turn on device.
+ Can't turn on device.
+ Gerät kann nicht eingeschaltet werden.
+ 不能打开设备.
+ Can't turn on device.
+ Impossible d'allumer l'appareil.
+ Non posso accendere il dispositivo.
+
+
+ 'From' missing
+ 'From' missing
+ 'Von' fehlt
+ 缺少 'From'
+ 'From' missing
+ 'De' manquant
+ 'Da' mancante
+
+
+ 'To' missing
+ 'To' missing
+ 'Nach' fehlt
+ 缺少 'To'
+ 'To' missing
+ 'A' manquant
+ 'A' mancante
+
+
+ 'Path' missing
+ 'Path' missing
+ 'Pfad' fehlt
+ 缺少 'Path'
+ 'Path' missing
+ 'Chemin' manquant
+ 'Percorso' mancante
+
+
+ 'Owner' missing
+ 'Owner' missing
+ 'Besitzer' fehlt
+ 缺少 'Owner'
+ 'Owner' missing
+ 'Propriétaire' manquant
+ 'Proprietario' mancante
+
+
+ 'Key' missing
+ 'Key' missing
+ 'Schlüssel' fehlt
+ 缺少 'Key'
+ 'Key' missing
+ 'Clé' manquante
+ 'Key' mancante
+
+
+ 'Username' missing
+ 'Username' missing
+ 'Benutzname' fehlt
+ 缺少 'Username'
+ 'Username' missing
+ 'Nom d'utilisateur' manquant
+ 'Username' mancante
+
+
+ 'Password' missing
+ 'Password' missing
+ 'Passwort' fehlt
+ 缺少 'Password'
+ 'Password' missing
+ 'Mot de passe' manquant
+ 'Password' mancante
+
+
+ 'Path' contains forbidden spaces
+ 'Path' contains forbidden spaces
+ 'Pfad' enthält verbotene Leerzeichen
+ 'Path' 包含非法的空格
+ 'Path' contains forbidden spaces
+ 'Chemin' contient des espaces interdits
+ 'Percorso' contiene caratteri proibiti
+
+
+ 'Username' contains forbidden spaces
+ 'Username' contains forbidden spaces
+ 'Benutzername' enthält verbotene Leerzeichen
+ 'Username' 包含非法的空格
+ 'Username' contains forbidden spaces
+ 'Nom d'utilisateur' contient des espaces interdits
+ 'Username' contiene caratteri proibiti
+
+
+ 'Owner' contains forbidden spaces
+ 'Owner' contains forbidden spaces
+ 'Besitzer' enthält verbotene Leerzeichen
+ 'Owner' 包含非法的空格
+ 'Owner' contains forbidden spaces
+ 'Propriétaire' contient des espaces interdits
+ 'proprietario' contiene caratteri proibiti
+
+
+ AE3 Power Connection added
+ AE3 Power Connection added
+ AE3 Stromverbindung hinzugefügt
+ AE3 电力连接已添加
+ AE3 Power Connection added
+ AE3 Connexion électrique ajoutée
+ AE3 Connessione elettrica aggiunta
+
+
+ AE3 Network Connection added
+ AE3 Network Connection added
+ AE3 Netzwerkverbindung hinzugefügt
+ AE3 网络连接已添加
+ AE3 Network Connection added
+ AE3 Connexion réseau ajoutée
+ AE3 Connessione di rete aggiunta
+
+
+ AE3 Directory added
+ AE3 Directory added
+ AE3 Verzeichnis hinzugefügt
+ AE3 目录已添加
+ AE3 Directory added
+ AE3 Annuaire ajouté
+ AE3 Cartella aggiunta
+
+
+ AE3 File added
+ AE3 File added
+ AE3 Datei hinzugefügt
+ AE3 文件已添加
+ AE3 File added
+ AE3 Fichier ajouté
+ AE3 File aggiunto
+
+
+ AE3 Games added
+ AE3 Games added
+ AE3 Spiele hinzugefügt
+ AE3 游戏已添加
+ AE3 Games added
+ AE3 Jeux ajoutés
+ AE3 Giochi aggiunti
+
+
+ AE3 Security Commands added
+ AE3 Security Commands added
+ AE3 Spiele hinzugefügt
+ AE3 安全命令已添加
+ AE3 Security Commands added
+ AE3 Commandes de sécurité ajoutées
+ AE3 Comandi di sicurezza aggiunti
+
+
+ AE3 User added
+ AE3 User added
+ AE3 Benutzer hinzugefügt
+ AE3 用户已添加
+ AE3 User added
+ AE3 Utilisateur ajouté
+ AE3 Utente aggiunto
+
+
+ No computer. Place module on computer.
+ No computer. Place module on computer.
+ Kein Computer. Setze das Mobul auf einen Computer.
+ 没有电脑.请将模块放置在电脑上.
+ No computer. Place module on computer.
+ Pas d'ordinateur. Placez le module sur l'ordinateur.
+ No computer, piazza il modulo su un computer
+
+
+ Computer currently in use.
+ Computer currently in use.
+ Computer wird gerade verwendet.
+ 当前正在使用计算机.
+ Computer currently in use.
+ Ordinateur en cours d'utilisation.
+ Computer attualmente in uso.
+
+
+ New Battery Level: %1%2
+ New Battery Level: %1%2
+ Neuer Batterieladestand: %1%2
+ 新电量: %1%2
+ New Battery Level: %1%2
+ Nouveau niveau de batterie : %1%2
+ Nuovo livello batteria: %1%2
+
+
+ New Fuel Level: %1%2
+ New Fuel Level: %1%2
+ Neuer Treibstofffüllstand: %1%2
+ 新油量: %1%2
+ New Fuel Level: %1%2
+ Nouveau niveau de carburant: %1%2
+ Nuovo livello benzina: %1%2
+
+
+ AE3 Object: %1
+ AE3 Object: %1
+ AE3 Gegenstand: %1
+ AE3 独享: %1
+ AE3 Object: %1
+ AE3 Objet: %1
+ AE3 Oggetto: %1
+
+
+ Class name: %1
+ Class name: %1
+ Klassenname: %1
+ 类名: %1
+ Class name: %1
+ Nom de la classe: %1
+ Nome Classe: %1
+
+
diff --git a/addons/main/ui/AE3_Module_Icon_addConnection.paa b/addons/main/ui/AE3_Module_Icon_addConnection.paa
new file mode 100644
index 00000000..2a714b4b
Binary files /dev/null and b/addons/main/ui/AE3_Module_Icon_addConnection.paa differ
diff --git a/addons/network/CfgVehicles.hpp b/addons/network/CfgVehicles.hpp
index 294e98d5..6437555a 100644
--- a/addons/network/CfgVehicles.hpp
+++ b/addons/network/CfgVehicles.hpp
@@ -6,6 +6,12 @@ class CfgVehicles
class Land_Router_01_olive_F;
class Land_Router_01_olive_F_AE3: Land_Router_01_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
displayName = "$STR_AE3_Network_Config_RouterDisplayName";
@@ -53,6 +59,12 @@ class CfgVehicles
class Land_Router_01_black_F;
class Land_Router_01_black_F_AE3: Land_Router_01_black_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
displayName = "$STR_AE3_Network_Config_RouterDisplayName";
@@ -100,6 +112,12 @@ class CfgVehicles
class Land_Router_01_sand_F;
class Land_Router_01_sand_F_AE3: Land_Router_01_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
displayName = "$STR_AE3_Network_Config_RouterDisplayName";
diff --git a/addons/network/XEH_PREP.hpp b/addons/network/XEH_PREP.hpp
index 4aa32e3a..f4c61a76 100644
--- a/addons/network/XEH_PREP.hpp
+++ b/addons/network/XEH_PREP.hpp
@@ -18,4 +18,8 @@ PREP(dhcp_refresh);
PREP(dhcp_onTurnOn);
/* Generic */
-PREP(ip2str);
\ No newline at end of file
+PREP(ip2str);
+
+/* Connections */
+PREP(createNetworkConnection);
+PREP(removeNetworkConnection);
\ No newline at end of file
diff --git a/addons/network/config.cpp b/addons/network/config.cpp
index 202056d9..714b5bc0 100644
--- a/addons/network/config.cpp
+++ b/addons/network/config.cpp
@@ -5,7 +5,12 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {};
+ units[] =
+ {
+ "Land_Router_01_olive_F_AE3",
+ "Land_Router_01_black_F_AE3",
+ "Land_Router_01_sand_F_AE3"
+ };
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main"};
diff --git a/addons/network/functions/fnc_connect_device2router.sqf b/addons/network/functions/fnc_connect_device2router.sqf
index fef10dbb..470e8dfa 100644
--- a/addons/network/functions/fnc_connect_device2router.sqf
+++ b/addons/network/functions/fnc_connect_device2router.sqf
@@ -9,13 +9,13 @@
* None
*/
-params['_device', '_parent'];
+params ["_device", "_parent"];
-private _children = _parent getVariable 'AE3_network_children';
-_parent setVariable ['AE3_network_children', _children + [_device], true];
+private _children = _parent getVariable ["AE3_network_children", []];
+_parent setVariable ["AE3_network_children", _children + [_device], true];
-_device setVariable ['AE3_network_parent', _parent, true];
-_device setVariable ['AE3_network_address', [_device] call AE3_network_fnc_dhcp_get, true];
+_device setVariable ["AE3_network_parent", _parent, true];
+_device setVariable ["AE3_network_address", [_device] call AE3_network_fnc_dhcp_get, true];
if (isNull _parent) then
{
diff --git a/addons/network/functions/fnc_connect_isCyclic.sqf b/addons/network/functions/fnc_connect_isCyclic.sqf
index 087c7938..e71da794 100644
--- a/addons/network/functions/fnc_connect_isCyclic.sqf
+++ b/addons/network/functions/fnc_connect_isCyclic.sqf
@@ -9,22 +9,22 @@
* 0: If cyclic
*/
-params['_entity', '_cmp'];
+params ["_entity", "_cmp"];
private _result = false;
{
- if(_cmp == _x) then
+ if (_cmp == _x) then
{
_result = true;
break;
};
- if([_x, _cmp] call AE3_network_fnc_connect_isCyclic) then
+ if ([_x, _cmp] call AE3_network_fnc_connect_isCyclic) then
{
_result = true;
break;
};
-} forEach (_entity getVariable ['AE3_network_children', []]);
+} forEach (_entity getVariable ["AE3_network_children", []]);
_result;
\ No newline at end of file
diff --git a/addons/network/functions/fnc_connect_router2router.sqf b/addons/network/functions/fnc_connect_router2router.sqf
index 19e4ddd5..2c35f5ae 100644
--- a/addons/network/functions/fnc_connect_router2router.sqf
+++ b/addons/network/functions/fnc_connect_router2router.sqf
@@ -9,29 +9,29 @@
* None
*/
-params['_router', '_parent'];
+params ["_router", "_parent"];
-if (!isNull (_router getVariable 'AE3_network_parent')) then
+if (!isNull (_router getVariable ["AE3_network_parent", objNull])) then
{
[_router] call AE3_network_fnc_disconnect;
};
-_router setVariable ['AE3_network_parent', _parent, true];
+_router setVariable ["AE3_network_parent", _parent, true];
-private _children = _parent getVariable 'AE3_network_children';
-_parent setVariable ['AE3_network_children', _children + [_router], true];
+private _children = _parent getVariable ["AE3_network_children", []];
+_parent setVariable ["AE3_network_children", _children + [_router], true];
-if([_parent, _parent] call AE3_network_fnc_connect_isCyclic) exitWith
+if ([_parent, _parent] call AE3_network_fnc_connect_isCyclic) exitWith
{
- _router setVariable ['AE3_network_parent', objNull, true];
+ _router setVariable ["AE3_network_parent", objNull, true];
- _children = _parent getVariable 'AE3_network_children';
- _parent setVariable ['AE3_network_children', _children - [_router], true];
+ _children = _parent getVariable ["AE3_network_children", []];
+ _parent setVariable ["AE3_network_children", _children - [_router], true];
};
-_router setVariable ['AE3_network_address', [_router] call AE3_network_fnc_dhcp_get, true];
+_router setVariable ["AE3_network_address", [_router] call AE3_network_fnc_dhcp_get, true];
-if(count (_router getVariable 'AE3_network_children') != 0) then
+if (count (_router getVariable ["AE3_network_children", []]) != 0) then
{
[_router] call AE3_network_fnc_dhcp_refresh;
};
diff --git a/addons/network/functions/fnc_createNetworkConnection.sqf b/addons/network/functions/fnc_createNetworkConnection.sqf
new file mode 100644
index 00000000..25fb09f5
--- /dev/null
+++ b/addons/network/functions/fnc_createNetworkConnection.sqf
@@ -0,0 +1,36 @@
+/**
+ * PUBLIC
+ *
+ * This function creates a network connection from the _from object to the _to object.
+ *
+ * Arguments:
+ * 1: From
+ * 2: To
+ *
+ * Results:
+ * None
+ *
+ * Examples:
+ * [_laptop, _router] call AE3_network_fnc_createNetworkConnection;
+ * [_router, _router] call AE3_network_fnc_createNetworkConnection;
+ *
+ */
+
+params ["_from", "_to"];
+
+[_from, _to] spawn
+{
+ params ["_from", "_to"];
+
+ // wait until both devices have relevant variables set; this indicates that the init process is done
+ waitUntil { !(isNil { _from getVariable "AE3_network_address"; }) && !(isNil { _to getVariable "AE3_network_children"; }) };
+
+ if (isNil { _from getVariable "AE3_network_children"; }) then
+ {
+ [_from, _to] call AE3_network_fnc_connect_device2router;
+ }
+ else
+ {
+ [_from, _to] call AE3_network_fnc_connect_router2router;
+ };
+};
\ No newline at end of file
diff --git a/addons/network/functions/fnc_dhcp_get.sqf b/addons/network/functions/fnc_dhcp_get.sqf
index 48797f7f..90650692 100644
--- a/addons/network/functions/fnc_dhcp_get.sqf
+++ b/addons/network/functions/fnc_dhcp_get.sqf
@@ -9,20 +9,20 @@
*
*/
-params['_entity'];
+params ["_entity"];
-private _parent = _entity getVariable 'AE3_network_parent';
+private _parent = _entity getVariable ["AE3_network_parent", objNull];
-if(!alive _entity || _entity getVariable 'AE3_power_powerState' == 0) exitWith {[127, 0, 0, 1]};
+if (!alive _entity || _entity getVariable "AE3_power_powerState" == 0) exitWith { [127, 0, 0, 1] };
-if(isNull _parent) then
+if (isNull _parent) then
{
- _counter = _entity getVariable 'AE3_network_addressCounter';
+ _counter = _entity getVariable "AE3_network_addressCounter";
_counter = _counter + 1;
- _entity setVariable ['AE3_network_addressCounter', _counter, true];
+ _entity setVariable ["AE3_network_addressCounter", _counter, true];
- _address = _entity getVariable 'AE3_network_address';
+ _address = _entity getVariable "AE3_network_address";
_return = [0, 0, 0, 0];
_return set [0, _address select 0];
diff --git a/addons/network/functions/fnc_dhcp_onTurnOn.sqf b/addons/network/functions/fnc_dhcp_onTurnOn.sqf
index 6c5fb217..342e6870 100644
--- a/addons/network/functions/fnc_dhcp_onTurnOn.sqf
+++ b/addons/network/functions/fnc_dhcp_onTurnOn.sqf
@@ -8,17 +8,17 @@
* None
*/
-params['_entity'];
+params ["_entity"];
-private _parent = _entity getVariable 'AE3_network_parent';
+private _parent = _entity getVariable ["AE3_network_parent", objNull];
-if(!isNull _parent) then
+if (!isNull _parent) then
{
_ip = [_parent] call AE3_network_fnc_dhcp_get;
- _entity setVariable ['AE3_network_address', _ip, true];
+ _entity setVariable ["AE3_network_address", _ip, true];
};
-if(!isNil {_entity getVariable 'AE3_network_children'}) then
+if (!isNil {_entity getVariable "AE3_network_children"}) then
{
/*
Sketchy workaround, because this is executed before the
diff --git a/addons/network/functions/fnc_dhcp_refresh.sqf b/addons/network/functions/fnc_dhcp_refresh.sqf
index 34e082f5..e0fdf622 100644
--- a/addons/network/functions/fnc_dhcp_refresh.sqf
+++ b/addons/network/functions/fnc_dhcp_refresh.sqf
@@ -10,15 +10,15 @@
*
*/
- params['_entity'];
+ params ["_entity"];
{
- _x setVariable ['AE3_network_address', [_entity] call AE3_network_fnc_dhcp_get, true];
+ _x setVariable ["AE3_network_address", [_entity] call AE3_network_fnc_dhcp_get, true];
- if(!isNil {_x getVariable 'AE3_network_childern'}) then
+ if(!isNil {_x getVariable "AE3_network_children"}) then
{
[_x] call AE3_network_fnc_dhcp_refresh;
};
-} forEach (_entity getVariable 'AE3_network_children');
\ No newline at end of file
+} forEach (_entity getVariable ["AE3_network_children", []]);
\ No newline at end of file
diff --git a/addons/network/functions/fnc_disconnect.sqf b/addons/network/functions/fnc_disconnect.sqf
index 9ffeb61c..a62521b1 100644
--- a/addons/network/functions/fnc_disconnect.sqf
+++ b/addons/network/functions/fnc_disconnect.sqf
@@ -1,42 +1,19 @@
/**
- * Disconnect a device from its parent router
+ * PUBLIC
+ *
+ * Disconnects a device from its parent router.
*
* Arguments:
* 0: Device
- * 1: Parent router
*
* Returns:
* None
+ *
+ * Example:
+ * [_entity] call AE3_network_fnc_disconnect;
+ *
*/
-params['_entity'];
-
-private _parent = _entity getVariable 'AE3_network_parent';
-private _children = _parent getVariable 'AE3_network_children';
-
-_parent setVariable ['AE3_network_children', _children - [_entity], true];
-
-if(!isNil {_entity getVariable 'AE3_network_children'}) then
-{
- [_entity] call AE3_network_fnc_dhcp_refresh;
-};
-
-// set parent to "network disconnected" if parent has no connected children and no connected parent-parent
-_children = _parent getVariable 'AE3_network_children';
-if (count _children == 0) then
-{
- private _parentParent = _parent getVariable 'AE3_network_parent';
- if (isNull _parentParent) then
- {
- [_parent, "networkConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
- };
-};
-
-// set device to "network disconnected" if device has no connected children
-_children = _entity getVariable ['AE3_network_children', []];
-if (count _children == 0) then
-{
- [_entity, "networkConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
-};
+params ["_entity"];
-_entity setVariable ['AE3_network_parent', objNull, true];
\ No newline at end of file
+[_entity] call AE3_network_fnc_removeNetworkConnection;
\ No newline at end of file
diff --git a/addons/network/functions/fnc_initNetworkDevice.sqf b/addons/network/functions/fnc_initNetworkDevice.sqf
index 2befe131..33262f22 100644
--- a/addons/network/functions/fnc_initNetworkDevice.sqf
+++ b/addons/network/functions/fnc_initNetworkDevice.sqf
@@ -30,7 +30,9 @@ private _childs =
private _action = [_aceCargoName, _aceCargoName, "", _childStatement, {true}, {}, _x] call ace_interact_menu_fnc_createAction;
_actions pushBack [_action, [], _target];
- } forEach (_routers); _actions
+ } forEach (_routers);
+
+ _actions
};
private _connect = ["AE3_Network_ConnectAction", localize "STR_AE3_Network_Interaction_ConnectToRouter", "",
@@ -38,7 +40,7 @@ private _connect = ["AE3_Network_ConnectAction", localize "STR_AE3_Network_Inter
{
params ["_target", "_player", "_params"];
_params params ["_device"];
- (alive _target) and (isNull (_device getVariable "AE3_network_parent"))
+ (alive _target) and (isNull (_device getVariable ["AE3_network_parent", objNull]))
},
_childs,
[_entity]
@@ -53,25 +55,25 @@ private _disconnect = ["AE3_Network_DisconnectAction", localize "STR_AE3_Network
{
params ["_target", "_player", "_params"];
_params params ["_device"];
- (alive _target) and (!isNull (_device getVariable "AE3_network_parent"))
+ (alive _target) and (!isNull (_device getVariable ["AE3_network_parent", objNull]))
},
{},
[_entity]
] call ace_interact_menu_fnc_createAction;
-if(!isDedicated) then
+if (!isDedicated) then
{
[_entity, 0, ["ACE_MainActions", "AE3_DeviceAction"], _connect] call ace_interact_menu_fnc_addActionToObject;
[_entity, 0, ["ACE_MainActions", "AE3_DeviceAction"], _disconnect] call ace_interact_menu_fnc_addActionToObject;
};
- if(isServer) then
+ if (isServer) then
{
_entity setVariable ["AE3_network_address", _address, true];
_entity setVariable ["AE3_network_parent", _parent, true];
- if(!isNull _parent) then
+ if (!isNull _parent) then
{
[_entity, _parent] call AE3_network_fnc_connect_device2router;
};
diff --git a/addons/network/functions/fnc_initRouter.sqf b/addons/network/functions/fnc_initRouter.sqf
index 58e97561..afadf387 100644
--- a/addons/network/functions/fnc_initRouter.sqf
+++ b/addons/network/functions/fnc_initRouter.sqf
@@ -32,7 +32,9 @@ private _childs =
private _action = [_aceCargoName, _aceCargoName, "", _childStatement, {true}, {}, _x] call ace_interact_menu_fnc_createAction;
_actions pushBack [_action, [], _target];
- } forEach (_routers); _actions
+ } forEach (_routers);
+
+ _actions
};
private _connect = ["AE3_Network_ConnectAction", localize "STR_AE3_Network_Interaction_ConnectToRouter", "",
@@ -40,7 +42,7 @@ private _connect = ["AE3_Network_ConnectAction", localize "STR_AE3_Network_Inter
{
params ["_target", "_player", "_params"];
_params params ["_device"];
- (alive _target) and (isNull (_device getVariable "AE3_network_parent"))
+ (alive _target) and (isNull (_device getVariable ["AE3_network_parent", objNull]))
},
_childs,
[_entity]
@@ -55,21 +57,21 @@ private _disconnect = ["AE3_Network_DisconnectAction", localize "STR_AE3_Network
{
params ["_target", "_player", "_params"];
_params params ["_device"];
- (alive _target) and (!isNull (_device getVariable "AE3_network_parent"))
+ (alive _target) and (!isNull (_device getVariable ["AE3_network_parent", objNull]))
},
{},
[_entity]
] call ace_interact_menu_fnc_createAction;
-if(!isDedicated && !_internal) then
+if (!isDedicated && !_internal) then
{
[_entity, 0, ["ACE_MainActions", "AE3_DeviceAction"], _connect] call ace_interact_menu_fnc_addActionToObject;
[_entity, 0, ["ACE_MainActions", "AE3_DeviceAction"], _disconnect] call ace_interact_menu_fnc_addActionToObject;
};
- if(isServer) then
+ if (isServer) then
{
_entity setVariable ["AE3_network_address", _address, true];
@@ -80,7 +82,7 @@ if(!isDedicated && !_internal) then
_entity setVariable ["AE3_network_addressCounter", 0, true];
- if(!isNull _parent) then
+ if (!isNull _parent) then
{
[_entity, _parent] call AE3_network_fnc_connect_router2router;
};
diff --git a/addons/network/functions/fnc_ip2str.sqf b/addons/network/functions/fnc_ip2str.sqf
index a9586e85..2fea72df 100644
--- a/addons/network/functions/fnc_ip2str.sqf
+++ b/addons/network/functions/fnc_ip2str.sqf
@@ -8,11 +8,8 @@
* 0: IP String
*/
-params['_ip'];
+params ["_ip"];
-if(count _ip != 4) exitWith
-{
- "0.0.0.0";
-};
+if(count _ip != 4) exitWith { "0.0.0.0"; };
- _ip joinString ".";
\ No newline at end of file
+_ip joinString ".";
\ No newline at end of file
diff --git a/addons/network/functions/fnc_ping.sqf b/addons/network/functions/fnc_ping.sqf
index 1ad7af8e..09d7c070 100644
--- a/addons/network/functions/fnc_ping.sqf
+++ b/addons/network/functions/fnc_ping.sqf
@@ -13,41 +13,41 @@
* 1: Length
*/
-params['_entity', '_target', ['_last', objNull]];
+params ["_entity", "_target", ["_last", objNull]];
-if(!alive _entity || _entity getVariable ['AE3_power_powerState', 1] == 0) exitWith
+if (!alive _entity || _entity getVariable ["AE3_power_powerState", 1] == 0) exitWith
{
[objNull, 0];
};
-if(_target isEqualTo [127, 0, 0, 1] || _target isEqualTo (_entity getVariable 'AE3_network_address')) exitWith
+if (_target isEqualTo [127, 0, 0, 1] || _target isEqualTo (_entity getVariable "AE3_network_address")) exitWith
{
[_entity, 0];
};
// Is router?
-if(!isNil {_entity getVariable 'AE3_network_children'}) exitWith
+if (!isNil {_entity getVariable "AE3_network_children"}) exitWith
{
- _catch = _entity getVariable 'AE3_network_addressCatch';
+ _catch = _entity getVariable "AE3_network_addressCatch";
// Target is in catch
_result = [objNull, 0];
- if(_target in _catch) then
+ if (_target in _catch) then
{
_next = _catch get (_target call AE3_network_fnc_ip2str);
_res = [_next, _target, _entity] call AE3_network_fnc_ping;
- if(isNull (_res select 0)) exitWith
+ if (isNull (_res select 0)) exitWith
{
- _catch deleteAt '_target';
- _entity setVariable ['AE3_network_addressCatch', _catch, true];
+ _catch deleteAt "_target";
+ _entity setVariable ["AE3_network_addressCatch", _catch, true];
_result = _res;
};
_len = (_res select 1) + (_next distance _entity);
_res set [1, _len];
_result = _res;
};
- if(!isNull (_result select 0)) exitWith {_result};
+ if (!isNull (_result select 0)) exitWith {_result};
// Target is in children
_result = {
@@ -55,30 +55,30 @@ if(!isNil {_entity getVariable 'AE3_network_children'}) exitWith
_res = [_x, _target, _entity] call AE3_network_fnc_ping;
- if(!isNull (_res select 0)) exitWith
+ if (!isNull (_res select 0)) exitWith
{
- _catch set ['_target', _x];
- _entity setVariable ['AE3_network_addressCatch', _catch, true];
+ _catch set ["_target", _x];
+ _entity setVariable ["AE3_network_addressCatch", _catch, true];
_len = (_res select 1) + (_x distance _entity);
_res set [1, _len];
_res;
};
- }forEach (_entity getVariable 'AE3_network_children');
+ } forEach (_entity getVariable ["AE3_network_children", []]);
- if(!isNil "_result") exitWith {_result};
+ if (!isNil "_result") exitWith {_result};
// Target is in parents
_result = [objNull, 0];
- _parent = _entity getVariable 'AE3_network_parent';
- if(!isNull (_parent) && !(_parent isEqualTo _last)) then
+ _parent = _entity getVariable ["AE3_network_parent", objNull];
+ if (!isNull (_parent) && !(_parent isEqualTo _last)) then
{
_res = [_parent, _target, _entity] call AE3_network_fnc_ping;
- if(!isNull(_res select 0)) then
+ if (!isNull(_res select 0)) then
{
- _catch set ['_target', _parent];
- _entity setVariable ['AE3_network_addressCatch', _catch, true];
+ _catch set ["_target", _parent];
+ _entity setVariable ["AE3_network_addressCatch", _catch, true];
_len = (_res select 1) + (_parent distance _entity);
_res set [1, _len];
@@ -89,8 +89,8 @@ if(!isNil {_entity getVariable 'AE3_network_children'}) exitWith
_result;
};
-private _parent = _entity getVariable 'AE3_network_parent';
-if(!isNull _parent && !(_parent isEqualTo _last)) exitWith
+private _parent = _entity getVariable ["AE3_network_parent", objNull];
+if (!isNull _parent && !(_parent isEqualTo _last)) exitWith
{
_res = [_parent, _target, _entity] call AE3_network_fnc_ping;
_len = (_parent distance _entity) + (_res select 1);
diff --git a/addons/network/functions/fnc_removeNetworkConnection.sqf b/addons/network/functions/fnc_removeNetworkConnection.sqf
new file mode 100644
index 00000000..2deddaba
--- /dev/null
+++ b/addons/network/functions/fnc_removeNetworkConnection.sqf
@@ -0,0 +1,56 @@
+/**
+ * PUBLIC
+ *
+ * Removes the network connection (Uplink) for a given device and updates the available interactions.
+ *
+ * Arguments:
+ * 0: Network Consumer
+ *
+ * Returns:
+ * None
+ *
+ * Example:
+ * [_entity] call AE3_network_fnc_removeNetworkConnection;
+ *
+ */
+
+params ["_networkConsumer"];
+
+private _networkProvider = _networkConsumer getVariable ["AE3_network_parent", objNull];
+
+if (!(isNull _networkProvider)) then
+{
+ // remove network consumer from network providers list of connected devices
+ private _connectedDevices = _networkProvider getVariable ["AE3_network_children", []];
+ _connectedDevices = _connectedDevices - [_networkConsumer];
+ _networkProvider setVariable ["AE3_network_children", _connectedDevices, true];
+
+ if(!(_connectedDevices isEqualTo [])) then
+ {
+ [_networkProvider] call AE3_network_fnc_dhcp_refresh;
+ };
+
+ // set network provider to "network disconnected" if it has no connected children and no connected parent-parent
+ if (count _connectedDevices == 0) then
+ {
+ private __networkProviderParent = _networkProvider getVariable ["AE3_network_parent", objNull];
+ if (isNull __networkProviderParent) then
+ {
+ [_networkProvider, "networkConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
+ };
+ };
+};
+
+// remove network connection from network consumer
+_networkConsumer setVariable ["AE3_network_parent", nil, true];
+
+// set network consumer to "network disconnected" if it has no connected children
+if (count call {_networkConsumer getVariable ["AE3_network_children", []]} == 0) then
+{
+ [_networkConsumer, "networkConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
+};
+
+// reset ip address of network consumer
+_networkConsumer setVariable ["AE3_network_address", [127, 0, 0, 1], true];
+
+true;
\ No newline at end of file
diff --git a/addons/network/stringtable.xml b/addons/network/stringtable.xml
index f975baff..3b8a8a3c 100644
--- a/addons/network/stringtable.xml
+++ b/addons/network/stringtable.xml
@@ -1,6 +1,17 @@
+
+
+ IP Address
+ IP Address
+ IP-Adresse
+ IP地址
+ IP Address
+ Adresse IP
+ Indirizzo IP
+
+
Connect to router
@@ -9,6 +20,7 @@
连接路由器.
Подключить к роутеру
Connecter au router
+ Connetti al router
Disconnect from router
@@ -17,6 +29,7 @@
断开路由器.
Отключить от роутера
Déconnecter du routeur
+ Disconnetti dal router
@@ -27,6 +40,7 @@
路由器
Роутер
Routeur
+ Router
diff --git a/addons/power/CfgVehicles.hpp b/addons/power/CfgVehicles.hpp
index 05268390..e129f481 100644
--- a/addons/power/CfgVehicles.hpp
+++ b/addons/power/CfgVehicles.hpp
@@ -2,42 +2,16 @@ class CfgVehicles
{
/* ================================================================================ */
- // Generator Dummy
- //class Land_PortableGenerator_01_F;
- //class Land_PortableGenerator_01_black_F;
- //class Land_PortableGenerator_01_sand_F;
-
- //class Land_PortableGenerator_01_F_AE3_Dummy: Land_PortableGenerator_01_F
- //{
- // class EventHandlers
- // {
- // init = "params ['_entity']; [_entity, 'Land_PortableGenerator_01_F_AE3'] call AE3_main_fnc_replace;";
- // };
- //};
-
- //class Land_PortableGenerator_01_black_F_AE3_Dummy: Land_PortableGenerator_01_black_F
- //{
- // class EventHandlers
- // {
- // init = "params ['_entity']; [_entity, 'Land_PortableGenerator_01_black_F_AE3'] call AE3_main_fnc_replace;";
- // };
- //};
-
- //class Land_PortableGenerator_01_sand_F_AE3_Dummy: Land_PortableGenerator_01_sand_F
- //{
- // class EventHandlers
- // {
- // init = "params ['_entity']; [_entity, 'Land_PortableGenerator_01_sand_F_AE3'] call AE3_main_fnc_replace;";
- // };
- //};
-
- /* ================================================================================ */
-
// Generator
class B_Radar_System_01_F;
-
- class Land_PortableGenerator_01_F_AE3: B_Radar_System_01_F
+ class GeneratorMaster_01_F_AE3: B_Radar_System_01_F
{
+ scope = 0; // Dummy Class
+ scopeCurator = 0; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ curatorInfoType = "AE3_UserInterface_Zeus_Asset_Details"; // when placing with AI
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details"; // when placing without AI
+
// Eden Editor Attributes
class Attributes
{
@@ -65,12 +39,62 @@ class CfgVehicles
// Refuel
ace_refuel_canReceive = 1; // For vehicles which can't be refueled
- ace_refuel_fuelCapacity = 5; // Fuel tank volume
ace_refuel_flowRate = 1; // Speed?
+ /* -------------------- */
+
+ // Override
+ faction = "Default";
+ editorCategory = "AE3_Assets";
+ editorSubcategory = "EdSubcat_Electronics";
+ icon = "iconObject_1x1"; // Object gets invisible, except the shadow
+ picture = "pictureThing";
+ hasDriver = 0;
+ getInAction = "";
+ maximumLoad = 0;
+
+ cargoCompartments[] = {};
+ cargoAction[] = {};
+ driverAction = "";
+ typicalCargo[] = {};
+ weapons[] = {};
+
+ fuelConsumptionRate = 0.0;
+ };
+
+ /* ================================================================================ */
+
+ class Land_PortableGenerator_01_F_AE3: GeneratorMaster_01_F_AE3
+ {
+ scope = 2; // Dummy Class
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ model = "\A3\Props_F_Exp\Military\Camps\PortableGenerator_01_F.p3d";
+ editorPreview = "\A3\EditorPreviews_F_Exp\Data\CfgVehicles\Land_PortableGenerator_01_F.jpg"; // modified for texture variants
+ hiddenSelections[] = {"Camo_1"};
+ hiddenSelectionsTextures[] = {"a3\props_f_exp\military\camps\data\portablegenerator_01_co.paa"}; // modified for texture variants
+ displayName = "$STR_A3_CfgVehicles_Land_PortableGenerator_01_F0"; // modified for texture variants
+
+ fuelCapacity = "5";
+ ace_refuel_fuelCapacity = 5; // Fuel tank volume
+
+ soundStartEngine[] = {"z\ae3\addons\power\sounds\GeneratorStartSound.ogg", 5, 1};
+ soundStopEngine[] = {"z\ae3\addons\power\sounds\GeneratorStopSound.ogg", 5, 1};
+
+ // https://www.realitymod.com/forum/showthread.php?t=100826
+ class Sounds
+ {
+ class Engine
+ {
+ frequency = "( randomizer*0.05 + 0.95 )";
+ volume = "engineOn * camPos";
+ sound[] = {"z\ae3\addons\power\sounds\GeneratorRunningSound.ogg", 2, 1, 100};
+ };
+ };
+
class AE3_Device
{
- displayName = "$STR_AE3_Power_Config_GeneratorDisplayName";
+ displayName = "$STR_AE3_Power_Config_RuggedPortableGeneratorDisplayName";
defaultPowerLevel = 0;
turnOnAction = "_this call AE3_power_fnc_turnOnGeneratorAction";
@@ -88,7 +112,7 @@ class CfgVehicles
class AE3_Equipment
{
- displayName = "$STR_AE3_Power_Config_GeneratorDisplayName";
+ displayName = "$STR_AE3_Power_Config_RuggedPortableGeneratorDisplayName";
class AE3_ace3Interactions
{
@@ -106,35 +130,44 @@ class CfgVehicles
};
};
};
+ };
- /* -------------------- */
+ /* ================================================================================ */
- // Override
- faction = "Default";
- editorCategory = "EdCat_Things";
- editorSubcategory = "EdSubcat_Electronics";
- editorPreview = "\A3\EditorPreviews_F_Exp\Data\CfgVehicles\Land_PortableGenerator_01_F.jpg"; // modified for texture variants
- model = "\A3\Props_F_Exp\Military\Camps\PortableGenerator_01_F.p3d";
- hiddenSelections[] = {"Camo_1"};
- hiddenSelectionsTextures[] = {"a3\props_f_exp\military\camps\data\portablegenerator_01_co.paa"}; // modified for texture variants
- icon = "iconObject_1x1"; // Object gets invisible, except the shadow
- picture = "pictureThing";
- displayName = "$STR_AE3_Power_Config_GeneratorDisplayName"; // modified for texture variants
- hasDriver = 0;
- getInAction = "";
- maximumLoad = 0;
+ class Land_PortableGenerator_01_black_F_AE3: Land_PortableGenerator_01_F_AE3
+ {
+ editorPreview = "\A3\EditorPreviews_F_Enoch\Data\CfgVehicles\Land_PortableGenerator_01_black_F.jpg"; // modified for texture variants
+ hiddenSelectionsTextures[] = {"a3\Props_F_Enoch\Military\Camps\data\PortableGenerator_01_black_CO.paa"}; // modified for texture variants
+ displayName = "$STR_A3_C_CfgVehicles_Land_PortableGenerator_01_black_F0"; // modified for texture variants
+ };
- cargoCompartments[] = {};
- cargoAction[] = {};
- driverAction = "";
- typicalCargo[] = {};
- weapons[] = {};
+ /* ================================================================================ */
- fuelCapacity = "5";
- fuelConsumptionRate = 0.0;
+ class Land_PortableGenerator_01_sand_F_AE3: Land_PortableGenerator_01_F_AE3
+ {
+ editorPreview = "\A3\EditorPreviews_F_Enoch\Data\CfgVehicles\Land_PortableGenerator_01_sand_F.jpg"; // modified for texture variants
+ hiddenSelectionsTextures[] = {"a3\Props_F_Enoch\Military\Camps\data\PortableGenerator_01_sand_CO.paa"}; // modified for texture variants
+ displayName = "$STR_A3_C_CfgVehicles_Land_PortableGenerator_01_sand_F0"; // modified for texture variants
+ };
+
+ /* ================================================================================ */
+
+ class Land_MobileRadar_01_generator_F_AE3: GeneratorMaster_01_F_AE3
+ {
+ scope = 2; // Dummy Class
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ model = "\A3\Structures_F_Enoch\Military\Radar\MobileRadar_01_generator_F.p3d";
+ editorPreview = "\A3\EditorPreviews_F_Enoch\Data\CfgVehicles\Land_MobileRadar_01_generator_F.jpg"; // modified for texture variants
+ hiddenSelections[] = {};
+ hiddenSelectionsTextures[] = {}; // modified for texture variants
+ displayName = "$STR_A3_C_CfgVehicles_Land_MobileRadar_01_generator_F0"; // modified for texture variants
+
+ fuelCapacity = "470";
+ ace_refuel_fuelCapacity = 470; // Fuel tank volume
- soundStartEngine[] = {"z\ae3\addons\power\sounds\GeneratorStartSound.ogg", 5, 1};
- soundStopEngine[] = {"z\ae3\addons\power\sounds\GeneratorStopSound.ogg", 5, 1};
+ soundStartEngine[] = {"z\ae3\addons\power\sounds\GeneratorLargeStartSound.ogg", 5, 1};
+ soundStopEngine[] = {"z\ae3\addons\power\sounds\GeneratorLargeStopSound.ogg", 5, 1};
// https://www.realitymod.com/forum/showthread.php?t=100826
class Sounds
@@ -143,25 +176,195 @@ class CfgVehicles
{
frequency = "( randomizer*0.05 + 0.95 )";
volume = "engineOn * camPos";
- sound[] = {"z\ae3\addons\power\sounds\GeneratorRunningSound.ogg", 2, 1, 100};
+ sound[] = {"z\ae3\addons\power\sounds\GeneratorLargeRunningSound.ogg", 2, 1, 100};
+ };
+ };
+
+ class AE3_Device
+ {
+ displayName = "$STR_AE3_Power_Config_RadarGeneratorDisplayName";
+ defaultPowerLevel = 0;
+
+ turnOnAction = "_this call AE3_power_fnc_turnOnGeneratorAction";
+ turnOffAction = "_this call AE3_power_fnc_turnOffGeneratorAction";
+
+ class AE3_Generator
+ {
+ fuelConsumption = 48.0; // 48 litres per hour consumption
+ fuelCapacity = 470; // 400 litres max. tank volume
+ fuelLevel = 1; // 100 % full tank; Doesn't work here because this is set via vanilla fuel
+
+ power = 400/3600; // provides max. 400kW
};
};
};
/* ================================================================================ */
- class Land_PortableGenerator_01_black_F_AE3: Land_PortableGenerator_01_F_AE3
+ class Land_DieselGroundPowerUnit_01_F_AE3: GeneratorMaster_01_F_AE3
{
- editorPreview = "\A3\EditorPreviews_F_Enoch\Data\CfgVehicles\Land_PortableGenerator_01_black_F.jpg"; // modified for texture variants
- hiddenSelectionsTextures[] = {"a3\Props_F_Enoch\Military\Camps\data\PortableGenerator_01_black_CO.paa"}; // modified for texture variants
- displayName = "$STR_AE3_Power_Config_GeneratorDisplayName"; // modified for texture variants
+ scope = 2; // Dummy Class
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ model = "\A3\Structures_F_Heli\Ind\Machines\DieselGroundPowerUnit_01_F.p3d";
+ editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\Land_DieselGroundPowerUnit_01_F.jpg"; // modified for texture variants
+ hiddenSelections[] = {};
+ hiddenSelectionsTextures[] = {}; // modified for texture variants
+ displayName = "$STR_AE3_Power_Config_AirportGeneratorDisplayName"; // modified for texture variants
+
+ fuelCapacity = "300";
+ ace_refuel_fuelCapacity = 300; // Fuel tank volume
+
+ soundStartEngine[] = {"z\ae3\addons\power\sounds\GeneratorAirportStartSound.ogg", 5, 1};
+ soundStopEngine[] = {"z\ae3\addons\power\sounds\GeneratorAirportStopSound.ogg", 5, 1};
+
+ // https://www.realitymod.com/forum/showthread.php?t=100826
+ class Sounds
+ {
+ class Engine
+ {
+ frequency = "( randomizer*0.05 + 0.95 )";
+ volume = "engineOn * camPos";
+ sound[] = {"z\ae3\addons\power\sounds\GeneratorAirportRunningSound.ogg", 2, 1, 100};
+ };
+ };
+
+ class AE3_Device
+ {
+ displayName = "$STR_AE3_Power_Config_AirportGeneratorDisplayName";
+ defaultPowerLevel = 0;
+
+ turnOnAction = "_this call AE3_power_fnc_turnOnGeneratorAction";
+ turnOffAction = "_this call AE3_power_fnc_turnOffGeneratorAction";
+
+ class AE3_Generator
+ {
+ fuelConsumption = 30; // 48 litres per hour consumption
+ fuelCapacity = 300; // 400 litres max. tank volume
+ fuelLevel = 1; // 100 % full tank; Doesn't work here because this is set via vanilla fuel
+
+ power = 100/3600; // provides max. 100 kW
+ };
+ };
};
- class Land_PortableGenerator_01_sand_F_AE3: Land_PortableGenerator_01_F_AE3
+ /* ================================================================================ */
+
+ class Land_PowerGenerator_F_AE3: GeneratorMaster_01_F_AE3
{
- editorPreview = "\A3\EditorPreviews_F_Enoch\Data\CfgVehicles\Land_PortableGenerator_01_sand_F.jpg"; // modified for texture variants
- hiddenSelectionsTextures[] = {"a3\Props_F_Enoch\Military\Camps\data\PortableGenerator_01_sand_CO.paa"}; // modified for texture variants
- displayName = "$STR_AE3_Power_Config_GeneratorDisplayName"; // modified for texture variants
+ scope = 2; // Dummy Class
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ model = "\A3\Structures_F\Ind\WindPowerPlant\PowerGenerator_F.p3d";
+ editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\Land_PowerGenerator_F.jpg"; // modified for texture variants
+ hiddenSelections[] = {};
+ hiddenSelectionsTextures[] = {}; // modified for texture variants
+ displayName = "$STR_A3_CfgVehicles_Land_PowerGenerator_F0"; // modified for texture variants
+
+ fuelCapacity = "300";
+ ace_refuel_fuelCapacity = 300; // Fuel tank volume
+
+ soundStartEngine[] = {"z\ae3\addons\power\sounds\GeneratorAirportStartSound.ogg", 5, 1};
+ soundStopEngine[] = {"z\ae3\addons\power\sounds\GeneratorAirportStopSound.ogg", 5, 1};
+
+ // https://www.realitymod.com/forum/showthread.php?t=100826
+ class Sounds
+ {
+ class Engine
+ {
+ frequency = "( randomizer*0.05 + 0.95 )";
+ volume = "engineOn * camPos";
+ sound[] = {"z\ae3\addons\power\sounds\GeneratorAirportRunningSound.ogg", 2, 1, 100};
+ };
+ };
+
+ class AE3_Device
+ {
+ displayName = "$STR_AE3_Power_Config_PowerGeneratorDisplayName";
+ defaultPowerLevel = 0;
+
+ turnOnAction = "_this call AE3_power_fnc_turnOnGeneratorAction";
+ turnOffAction = "_this call AE3_power_fnc_turnOffGeneratorAction";
+
+ class AE3_Generator
+ {
+ fuelConsumption = 30; // 48 litres per hour consumption
+ fuelCapacity = 300; // 400 litres max. tank volume
+ fuelLevel = 1; // 100 % full tank; Doesn't work here because this is set via vanilla fuel
+
+ power = 100/3600; // provides max. 100 kW
+ };
+ };
+ };
+
+ /* ================================================================================ */
+
+ class Land_Portable_generator_F_AE3: GeneratorMaster_01_F_AE3
+ {
+ scope = 2; // Dummy Class
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ model = "\A3\Structures_F\Items\Electronics\Portable_generator_F.p3d";
+ editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\Land_Portable_generator_F.jpg"; // modified for texture variants
+ hiddenSelections[] = {};
+ hiddenSelectionsTextures[] = {}; // modified for texture variants
+ displayName = "$STR_A3_cfgVehicles_Land_Portable_generator_F0"; // modified for texture variants
+
+ fuelCapacity = "5";
+ ace_refuel_fuelCapacity = 5; // Fuel tank volume
+
+ soundStartEngine[] = {"z\ae3\addons\power\sounds\GeneratorStartSound.ogg", 5, 1};
+ soundStopEngine[] = {"z\ae3\addons\power\sounds\GeneratorStopSound.ogg", 5, 1};
+
+ // https://www.realitymod.com/forum/showthread.php?t=100826
+ class Sounds
+ {
+ class Engine
+ {
+ frequency = "( randomizer*0.05 + 0.95 )";
+ volume = "engineOn * camPos";
+ sound[] = {"z\ae3\addons\power\sounds\GeneratorRunningSound.ogg", 2, 1, 100};
+ };
+ };
+
+ class AE3_Device
+ {
+ displayName = "$STR_AE3_Power_Config_PortableGeneratorDisplayName";
+ defaultPowerLevel = 0;
+
+ turnOnAction = "_this call AE3_power_fnc_turnOnGeneratorAction";
+ turnOffAction = "_this call AE3_power_fnc_turnOffGeneratorAction";
+
+ class AE3_Generator
+ {
+ fuelConsumption = 1.5; // 48 litres per hour consumption
+ fuelCapacity = 5; // 400 litres max. tank volume
+ fuelLevel = 1; // 100 % full tank; Doesn't work here because this is set via vanilla fuel
+
+ power = 5/3600; // provides max. 5 kW
+ };
+ };
+
+ class AE3_Equipment
+ {
+ displayName = "$STR_AE3_Power_Config_PortableGeneratorDisplayName";
+
+ class AE3_ace3Interactions
+ {
+ class AE3_aceDragging
+ {
+ // Dragging
+ ae3_dragging_canDrag = 1; // Can be dragged (0-no, 1-yes)
+ ae3_dragging_dragPosition[] = {0, 1, 0}; // Offset of the model from the body while dragging (same as attachTo)
+ ae3_dragging_dragDirection = 0; // Model direction while dragging (same as setDir after attachTo)
+ };
+ class AE3_aceCargo
+ {
+ ae3_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no)
+ ae3_cargo_size = 4; // Cargo space the object takes
+ };
+ };
+ };
};
/* ================================================================================ */
@@ -170,6 +373,12 @@ class CfgVehicles
class Land_BatteryPack_01_open_olive_F;
class Land_BatteryPack_01_open_olive_F_AE3 : Land_BatteryPack_01_open_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
// Eden Editor Attributes
class Attributes
{
@@ -241,7 +450,13 @@ class CfgVehicles
class Land_BatteryPack_01_open_black_F;
class Land_BatteryPack_01_open_black_F_AE3 : Land_BatteryPack_01_open_black_F
{
- // Eden Editor Attributes
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
+ // Eden Editor Attributes
class Attributes
{
class AE3_EdenAttribute_PowerLevel
@@ -312,7 +527,13 @@ class CfgVehicles
class Land_BatteryPack_01_open_sand_F;
class Land_BatteryPack_01_open_sand_F_AE3 : Land_BatteryPack_01_open_sand_F
{
- // Eden Editor Attributes
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
+ // Eden Editor Attributes
class Attributes
{
class AE3_EdenAttribute_PowerLevel
@@ -383,6 +604,12 @@ class CfgVehicles
class Land_SolarPanel_04_olive_F;
class Land_SolarPanel_04_olive_F_AE3 : Land_SolarPanel_04_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
// Eden Editor Attributes
class Attributes
{
@@ -526,7 +753,13 @@ class CfgVehicles
class Land_SolarPanel_04_black_F;
class Land_SolarPanel_04_black_F_AE3 : Land_SolarPanel_04_black_F
{
- // Eden Editor Attributes
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
+ // Eden Editor Attributes
class Attributes
{
class AE3_EdenAttribute_PowerLevel
@@ -669,7 +902,13 @@ class CfgVehicles
class Land_SolarPanel_04_sand_F;
class Land_SolarPanel_04_sand_F_AE3 : Land_SolarPanel_04_sand_F
{
- // Eden Editor Attributes
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
+ // Eden Editor Attributes
class Attributes
{
class AE3_EdenAttribute_PowerLevel
@@ -808,6 +1047,12 @@ class CfgVehicles
class Land_PortableSolarPanel_01_olive_F;
class Land_PortableSolarPanel_01_olive_F_AE3 : Land_PortableSolarPanel_01_olive_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
displayName = "$STR_AE3_Power_Config_SolarPanelDisplayName";
@@ -850,6 +1095,12 @@ class CfgVehicles
class Land_PortableSolarPanel_01_sand_F;
class Land_PortableSolarPanel_01_sand_F_AE3 : Land_PortableSolarPanel_01_sand_F
{
+ scopeCurator = 2; // Zeus visability; 2 will show it in the menu, 0 will hide it.
+
+ editorCategory = "AE3_Assets";
+
+ curatorInfoTypeEmpty = "AE3_UserInterface_Zeus_Asset_Details";
+
class AE3_Device
{
displayName = "$STR_AE3_Power_Config_SolarPanelDisplayName";
diff --git a/addons/power/XEH_PREP.hpp b/addons/power/XEH_PREP.hpp
index 23ea5dc7..1ce2439a 100644
--- a/addons/power/XEH_PREP.hpp
+++ b/addons/power/XEH_PREP.hpp
@@ -13,10 +13,14 @@ PREP(connectToGeneratorAction);
PREP(disconnectFromGeneratorAction);
/* Getter */
+PREP(getBatteryLevel);
PREP(getFuelLevel);
PREP(getPowerState);
PREP(getPowerOutput);
-PREP(getBatteryLevel);
+
+/* Setter */
+PREP(setBatteryLevel);
+PREP(setFuelLevel);
/* Init */
PREP(compileConfig);
@@ -30,6 +34,11 @@ PREP(initFuelLevelWithEdenAttribute);
PREP(initConsumer);
PREP(initSolarPanel);
+/* Controller */
+PREP(turnOffDevice);
+PREP(turnOnDevice);
+PREP(standbyDevice);
+
/* Sys */
PREP(batteryCalculation);
PREP(addProviderHandler);
@@ -48,4 +57,8 @@ PREP(showBatteryLevel);
/* Solar */
PREP(getSolarPosition);
PREP(solarCalculation);
-PREP(multSolarPanelOrientation);
\ No newline at end of file
+PREP(multSolarPanelOrientation);
+
+/* Connections */
+PREP(createPowerConnection);
+PREP(removePowerConnection);
\ No newline at end of file
diff --git a/addons/power/XEH_preInit.sqf b/addons/power/XEH_preInit.sqf
index 576cff9b..be65062a 100644
--- a/addons/power/XEH_preInit.sqf
+++ b/addons/power/XEH_preInit.sqf
@@ -2,4 +2,4 @@
#include "XEH_PREP.hpp"
-["All", "init", {_this call AE3_power_fnc_compileDevice}] call CBA_fnc_addClassEventHandler;
\ No newline at end of file
+["All", "InitPost", {_this call AE3_power_fnc_compileDevice}] call CBA_fnc_addClassEventHandler;
\ No newline at end of file
diff --git a/addons/power/config.cpp b/addons/power/config.cpp
index 202056d9..6f064833 100644
--- a/addons/power/config.cpp
+++ b/addons/power/config.cpp
@@ -5,7 +5,24 @@ class CfgPatches
class ADDON
{
name = QUOTE(COMPONENT);
- units[] = {};
+ units[] =
+ {
+ "Land_PortableGenerator_01_F_AE3",
+ "Land_PortableGenerator_01_black_F_AE3",
+ "Land_PortableGenerator_01_sand_F_AE3",
+ "Land_MobileRadar_01_generator_F_AE3",
+ "Land_DieselGroundPowerUnit_01_F_AE3",
+ "Land_PowerGenerator_F_AE3",
+ "Land_Portable_generator_F_AE3",
+ "Land_BatteryPack_01_open_olive_F_AE3",
+ "Land_BatteryPack_01_open_black_F_AE3",
+ "Land_BatteryPack_01_open_sand_F_AE3",
+ "Land_SolarPanel_04_olive_F_AE3",
+ "Land_SolarPanel_04_black_F_AE3",
+ "Land_SolarPanel_04_sand_F_AE3",
+ "Land_PortableSolarPanel_01_olive_F_AE3",
+ "Land_PortableSolarPanel_01_sand_F_AE3"
+ };
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Modules_F", "cba_main", "ace_main", "acex_main", "ae3_main"};
diff --git a/addons/power/functions/fnc_compileDevice.sqf b/addons/power/functions/fnc_compileDevice.sqf
index 40782e67..91733d1d 100644
--- a/addons/power/functions/fnc_compileDevice.sqf
+++ b/addons/power/functions/fnc_compileDevice.sqf
@@ -41,7 +41,11 @@ if(isNil {missionNamespace getVariable _class_name}) then
private _config = missionNamespace getVariable _class_name;
-if(_config isEqualType "") exitWith {};
+// if no power/device config found then exit and set status accordingly
+if(_config isEqualType "") exitWith { if (isServer) then { _entity setVariable ["AE3_power_isDevice", false, true]; }; };
+
+// it seems that there is a AE3_Device config, therefore this is a power device
+if (isServer) then { _entity setVariable ["AE3_power_isDevice", true, true]; };
// ================================================================================
// Save all objects in an array, so debug mode can access them
@@ -82,44 +86,53 @@ if('solar' in _config) then
[_entity] + (_config get 'solar') call AE3_power_fnc_initSolarPanel;
};
-// "AE3_power_hasInternal" is my only indicator to check, if a device (with or without internal) is completely initialized
-if(!("internal" in _config)) exitWith { _entity setVariable ['AE3_power_hasInternal', false, true]; };
-
-[_entity, _config] spawn {
- params ['_entity', '_config'];
-
- private _internalConfig = _config get "internal";
- private _internal = _entity getVariable 'AE3_power_internal';
-
- /* Init internal namespace serverside to prevent race conditions */
- if(isServer) then
- {
- _internal = true call CBA_fnc_createNamespace;
-
- // "AE3_power_hasInternal" is my only indicator to check, if a device (with or without internal) is completely initialized
- _entity setVariable ['AE3_power_hasInternal', true, true];
- _entity setVariable ['AE3_power_internal', _internal, true];
- _internal setVariable ['AE3_power_parent', _entity, true];
- }else
- {
- waitUntil {!isNil {_entity getVariable 'AE3_power_internal';}};
- _internal = _entity getVariable 'AE3_power_internal';
- };
-
- [_internal] + (_internalConfig get 'device') call AE3_power_fnc_initDevice;
-
- if('powerInterface' in _internalConfig) then
- {
- [_internal] + (_internalConfig get 'powerInterface') call AE3_power_fnc_initPowerInterface;
- };
-
- if('battery' in _internalConfig) then
+if ("internal" in _config) then
+{
+ [_entity, _config] spawn
{
- [_internal] + (_internalConfig get 'battery') call AE3_power_fnc_initBattery;
+ params ['_entity', '_config'];
+
+ private _internalConfig = _config get "internal";
+ private _internal = _entity getVariable 'AE3_power_internal';
+
+ /* Init internal namespace serverside to prevent race conditions */
+ if(isServer) then
+ {
+ _internal = true call CBA_fnc_createNamespace;
+
+ // "AE3_power_hasInternal" is my only indicator to check, if a device (with or without internal) is completely initialized
+ _entity setVariable ['AE3_power_hasInternal', true, true];
+ _entity setVariable ['AE3_power_internal', _internal, true];
+ _internal setVariable ['AE3_power_parent', _entity, true];
+ }else
+ {
+ waitUntil {!isNil {_entity getVariable 'AE3_power_internal';}};
+ _internal = _entity getVariable 'AE3_power_internal';
+ };
+
+ [_internal] + (_internalConfig get 'device') call AE3_power_fnc_initDevice;
+
+ if('powerInterface' in _internalConfig) then
+ {
+ [_internal] + (_internalConfig get 'powerInterface') call AE3_power_fnc_initPowerInterface;
+ };
+
+ if('battery' in _internalConfig) then
+ {
+ [_internal] + (_internalConfig get 'battery') call AE3_power_fnc_initBattery;
+ };
+
+ if('generator' in _internalConfig) then
+ {
+ [_internal] + (_internalConfig get 'generator') call AE3_power_fnc_initGenerator;
+ };
+
+ if (isServer) then { _entity setVariable ["AE3_power_initDone", true, true]; };
};
+}
+else
+{
+ if (isServer) then { _entity setVariable ["AE3_power_hasInternal", false, true]; };
- if('generator' in _internalConfig) then
- {
- [_internal] + (_internalConfig get 'generator') call AE3_power_fnc_initGenerator;
- };
+ if (isServer) then { _entity setVariable ["AE3_power_initDone", true, true]; };
};
\ No newline at end of file
diff --git a/addons/power/functions/fnc_createPowerConnection.sqf b/addons/power/functions/fnc_createPowerConnection.sqf
new file mode 100644
index 00000000..b62e8bae
--- /dev/null
+++ b/addons/power/functions/fnc_createPowerConnection.sqf
@@ -0,0 +1,35 @@
+/**
+ * PUBLIC
+ *
+ * This function creates a power connection from the _from object to the _to object.
+ *
+ * Arguments:
+ * 1: From
+ * 2: To
+ *
+ * Results:
+ * None
+ *
+ * Examples:
+ * [_laptop, _generator] call AE3_power_fnc_createPowerConnection;
+ * [_battery, _generator] call AE3_power_fnc_createPowerConnection;
+ *
+ */
+
+params ["_from", "_to"];
+
+[_from, _to] spawn
+{
+ params ["_from", "_to"];
+
+ // wait until both devices have relevant variables set; this indicates that the init process is done
+ waitUntil { !(isNil { _from getVariable "AE3_power_hasInternal"; }) && !(isNil { _to getVariable "AE3_power_connectedDevices"; }) };
+
+ private _hasInternal = _from getVariable "AE3_power_hasInternal";
+
+ private _device = objNull;
+
+ if (_hasInternal) then { _device = _from getVariable "AE3_power_internal"; } else { _device = _from; };
+
+ [_device, _to] call AE3_power_fnc_connectToGeneratorAction;
+};
\ No newline at end of file
diff --git a/addons/power/functions/fnc_disconnectFromGeneratorAction.sqf b/addons/power/functions/fnc_disconnectFromGeneratorAction.sqf
index 57b4efb4..391c1097 100644
--- a/addons/power/functions/fnc_disconnectFromGeneratorAction.sqf
+++ b/addons/power/functions/fnc_disconnectFromGeneratorAction.sqf
@@ -1,5 +1,7 @@
/**
- * Disconnects a device from a power source.
+ * PRIVATE
+ *
+ * Disconnects a device from it's power source. This function is triggered by a ACE3 interaction.
*
* Arguments:
* 0: Device
@@ -10,43 +12,4 @@
params ["_target"];
-_generator = _target getVariable "AE3_power_powerCableDevice";
-
-if (!isNil "_generator") then
-{
- _connectedDevices = _generator getVariable "AE3_power_connectedDevices";
-
- _index = _connectedDevices findIf {_x isEqualTo _target};
-
- _connectedDevices deleteAt _index;
-
-
- if (count _connectedDevices == 0) then
- {
- _tmpGen = _generator;
- // if generator has internal power parent, change interaction for that parent instead of generator itself
- private _powerParent = _tmpGen getVariable "AE3_power_parent";
- if (!(isNil "_powerParent")) then { _tmpGen = _powerParent };
-
- // if generator is not connected to another generator (in case of battery pack)
- private _parentGenerator = _tmpGen getVariable "AE3_power_powerCableDevice";
- if (isNil "_parentGenerator") then { [_tmpGen, "powerConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2]; };
- };
-
- _generator setVariable ["AE3_power_connectedDevices", _connectedDevices, true];
-};
-
-_target setVariable ["AE3_power_powerCableDevice", nil, true];
-
-_tmpTar = _target;
-// if target has internal power parent, change interaction for that parent instead of target itself
-private _powerParent = _tmpTar getVariable "AE3_power_parent";
-if (!(isNil "_powerParent")) then { _tmpTar = _powerParent };
-[_tmpTar, "powerConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
-
-if(!isNil {_target getVariable 'AE3_power_powerConsumption'}) then
-{
- [_target] call (_target getVariable 'AE3_power_fnc_turnOffWrapper')
-};
-
-[_generator] call AE3_power_fnc_updatePower;
+[_target] call AE3_power_fnc_removePowerConnection;
diff --git a/addons/power/functions/fnc_getBatteryLevel.sqf b/addons/power/functions/fnc_getBatteryLevel.sqf
index 919a147c..bafd6368 100644
--- a/addons/power/functions/fnc_getBatteryLevel.sqf
+++ b/addons/power/functions/fnc_getBatteryLevel.sqf
@@ -1,5 +1,10 @@
/**
* Returns the battery level of the given device. Optional displays hint.
+ * This function will check if it's executed in scheduled or unscheduled mode.
+ * if executed in unscheduled mode, the result could be outdated.
+ * The given entity must be a battery. If you want to check an entity with an internal
+ * battery, like the laptop, you need to pass the object of the internal battery
+ * to this function instead of laptop itself.
*
* Arguments:
* 0: Device
@@ -13,37 +18,68 @@
params ["_entity", ["_hint", false]];
-// Update local copy of server var
-[_entity, _hint] spawn
+/* ================================================================================ */
+
+private _calcFnc =
{
- params ["_entity", "_hint"];
-
- [_entity, "AE3_power_batteryLevel"] call AE3_main_fnc_getRemoteVar;
+ params ["_entity"];
- if (_hint) then
- {
- private _batteryLevel = _entity getVariable "AE3_power_batteryLevel";
- private _batteryCapacity = _entity getVariable "AE3_power_batteryCapacity";
- private _batteryLevelPercent = (_batteryLevel / _batteryCapacity) * 100;
+ private _batteryLevel = _entity getVariable "AE3_power_batteryLevel";
+ private _batteryCapacity = _entity getVariable "AE3_power_batteryCapacity";
+ private _batteryLevelPercent = (_batteryLevel / _batteryCapacity) * 100;
+
+ // Wh
+ _batteryLevel = _batteryLevel * 1000;
+ _batteryCapacity = _batteryCapacity * 1000;
+
+ [_batteryLevel, _batteryLevelPercent, _batteryCapacity]
+};
+
+/* ================================================================================ */
+
+private _hintFnc =
+{
+ params ["_batteryLevel", "_batteryLevelPercent", "_batteryCapacity"];
+
+ _batteryLevel = [_batteryLevel, 1, 1, true] call CBA_fnc_formatNumber; // 1,234.5 and 123.4
+ _batteryLevelPercent = [_batteryLevelPercent, 1, 1, true] call CBA_fnc_formatNumber; // 1,234.5 and 123.4
+ _batteryCapacity = [_batteryCapacity, 1, 0, true] call CBA_fnc_formatNumber; // 1,234 and 123
+
+ hint format [localize "STR_AE3_Power_Interaction_BatteryLevelHint", _batteryLevel, _batteryLevelPercent, "%", _batteryCapacity];
+};
- // Wh
- _batteryLevel = _batteryLevel * 1000;
- _batteryCapacity = _batteryCapacity * 1000;
+/* ================================================================================ */
- _batteryLevel = [_batteryLevel, 1, 1, true] call CBA_fnc_formatNumber; // 1,234.5 and 123.4
- _batteryLevelPercent = [_batteryLevelPercent, 1, 1, true] call CBA_fnc_formatNumber; // 1,234.5 and 123.4
- _batteryCapacity = [_batteryCapacity, 1, 0, true] call CBA_fnc_formatNumber; // 1,234 and 123
+if (canSuspend) exitWith
+{
+ [_entity, "AE3_power_batteryLevel"] call AE3_main_fnc_getRemoteVar;
+
+ private _result = [_entity] call _calcFnc;
+
+ if (_hint) then { _result call _hintFnc; } else { _result; };
+};
+
+/* ================================================================================ */
- hint format [localize "STR_AE3_Power_Interaction_BatteryLevelHint", _batteryLevel, _batteryLevelPercent, "%", _batteryCapacity];
+if (!canSuspend && _hint) exitWith
+{
+ // Update local copy of server var
+ [_entity, _hint, _calcFnc, _hintFnc] spawn
+ {
+ params ["_entity", "_hint", "_calcFnc", "_hintFnc"];
+
+ [_entity, "AE3_power_batteryLevel"] call AE3_main_fnc_getRemoteVar;
+
+ private _result = [_entity] call _calcFnc;
+
+ _result call _hintFnc;
};
};
-private _batteryLevel = _entity getVariable "AE3_power_batteryLevel";
-private _batteryCapacity = _entity getVariable "AE3_power_batteryCapacity";
-private _batteryLevelPercent = (_batteryLevel / _batteryCapacity) * 100;
+/* ================================================================================ */
+
+[_entity] call _calcFnc;
+
+/* ================================================================================ */
-// Wh
-_batteryLevel = _batteryLevel * 1000;
-_batteryCapacity = _batteryCapacity * 1000;
-[_batteryLevel, _batteryLevelPercent, _batteryCapacity]
diff --git a/addons/power/functions/fnc_getPowerOutput.sqf b/addons/power/functions/fnc_getPowerOutput.sqf
index a9d0c411..f391371e 100644
--- a/addons/power/functions/fnc_getPowerOutput.sqf
+++ b/addons/power/functions/fnc_getPowerOutput.sqf
@@ -21,11 +21,17 @@ params ["_entity", ["_hint", false]];
if (_hint) then
{
private _powerCap = _entity getVariable ['AE3_power_powerCapacity', 0];
-
- // Watts
- _powerCap = _powerCap * 3600 * 1000;
+ private _prefix = "k";
+
+ // kWatts
+ _powerCap = _powerCap * 3600;
+ if (_powerCap < 1.0) then
+ {
+ _powerCap = _powerCap * 1000;
+ _prefix = "";
+ };
- hint format [localize "STR_AE3_Power_Interaction_PowerOutputHint", _powerCap];
+ hint format [localize "STR_AE3_Power_Interaction_PowerOutputHint", _powerCap, _prefix];
};
};
diff --git a/addons/power/functions/fnc_initBatteryLevelWithEdenAttribute.sqf b/addons/power/functions/fnc_initBatteryLevelWithEdenAttribute.sqf
index c9566f31..558e318e 100644
--- a/addons/power/functions/fnc_initBatteryLevelWithEdenAttribute.sqf
+++ b/addons/power/functions/fnc_initBatteryLevelWithEdenAttribute.sqf
@@ -1,5 +1,6 @@
/**
- * Sets the battery level for a given battery inside an entity if value is changed in Eden Editor.
+ * Sets the battery level for a given battery inside an entity if value is changed in Eden Editor. This will only work for an
+ * entity that is placed in Eden Editor. In Zeus Mode, the variables are not set.
*
* Arguments:
* 0: Battery
@@ -15,24 +16,29 @@ params ["_battery", "_entity"];
{
params ["_battery", "_entity"];
- // wait until the eden attribute is set via expression; unset is -1; regular values should be between 0 and 1
- waitUntil { !(isNil {_entity getVariable "AE3_EdenAttribute_PowerLevel"}) };
+ // wait until all "init" processes are done, see: https://community.bistudio.com/wiki/Initialization_Order
+ waitUntil { !isNil "BIS_fnc_init" };
- private _edenAttributePowerLevel = _entity getVariable "AE3_EdenAttribute_PowerLevel";
+ private _edenAttributePowerLevel = _entity getVariable ["AE3_EdenAttribute_PowerLevel", nil];
- // only set power level if changed in Eden Editor; -1 is default value
- if (_edenAttributePowerLevel != -1) then
+ // var is nil if entity is set via zeus instead of eden editor
+ if (!isNil "_edenAttributePowerLevel") then
{
- // apply min and max values
- if (_edenAttributePowerLevel < 0) then { _edenAttributePowerLevel = 0; };
- if (_edenAttributePowerLevel > 1) then { _edenAttributePowerLevel = 1; };
+ // only set power level if changed in Eden Editor; -1 is default value
+ // unset is -1; regular values should be between 0 and 1
+ if (_edenAttributePowerLevel != -1) then
+ {
+ // apply min and max values
+ if (_edenAttributePowerLevel < 0) then { _edenAttributePowerLevel = 0; };
+ if (_edenAttributePowerLevel > 1) then { _edenAttributePowerLevel = 1; };
- // calculate real battery level by multiplying relative value with max capacity
- private _batteryLevel = _edenAttributePowerLevel;
- private _batteryCapacity = _battery getVariable "AE3_power_batteryCapacity";
- _batteryLevel = _batteryCapacity * _batteryLevel;
+ // calculate real battery level by multiplying relative value with max capacity
+ private _batteryLevel = _edenAttributePowerLevel;
+ private _batteryCapacity = _battery getVariable "AE3_power_batteryCapacity";
+ _batteryLevel = _batteryCapacity * _batteryLevel;
- // set battery level
- _battery setVariable ["AE3_power_batteryLevel", _batteryLevel, true];
+ // set battery level
+ _battery setVariable ["AE3_power_batteryLevel", _batteryLevel, true];
+ };
};
};
\ No newline at end of file
diff --git a/addons/power/functions/fnc_initFuelLevelWithEdenAttribute.sqf b/addons/power/functions/fnc_initFuelLevelWithEdenAttribute.sqf
index a5ede007..5548830b 100644
--- a/addons/power/functions/fnc_initFuelLevelWithEdenAttribute.sqf
+++ b/addons/power/functions/fnc_initFuelLevelWithEdenAttribute.sqf
@@ -1,5 +1,6 @@
/**
- * Sets the fuel level for a given generator if value is changed in Eden Editor.
+ * Sets the fuel level for a given generator if value is changed in Eden Editor. This will only work for an
+ * entity that is placed in Eden Editor. In Zeus Mode, the variables are not set.
*
* Arguments:
* 0: Generator
@@ -14,22 +15,24 @@ params ["_generator"];
{
params ["_generator"];
- // wait until the eden attribute is set via expression; unset is -1; regular values should be between 0 and 1
- waitUntil { !(isNil {_generator getVariable "AE3_EdenAttribute_FuelLevel"}) };
-
- private _edenAttributeFuelLevel = _generator getVariable "AE3_EdenAttribute_FuelLevel";
-
// wait until all "init" processes are done, see: https://community.bistudio.com/wiki/Initialization_Order
waitUntil { !isNil "BIS_fnc_init" };
- // only set power level if changed in Eden Editor; -1 is default value
- if (_edenAttributeFuelLevel != -1) then
+ private _edenAttributeFuelLevel = _generator getVariable ["AE3_EdenAttribute_FuelLevel", nil];
+
+ // var is nil if entity is set via zeus instead of eden editor
+ if (!isNil "_edenAttributeFuelLevel") then
{
- // apply min and max values
- if (_edenAttributeFuelLevel < 0) then { _edenAttributeFuelLevel = 0; };
- if (_edenAttributeFuelLevel > 1) then { _edenAttributeFuelLevel = 1; };
+ // only set power level if changed in Eden Editor; -1 is default value
+ // unset is -1; regular values should be between 0 and 1
+ if (_edenAttributeFuelLevel != -1) then
+ {
+ // apply min and max values
+ if (_edenAttributeFuelLevel < 0) then { _edenAttributeFuelLevel = 0; };
+ if (_edenAttributeFuelLevel > 1) then { _edenAttributeFuelLevel = 1; };
- // set fuel level
- _generator setFuel _edenAttributeFuelLevel;
+ // set fuel level
+ _generator setFuel _edenAttributeFuelLevel;
+ };
};
};
\ No newline at end of file
diff --git a/addons/power/functions/fnc_removePowerConnection.sqf b/addons/power/functions/fnc_removePowerConnection.sqf
new file mode 100644
index 00000000..daf38507
--- /dev/null
+++ b/addons/power/functions/fnc_removePowerConnection.sqf
@@ -0,0 +1,60 @@
+/**
+ * PUBLIC
+ *
+ * Removes the power connection (Uplink) for a given device and updates the available interactions.
+ *
+ * Arguments:
+ * 0: Power Consumer
+ *
+ * Returns:
+ * None
+ *
+ * Example:
+ * [_entity] call AE3_power_fnc_removePowerConnection;
+ *
+ */
+
+params ["_powerConsumer"];
+
+private _powerProvider = _powerConsumer getVariable ["AE3_power_powerCableDevice", objNull];
+
+if (!(isNull _powerProvider)) then
+{
+ // remove power consumer from power providers list of connected devices
+ private _connectedDevices = _powerProvider getVariable ["AE3_power_connectedDevices", []];
+ _connectedDevices = _connectedDevices - [_powerConsumer];
+ _powerProvider setVariable ["AE3_power_connectedDevices", _connectedDevices, true];
+
+ if (count _connectedDevices == 0) then
+ {
+ // if power provider has internal power parent, change interaction for that parent instead
+ _tmpPowerProvider = _powerProvider;
+ private _powerParent = _tmpPowerProvider getVariable ["AE3_power_parent", objNull];
+ if (!(isNull _powerParent)) then { _tmpPowerProvider = _powerParent; };
+
+ // if power provider is not connected to another power provider (in case of battery pack)
+ private _parentPowerProvider = _tmpPowerProvider getVariable ["AE3_power_powerCableDevice", objNull];
+ if (isNull _parentPowerProvider) then { [_tmpPowerProvider, "powerConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2]; };
+ };
+
+ _powerProvider setVariable ["AE3_power_connectedDevices", _connectedDevices, true];
+
+ [_powerProvider] call AE3_power_fnc_updatePower;
+};
+
+// remove power connection from power consumer
+_powerConsumer setVariable ["AE3_power_powerCableDevice", nil, true];
+
+// if power consumer has internal power parent, change interaction for that parent instead
+private _tmpPowerConsumer = _powerConsumer;
+private _powerParent = _tmpPowerConsumer getVariable ["AE3_power_parent", objNull];
+if (!(isNull _powerParent)) then { _tmpPowerConsumer = _powerParent; };
+[_tmpPowerConsumer, "powerConnected", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
+
+// turn off power consumer if it was turned on
+if(!(isNil {_powerConsumer getVariable ["AE3_power_powerConsumption", nil]})) then
+{
+ [_powerConsumer] call (_powerConsumer getVariable "AE3_power_fnc_turnOffWrapper");
+};
+
+true;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_removeProviderHandler.sqf b/addons/power/functions/fnc_removeProviderHandler.sqf
index 49524117..9670625e 100644
--- a/addons/power/functions/fnc_removeProviderHandler.sqf
+++ b/addons/power/functions/fnc_removeProviderHandler.sqf
@@ -10,9 +10,13 @@
params ["_generator"];
-_generator setVariable ["AE3_power_powerState", 0, true];
-
_genHandle = _generator getVariable 'AE3_power_generatorHandle';
[_genHandle] call CBA_fnc_removePerFrameHandler;
-_generator setVariable ['AE3_power_generatorHandle', nil];
\ No newline at end of file
+_generator setVariable ["AE3_power_generatorHandle", nil];
+
+// set power state to "off" global
+_generator setVariable ["AE3_power_powerState", 0, true];
+
+// delete/reset power capacity value global
+_generator setVariable ["AE3_power_powerCapacity", nil, true];
\ No newline at end of file
diff --git a/addons/power/functions/fnc_setBatteryLevel.sqf b/addons/power/functions/fnc_setBatteryLevel.sqf
new file mode 100644
index 00000000..1d17c751
--- /dev/null
+++ b/addons/power/functions/fnc_setBatteryLevel.sqf
@@ -0,0 +1,26 @@
+/**
+ * PUBLIC - Needs to be executed on the server.
+ *
+ * Sets the battery level of a given battery.
+ *
+ * Arguments:
+ * 0: Battery
+ * 1: Battery Level Percent
+ *
+ * Example:
+ * [battery, 100] call AE3_power_fnc_setBatteryLevel;
+ *
+ */
+
+params ["_battery", "_batteryLevelPercent"];
+
+if (!isServer) exitWith { false; };
+
+_batteryLevelPercent = ((_batteryLevelPercent min 100) max 0); // normalize; max = 100 and min = 0
+
+private _batteryCapacity = _battery getVariable "AE3_power_batteryCapacity";
+private _batteryLevel = _batteryCapacity * (_batteryLevelPercent / 100);
+
+_battery setVariable ["AE3_power_batteryLevel", _batteryLevel];
+
+true;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_setFuelLevel.sqf b/addons/power/functions/fnc_setFuelLevel.sqf
new file mode 100644
index 00000000..694d2614
--- /dev/null
+++ b/addons/power/functions/fnc_setFuelLevel.sqf
@@ -0,0 +1,22 @@
+/**
+ * PUBLIC
+ *
+ * Sets the fuel level of a given generator.
+ *
+ * Arguments:
+ * 0: Generator
+ * 1: Fuel Level Percent
+ *
+ * Example:
+ * [generator, 100] call AE3_power_fnc_setFuelLevel;
+ *
+ */
+
+params ["_generator", "_fuelLevelPercent"];
+
+_fuelLevelPercent = ((_fuelLevelPercent min 100) max 0); // normalize; max = 100 and min = 0
+
+private _fuelCapacity = _generator getVariable "AE3_power_batteryCapacity";
+private _fuelLevel = _fuelLevelPercent / 100;
+
+_generator setFuel _fuelLevel;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_standbyDevice.sqf b/addons/power/functions/fnc_standbyDevice.sqf
new file mode 100644
index 00000000..098e79eb
--- /dev/null
+++ b/addons/power/functions/fnc_standbyDevice.sqf
@@ -0,0 +1,41 @@
+/**
+ * PUBLIC
+ *
+ * Sets the given device in standby mode. Works for every asset. Returns true/false depending on the success of the command.
+ *
+ * Arguments:
+ * 0: Device
+ *
+ * Returns:
+ * 0: Result
+ *
+ * Example:
+ * private _result = [_device] call AE3_power_fnc_standbyDevice;
+ *
+ */
+
+params ["_device"];
+
+private _result = false;
+
+private _standbyCondition =
+(
+ (_device call (_device getVariable ["AE3_power_fnc_standbyCondition", {true}]) and
+ (alive _device) and
+ (_device getVariable ["AE3_power_powerState", -1] == 1) and
+ !(_device getVariable ["AE3_power_mutex", false]) and
+ (_device getVariable ["AE3_interaction_closeState", 0] == 0))
+);
+
+if (_standbyCondition && !((_device getVariable ["AE3_power_fnc_standby", {}]) isEqualTo {})) then
+{
+ _device setVariable ["AE3_power_mutex", true, true];
+
+ [_device] call (_device getVariable "AE3_power_fnc_standbyWrapper");
+
+ _device setVariable ["AE3_power_mutex", false, true];
+
+ _result = true;
+};
+
+_result;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_turnOffDevice.sqf b/addons/power/functions/fnc_turnOffDevice.sqf
new file mode 100644
index 00000000..1473cad9
--- /dev/null
+++ b/addons/power/functions/fnc_turnOffDevice.sqf
@@ -0,0 +1,41 @@
+/**
+ * PUBLIC
+ *
+ * Turns off the given device. Works for every asset. Returns true/false depending on the success of the command.
+ *
+ * Arguments:
+ * 0: Device
+ *
+ * Returns:
+ * 0: Result
+ *
+ * Example:
+ * private _result = [_device] call AE3_power_fnc_turnOffDevice;
+ *
+ */
+
+params ["_device"];
+
+private _result = false;
+
+private _turnOffCondition =
+(
+ (_device call (_device getVariable ["AE3_power_fnc_turnOffCondition", {true}]) and
+ (alive _device) and
+ (_device getVariable ["AE3_power_powerState", -1] != 0) and
+ !(_device getVariable ["AE3_power_mutex", false]) and
+ (_device getVariable ["AE3_interaction_closeState", 0] == 0))
+);
+
+if (_turnOffCondition && !((_device getVariable ["AE3_power_fnc_turnOff", {}]) isEqualTo {})) then
+{
+ _device setVariable ["AE3_power_mutex", true, true];
+
+ [_device] call (_device getVariable "AE3_power_fnc_turnOffWrapper");
+
+ _device setVariable ["AE3_power_mutex", false, true];
+
+ _result = true;
+};
+
+_result;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_turnOffGeneratorAction.sqf b/addons/power/functions/fnc_turnOffGeneratorAction.sqf
index ddf7a92c..5f07b815 100644
--- a/addons/power/functions/fnc_turnOffGeneratorAction.sqf
+++ b/addons/power/functions/fnc_turnOffGeneratorAction.sqf
@@ -13,26 +13,33 @@ params ["_entity", ["_silent", false]];
private _result = false;
-private _turnOffTime = 3;
-
-private _stopSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStopSound;
+private _stopSoundHandle = scriptNull;
private _turnOffGenFunc =
{
- params ["_entity"];
+ params ["_entity", "_stopSoundHandle"];
[_entity, "turnedOn", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
-
[_entity] remoteExecCall ["AE3_power_fnc_removeProviderHandler", 2];
+ _stopSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStopSound;
+
// TODO: Wrapper?
{
[_x] call (_x getVariable "AE3_power_fnc_turnOffWrapper");
}forEach (_entity getVariable ["AE3_power_connectedDevices", []]);
};
-if (!_silent) then
+if ((!isNull curatorCamera) || (_silent)) then
+{
+ [_entity] call _turnOffGenFunc;
+
+ _result = true;
+}
+else
{
+ private _turnOffTime = 3;
+
[
_turnOffTime,
[_entity, _stopSoundHandle, _turnOffGenFunc],
@@ -42,7 +49,7 @@ if (!_silent) then
_args params ["_entity", "_stopSoundHandle", "_turnOffGenFunc"];
- [_entity] call _turnOffGenFunc;
+ [_entity, _stopSoundHandle] call _turnOffGenFunc;
// we need to set power state here because function already returned false
// and therefore the turn on wrapper doesn't set the state to turned on
@@ -58,16 +65,10 @@ if (!_silent) then
terminate _stopSoundHandle;
// start sound will be played
- private _stopSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStartSound;
+ private _startSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStartSound;
},
(localize "STR_AE3_Power_Interaction_TurnOff" + "...")
] call ace_common_fnc_progressBar;
-}
-else
-{
- [_entity] call _turnOffGenFunc;
-
- _result = true;
};
// function immediately returns false, because progress bar runs unscheduled
diff --git a/addons/power/functions/fnc_turnOffSolarAction.sqf b/addons/power/functions/fnc_turnOffSolarAction.sqf
index 9a2f26db..f0df8a16 100644
--- a/addons/power/functions/fnc_turnOffSolarAction.sqf
+++ b/addons/power/functions/fnc_turnOffSolarAction.sqf
@@ -13,26 +13,29 @@ params ["_entity", ["_silent", false]];
private _result = false;
-private _turnOffTime = 3;
-
private _turnOffSolPanFunc =
{
params ["_entity"];
[_entity, "turnedOn", false] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
-
[_entity] remoteExecCall ["AE3_power_fnc_removeProviderHandler", 2];
// TODO: Wrapper?
{
[_x] call (_x getVariable "AE3_power_fnc_turnOffWrapper");
}forEach (_entity getVariable ["AE3_power_connectedDevices", []]);
-
- _entity setVariable ["AE3_power_powerCapacity", 0, 2];
};
-if (!_silent) then
+if ((!isNull curatorCamera) || (_silent)) then
+{
+ [_entity] call _turnOffSolPanFunc;
+
+ _result = true;
+}
+else
{
+ private _turnOffTime = 3;
+
[
_turnOffTime,
[_entity, _turnOffSolPanFunc],
@@ -53,13 +56,6 @@ if (!_silent) then
},
(localize "STR_AE3_Power_Interaction_TurnOff" + "...")
] call ace_common_fnc_progressBar;
-}
-else
-{
- [_entity] call _turnOffSolPanFunc;
-
- _result = true;
};
-// function immediately returns false, because progress bar runs unscheduled
_result;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_turnOnDevice.sqf b/addons/power/functions/fnc_turnOnDevice.sqf
new file mode 100644
index 00000000..b66219c0
--- /dev/null
+++ b/addons/power/functions/fnc_turnOnDevice.sqf
@@ -0,0 +1,41 @@
+/**
+ * PUBLIC
+ *
+ * Turns on the given device. Works for every asset. Returns true/false depending on the success of the command.
+ *
+ * Arguments:
+ * 0: Device
+ *
+ * Returns:
+ * 0: Result
+ *
+ * Example:
+ * private _result = [_device] call AE3_power_fnc_turnOnDevice;
+ *
+ */
+
+params ["_device"];
+
+private _result = false;
+
+private _turnOnCondition =
+(
+ (_device call (_device getVariable ["AE3_power_fnc_turnOnCondition", {true}]) and
+ (alive _device) and
+ (_device getVariable ["AE3_power_powerState", -1] != 1) and
+ !(_device getVariable ["AE3_power_mutex", false]) and
+ (_device getVariable ["AE3_interaction_closeState", 0] == 0))
+);
+
+if (_turnOnCondition && !((_device getVariable ["AE3_power_fnc_turnOn", {}]) isEqualTo {})) then
+{
+ _device setVariable ["AE3_power_mutex", true, true];
+
+ [_device] call (_device getVariable "AE3_power_fnc_turnOnWrapper");
+
+ _device setVariable ["AE3_power_mutex", false, true];
+
+ _result = true;
+};
+
+_result;
\ No newline at end of file
diff --git a/addons/power/functions/fnc_turnOnGeneratorAction.sqf b/addons/power/functions/fnc_turnOnGeneratorAction.sqf
index a5eb9e75..f802ffc4 100644
--- a/addons/power/functions/fnc_turnOnGeneratorAction.sqf
+++ b/addons/power/functions/fnc_turnOnGeneratorAction.sqf
@@ -3,56 +3,74 @@
*
* Arguments:
* 0: Generator
+ * 1: If the ace progress bar is shown
*
* Returns:
* None
*/
-params ["_entity"];
-
-private _fuelCapacity = _entity getVariable "AE3_power_fuelCapacity";
-private _fuelLevelPercent = fuel _entity;
-private _fuelLevel = _fuelCapacity * _fuelLevelPercent;
+params ["_entity", ["_silent", false]];
private _result = false;
-if (_fuelLevel > 0) then
+private _startSoundHandle = scriptNull;
+
+private _turnOnGenFunc =
+{
+ params ["_entity", "_startSoundHandle"];
+
+ [_entity, AE3_power_fnc_fuelConsumption] remoteExecCall ["AE3_power_fnc_addProviderHandler", 2];
+ [_entity, "turnedOn", true] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
+
+ _startSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStartSound;
+};
+
+if ((!isNull curatorCamera) || (_silent)) then
+{
+ [_entity] call _turnOnGenFunc;
+
+ _result = true;
+}
+else
{
private _turnOnTime = 5;
- private _startSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStartSound;
-
- [
- _turnOnTime,
- [_entity, _startSoundHandle],
- {
- // following code only runs on progress bar success
- params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
-
- _args params ["_entity", "_startSoundHandle"];
-
- [_entity, AE3_power_fnc_fuelConsumption] remoteExecCall ["AE3_power_fnc_addProviderHandler", 2];
-
- [_entity, "turnedOn", true] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
-
- // we need to set power state here because function already returned false
- // and therefore the turn on wrapper doesn't set the state to turned on
- _entity setVariable ["AE3_power_powerState", 1, true];
- },
- {
- // following code only runs on progress bar fail
- params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
-
- _args params ["_entity", "_startSoundHandle"];
-
- // start sound will be canceled
- terminate _startSoundHandle;
-
- // stop sound will be played
- private _stopSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStopSound;
- },
- (localize "STR_AE3_Power_Interaction_TurnOn" + "...")
- ] call ace_common_fnc_progressBar;
+ private _fuelCapacity = _entity getVariable "AE3_power_fuelCapacity";
+ private _fuelLevelPercent = fuel _entity;
+ private _fuelLevel = _fuelCapacity * _fuelLevelPercent;
+
+ if (_fuelLevel > 0) then
+ {
+ [
+ _turnOnTime,
+ [_entity, _startSoundHandle, _turnOnGenFunc],
+ {
+ // following code only runs on progress bar success
+ params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
+
+ _args params ["_entity", "_startSoundHandle", "_turnOnGenFunc"];
+
+ [_entity, _startSoundHandle] call _turnOnGenFunc;
+
+ // we need to set power state here because function already returned false
+ // and therefore the turn on wrapper doesn't set the state to turned on
+ _entity setVariable ["AE3_power_powerState", 1, true];
+ },
+ {
+ // following code only runs on progress bar fail
+ params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
+
+ _args params ["_entity", "_startSoundHandle", "_turnOnGenFunc"];
+
+ // start sound will be canceled
+ terminate _startSoundHandle;
+
+ // stop sound will be played
+ private _stopSoundHandle = [_entity] spawn AE3_power_fnc_playGeneratorStopSound;
+ },
+ (localize "STR_AE3_Power_Interaction_TurnOn" + "...")
+ ] call ace_common_fnc_progressBar;
+ };
};
// function immediately returns false, because progress bar runs unscheduled
diff --git a/addons/power/functions/fnc_turnOnSolarAction.sqf b/addons/power/functions/fnc_turnOnSolarAction.sqf
index 1cb3fa8e..7aa23f22 100644
--- a/addons/power/functions/fnc_turnOnSolarAction.sqf
+++ b/addons/power/functions/fnc_turnOnSolarAction.sqf
@@ -3,39 +3,54 @@
*
* Arguments:
* 0: Solar Panel
+ * 1: If the ace progress bar is shown
*
* Returns:
* None
*/
-params ["_entity"];
+params ["_entity", ["_silent", false]];
private _result = false;
-private _turnOnTime = 3;
+private _turnOnSolPanFunc =
+{
+ params ["_entity"];
+
+ [_entity, AE3_power_fnc_solarCalculation] remoteExecCall ["AE3_power_fnc_addProviderHandler", 2];
+ [_entity, "turnedOn", true] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
+};
+
+if ((!isNull curatorCamera) || (_silent)) then
+{
+ [_entity] call _turnOnSolPanFunc;
+
+ _result = true;
+}
+else
+{
+ private _turnOnTime = 3;
+
+ [
+ _turnOnTime,
+ [_entity, _turnOnSolPanFunc],
+ {
+ // following code only runs on progress bar success
+ params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
+
+ _args params ["_entity", "_turnOnSolPanFunc"];
+
+ [_entity] call _turnOnSolPanFunc;
+
+ // we need to set power state here because function already returned false
+ // and therefore the turn on wrapper doesn't set the state to turned on
+ _entity setVariable ["AE3_power_powerState", 1, true];
+ },
+ {
+ // following code only runs on progress bar fail
+ },
+ (localize "STR_AE3_Power_Interaction_TurnOn" + "...")
+ ] call ace_common_fnc_progressBar;
+};
-[
- _turnOnTime,
- [_entity],
- {
- // following code only runs on progress bar success
- params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
-
- _args params ["_entity"];
-
- [_entity, AE3_power_fnc_solarCalculation] remoteExecCall ["AE3_power_fnc_addProviderHandler", 2];
-
- [_entity, "turnedOn", true] remoteExecCall ["AE3_interaction_fnc_manageAce3Interactions", 2];
-
- // we need to set power state here because function already returned false
- // and therefore the turn on wrapper doesn't set the state to turned on
- _entity setVariable ["AE3_power_powerState", 1, true];
- },
- {
- // following code only runs on progress bar fail
- },
- (localize "STR_AE3_Power_Interaction_TurnOn" + "...")
-] call ace_common_fnc_progressBar;
-
-// function immediately returns false, because progress bar runs unscheduled
_result;
\ No newline at end of file
diff --git a/addons/power/readme.md b/addons/power/readme.md
index 9ff18187..9765afac 100644
--- a/addons/power/readme.md
+++ b/addons/power/readme.md
@@ -1,8 +1,9 @@
# Power framework
-
+
## Adding a device via config
-
+
Example:
+
```cpp
class Land_PortableLight_single_F;
@@ -30,11 +31,12 @@ class Land_PortableLight_single_F_AE3: Land_PortableLight_single_F
};
};
```
-
+
### Base (AE3_Device)
+
Base device class.
-
-| Config | Type | Description |
+
+| Config | Type | Description |
| ------ | ------ | ------ |
| displayName | String | Device name (Optional) |
| defaultPowerState | Number | Powerstate (0 = off, 1 = on, 2= standby)(Optional) |
@@ -42,36 +44,40 @@ Base device class.
| turnOnAction | String (Code) | Turn on function (Optional) |
| turnOffAction | String (Code) | Turn off function (Optional) |
| standbyAction | String (Code) | Standby function (Optional) |
-
+
### Consumer (AE3_Consumer)
+
Adds power requirement to the on and standby actions.
-
+
| Config | Type | Description |
| ------ | ------ | ------ |
| powerConsumption | Number | Power consumption when on in [kW] |
| standbyConsumption | Number | Power consumption on standby in [kW] (Optional)|
-
+
### Power interface (AE3_PowerInterface)
+
Adds the possibility to connect the device to a power source.
-
+
| Config | Type | Description |
| ------ | ------ | ------ |
| connected | [Object] | Default connected devices (Optional) |
| internal | Bool | If the connection action should be unavailable |
-
+
### Battery (AE3_Battery)
+
Adds battery functionality to the device
-
+
| Config | Type | Description |
| ------ | ------ | ------ |
| capacity | Number | Battery capacity in [kWh] |
| recharging | Number | Recharging rate in [kW] |
| level | Number | Default charge in [kWh] (Optional)|
| internal | Bool | If the battery is only internal (Optional) |
-
+
### Generator (AE3_Generator)
+
Adds generator functionality to the device
-
+
| Config | Type | Description |
| ------ | ------ | ------ |
| fuelCapacity | Number | Fuel capacity in [l] |
@@ -83,6 +89,8 @@ Adds generator functionality to the device
Name | Type | Desciption | Location
---- | ----- | ----------- | -------
+isDevice | bool | if the device has a power config | public
+initDone | bool | is set when device is completely initialized | public
mutex | bool | if the device is currently changes its power state | public
powerState | int | `1` if turned on, `0` if turned off `2` if on standby | public
fnc_turnOnWrapper | code | function, which defines the turn on behavior | everwhere
@@ -104,6 +112,7 @@ standbyConsumption | number | Power consumption in [kW] when in standby
powerDraw | number | Current power consumption in [kW] | server
### Power Interface
+
Name | Type | Desciption | Location
---- | ----- | ----------- | -------
powerCableDevice | object | Power suppling device | public
@@ -122,16 +131,18 @@ generatorHandle | int | Handler for the generator loop
Name | Type | Desciption | Location
---- | ----- | ----------- | -------
-fuelCapacity | number | Fuel capacity in [l] | public
-fuelConsumption | number | Fuel consumption in [l/h] | public
+fuelCapacity | number | Fuel capacity in [l] | public
+fuelConsumption | number | Fuel consumption in [l/h] | public
#### Solar Generator
+
Name | Type | Desciption | Location
---- | ----- | ----------- | -------
height | number | Height of the solar panels relative to the object coords. | server
orientationFnc | code | returns a list of normal vectors for each solar panel | server
#### Battery
+
Name | Type | Desciption | Location
---- | ----- | ----------- | -------
batteryCapacity | number | Battery capacity in [kWh] | public
@@ -149,4 +160,4 @@ internalBattery | bool | If the device has an internal battery
**Internal Battery:**
Name | Type | Desciption | Location
---- | ----- | ----------- | -------
-parent | object | Parent device to the interanl battery | public
\ No newline at end of file
+parent | object | Parent device to the interanl battery | public
diff --git a/addons/power/sounds/GeneratorAirportRunningSound.ogg b/addons/power/sounds/GeneratorAirportRunningSound.ogg
new file mode 100644
index 00000000..97ee2995
Binary files /dev/null and b/addons/power/sounds/GeneratorAirportRunningSound.ogg differ
diff --git a/addons/power/sounds/GeneratorAirportStartSound.ogg b/addons/power/sounds/GeneratorAirportStartSound.ogg
new file mode 100644
index 00000000..2bb46589
Binary files /dev/null and b/addons/power/sounds/GeneratorAirportStartSound.ogg differ
diff --git a/addons/power/sounds/GeneratorAirportStopSound.ogg b/addons/power/sounds/GeneratorAirportStopSound.ogg
new file mode 100644
index 00000000..5f405eb5
Binary files /dev/null and b/addons/power/sounds/GeneratorAirportStopSound.ogg differ
diff --git a/addons/power/sounds/GeneratorLargeRunningSound.ogg b/addons/power/sounds/GeneratorLargeRunningSound.ogg
new file mode 100644
index 00000000..86277744
Binary files /dev/null and b/addons/power/sounds/GeneratorLargeRunningSound.ogg differ
diff --git a/addons/power/sounds/GeneratorLargeStartSound.ogg b/addons/power/sounds/GeneratorLargeStartSound.ogg
new file mode 100644
index 00000000..47b2612a
Binary files /dev/null and b/addons/power/sounds/GeneratorLargeStartSound.ogg differ
diff --git a/addons/power/sounds/GeneratorLargeStopSound.ogg b/addons/power/sounds/GeneratorLargeStopSound.ogg
new file mode 100644
index 00000000..fac2fcc9
Binary files /dev/null and b/addons/power/sounds/GeneratorLargeStopSound.ogg differ
diff --git a/addons/power/stringtable.xml b/addons/power/stringtable.xml
index 126fa0db..57941d3f 100644
--- a/addons/power/stringtable.xml
+++ b/addons/power/stringtable.xml
@@ -9,6 +9,7 @@
电量: %1 Wh (%2%3 of %4 Wh)
Уровень заряда батареи: %1 Wh (%2%3 of %4 Wh)
Niveau de batterie: %1 Wh (%2%3 de %4 Wh)
+ Livello batteria: %1 Wh (%2%3 di %4 Wh)
Fuel Level: %1 l (%2%3 of %4 l)
@@ -17,14 +18,25 @@
燃料: %1 l (%2%3 of %4 l)
Уровень топлива: %1 l (%2%3 of %4 l)
Niveau de carburant: %1 l (%2%3 de %4 l)
+ Livello carburante: %1 l (%2%3 di %4 l)
- Current power output: %1 W
- Current power output: %1 W
- Aktuelle Ausgangsleistung: %1 W
- 当前输出功率: %1 W
- Текущая выходная мощность: %1 W
- Puissance de sortie actuelle: %1 W
+ Current power output: %1 %2W
+ Current power output: %1 %2W
+ Aktuelle Ausgangsleistung: %1 %2W
+ 当前输出功率: %1 %2W
+ Текущая выходная мощность: %1 %2W
+ Puissance de sortie actuelle: %1 %2W
+ Energia elettrica in uscita attuale: %1 %2W
+
+
+ Current power required: %1 %2W
+ Current power required: %1 %2W
+ Benötigte Ausgangsleistung: %1 %2W
+ Current power required: %1 %2W
+ Current power required: %1 %2W
+ Puissance actuelle requise: %1 %2W
+ Energia attualmente richiesta: %1 %2W
Device Power State is: %1
@@ -33,6 +45,7 @@
>设备电源状态: %1
Состояние питания устройства: %1
L'état d'alimentation de l'appareil est: %1
+ Stato accensione dispositivo: %1
Check Battery Charge
@@ -41,6 +54,7 @@
检查电量
Проверить заряд батареи
Vérifier la charge de la batterie
+ Controlla carica della batteria
Check Power State
@@ -49,6 +63,7 @@
检查电源状态
Проверить состояние питания
Vérifier l'état de l'alimentation
+ Controlla stato accensione
Check Fuel Level
@@ -57,6 +72,7 @@
检查燃料
Проверить уровень топлива
Vérifier le niveau de carburant
+ Controlla livello carburante
Check Power Generation
@@ -65,6 +81,7 @@
检查发电量
Проверить выработку электроэнергии
Vérifiez la production d'énergie
+ Controlla generazione energia elettrica
Connect to power source
@@ -73,6 +90,7 @@
连接电源
Подключить к источнику питания
Connecter à la source d'alimentation
+ Collega a fonte di energia
Disconnect from power source
@@ -81,6 +99,7 @@
断开电源
Отключить от источника питания
Déconnecter à la source d'alimentation
+ Disconnetti da fonte di engergia
Turn on
@@ -89,6 +108,7 @@
打开
Включить
Allumer
+ Accendi
Turn off
@@ -97,6 +117,7 @@
关闭
Выключить
Éteindre
+ Spegni
Standby
@@ -105,6 +126,7 @@
待机
Ожидание (Standby)
Veille
+ Attesa
On
@@ -113,6 +135,7 @@
开
Вкл
On
+ Acceso
Off
@@ -121,6 +144,7 @@
关
Выкл
Off
+ Spento
Standby
@@ -129,6 +153,7 @@
待机
Ожидание (Standby)
Veille
+ Attesa
Unknown
@@ -137,6 +162,7 @@
未知
Неизвестный
Inconu
+ Sconosciuto
@@ -147,6 +173,7 @@
电池模式
Режим батареи
Mode batterie
+ Modalita' batteria
Power Adapter Mode
@@ -155,6 +182,7 @@
电源模式
Работа от сети
Mode adaptateur secteur
+ Modalità adattatore di potenza
Unknown Mode
@@ -163,6 +191,7 @@
未知模式
Неизвестный режим работы
Mode inconnu
+ Modalità sconosciuta
TERMINAL - %1%2 (%3)
@@ -171,16 +200,53 @@
终端 - %1%2 (%3)
TERMINAL - %1%2 (%3)
TERMINAL - %1%2 (%3)
+ TERMINALE - %1%2 (%3)
-
+
Portable Generator
Portable Generator
Tragbarer Generator
便携式发电机
Портативный генератор
Générateur portatif
+ Generatore portatile
+
+
+ Rugged Portable Generator
+ Rugged Portable Generator
+ Gehärteter Tragbarer Generator
+ 坚固便携式发电机
+ Rugged Portable Generator
+ Générateur portable robuste
+
+
+ Radar Generator
+ Radar Generator
+ Radar Generator
+ 雷达信号发射器
+ Radar Generator
+ Générateur Radar
+ Generatore Radar
+
+
+ Diesel Ground Power Unit
+ Diesel Ground Power Unit
+ Bodenstromaggregat
+ 大型发电机
+ Diesel Ground Power Unit
+ Unité d'alimentation diesel
+ Unità energetica diesel da terra
+
+
+ Power Generator
+ Power Generator
+ Stromgenerator
+ 发电机
+ Power Generator
+ Générateur de courant
+ Generatore portatile
Black
@@ -189,6 +255,7 @@
黑色
Black
Noir
+ Nero
Olive
@@ -197,6 +264,7 @@
橄榄绿
Olive
Olive
+ Oliva
Yellow
@@ -205,6 +273,7 @@
黄色
Yellow
Jaune
+ Giallo
Sand
@@ -213,6 +282,7 @@
沙色
Sand
Sable
+ Sabbia
Battery
@@ -221,6 +291,7 @@
电池
Батарея
Batterie
+ Batteria
Solar Panel
@@ -229,6 +300,7 @@
太阳能电池板
Солнечная панель
Panneau solaire
+ Pannello solare
solar panel 1
@@ -237,6 +309,7 @@
太阳能电池板1
Солнечная панель 1
Panneau solaire 1
+ Pannello solare 1
pitch solar panel 1
@@ -245,6 +318,7 @@
倾斜太阳能电池板1
Наклонить солнечную панель 1
basculer Panneau solaire 1
+ Inclina il pannello solare 1
solar panel 2
@@ -253,6 +327,7 @@
太阳能电池板2
Солнечная панель 2
Panneau solaire 2
+ Pannello solare 2
pitch solar panel 2
@@ -261,6 +336,7 @@
倾斜太阳能电池板2
Наклонить солнечную панель 2
basculer Panneau solaire 2
+ Inclina pannello solare 2
solar panels
@@ -269,6 +345,7 @@
太阳能电池板
Солнечные панели
Panneaux solaires
+ Pannelli solari
yaw solar panels
@@ -277,6 +354,7 @@
偏转太阳能电池板
Повернуть солнечную панель
basculer Panneaux solaires
+ Ruota pannello solari
diff --git a/design/AE3_Module_Icon_addConnection.afdesign b/design/AE3_Module_Icon_addConnection.afdesign
new file mode 100644
index 00000000..41c34ab3
Binary files /dev/null and b/design/AE3_Module_Icon_addConnection.afdesign differ
diff --git a/design/AE3_Module_Icon_addConnection.paa b/design/AE3_Module_Icon_addConnection.paa
new file mode 100644
index 00000000..2a714b4b
Binary files /dev/null and b/design/AE3_Module_Icon_addConnection.paa differ
diff --git a/design/AE3_Module_Icon_addConnection.png b/design/AE3_Module_Icon_addConnection.png
new file mode 100644
index 00000000..8f74b16a
Binary files /dev/null and b/design/AE3_Module_Icon_addConnection.png differ
diff --git a/mod.cpp b/mod.cpp
index a8aeb97c..1fb038c3 100644
--- a/mod.cpp
+++ b/mod.cpp
@@ -1,8 +1,8 @@
-name = "Advanced Equipment v0.5.2";
+name = "Advanced Equipment v0.5.3";
picture = "logo_ae3_ca_font.paa";
actionName = "GitHub";
action = "https://github.com/y0014984/Advanced-Equipment";
-description = "Advanced Equipment v0.5.2";
+description = "Advanced Equipment v0.5.3";
logo = "logo_ae3_ca.paa";
logoOver = "logo_ae3_ca_hover.paa";
tooltip = "Advanced Equipment";
diff --git a/wiki/armaOS-Commands.md b/wiki/armaOS-Commands.md
new file mode 100644
index 00000000..a26bc2a3
--- /dev/null
+++ b/wiki/armaOS-Commands.md
@@ -0,0 +1,228 @@
+# crypto
+The `crypto` command is meant to be used in conjuction with the `crack` command. The `crypto` command allows you to encrypt and decrypt text by using various algorithms. See the list below for available algorithms. `crypto` is no real world linux command. It's meant to create gameplay options.
+There is a very good [website](http://www.crypto-it.net/eng/simple/index.html) explaining simple encryption methods. Future algorithms will be taken from there.
+
+| algorithm | status | key type | allowed text characters |
+| --- | --- | --- | --- |
+| caesar | implemented | integer | latin alphabet A-Z, only upper case, no numbers or symbols, no language specific characters like ö, é or ô |
+| columnar | in development | string | characters found in the [UTF-8 decimal table](https://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec), between 33 and 126 (both included) |
+
+## Command syntax
+
+```
+crypto -a= -m= -k=
+```
+
+## Parameter details
+
+| parameter | mandatory | option type | available options |
+| --- | --- | --- | --- |
+| `-a=` | yes | select from available options | `caesar` and `columnar` |
+| `-m=` | yes | select from available options | `encrypt` and `decrypt` |
+| `-k=` | yes | custom string, see algorithms for details | --- |
+| `` | yes | custom string | --- |
+
+## Caesar algorithm
+The caesar algorithm is very old and very simple. You shift every character by the key number to the right. For example: If the key is `3` and you want to encrypt a `B` you will get an `E` because this is the character 3 digits to the right in the latin alphabet.
+Because you can only use upper case latin alphabet you need to somehow adjust your messages according to that. This algorithm is meant to be easy crackable. You can do that in mind because of it's low complexity or with the `crack` command.
+Keep in mind, all characters of the message to be encrypted will be changed to upper case latin alphabet or a blank space. Also keep in mind that there are only 26 passible keys because that's the length of the alphabet. You can use higher numbers but the result will match a lower number.
+
+## Example
+Here's an example. Message to encrypt: HELLO WORLD
+
+```
+admin@armaOS:/> crypto -a=caesar -m=encrypt -k=3 HELLO WORLD
+KHOOR ZRUOG
+admin@armaOS:/> crypto -a=caesar -m=decrypt -k=3 KHOOR ZRUOG
+HELLO WORLD
+```
+
+## Columnar transposition algorithm
+The columnar transposition algorithm is a cipher that involves rearranging the characters in a message (*transposition*), without altering the characters themselves. It transposes the text based on a key that defines the number of columns and their order. First, the plaintext is written row-wise into a grid with the keyword letter count as width. Because this implementation represents a complete columnar transposition, the last row will be completed with underscores (`'_'`), should the message not fit perfectly into all columns (i.e. `count(ciphertext) mod count(keyword) != 0`). Next, the columns are reordered based on the alphabetic order of the keyword's letters. The alphabetic order is determined by the corresponding [UTF-8 decimal](https://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec) order; Allowed characters are between decimal `33 = '!'` and decimal `126 = '~'`. If the key contains the same character multiple times, they are ordered front to back, in the order they appear in the message. Finally, the ciphertext is read out column-wise. To decipher a message, the process is reversed.
+
+## Example
+
+Take a look at the following example, with `ARMA` as the keyword and `TheEnemyWillAttackAt0600h` as the secret message. First, the message is distributed over `4` columns, because the keyword has a length of 4 characters:
+| A | R | M | A |
+|---|---|---|---|
+| T | h | e | E |
+| n | e | m | y |
+| W | i | l | l |
+| A | t | t | a |
+| c | k | A | t |
+| 0 | 6 | 0 | 0 |
+| h | | | |
+
+Next, complete the last row with underscores:
+| A | R | M | A |
+|---|---|---|---|
+| T | h | e | E |
+| n | e | m | y |
+| W | i | l | l |
+| A | t | t | a |
+| c | k | A | t |
+| 0 | 6 | 0 | 0 |
+| h | _ | _ | _ |
+
+Once the matrix is complete, the columns are reordered in alphabetic order, with the first `A` coming before the second:
+| A | A | M | R |
+|---|---|---|---|
+| T | E | e | h |
+| n | y | m | e |
+| W | l | l | i |
+| A | a | t | t |
+| C | t | A | k |
+| 0 | 0 | 0 | 6 |
+| h | _ | _ | _ |
+
+The final step is writing down the encrypted message, column-wise:
+`TnWAc0hEylat0_emltA0_heitk6_`
+
+The same example via the console will look like this:
+```
+admin@armaOS:/> crypto -a=columnar -m=encrypt -k=ARMA TheEnemyWillAttackAt0600h
+TnWAc0hEylat0_emltA0_heitk6_
+admin@armaOS:/> crypto -a=columnar -m=decrypt -k=ARMA TnWAc0hEylat0_emltA0_heitk6_
+TheEnemyWillAttackAt0600h___
+```
+
+# crack
+The `crack` command is meant to be used in conjuction with the `crypto` command. The `crack` command currently implements two methods each that allow you to crack the `caesar` and `columnar` algorithm. `crack` is no real world linux command. It's meant to create gameplay options.
+
+## Command syntax
+
+```
+crack -a= -m=
+```
+
+## Parameter details
+
+| parameter | mandatory | option type | available options |
+| --- | --- | --- | --- |
+| `-a=` | yes | select from available options | `caesar` and `columnar` |
+| `-m=` | yes | select from available options | `bruteforce`, `key` (only for columnar) and `statistics` (only for caesar) |
+| `` | yes | custom string | --- |
+
+## Example statistics mode
+### Caesar
+The `statistics` mode takes advantage of the fact that some characters are more common than others. The most common character for example in german is the `E` so it's very likely that the most frequent character in the encrypted message corresponds to an `E`. From there it's quite easy to decrypt.
+Here's an example with the `statistics` mode.
+
+Original Message: THIS IS MY SECRET MESSAGE
+
+Encrypted Message: WKLV LV PB VHFUHW PHVVDJH
+
+```
+admin@armaOS:/> crack -a=caesar -m=statistics WKLV LV PB VHFUHW PHVVDJH
+Character 'B' found 1 times (Possible key, if this is an 'E': 23)
+Character 'D' found 1 times (Possible key, if this is an 'E': 25)
+Character 'F' found 1 times (Possible key, if this is an 'E': 1)
+Character 'H' found 4 times (Possible key, if this is an 'E': 3)
+Character 'J' found 1 times (Possible key, if this is an 'E': 5)
+Character 'K' found 1 times (Possible key, if this is an 'E': 6)
+Character 'L' found 2 times (Possible key, if this is an 'E': 7)
+Character 'P' found 2 times (Possible key, if this is an 'E': 11)
+Character 'U' found 1 times (Possible key, if this is an 'E': 16)
+Character 'V' found 5 times (Possible key, if this is an 'E': 17)
+Character 'W' found 2 times (Possible key, if this is an 'E': 18)
+admin@armaOS:/> crypto -a=caesar -m=decrypt -k=17 WKLV LV PB VHFUHW PHVVDJH
+FTUE UE YK EQODQF YQEEMSQ
+admin@armaOS:/> crypto -a=caesar -m=decrypt -k=3 WKLV LV PB VHFUHW PHVVDJH
+THIS IS MY SECRET MESSAGE
+```
+
+## Example key mode
+### Columnar
+The `key` mode prints out all possible key-lengths that could have been used to encrypt the message. This might help in the search for the correct key.
+Here's an example using the same key and encrypted message from the [columnar transposition algorithm example](#example-1).
+```
+admin@armaOS:/> crack -m=key -a=columnar TnWAc0hEylat0_emltA0_heitk6_
+Possible Key-Lengths are:
+2
+4
+7
+14
+```
+
+## Example bruteforce mode
+### Caesar
+With a `bruteforce` attack the `crack` command prints all possible key variants and you need to find the correct one by looking over it. This is quite easy because there are only 26 options.
+Here's an example with the `bruteforce` mode.
+
+Original Message: THIS IS MY SECRET MESSAGE
+
+Encrypted Message: WKLV LV PB VHFUHW PHVVDJH
+
+```
+admin@armaOS:/> crack -m=bruteforce -a=caesar WKLV LV PB VHFUHW PHVVDJH
+Test 1: VJKU KU OA UGETGV OGUUCIG
+Test 2: UIJT JT NZ TFDSFU NFTTBHF
+Test 3: THIS IS MY SECRET MESSAGE
+Test 4: SGHR HR LX RDBQDS LDRRZFD
+Test 5: RFGQ GQ KW QCAPCR KCQQYEC
+Test 6: QEFP FP JV PBZOBQ JBPPXDB
+Test 7: PDEO EO IU OAYNAP IAOOWCA
+Test 8: OCDN DN HT NZXMZO HZNNVBZ
+Test 9: NBCM CM GS MYWLYN GYMMUAY
+Test 10: MABL BL FR LXVKXM FXLLTZX
+Test 11: LZAK AK EQ KWUJWL EWKKSYW
+Test 12: KYZJ ZJ DP JVTIVK DVJJRXV
+Test 13: JXYI YI CO IUSHUJ CUIIQWU
+Test 14: IWXH XH BN HTRGTI BTHHPVT
+Test 15: HVWG WG AM GSQFSH ASGGOUS
+Test 16: GUVF VF ZL FRPERG ZRFFNTR
+Test 17: FTUE UE YK EQODQF YQEEMSQ
+Test 18: ESTD TD XJ DPNCPE XPDDLRP
+Test 19: DRSC SC WI COMBOD WOCCKQO
+Test 20: CQRB RB VH BNLANC VNBBJPN
+Test 21: BPQA QA UG AMKZMB UMAAIOM
+Test 22: AOPZ PZ TF ZLJYLA TLZZHNL
+Test 23: ZNOY OY SE YKIXKZ SKYYGMK
+Test 24: YMNX NX RD XJHWJY RJXXFLJ
+Test 25: XLMW MW QC WIGVIX QIWWEKI
+Test 26: WKLV LV PB VHFUHW PHVVDJH
+```
+
+Check the lines one by one. You will recognize immediately the correct decrypted message. So we found the correct message in Test 3. That means that the correct key is 3.
+
+### Columnar
+Bruteforcing the `columnar` cipher as not as simple, as the `caesar` cipher. Though in a complete transposition, it is possible to first take all possible key-lengths (just like the [key mode](#columnar)) and then list the according columns. Keep in mind that there is no way of knowing the column order. So instead of printing all column-permutations, you have to form the words from the columns yourself.
+Here's an example using the same key and encrypted message from the [columnar transposition algorithm example](#example-1).
+
+```
+admin@armaOS:/> crack -m=bruteforce -a=columnar TnWAc0hEylat0_emltA0_heitk6_
+Columns: 2, Rows: 14
+T e
+n m
+W l
+A t
+c A
+0 0
+h _
+E h
+y e
+l i
+a t
+t k
+0 6
+_ _
+
+Columns: 4, Rows: 7
+T E e h
+n y m e
+W l l i
+A a t t
+c t A k
+0 0 0 6
+h _ _ _
+
+Columns: 7, Rows: 4
+T c y 0 l _ t
+n 0 l _ t h k
+W h a e A e 6
+A E t m 0 i _
+
+Columns: 14, Rows: 2
+T W c h y a 0 e l A _ e t 6
+n A 0 E l t _ m t 0 h i k _
+```