Compare commits
4 Commits
master
...
mission-br
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03b6259a60 | ||
|
|
0d2d27457d | ||
|
|
8361712857 | ||
|
|
0d4e749502 |
Binary file not shown.
|
Before Width: | Height: | Size: 102 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 219 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 170 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 149 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 144 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB |
@@ -26,27 +26,55 @@
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<list>
|
||||
<name>mission_list</name>
|
||||
<pref-width>300</pref-width>
|
||||
<pref-height>250</pref-height>
|
||||
<halign>fill</halign>
|
||||
<valign>fill</valign>
|
||||
<stretch>true</stretch>
|
||||
<padding>6</padding>
|
||||
<property>/sim/mission/gui/selected-mission</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
select_mission();
|
||||
</script>
|
||||
</binding>
|
||||
<value>...</value>
|
||||
<value>...</value>
|
||||
</list>
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<button>
|
||||
<legend>Generic missions</legend>
|
||||
<pref-height>30</pref-height>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
missions_dir = getprop("/sim/mission/root_path") ~ "/Missions";
|
||||
update_list();
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
<button>
|
||||
<legend>Aircraft-specific missions</legend>
|
||||
<pref-height>30</pref-height>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
missions_dir = getprop("/sim/aircraft-dir") ~ "/Missions";
|
||||
update_list();
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
<list>
|
||||
<name>mission_list</name>
|
||||
<pref-width>300</pref-width>
|
||||
<pref-height>250</pref-height>
|
||||
<halign>fill</halign>
|
||||
<valign>fill</valign>
|
||||
<stretch>true</stretch>
|
||||
<padding>6</padding>
|
||||
<property>/sim/mission/gui/selected-mission</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
select_mission();
|
||||
</script>
|
||||
</binding>
|
||||
<value>...</value>
|
||||
<value>...</value>
|
||||
</list>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
@@ -97,8 +125,9 @@
|
||||
|
||||
<nasal>
|
||||
<open> <![CDATA[
|
||||
var list = cmdarg().getNode("group[1]/list");
|
||||
var list = cmdarg().getNode("group[1]/group[0]/list");
|
||||
var mission_root = "";
|
||||
var missions_dir = getprop("/sim/mission/root_path") ~ "/Missions";
|
||||
var selected_mission = "";
|
||||
var data_node = props.getNode("sim/mission/gui/data", 1);
|
||||
data_node.setValues({description: ""});
|
||||
@@ -116,10 +145,14 @@
|
||||
var update_list = func {
|
||||
list.removeChildren("value");
|
||||
|
||||
var mission_path = getprop("/sim/mission/root_path") ~ "/Missions";
|
||||
foreach (var a; directory(mission_path)) {
|
||||
# var mission_path = "";
|
||||
# if (mode == nil)
|
||||
# mission_path = getprop("/sim/mission/root_path") ~ "/Missions";
|
||||
# else mission_path = getprop("/sim/aircraft-dir") ~ "/Missions";
|
||||
|
||||
foreach (var a; directory(missions_dir)) {
|
||||
if (a != "." and a != ".." and a != "Generic") {
|
||||
foreach (var b; directory(mission_path ~ "/" ~ a)) {
|
||||
foreach (var b; directory(missions_dir ~ "/" ~ a)) {
|
||||
if (b != "." and b != "..") {
|
||||
list.addChild("value").setValue(a ~ "/" ~ b);
|
||||
}
|
||||
@@ -132,7 +165,7 @@
|
||||
|
||||
var select_mission = func {
|
||||
selected_mission = getprop("/sim/mission/gui/selected-mission");
|
||||
mission_root = getprop("/sim/mission/root_path") ~ "/Missions/" ~ selected_mission;
|
||||
mission_root = missions_dir ~ "/" ~ selected_mission; #getprop("/sim/mission/root_path") ~ "/Missions/" ~ selected_mission;
|
||||
|
||||
data_node.setValues({description: ""});
|
||||
io.read_properties(mission_root ~ "/metadata.xml", data_node);
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
#
|
||||
# Protocol KML addon
|
||||
# Missions addon
|
||||
#
|
||||
# Slawek Mikula, December 2019
|
||||
# Started by Marius_A
|
||||
# Started on November 2016
|
||||
#
|
||||
# Converted to a FlightGear addon by
|
||||
# Slawek Mikula, October 2017
|
||||
|
||||
var main = func( addon ) {
|
||||
var root = addon.basePath;
|
||||
var myAddonId = addon.id;
|
||||
var mySettingsRootPath = "/addons/by-id/" ~ myAddonId;
|
||||
# setting root path to addon
|
||||
var root = addon.basePath;
|
||||
setprop("/sim/mission/root_path", root);
|
||||
|
||||
# load scripts
|
||||
foreach(var f; ['mission.nas', 'extensions.nas', 'persistence.nas', 'gui.nas', 'utils.nas'] ) {
|
||||
io.load_nasal( root ~ "/Nasal/" ~ f, "mission" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PropertyList>
|
||||
<meta>
|
||||
<file-type type="string">FlightGear add-on menu bar items</file-type>
|
||||
<format-version type="int">1</format-version>
|
||||
</meta>
|
||||
|
||||
<menubar-items>
|
||||
</menubar-items>
|
||||
</PropertyList>
|
||||
@@ -1,63 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<PropertyList>
|
||||
<meta>
|
||||
<file-type type="string">FlightGear add-on metadata</file-type>
|
||||
<format-version type="int">1</format-version>
|
||||
</meta>
|
||||
<meta>
|
||||
<file-type type="string">FlightGear add-on metadata</file-type>
|
||||
<format-version type="int">1</format-version>
|
||||
</meta>
|
||||
|
||||
<addon>
|
||||
<identifier type="string">com.slawekmikula.flightgear.Missions</identifier>
|
||||
<name type="string">Missions & Adventures</name>
|
||||
<version type="string">0.0.1</version>
|
||||
<addon>
|
||||
<identifier type="string">org.flightgear.addons.Skeleton</identifier>
|
||||
<name type="string">Skeleton</name>
|
||||
<version type="string">1.1.1</version>
|
||||
|
||||
<authors>
|
||||
<author>
|
||||
<name type="string">slawekmikula from the FlightGear forum</name>
|
||||
<email type="string">slawek.mikula@gmail.com</email>
|
||||
<url type="string"></url>
|
||||
</author>
|
||||
</authors>
|
||||
<authors>
|
||||
<author>
|
||||
<name type="string">Torsten Dreyer</name>
|
||||
<email type="string"></email>
|
||||
<url type="string"></url>
|
||||
</author>
|
||||
<author>
|
||||
<name type="string">Henning Stahlke</name>
|
||||
<email type="string"></email>
|
||||
<url type="string"></url>
|
||||
</author>
|
||||
</authors>
|
||||
|
||||
<maintainers>
|
||||
<maintainer>
|
||||
<name type="string">slawekmikula from the FlightGear forum</name>
|
||||
<email type="string">slawek.mikula@gmail.com</email>
|
||||
<url type="string"></url>
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<maintainers>
|
||||
<maintainer>
|
||||
<name type="string">FlightGear developers</name>
|
||||
<url type="string">
|
||||
https://sourceforge.net/p/flightgear/mailman/flightgear-devel/
|
||||
</url>
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
|
||||
<short-description type="string">FlightGear missions addon. Adds ability to perform mutliple missions/tasks.</short-description>
|
||||
<long-description type="string">Addon for FlightGear that adds new missions & tasks to perform during flight </long-description>
|
||||
<short-description type="string">
|
||||
Template add-on to help new add-on developers.
|
||||
</short-description>
|
||||
|
||||
<localized>
|
||||
<pl>
|
||||
<name>Misje i przygody</name>
|
||||
<short-description type="string">Dodatek misji do FlightGear. Dodaje możliwość wykonywania różnych misji/zadań.</short-description>
|
||||
<long-description type="string">Rozszerzenie do FlightGear, które dodaje nowe misje i zadania do wykonania podczas lotu</long-description>
|
||||
</pl>
|
||||
</localized>
|
||||
<long-description type="string">
|
||||
This add-on does nothing particular, but you may use it as a starting point when writing a new add-on for FlightGear.
|
||||
</long-description>
|
||||
|
||||
<license>
|
||||
<designation type="string">GNU GPL version 2 or later</designation>
|
||||
<file type="string">LICENSE</file>
|
||||
<url type="string">https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html</url>
|
||||
</license>
|
||||
<license>
|
||||
<designation type="string">
|
||||
GNU GPL version 2 or later
|
||||
</designation>
|
||||
|
||||
<min-FG-version type="string">2018.3.5</min-FG-version>
|
||||
<max-FG-version type="string">none</max-FG-version>
|
||||
<file type="string">
|
||||
<!-- Use a relative, slash-separated path to a file under the add-on
|
||||
base directory that contains the add-on license text. -->
|
||||
</file>
|
||||
|
||||
<urls>
|
||||
<home-page type="string"><![CDATA[ http://wiki.flightgear.org/FlightGear_Missions_and_Adventures ]]></home-page>
|
||||
<download type="string">https://github.com/slawekmikula/fg-addon-missions/download</download>
|
||||
<support type="string">https://github.com/slawekmikula/fg-addon-missions/issues</support>
|
||||
<code-repository type="string">https://github.com/slawekmikula/fg-addon-missions</code-repository>
|
||||
</urls>
|
||||
<url type="string">
|
||||
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
|
||||
</url>
|
||||
</license>
|
||||
|
||||
<tags>
|
||||
<tag type="string">missions</tag>
|
||||
<tag type="string">adventures</tag>
|
||||
<tag type="string">fun</tag>
|
||||
</tags>
|
||||
</addon>
|
||||
<min-FG-version type="string">2017.4.0</min-FG-version>
|
||||
<max-FG-version type="string">none</max-FG-version>
|
||||
|
||||
<urls>
|
||||
<home-page type="string">
|
||||
https://example.com/FlightGear-Skeleton-addon/
|
||||
</home-page>
|
||||
|
||||
<download type="string">
|
||||
https://example.com/FlightGear-Skeleton-addon/download
|
||||
</download>
|
||||
|
||||
<support type="string">
|
||||
https://example.com/FlightGear-Skeleton-addon/support
|
||||
</support>
|
||||
|
||||
<code-repository type="string">
|
||||
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Addons/Skeleton/
|
||||
</code-repository>
|
||||
</urls>
|
||||
|
||||
<tags>
|
||||
<tag type="string">skeleton</tag>
|
||||
<tag type="string">dummy</tag>
|
||||
<tag type="string">template</tag>
|
||||
</tags>
|
||||
</addon>
|
||||
</PropertyList>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PropertyList>
|
||||
</PropertyList>
|
||||
Reference in New Issue
Block a user