Merge branch 'tutorial-scenario': lesson 8 and some fixes

This commit is contained in:
cim 2013-12-21 18:31:09 +00:00
commit 84c1520ee8
3 changed files with 283 additions and 42 deletions

View File

@ -193,11 +193,15 @@
"oolite-tutorial-no-advance" = "Advancing with '[oolite_key_activate_equipment]' is not currently available.";
"oolite-tutorial-controls-mode0" = "Mode: next stage in lesson";
"oolite-tutorial-controls-mode1" = "Mode: next lesson";
"oolite-tutorial-controls-mode2" = "Mode: restart lesson";
"oolite-tutorial-0-0-title" = "Flight Training Course";
"oolite-tutorial-0-0-message" = "Welcome to the Cooperative Flight Training Course, pilot. This course will demonstrate the basic functionality of Cooperative ships to you, in a specially-prepared simulator.\n\nThe course is in multiple sections. While in the simulator, you can use the '[oolite_key_activate_equipment]' key to advance to the next entry in the current lesson, and the '[oolite_key_mode_equipment]' key to go to the next lesson, if you wish to skip sections you have previously completed.\n\nOnce the simulation begins, a panel on your screen will display instructions, which you should follow to progress through the course. If you wish to temporarily hide the panel, press the '[oolite_key_cycle_mfd]' key. You can bring it back with the same key, or it will automatically reappear when there are new instructions.\n\nWhere an instruction asks you to press a letter key, press the letter key alone if it is lower case (e.g. 'i'), and press shift and the key together if it is upper case (e.g. 'K').\n\nWhen you are ready, press the Enter key to begin the simulation with the first lesson.";
"oolite-tutorial-0-0-message" = "Welcome to the Cooperative Flight Training Course, pilot. This course will demonstrate the basic functionality of Cooperative ships to you, in a specially-prepared simulator.\n\nThe course is in multiple lessons. While in the simulator, you can use the '[oolite_key_activate_equipment]' key to advance to the next entry in the current lesson. Using the '[oolite_key_mode_equipment]' key will temporarily change the functionality of the '[oolite_key_activate_equipment]' key, and allow you to skip lessons you have previously completed, or restart the current lessons.\n\nOnce the simulation begins, a panel on your screen will display instructions, which you should follow to progress through the course. If you wish to temporarily hide the panel, press the '[oolite_key_cycle_mfd]' key. You can bring it back with the same key, or it will automatically reappear when there are new instructions.\n\nWhere an instruction asks you to press a letter key, press the letter key alone if it is lower case (e.g. 'i'), and press shift and the key together if it is upper case (e.g. 'K').\n\nWhen you are ready, press the Enter key to begin the simulation with the first lesson.";
"oolite-tutorial-0-0-choices" = { "1" = "Begin Course"; };
"oolite-tutorial-0-2" = "Welcome to the pilot's training course. The lesson information will be displayed on this panel.\n\nYou will often need to press '[oolite_key_activate_equipment]' to go to the next step - do this now to start the first lesson.\n\nRemember, you can also press '[oolite_key_mode_equipment]' to skip to the next lesson.";
"oolite-tutorial-0-2" = "Welcome to the pilot's training course. The lesson information will be displayed on this panel.\n\nYou will often need to press '[oolite_key_activate_equipment]' to go to the next step - do this now to start the first lesson.\n\nRemember, you can also press '[oolite_key_mode_equipment]' to skip or restart lessons.";
"oolite-tutorial-1-0" = "Lesson 1: the HUD\nThis lesson introduces the HUD components in turn.\nWhen you start, the HUD components will all be hidden. As you go through this lesson, they will be made visible and introduced.";
@ -213,7 +217,7 @@
"oolite-tutorial-1-6" = "Primary Shields: 3/3\nThe shields will slowly recharge from the energy banks if they are drained, and the bars will change colour to highlight a drained state. As with the energy banks, a full recharge will take some time.";
"oolite-tutorial-1-7" = "Fuel: 1/2\nThis bar shows the amount of witchspace fuel currently available. The full capacity is sufficient for a seven light-year witchspace jump. With the correct equipment, fuel can also be used to significantly boost your speed in normal space.";
"oolite-tutorial-1-7" = "Fuel: 1/2\nThis bar shows the amount of witchspace fuel currently available. The full capacity is sufficient for a seven light-year witchspace jump. With the optional Fuel Injectors upgrade fitted, fuel can also be used to significantly boost your speed in normal space.";
"oolite-tutorial-1-8" = "Fuel: 2/2\nThe vertical line shows the amount of fuel needed to reach the currently selected witchspace destination. If the fuel is insufficient, this will change colour.";
@ -253,31 +257,33 @@
"oolite-tutorial-2-1-error" = "First bring your ship to a complete stop using the '[oolite_key_decrease_speed]' key.";
"oolite-tutorial-2-1" = "Scanner use: 1/8\nWe have added several asteroids around you, which appear on your scanner as a white marker.\nThe circle of the scanner represents the horizontal plane around your ship, with the lines forward approximately indicating your field of view.";
"oolite-tutorial-2-1" = "Scanner use: 1/9\nWe have added several asteroids around you, which appear on your scanner as a white marker.\nThe circle of the scanner represents the horizontal plane around your ship, with the diagonal lines approximately indicating your field of view. Maximum range is just over 25km.";
"oolite-tutorial-2-2" = "Scanner use: 2/8\nThe position of an object above or below the plane is then marked with a stick. The further the object is from the plane, the longer the stick will be.";
"oolite-tutorial-2-2" = "Scanner use: 2/9\nThe position of an object above or below the plane is then marked with a stick. The further the object is from the plane, the longer the stick will be.";
"oolite-tutorial-2-3" = "Scanner use: 3/8\nTo bring an object on the scanner into your forward view, first roll your ship with the '[oolite_key_roll_left]' and '[oolite_key_roll_right]' keys until the object is on the forward/back line of the scanner. Then, use the '[oolite_key_pitch_forward]' and '[oolite_key_pitch_back]' keys to turn your ship so that it is in front of you.";
"oolite-tutorial-2-3" = "Scanner use: 3/9\nTo bring an object on the scanner into your forward view, first roll your ship with the '[oolite_key_roll_left]' and '[oolite_key_roll_right]' keys until the object is on the forward/back line of the scanner. Then, use the '[oolite_key_pitch_forward]' and '[oolite_key_pitch_back]' keys to turn your ship so that it is in front of you.";
"oolite-tutorial-2-4" = "Scanner use: 4/8\nThe scanner can detect objects up to a substantial distance. Pick one of the asteroids and fly towards it. Accelerate with the '[oolite_key_increase_speed]' key, and decelerate again when nearby with the '[oolite_key_decrease_speed]' key.\nBe careful not to collide with it!";
"oolite-tutorial-2-4" = "Scanner use: 4/9\nThe scanner can detect objects up to a substantial distance. Pick one of the asteroids and fly towards it. Accelerate with the '[oolite_key_increase_speed]' key, and decelerate again when nearby with the '[oolite_key_decrease_speed]' key.\nBe careful not to collide with it!";
"oolite-tutorial-2-5" = "Scanner use: 5/8\nWhen concentrating on close-up objects, it may be useful to zoom the scanner, sacrificing range for detail. Press the '[oolite_key_scanner_zoom]' key to zoom in, up to 5x zoom.\nYou can reset the zoom to maximum range using the '[oolite_key_scanner_unzoom]' key. Note the zoom level indicator by the scanner.";
"oolite-tutorial-2-5" = "Scanner use: 5/9\nWhen concentrating on close-up objects, it may be useful to zoom the scanner, sacrificing range for detail. Press the '[oolite_key_scanner_zoom]' key to zoom in, up to 5x zoom.\nYou can reset the zoom to maximum range using the '[oolite_key_scanner_unzoom]' key. Note the zoom level indicator by the scanner.";
"oolite-tutorial-2-6" = "Scanner use: 6/8\nThe colour of the marker is used to indicate something about its nature. Asteroids are unpowered objects and appear white. Other objects which will appear white include debris, cargo containers, and escape capsules";
"oolite-tutorial-2-6" = "Scanner use: 6/9\nThe horizontal lines on the scanner mark out range. The major lines are 5km apart, and as you zoom the scanner in, minor lines 1km apart will also be added.";
"oolite-tutorial-2-7" = "Scanner use: 7/8\nPowered ships usually appear yellow on the scanner, unless they are attacking, when they appear red. Don't worry - this one isn't actually attacking!\nPolice and other official ships are indicated with a purple marker - be careful not to accidentally hit them as this is an illegal act.";
"oolite-tutorial-2-7" = "Scanner use: 7/9\nThe colour of the marker is used to indicate something about its nature. Asteroids are unpowered objects and appear white. Other objects which will appear white include debris, cargo containers, and escape capsules";
"oolite-tutorial-2-8" = "Scanner use: 8/9\nPowered ships usually appear yellow on the scanner, unless they are attacking, when they appear red. Don't worry - this one isn't actually attacking!\nPolice and other official ships are indicated with a purple marker - be careful not to accidentally hit them as this is an illegal act.";
"oolite-tutorial-2-8" = "Scanner use: 8/8\nOther common colours include yellow/green flashing for navigation buoys, light blue for missiles, and red/yellow flashing for mines. Again, don't worry, these are all disarmed!";
"oolite-tutorial-2-9" = "Scanner use: 9/9\nOther common colours include yellow/green flashing for navigation buoys, light blue for missiles, and red/yellow flashing for mines. Again, don't worry, these are all disarmed!";
"oolite-tutorial-2-9" = "View controls: 1/2\nYour ship is fitted with four view cameras. Use the '[oolite_key_view_forward]', '[oolite_key_view_aft]', '[oolite_key_view_port]' and '[oolite_key_view_starboard]' keys to switch between them. The view lines on the scanner will move as you do. Notice that the crosshair is replaced on the other views, as you have no other weapons mounted.";
"oolite-tutorial-2-10" = "View controls: 1/2\nYour ship is fitted with four view cameras. Use the '[oolite_key_view_forward]', '[oolite_key_view_aft]', '[oolite_key_view_port]' and '[oolite_key_view_starboard]' keys to switch between them. The view lines on the scanner will move as you do. Notice that the crosshair is replaced on the other views, as you have no other weapons mounted.";
"oolite-tutorial-2-10" = "View controls: 2/2\nYour ship can also simulate an external view for you. Press '[oolite_key_custom_view]' to switch to external view mode and to cycle through the available external views. Any of the internal view keys will return you to internal viewing.";
"oolite-tutorial-2-11" = "View controls: 2/2\nYour ship can also simulate an external view for you. Press '[oolite_key_custom_view]' to switch to external view mode and to cycle through the available external views. Any of the internal view keys will return you to internal viewing.";
"oolite-tutorial-3-0" = "Lesson 3: Flight Training\nThis lesson gives you opportunity to practice basic piloting skills. Your ship has been disarmed temporarily to focus on movement over weapon use.";
"oolite-tutorial-3-1" = "To refresh your memory, the basic flight controls are:\n[oolite_key_roll_left]: roll left\n[oolite_key_roll_right]: roll right\n[oolite_key_pitch_forward]: pitch forward\n[oolite_key_pitch_back]: pitch back\n[oolite_key_increase_speed]: increase speed\n[oolite_key_decrease_speed]: decrease speed";
"oolite-tutorial-3-2" = "We have added a dense asteroid cluster nearby. Use your scanner to locate the buoy within it, then fly within 500m of the buoy and come to a complete stop.";
"oolite-tutorial-3-2" = "We have added a dense asteroid cluster nearby. Use your scanner to locate the buoy within it, then fly within 500m of the buoy and come to a complete stop.\n\nTip: use the range lines on the scanner to judge distance.";
"oolite-tutorial-3-3-error" = "To continue, come to a stop near the buoy. Use your '[oolite_key_scanner_unzoom]' key to maximise scan range if you are having trouble finding it.";
@ -287,11 +293,11 @@
"oolite-tutorial-3-3-win" = "That's enough practice for now";
"oolite-tutorial-3-4" = "You survived [mission_oolite_tutorial_asteroids] seconds.\n\nIf you would like to try this challenge again, press '[oolite_key_activate_equipment]'. Otherwise, press '[oolite_key_mode_equipment]' to go to the next stage of the course.\n\nTip: use the '[oolite_key_scanner_zoom]' key to magnify your scanner.";
"oolite-tutorial-3-4" = "You survived [mission_oolite_tutorial_asteroids] seconds.\n\nIf you would like to try this challenge again, come to a complete stop before pressing '[oolite_key_activate_equipment]'. Otherwise, press '[oolite_key_activate_equipment]' while moving to finish the lesson.\n\nTip: use the '[oolite_key_scanner_zoom]' key to magnify your scanner.";
"oolite-tutorial-3-4a" = "You survived [mission_oolite_tutorial_asteroids] seconds.\n\nIf you would like to try this challenge again, this time without the scanner highlighting, press '[oolite_key_activate_equipment]'. Otherwise, press '[oolite_key_mode_equipment]' to go to the next stage of the course.";
"oolite-tutorial-3-4a" = "You survived [mission_oolite_tutorial_asteroids] seconds.\n\nIf you would like to try this challenge again, this time without the scanner highlighting, come to a complete stop and press '[oolite_key_activate_equipment]'. Otherwise, press '[oolite_key_activate_equipment]' while moving to go to the next lesson.";
"oolite-tutorial-3-4b" = "You survived [mission_oolite_tutorial_asteroids] seconds without scanner assistance.\nIt's probably time to press '[oolite_key_mode_equipment]' to go to the next stage of the course, but you can have another go with '[oolite_key_activate_equipment]' if you want.";
"oolite-tutorial-3-4b" = "You survived [mission_oolite_tutorial_asteroids] seconds without scanner assistance.\nThat's as much as this lesson can teach you, so press '[oolite_key_activate_equipment]' to go to the next lesson.";
"oolite-tutorial-4-0" = "Lesson 4: Weapons systems\nThis lesson will give you the chance to practice basic targeting and laser usage skills.";
@ -343,13 +349,13 @@
"oolite-tutorial-6-4" = "Good work. Here's two more to take on. While fighting one, don't lose track of what the other is up to.\n\nTip: Zoom your scanner in so that you can see where the one you're firing at is going and keep on it. If you split your fire between both, you won't do enough damage.";
"oolite-tutorial-6-5" = "Excellent. That's the basics done. You can either end the lesson now by pressing '[oolite_key_mode_equipment]' or shooting the buoy, or you can continue to face harder targets by pressing '[oolite_key_activate_equipment]'.\nIf you want to wait a little for your shields to recharge, that's okay.";
"oolite-tutorial-6-5" = "Excellent. That's the basics done. You can either end the lesson now by shooting the buoy, or you can continue to face harder targets by pressing '[oolite_key_activate_equipment]'.\nIf you want to wait a little for your shields to recharge, that's okay.";
"oolite-tutorial-6-6" = "This Krait has been upgraded to carry a beam laser. It'll tear up your shields in no time if you let it. Move!\n\nTip: Your weapon is weaker, so dodge and close the range rather than getting into a long-range shooting match.";
"oolite-tutorial-6-7" = "So far, so good. See if you can handle two at once.\n\nTip: when outnumbered like this, use a missile to distract one while you fight the other.";
"oolite-tutorial-6-8" = "You did it! We do have a third stage available if you're feeling up to it - press '[oolite_key_activate_equipment]' to start it. If that last fight was any trouble, though, maybe you'd be better stopping now. Pressing '[oolite_key_mode_equipment]' or shoot the buoy to complete the lesson.";
"oolite-tutorial-6-8" = "You did it! We do have a third stage available if you're feeling up to it - press '[oolite_key_activate_equipment]' to start it. If that last fight was any trouble, though, maybe you'd be better stopping now by shooting the buoy to complete the lesson.";
"oolite-tutorial-6-9" = "As you wish. This Krait is well-armed, well-equipped, and we've got a local escort pilot in the next simulator booth to fly it for us. Your Cobra might still be a superior ship, but you'll have to make every shot count.";
@ -385,6 +391,57 @@
"oolite-tutorial-7-13-message" = "Well done - you've docked with some degree of success.\n\nYou can try again for some more practice, especially if this attempt didn't go particularly well, or you scraped the shields. Alternatively, if when feel ready, you can move on to the next lesson.";
"oolite-tutorial-7-13-choices" = { "01_AGAIN" = "Try again"; "02_CONTINUE" = "Continue to next lesson"; };
"oolite-tutorial-8-0" = "Lesson 8: Information screens\nThis lesson covers various screens which are used to examine ship status and other information. After the docking lesson we thought you might need a short break from flying.";
"oolite-tutorial-8-1" = "Status screen: 1/4\nPressing '[oolite_key_gui_screen_status]' or 'F5' will bring up the status screen. You can use '[oolite_key_view_forward]' to return to forward view at any time while viewing it. Try it now, then come back to the forward view before continuing.";
"oolite-tutorial-8-2" = "Status screen: 2/4\nThe top of the screen shows your current location and witchspace destination, a text description of your alert condition (remember the status light from the first lesson), your current fuel and cash, and your legal status and combat rating.";
"oolite-tutorial-8-3" = "Status screen: 3/4\nThe bottom of the screen lists your ship's fitted equipment. We have added a few extra items to your ship which you can inspect now.";
"oolite-tutorial-8-4" = "Status screen: 4/4\nIf your equipment is damaged in combat or through failure to keep your ship well maintained, it will be coloured orange on the screen, with 'n/a' appended to its description. Check the screen again for an example.";
"oolite-tutorial-8-5" = "Manifest screen: 1/2\nPressing '[oolite_key_gui_screen_status]' or 'F5' while already on the status screen will display the manifest screen (so press either key twice from elsewhere). This displays your current cargo and a log of outstanding work contracts you have taken.";
"oolite-tutorial-8-6" = "Manifest screen: 2/2\nA number of cargo pods have been added to your hold to demonstrate the manifest screen, and a sample work contract entry has been added.";
"oolite-tutorial-8-6-info" = "Training course: complete the course";
"oolite-tutorial-8-7" = "Short range chart: 1/10\nThe short range chart is reached by pressing '[oolite_key_gui_chart_screens]' or 'F6'. It shows the nearby systems, and your current position is marked with a green cross. A green circle shows the limits of your current witchspace fuel.";
"oolite-tutorial-8-8" = "Short range chart: 2/10\nWhere systems may be relevant to a contract of employment, they are often marked on the chart. An example of this has now been added to the nearby Leesti system.";
"oolite-tutorial-8-9" = "Short range chart: 3/10\nThe information screens share common directional controls - '[oolite_key_gui_arrow_left]', '[oolite_key_gui_arrow_right]', '[oolite_key_gui_arrow_up]', and '[oolite_key_gui_arrow_down]'. On this screen, they can be used to select a destination system.";
"oolite-tutorial-8-10" = "Short range chart: 4/10\nPressing the '[oolite_key_map_info]' key while on the short range chart will replace the system names with symbols reflecting key aspects of those systems - government, economy, and technological level.";
"oolite-tutorial-8-11" = "Short range chart: 5/10\nGovernment symbols:\n\007 - Corporate State\n\006 - Democracy\n\005 - Confederacy\n\004 - Communist\n\003 - Dictatorship\n\002 - Multi-Government\n\001 - Feudal\n\000 - Anarchy";
"oolite-tutorial-8-12" = "Short range chart: 6/10\nThe government type approximately corresponds to the level of control the planet has over its orbital space and therefore the likelihood of pirate attacks, with Corporate States being the safest, and Anarchies the most dangerous.";
"oolite-tutorial-8-13" = "Short range chart: 7/10\nEconomic symbols:\n\020 - Poor Agricultural\n\021 - Average Agricultural\n\022 - Rich Agricultural\n\023 - Mainly Agricultural\n\024 - Mainly Industrial\n\025 - Poor Industrial\n\026 - Average Industrial\n\027 - Rich Industrial";
"oolite-tutorial-8-14" = "Short range chart: 8/10\nThe economy gives an idea of the types of trade goods which are likely to be cheap to buy or profitable to sell in this system. Most trade routes are between Agricultural and Industrial worlds.";
"oolite-tutorial-8-15" = "Short range chart: 9/10\nThe number is the technological level (TL) and represents the planet's capabilities at ship construction and maintenance, on a scale from 1 to 15. At higher TL systems, more equipment and ships will be available from stations.";
"oolite-tutorial-8-16" = "Short range chart: 10/10\nOnce you have selected a destination on the short range chart, the '[oolite_key_hyperspace]' key will activate the witchspace jump sequence. You are recommended to fly straight and level while the sequence is underway. Once the sequence is complete, you will travel through witchspace to your chosen destination.";
"oolite-tutorial-8-17" = "Long range chart: 1/2\nPressing '[oolite_key_gui_chart_screens]' or 'F6' again while on the short range chart screen displays the long range chart. This displays the wider region of space you are in, with your current position, witchspace range, and markers displayed as on the short range chart.";
"oolite-tutorial-8-18" = "Long range chart: 2/2\nThe scale is too wide to display name labels, but you can type letters to search for systems. Try going to the chart and typing 'ti' to discover all systems beginning with 'ti', which will be highlighted with a green square. You can hold shift while pressing the direction keys to switch between possibilities.";
"oolite-tutorial-8-19" = "System information: 1/1\nPressing '[oolite_key_gui_system_data]' or 'F7' will display information on the current witchspace destination system. This includes the government, economy and technological level mentioned earlier, as well as other key data for visitors.";
"oolite-tutorial-8-20" = "Market information: 1/1\nPressing '[oolite_key_gui_market]' or 'F8' will display the current market prices in this system, or, if docked at a station, for that station. When docked, cargo may be bought and sold using the direction controls.";
"oolite-tutorial-8-21" = "Station screens: 1/4\nWhile docked at a station, the view controls take on different functions, as external views are not required.";
"oolite-tutorial-8-22" = "Station screens: 2/4\nThe '[oolite_key_view_port]' or 'F3' key gives access to purchase fuel and equipment for your ship, and pressing it twice accesses the shipyard (if available) where other ships may be viewed and purchased.";
"oolite-tutorial-8-23" = "Station screens: 3/4\nThe '[oolite_key_view_starboard]' or 'F4' key meanwhile gives access to a range of ship and station systems and communications channels, where you may configure ship settings and look for information or work offers.";
"oolite-tutorial-8-24" = "Station screens: 4/4\nFinally, while docked at a station, the '[oolite_key_view_forward]' or 'F1' key is repurposed to request a launch slot, shortly after which you will be launched from the station.";
"oolite-tutorial-end-mfd" = "You have completed the course. Press '[oolite_key_activate_equipment]' to view your test scores.";

View File

@ -37,14 +37,32 @@ this.author = "cim";
this.copyright = "© 2008-2013 the Oolite team.";
this.version = "1.79";
this.$mode = 0;
this.activated = function()
{
worldScripts["oolite-tutorial"]._nextItemEquip();
if (this.$mode == 0)
{
worldScripts["oolite-tutorial"]._nextItemEquip();
}
else if (this.$mode == 1)
{
worldScripts["oolite-tutorial"]._nextSection();
this.$mode = 0;
player.consoleMessage(expandMissionText("oolite-tutorial-controls-mode0"));
}
else if (this.$mode == 2)
{
worldScripts["oolite-tutorial"]._restartSection();
this.$mode = 0;
player.consoleMessage(expandMissionText("oolite-tutorial-controls-mode0"));
}
}
this.mode = function()
{
worldScripts["oolite-tutorial"]._nextSection();
this.$mode = (this.$mode + 1) % 3;
player.consoleMessage(expandMissionText("oolite-tutorial-controls-mode"+this.$mode));
}

View File

@ -60,13 +60,14 @@ this.startUp = function()
this.$tutorialStages = [
3, // stage 0: mission screen, post-launch cleanup, intro message
25, // stage 1: HUD displays
11, // stage 2: scanner and views
12, // stage 2: scanner and views
6, // stage 3: basic flight challenge
8, // stage 4: targeting + lasers
12, // stage 5: missiles + avoidance
11, // stage 6: combat
15, // stage 7: docking
0, // stage 8: (not yet started)
25, // stage 8: status screens
0, // stage 9: (not yet started)
];
this.$shipList = [];
@ -170,9 +171,12 @@ this.startUp = function()
station.remove(true);
if (this.$tutorialSubstage != 14)
{
this.$tutorialStage--;
this._restartSection();
}
else
{
this._nextSection();
}
this._nextSection();
}
}
@ -182,13 +186,11 @@ this.startUp = function()
if (amount >= player.ship.energy)
{
player.ship.position = system.locationFromCode("OUTER_SYSTEM_OFFPLANE");
--this.$tutorialStage;
this.$tutorialSubstage = 9999;
player.ship.dealEnergyDamage(1,10000,0);
this._playSound("bigbang.ogg");
player.consoleMessage(expandMissionText("oolite-tutorial-no-death"));
missionVariables.oolite_tutorial_deaths++;
this._nextItem(); // will call nextSection, which will reset energy
this._restartSection(); // will reset energy
}
}
@ -267,6 +269,13 @@ this.startUp = function()
}
// restart this section of the tutorial
this._restartSection = function()
{
this.$tutorialStage--;
this._nextSection();
}
// move to the next section of the tutorial
this._nextSection = function()
{
@ -681,6 +690,11 @@ this.startUp = function()
this.__stage2sub7 = function()
{
this._setInstructions("oolite-tutorial-2-7");
}
this.__stage2sub8 = function()
{
this._setInstructions("oolite-tutorial-2-8");
var yellow = this._addShips("[adder]",1,player.ship.position,5E3)[0];
yellow.setAI("nullAI.plist");
var red = this._addShips("[adder]",1,player.ship.position,5E3)[0];
@ -690,12 +704,12 @@ this.startUp = function()
red.performFlee();
var purple = this._addShips("police",1,player.ship.position,5E3)[0];
purple.setAI("nullAI.plist");
}
this.__stage2sub8 = function()
this.__stage2sub9 = function()
{
this._setInstructions("oolite-tutorial-2-8");
this._setInstructions("oolite-tutorial-2-9");
this._addShips("oolite-tutorial-buoy",1,player.ship.position,10E3);
var miss = this._addShips("missile",1,player.ship.position,10E3)[0];
miss.setAI("nullAI.plist");
@ -703,17 +717,16 @@ this.startUp = function()
mine.setAI("nullAI.plist");
}
this.__stage2sub9 = function()
{
this._setInstructions("oolite-tutorial-2-9");
}
this.__stage2sub10 = function()
{
this._setInstructions("oolite-tutorial-2-10");
}
this.__stage2sub11 = function()
{
this._setInstructions("oolite-tutorial-2-11");
}
this.__stage3sub0 = function()
{
// restart;
@ -902,8 +915,14 @@ this.startUp = function()
this.__stage3sub5 = function()
{
this._setFrameCallback("");
this.$tutorialStage--;
this._nextSection();
if (missionVariables.oolite_tutorial_asteroids_win == 2 || player.ship.speed > 1)
{
this._nextSection();
}
else
{
this._restartSection();
}
}
@ -1077,6 +1096,14 @@ this.startUp = function()
this._stage6scorer();
this._nextSection();
}.bind(this);
/* force buoy to be within scanner range */
buoy.script.$timer = new Timer (buoy.script,function() {
if (this.ship.position.distanceTo(player.ship) > 25E3)
{
this.ship.position = player.ship.position.add([0,0,10E3]);
}
},5,5);
var target = this._addShips("oolite-tutorial-fighter",1,player.ship.position,10E3);
target[0].forwardWeapon = "EQ_WEAPON_NONE";
@ -1244,12 +1271,151 @@ this.startUp = function()
this._setFrameCallback(this._dockingMonitor.bind(this));
}
this.__stage8sub0 = function()
{
this._setInstructions("oolite-tutorial-8-0");
}
this.__stage8sub1 = function()
{
this._setInstructions("oolite-tutorial-8-1");
}
this.__stage8sub2 = function()
{
this._setInstructions("oolite-tutorial-8-2");
}
this.__stage8sub3 = function()
{
this._setInstructions("oolite-tutorial-8-3");
player.ship.awardEquipment("EQ_HEAT_SHIELD");
player.ship.awardEquipment("EQ_ENERGY_UNIT");
}
this.__stage8sub4 = function()
{
this._setInstructions("oolite-tutorial-8-4");
player.ship.setEquipmentStatus("EQ_HEAT_SHIELD","EQUIPMENT_DAMAGED");
}
this.__stage8sub5 = function()
{
this._setInstructions("oolite-tutorial-8-5");
}
this.__stage8sub6 = function()
{
player.ship.manifest.food = 5;
player.ship.manifest.minerals = 3;
player.ship.manifest.gold = 13;
mission.setInstructionsKey("oolite-tutorial-8-6-info",this.name);
this._setInstructions("oolite-tutorial-8-6");
}
this.__stage8sub7 = function()
{
this._setInstructions("oolite-tutorial-8-7");
}
this.__stage8sub8 = function()
{
mission.markSystem(55);
this._setInstructions("oolite-tutorial-8-8");
}
this.__stage8sub9 = function()
{
this._setInstructions("oolite-tutorial-8-9");
}
this.__stage8sub10 = function()
{
this._setInstructions("oolite-tutorial-8-10");
}
this.__stage8sub11 = function()
{
this._setInstructions("oolite-tutorial-8-11");
}
this.__stage8sub12 = function()
{
this._setInstructions("oolite-tutorial-8-12");
}
this.__stage8sub13 = function()
{
this._setInstructions("oolite-tutorial-8-13");
}
this.__stage8sub14 = function()
{
this._setInstructions("oolite-tutorial-8-14");
}
this.__stage8sub15 = function()
{
this._setInstructions("oolite-tutorial-8-15");
}
this.__stage8sub16 = function()
{
this._setInstructions("oolite-tutorial-8-16");
}
this.__stage8sub17 = function()
{
this._setInstructions("oolite-tutorial-8-17");
}
this.__stage8sub18 = function()
{
this._setInstructions("oolite-tutorial-8-18");
}
this.__stage8sub19 = function()
{
this._setInstructions("oolite-tutorial-8-19");
}
this.__stage8sub20 = function()
{
this._setInstructions("oolite-tutorial-8-20");
}
this.__stage8sub21 = function()
{
this._setInstructions("oolite-tutorial-8-21");
}
this.__stage8sub22 = function()
{
this._setInstructions("oolite-tutorial-8-22");
}
this.__stage8sub23 = function()
{
this._setInstructions("oolite-tutorial-8-23");
}
this.__stage8sub24 = function()
{
this._setInstructions("oolite-tutorial-8-24");
}
this.__stage9sub0 = function()
{
player.ship.removeEquipment("EQ_HEAT_SHIELD");
player.ship.removeEquipment("EQ_ENERGY_UNIT");
this._setInstructions("oolite-tutorial-end-mfd");
}
this._endTutorial = function()
{
player.ship.hudHidden = true;
@ -1412,11 +1578,11 @@ this._dockingMonitor = function(delta)
// check roll
report += "[oolite-tutorial-dock-roll]";
var roll = Math.abs(player.ship.vectorRight.dot(dhoriz));
if (roll > 0.999)
if (roll > 0.99)
{
report += "[oolite-tutorial-dock-roll-good]";
}
else if (roll > 0.99)
else if (roll > 0.95)
{
report += "[oolite-tutorial-dock-roll-okay]";
}