-
Notifications
You must be signed in to change notification settings - Fork 58
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
24
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 1 commit
Commits
Show all changes
24 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 53c283e
Merge branch 'master' into pr/751
ampersand38 0cbf01b
add ZEN prefix to JIP ID
ampersand38 d1839af
Merge branch 'terrain-location-module' of https://github.com/ampersan…
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
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,86 @@ | ||
| #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_moduleLocation | ||
| * | ||
| * Public: No | ||
| */ | ||
|
|
||
| params ["_logic"]; | ||
|
|
||
| _location = nearestLocation [getPosASL _logic, ""]; | ||
|
ampersand38 marked this conversation as resolved.
Outdated
ampersand38 marked this conversation as resolved.
Outdated
|
||
|
|
||
| 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"]; | ||
| private _sides = [ | ||
| east, | ||
| west, | ||
| independent, | ||
| civilian, | ||
| sideUnknown | ||
| ]; | ||
|
|
||
| private _attributes = [ | ||
| ["COMBO", "str_3den_trigger_attribute_type_displayname", [_types,_types, _types find _type]], | ||
| ["EDIT", "str_a3_cfgvehicles_modulecuratoraddicon_f_arguments_text", _text, true], | ||
| ["SLIDER", "STR_3DEN_Display3DEN_ControlsHint_Rotate", [0, 360, _direction, EFUNC(common,formatDegrees)], true], | ||
| ["TOOLBOX", "str_3den_trigger_attribute_shape_tooltip", [parseNumber _isRectangular, 1, 2, ["str_3den_attributes_shapetrigger_ellipse", "str_3den_attributes_shapetrigger_rectangle"]]], | ||
|
ampersand38 marked this conversation as resolved.
Outdated
|
||
| ["EDIT", format ["%1 %2", localize "str_3den_trigger_attribute_size_displayname",localize "str_3den_axis_x"], _size select 0, true], | ||
| ["EDIT", format ["%1 %2", localize "str_3den_trigger_attribute_size_displayname",localize "str_3den_axis_y"], _size select 1, true], | ||
|
ampersand38 marked this conversation as resolved.
Outdated
|
||
| ["EDIT", "STR_3DEN_Display3DENSave_Filter_Name_text", _name, true], | ||
| ["COMBO", "str_a3_rscdisplaydynamicgroups_side", [_sides, [ | ||
| "OPFOR", | ||
| "BLUFOR", | ||
| "Independent", | ||
| "Civilian", | ||
| "Unknown" | ||
| ], _sides find _side]], | ||
| ["EDIT", LSTRING(ModuleLocation_Importance), _importance, true] | ||
| ]; | ||
|
mharis001 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ["STR_3DEN_Display3DEN_Locations", _attributes, { | ||
| params ["_dialogValues", "_location"]; | ||
|
ampersand38 marked this conversation as resolved.
Outdated
|
||
| _dialogValues params [ | ||
| "_type", | ||
| "_text", | ||
| "_direction", | ||
| "_isRectangular", | ||
| "_sizeX", | ||
| "_sizeY", | ||
| "_name", | ||
| "_side", | ||
| "_importance" | ||
| ]; | ||
|
|
||
| private _location = createLocation [_location]; | ||
|
|
||
|
ampersand38 marked this conversation as resolved.
Outdated
|
||
| _location setType _type; | ||
| _location setText _text; | ||
| _location setDirection _direction; | ||
| _location setRectangular ([false, true] select _isRectangular); | ||
|
ampersand38 marked this conversation as resolved.
Outdated
|
||
| _location setSize [parseNumber _sizeX, parseNumber _sizeY]; | ||
| _location setName _name; | ||
| _location setSide _side; | ||
| _location setImportance parseNumber _importance; | ||
|
|
||
| deleteLocation _location; | ||
|
mharis001 marked this conversation as resolved.
Outdated
|
||
| }, {}, _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.