-
Notifications
You must be signed in to change notification settings - Fork 56
Add Edit Terrain Location Module #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ampersand38
wants to merge
21
commits into
zen-mod:master
Choose a base branch
from
ampersand38:terrain-location-module
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
279fc49
Add Location Module
ampersand38 21ef51a
_values
ampersand38 607b0ac
Remove blank line.
ampersand38 37a7689
"Area Shape" instead of "Area shape.".
ampersand38 5e0b6dc
multi-line
ampersand38 52a7754
Missing private.
ampersand38 95d9fd3
Don't need getPosASL
ampersand38 eccbfb4
name Edit Terrain Location
ampersand38 bd15924
curatorCanAttach already 0
ampersand38 39c1e01
name Edit Terrain Location
ampersand38 787d269
Use vector for _size
ampersand38 5a786db
Don't force default values
ampersand38 a9fdc84
Toolbox controls can return BOOL
ampersand38 f0937e9
name Edit Terrain Location
ampersand38 ef29fc1
_attributes not needed
ampersand38 50c1056
missing space
ampersand38 b7604b9
Use global event
ampersand38 cf30381
Get Location types from cfg
ampersand38 55e7edf
style
ampersand38 b685ce2
Merge remote-tracking branch 'upstream/master' into terrain-location-…
ampersand38 cb1b499
fix JIP
ampersand38 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
addons/modules/functions/fnc_moduleEditTerrainLocation.sqf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| #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; | ||
|
|
||
| private _types = ["Mount","Name","Strategic","StrongpointArea","FlatArea","FlatAreaCity","FlatAreaCitySmall","CityCenter","Airport","NameMarine","NameCityCapital","NameCity","NameVillage","NameLocal","Hill","ViewPoint","RockArea","BorderCrossing","VegetationBroadleaf","VegetationFir","VegetationPalm","VegetationVineyard","Area","Flag","Invisible","HistoricalSite","CivilDefense","CulturalProperty","DangerousForces","SafetyZone","HandDrawnCamp","b_unknown","o_unknown","n_unknown","b_inf","o_inf","n_inf","b_motor_inf","o_motor_inf","n_motor_inf","b_mech_inf","o_mech_inf","n_mech_inf","b_armor","o_armor","n_armor","b_recon","o_recon","n_recon","b_air","o_air","n_air","b_plane","o_plane","n_plane","b_uav","o_uav","n_uav","b_naval","o_naval","n_naval","b_med","o_med","n_med","b_art","o_art","n_art","b_mortar","o_mortar","n_mortar","b_hq","o_hq","n_hq","b_support","o_support","n_support","b_maint","o_maint","n_maint","b_service","o_service","n_service","b_installation","o_installation","n_installation","u_installation","b_antiair","o_antiair","n_antiair","c_unknown","c_car","c_ship","c_air","c_plane","group_0","group_1","group_2","group_3","group_4","group_5","group_6","group_7","group_8","group_9","group_10","group_11","respawn_unknown","respawn_inf","respawn_motor","respawn_armor","respawn_air","respawn_plane","respawn_naval","respawn_para"]; | ||
mharis001 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| private _sides = [ | ||
mharis001 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| east, | ||
| west, | ||
| independent, | ||
| civilian, | ||
| sideUnknown | ||
| ]; | ||
|
|
||
| [LSTRING(ModuleEditTerrainLocation), [ | ||
| [ | ||
| "COMBO", | ||
| "str_3den_trigger_attribute_type_displayname", | ||
| [_types, _types, _types 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", "_location"]; | ||
| _values params [ | ||
| "_type", | ||
| "_text", | ||
| "_direction", | ||
| "_isRectangular", | ||
| "_size", | ||
| "_name", | ||
| "_side", | ||
| "_importance" | ||
| ]; | ||
|
|
||
| private _location = createLocation [_location]; | ||
| _location setType _type; | ||
| _location setText _text; | ||
| _location setDirection _direction; | ||
| _location setRectangular _isRectangular; | ||
| _location setSize _size; | ||
| _location setName _name; | ||
| _location setSide _side; | ||
| _location setImportance parseNumber _importance; | ||
|
|
||
| deleteLocation _location; | ||
| }, {}, _location] call EFUNC(dialog,create); | ||
|
|
||
| deleteVehicle _logic; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.