Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions addons/modules/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ class CfgVehicles {
icon = QPATHTOF(ui\light_ca.paa);
portrait = QPATHTOF(ui\light_ca.paa);
};
class GVAR(moduleEditTerrainLocation): GVAR(moduleBase) {
category = "Environment";
displayName = CSTRING(moduleEditTerrainLocation);
icon = "\a3\3den\Data\Displays\Display3DEN\PanelLeft\entityList_location_ca.paa";
portrait = "\a3\3den\Data\Displays\Display3DEN\PanelLeft\entityList_location_ca.paa";
function = QFUNC(moduleEditTerrainLocation);
};
class GVAR(moduleMakeInvincible): GVAR(moduleBase) {
curatorCanAttach = 1;
category = QGVAR(Objects);
Expand Down
1 change: 1 addition & 0 deletions addons/modules/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ PREP(moduleHeal);
PREP(moduleHideTerrainObjects);
PREP(moduleHideZeus);
PREP(moduleLightSource);
PREP(moduleEditTerrainLocation);
PREP(moduleMakeInvincible);
PREP(moduleNuke);
PREP(moduleNukeLocal);
Expand Down
16 changes: 16 additions & 0 deletions addons/modules/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ if (isServer) then {
player createDiaryRecord [QGVAR(intel), [_title, _text]];
}] call CBA_fnc_addEventHandler;

[QGVAR(editTerrainLocation), {
params ["_values", "_locationPosition"];
_values params ["_type", "_text", "_direction", "_isRectangular", "_size", "_name", "_side", "_importance"];

private _location = nearestLocation [_locationPosition, ""];
private _l = createLocation [_location];
_l setType _type;
_l setText _text;
_l setDirection _direction;
_l setRectangular _isRectangular;
_l setSize _size;
_l setName _name;
_l setSide _side;
_l setImportance parseNumber _importance;
}] call CBA_fnc_addEventHandler;

[QGVAR(teleportOutOfVehicle), {
params ["_unit", "_position"];

Expand Down
1 change: 1 addition & 0 deletions addons/modules/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CfgPatches {
QGVAR(moduleHideTerrainObjects),
QGVAR(moduleHideZeus),
QGVAR(moduleLightSource),
QGVAR(moduleEditTerrainLocation),
QGVAR(moduleMakeInvincible),
QGVAR(moduleNuke),
QGVAR(modulePatrolArea),
Expand Down
89 changes: 89 additions & 0 deletions addons/modules/functions/fnc_moduleEditTerrainLocation.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#include "script_component.hpp"
/*
* Author: Ampersand
* Zeus module function to edit terrain locations.
*
* Arguments:
* 0: Logic <OBJECT>
*
* Return Value:
* None
*
* Example:
* [LOGIC] call zen_modules_fnc_moduleEditTerrainLocation
*
* Public: No
*/

params ["_logic"];

private _location = nearestLocation [_logic, ""];
private _type = type _location;
private _text = text _location;
private _direction = direction _location;
private _isRectangular = rectangular _location;
private _size = size _location;
private _name = name _location;
private _side = side _location;
private _importance = importance _location;

if (isNil QGVAR(locationTypes)) then {
GVAR(locationTypes) = "true" configClasses (configFile >> "CfgLocationTypes") apply {configName _x};
};

private _sides = [
east,
west,
independent,
civilian,
sideUnknown
];

[LSTRING(ModuleEditTerrainLocation), [
[
"COMBO",
"str_3den_trigger_attribute_type_displayname",
[GVAR(locationTypes), GVAR(locationTypes), GVAR(locationTypes) find _type]
],
[
"EDIT",
"str_a3_cfgvehicles_modulecuratoraddicon_f_arguments_text",
_text
],
[
"SLIDER",
"STR_3DEN_Display3DEN_ControlsHint_Rotate",
[0, 360, _direction, EFUNC(common,formatDegrees)]
],
[
"TOOLBOX",
LSTRING(ModuleEditTerrainLocation_AreaShape),
[_isRectangular, 1, 2, ["str_3den_attributes_shapetrigger_ellipse", "str_3den_attributes_shapetrigger_rectangle"]],
true
],
[
"VECTOR",
"str_3den_trigger_attribute_size_displayname",
_size
],
[
"EDIT",
"STR_3DEN_Display3DENSave_Filter_Name_text",
_name
],
[
"COMBO",
"str_a3_rscdisplaydynamicgroups_side",
[_sides, _sides apply {[_x] call BIS_fnc_sideName}, _sides find _side]
],
[
"EDIT",
LSTRING(ModuleEditTerrainLocation_Importance),
_importance
]
], {
params ["_values", "_locationPosition"];
[QGVAR(editTerrainLocation), _this, str _locationPosition] call CBA_fnc_globalEventJIP;
}, {}, locationPosition _location] call EFUNC(dialog,create);

deleteVehicle _logic;
9 changes: 9 additions & 0 deletions addons/modules/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,15 @@
<Italian>Rendi invincibile</Italian>
<French>Rendre Invincible</French>
</Key>
<Key ID="STR_ZEN_Modules_ModuleEditTerrainLocation">
<English>Edit Terrain Location</English>
</Key>
<Key ID="STR_ZEN_Modules_ModuleEditTerrainLocation_Importance">
<English>Importance</English>
</Key>
<Key ID="STR_ZEN_Modules_ModuleEditTerrainLocation_AreaShape">
<English>Area Shape</English>
</Key>
<Key ID="STR_ZEN_Modules_ModuleMakeInvincible_Invincible">
<English>Invincible</English>
<Russian>Неуязвимость</Russian>
Expand Down