Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Giant Space Pizza

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description A light-hearted expansion which adds Giant Space Pizzas, Visitor Centres and Safety Stewards to selected systems. Visit them all to get a special award. A light-hearted expansion which adds Giant Space Pizzas, Visitor Centres and Safety Stewards to selected systems. Visit them all to get a special award.
Identifier oolite.oxp.smivs.GiantSpacePizza oolite.oxp.smivs.GiantSpacePizza
Title Giant Space Pizza Giant Space Pizza
Category Ambience Ambience
Author Smivs Smivs
Version 3.1 3.1
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Giant_Space_Pizza n/a
Download URL https://wiki.alioth.net/img_auth.php/3/32/GiantSpacePizza_v3.1.oxz http://wiki.alioth.net/img_auth.php/5/5f/GiantSpacePizza_v3.1.oxz
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1610873263

Documentation

Also read http://wiki.alioth.net/index.php/Giant%20Space%20Pizza

readme.rtf

Giant Space Pizza v3.1

This Expansion Pack adds Giant Space Pizzas near to the Sun in thirteen systems spread through all eight Galaxies. 
Each Giant Space Pizza has a visitor centre between the planet and the sun, and Safety Stewards patrol the area arond the Pizzas. 
Each time you dock at a Visitor Centre your visit is recorded, and if you visit all thirteen pizzas, you will get a special award. The Visitor Centre also features a 'History of the Giant Space Pizza' presentation.
Pizza systems are marked on the short- and long-range charts with a yellow diamond, and the planet descriptions include mention of them. You will be reminded about the Pizza when you first dock at the main station.
You do not need to visit the main station at a Pizza System, and can fly directly to the Visitor Centre if you prefer. These have a 'V' space compass legend.
You can start visiting the Pizzas in whichever galaxy you are in, and they do not have to be visited in a set order - just visit them as part of your normal travels around the Eight. 
Of course if you wanted to treat this as a 'Tour' mission and deliberately visit them all in a relatively short timescale you can do that as well.

Licence:-
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, SanFrancisco, California, 94105, USA.

Author and Credits:-
OXP by Smivs. 
Pizza base by Shipbuilder, topping and garnish by Smivs.
The model for the Visitor Centres is by Dr Nil. Many thanks to cim and Pleb for their assistance and Fatleaf for checking and testing. 'Musak' by the Ronnie Smith Band.

Locations of Giant Space Pizzas.
Galaxy, Planet name and Planet number.

G1
Isatre 152
Zaleriza 238
G2
Sosole 192
G3
Atistiso 57
G4
Usgeat 134
Zausmaor 189
G5
Raleor 50
G6
Biteen 193
G7
Ertius 150
Esaqube 205
Xeraso 158
G8
Usmaedin 13
Xetila 168

History of the Pizzas

Many hundreds of years ago the Trumbles had an advanced technological civilisation, but were suffering from acute over-population and food shortages. Due to the remote (and now forgotten) location of their homeworld they had no contact with other races, and were tied to their home-planet. While the Trumbles did have space travel their attempts to explore space were in their infancy, and their ships were crude. 
They tried to solve their food shortages by bio-engineering fast-growing giant foodstuffs but these experiments were largely un-successful, and eventually ended in disaster. An accidental release of some genetically-modified blancmange left the Trumble homeworld un-inhabitable within a year and caused the Trumble Diaspora, a last desperate attempt to save the Trumble race by evacuating the planet and searching for a new home.
However most of the Diaspora ships were lost during the attempt, which marked the end of the Trumble civilisation.
The few surviving Trumbles did eventually find a home in GalCop space where the indigenous species at first thought they were 'cute' and kept them as pets. The Trumbles started to re-populate, but having lost their knowledge base and without any functioning society, they were no more than a collection of individuals, and before long their runaway breeding even led to them being considered vermin by many of their adoptive hosts. 
One of the lost Diaspora ships was the "Preewootre'ill". Against regulations a Trumble food scientist smuggled a small specimen of his work, a megapizza, on board just before she was launched. Unfortunately the pizza grew rapidly on board the ship and eventually caused its destruction while it was in witchspace, leaving hundreds of pieces of the megapizza scattering into interstellar space. Most of these were lost forever, but a few fell into stable orbits around some of the suns in GalCop space. Baked by the heat of the sun, they grew, and grew, and grew. 
Today, they are known to the GalCop races simply as Giant Space Pizzas and at up to 5Km in diameter these inert and harmless entities are quite impressive. They remain there to this day, a curiosity to the spacefarers that come across them, and a testament to the folly of the Trumbles' catastrophic attempts to feed their burgeoning population all those years ago.

Equipment

This expansion declares no equipment.

Ships

Name
GSP Safety Steward
pizzaStewardEngine
Space Pizza Visitor Centre and Giftshop
Smivs Pizza Giftshop Dock
Giant Space Pizza

Models

This expansion declares no models.

Scripts

Path
Scripts/Pizza-safety-steward_script.js
"use strict";

// Standard attributes 
this.name           = "Pizza-safety-steward_script"; 
this.author         = "Smivs"; 
this.licence        = "Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License";
this.copyright      = "Smivs"; 
this.version        = "3.1"; 
this.description    = "Script to control Pizza safety stewards." 

this.$scanForPlayer = function()
{
       this.ship.target = player.ship;
       this.ship.reactToAIMessage("TARGET_FOUND");
}
this.$contactPlayer = function()
{
  if(missionVariables.GiantSpacePizza_status === "VISITED_GIFTSHOP")
    {
       this.ship.commsMessage(expandDescription("[STEWARD_WELCOME_MESSAGE]"),player.ship);
    }
  else if(missionVariables.GiantSpacePizza_status === "DEFAULT")
    {
       this.ship.commsMessage(expandDescription("[STEWARD_WARNING_MESSAGE]"),player.ship);   
    }
}
this.$attackWarning = function()
{
       this.ship.commsMessage(expandDescription("[STEWARD_ATTACK_WARNING_MESSAGE]"),player.ship);
}
Scripts/smivs_pizza_neon_timer_script.js
"use strict";

// Standard attributes 
this.name           = "smivs_pizza_neon_timer_script.js"; 
this.author         = "Smivs"; 
this.licence        = "Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License";
this.copyright      = "Smivs"; 
this.version        = "3.1";  
this.description    = "Script to control neon lights on Pizza visitor centre." 

this.shipSpawned = function()
{
 this.smivsPizzaVCneon1 ()
}
// 'red' phase
this.smivsPizzaVCneon1 = function()
// timer to switch to blue neon after 1 second
{
  this.switchNeonTimer1 = new Timer(this, this.neonTimerLights1,1); 
}
this.neonTimerLights1 = function()
// Set materials to blue emission map
{
   this.ship.setMaterials({"smivs_pizza_giftshop_sign.png": { emission_map: "smivs_pizza_giftshop_sign-em_map_blue.png" }});
// Switch to 'blue' phase
   this.smivsPizzaVCneon2 ();
}
// 'blue' phase
this.smivsPizzaVCneon2 = function()
{
// timer to switch to red neon after 1 second
  this.switchNeonTimer2 = new Timer(this, this.neonTimerLights2,1); 
}
this.neonTimerLights2 = function()
// Set materials to red emission map
{
   this.ship.setMaterials({"smivs_pizza_giftshop_sign.png": { emission_map: "smivs_pizza_giftshop_sign-em_map_red.png" }});
// Switch to 'red'phase
   this.smivsPizzaVCneon1 ();
}




Scripts/smivs_space_pizza_script.js
"use strict";

// Standard attributes 
this.name           = "smivs_space_pizza_script"; 
this.author         = "Smivs"; 
this.licence        = "Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License";
this.copyright      = "Smivs"; 
this.version        = "3.1"; 
this.description    = "Main script to add Giant Space Pizzas and related objects to selected systems, and control the 'mission' elements of the OXP" 

this.startUp = function()
{
// This section writes modified planet descriptions to the save file
    System.infoForSystem(0, 152).description = "The world Isatre is a boring planet, but has a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(0, 238).description = "This world is a tedious place. There is a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(1, 192).description = "The world Sosole is fabled for its weird rock formations and the Sosoleian deadly goat. There is a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(2, 56).description = "This planet is notable for the Atistisoian edible poet and Atistisoian evil brandy. It also has a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(3, 134).description = "Usgeat is cursed by dreadful civil war and has a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(3, 189).description = "This planet is very notable for its inhabitants' ingrained shyness and its fabulous cuisine. A Giant Space Pizza can be found in orbit around its Sun";
    System.infoForSystem(4, 50).description = "The planet Raleor is scourged by killer edible Leilcearoids. It has a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(5, 193).description = "The planet Biteen is reasonably noted for mud tennis and its unusual sit coms. A Giant Space Pizza is in orbit around its Sun";
    System.infoForSystem(6, 150).description = "This world is reasonably well known for its great dense forests but scourged by frequent civil war. A Giant Space Pizza is in orbit around its Sun";
    System.infoForSystem(6, 158).description = "This world is very notable for the Xerasoian edible moth. A Giant Space Pizza is in orbit around its Sun";
    System.infoForSystem(6, 205).description = "This planet is a dull world. It has a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(7, 13).description = "This planet is a dull world. It has a Giant Space Pizza in orbit around its Sun";
    System.infoForSystem(7, 168).description = "The planet Xetila is famous for Xetilaian wolf cutlets but plagued by a lethal disease. It has a Giant Space Pizza in orbit around its Sun"; 
// set status
  if(!missionVariables.GiantSpacePizza_status)
    {
      missionVariables.GiantSpacePizza_status = "DEFAULT";
    }
// set mission flag
  this.missionFlag = "NO";
// Mark pizzas on charts at startup
  this.$markPizzas()
//close startUp function
  this.startUpComplete;
  delete this.startUp;
}
this.playerEnteredNewGalaxy = function()
{
// Mark pizzas on charts after gal-jump
  this.$markPizzas()
// Allow for GalJump from Pizza system to or within 3 jumps of a Pizza System
  missionVariables.GiantSpacePizza_jumpCount = "JUMPS_0";
  missionVariables.GiantSpacePizza_status = "DEFAULT";
}
// Marks pizzas on charts
this.$markPizzas = function()
{
  if (galaxyNumber == 0)
    {
    mission.markSystem({
      system: 152,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      },
                      {
      system: 238,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 1)
    {
    mission.markSystem({
      system: 192,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 2)
    {
    mission.markSystem({
      system: 56,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 3)
    {
    mission.markSystem({
      system: 134,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      },
                      {
      system: 189,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 4)
    {
    mission.markSystem({
      system: 50,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 5)
    {
    mission.markSystem({
      system: 193,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 6)
    {
    mission.markSystem({
      system: 150,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      },
                      {
      system: 158,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      },
                      {
      system: 205,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
  else if (galaxyNumber == 7)
    {
    mission.markSystem({
      system: 13,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      },
                      {
      system: 168,
      name: "Giant Space Pizza",
      markerColor: "yellowColor",
      markerScale: 1.0,
      markerShape: "MARKER_DIAMOND"
                      });
    }
}

// Populates Pizzas, Stewards and Visitor centres
this.systemWillPopulate = function() 
{
  if 
  (
  !system.isInterstellarSpace && galaxyNumber == 0 && system.ID == 152 ||
  !system.isInterstellarSpace && galaxyNumber == 0 && system.ID == 238 ||
  !system.isInterstellarSpace && galaxyNumber == 1 && system.ID == 192 ||
  !system.isInterstellarSpace && galaxyNumber == 2 && system.ID == 56 ||
  !system.isInterstellarSpace && galaxyNumber == 3 && system.ID == 134 ||
  !system.isInterstellarSpace && galaxyNumber == 3 && system.ID == 189 ||
  !system.isInterstellarSpace && galaxyNumber == 4 && system.ID == 50 ||
  !system.isInterstellarSpace && galaxyNumber == 5 && system.ID == 193 ||
  !system.isInterstellarSpace && galaxyNumber == 6 && system.ID == 150 ||
  !system.isInterstellarSpace && galaxyNumber == 6 && system.ID == 158 ||
  !system.isInterstellarSpace && galaxyNumber == 6 && system.ID == 205 ||
  !system.isInterstellarSpace && galaxyNumber == 7 && system.ID == 13 ||
  !system.isInterstellarSpace && galaxyNumber == 7 && system.ID == 168 
  )
  {
  system.setPopulator("space_pizza_system",
          {
            callback: function(pos) 
              {
// Add the pizza
                var GSP = system.addShipsToRoute("smivs_space_pizza", 1, 0.96, "ws")[0];
// Add a safety steward
		var GSPSteward = system.addShips("Pizza-safety-steward", 1, GSP.position, 15000)[0];
// Add the visitor centre
                var SPVC = system.addShipsToRoute("smivs_pizza_giftshop", 1, 0.5, "ps")[0];
// next line sets up a vector SPVC --> planet
                var targetVector = system.mainPlanet.position.subtract(SPVC.position).direction();
// next line aligns the station relative to the targetVector by rotating
                SPVC.orientation = targetVector.rotationTo(new Vector3D(1,0,1));
              },
            deterministic: false
          });
  }
}

this.missionScreenOpportunity = function ()
// next section runs missionscreens at relevent main Stations
{
  if (player.ship.docked && player.ship.dockedStation.isMainStation && missionVariables.GiantSpacePizza_status == "DEFAULT"  && this.missionFlag && this.missionFlag === "NO") 
    {
      if 
        (
        galaxyNumber == 0 && system.ID == 152 ||
        galaxyNumber == 0 && system.ID == 238 ||
        galaxyNumber == 1 && system.ID == 192 ||
        galaxyNumber == 2 && system.ID == 56 ||
        galaxyNumber == 3 && system.ID == 134 ||
        galaxyNumber == 3 && system.ID == 189 ||
        galaxyNumber == 4 && system.ID == 50 ||
        galaxyNumber == 5 && system.ID == 193 ||
        galaxyNumber == 6 && system.ID == 150 ||
        galaxyNumber == 6 && system.ID == 158 ||
        galaxyNumber == 6 && system.ID == 205 ||
        galaxyNumber == 7 && system.ID == 13 ||
        galaxyNumber == 7 && system.ID == 168 
        )
    mission.runScreen({title: "!!! Major Visitor Attraction !!!", messageKey: "SPMainStnGreeting1", model:"smivs_pizza_giftshop"});
    this.missionFlag = "DONE";
    }
//  next section runs mission screens at visitor centres
  else if(player.ship.docked && player.ship.dockedStation.hasRole("smivs_pizza_giftshop") && missionVariables.GiantSpacePizza_status == "DEFAULT" && this.missionFlag && this.missionFlag === "NO")
    {
      if 
       (
       missionVariables.GiantSpacePizza_stage === "STAGE_1" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_2" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_3" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_4" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_5" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_6" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_7" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_8" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_9" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_10" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_11" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_12"
       )
// next lines run the standard visitor centre mission screen
       {
       mission.runScreen({title: "Giant Space Pizza Visitor Centre", messageKey: "SPVC_greeting1", choicesKey: "space_pizza_history_choice", background: { name: "SPVC.png", height: 512 }}, this.choices);
       this.missionFlag = "DONE";
       }
// If player docks at stage_13...
    else if (missionVariables.GiantSpacePizza_stage === "STAGE_13")
// next lines run the special 'Elite PizzaMan' mission screen
       {
       mission.runScreen({title: "Giant Space Pizza Visitor Centre", messageKey: "SPVC_greeting3", choicesKey: "space_pizza_history_choice", background: { name: "elitePizzaman.png", height: 512 }}, this.choices);
// then we give the reward!
       player.credits += 35;
       player.ship.fuel = 7.0;
       mission.setInstructionsKey ("elitePizzaman");
       missionVariables.GiantSpacePizza_stage = "STAGE_14";
       this.missionFlag = "DONE";
       }
// If player docks at stage_14...
    else if (missionVariables.GiantSpacePizza_stage === "STAGE_14") 
// next lines run the standard 'Elite PizzaMan' mission screen
       {
      mission.runScreen({title: "Giant Space Pizza Visitor Centre", messageKey: "SPVC_greeting4", choicesKey: "space_pizza_history_choice", background: { name: "elitePizzaman.png", height: 512 }}, this.choices);
       player.credits += 35;
       player.ship.fuel = 7.0;
       this.missionFlag = "DONE";
       }
    }
//  next section runs re-visit mission screen at visitor centres
  else if(player.ship.docked && player.ship.dockedStation.hasRole("smivs_pizza_giftshop") && this.missionFlag && this.missionFlag === "NO" && missionVariables.GiantSpacePizza_status == "VISITED_GIFTSHOP")
    {
      if 
       (
       missionVariables.GiantSpacePizza_stage === "STAGE_1" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_2" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_3" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_4" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_5" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_6" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_7" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_8" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_9" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_10" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_11" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_12" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_13" ||
       missionVariables.GiantSpacePizza_stage === "STAGE_14" 
       )
// next lines run the special mission screen for immediate re-visits to the Visitor Centre
       {
       mission.runScreen({title: "Giant Space Pizza Visitor Centre", messageKey: "SPVC_greeting5",background: { name: "SPVC.png", height: 512 }});
       this.missionFlag = "DONE";
       }
    }
}

this.choices = function(choice)
{
  switch(choice)
    {
      case "1_Yes":
        {
  mission.runScreen({title: "History of the Giant Space Pizza", messageKey: "space_pizza_history1", choicesKey: "space_pizza_history_continue", background: { name: "history1.png", height: 512 }}, this.choices);
  break;
        }
      case "2_No":
        {
  mission.runScreen({title: "Giant Space Pizza Visitor Centre", messageKey: "SPVC_greeting2", background: { name: "pizzaBG.png", height: 512 }}, this.choices);
  break;
        }
      case "1_Continue":
        {
  mission.runScreen({title: "History of the Giant Space Pizza", messageKey: "space_pizza_history2", choicesKey: "space_pizza_history_finish", background: { name: "history2.png", height: 512 }}, this.choices);
  break;
        }
      case "1_Continue1":
        {
  mission.runScreen({title: "Giant Space Pizza Visitor Centre", messageKey: "SPVC_greeting2", background: { name: "pizzaBG.png", height: 512 }}, this.choices);	
  break;
        }	
    }
}

this.shipWillDockWithStation = function(station)
// prevents stage count from increasing on re-visit to same giftshop
{
 if(station.primaryRole == "smivs_pizza_giftshop" && missionVariables.GiantSpacePizza_status == "VISITED_GIFTSHOP")
   {
     return;
   }
// count active visits
 else if(station.primaryRole == "smivs_pizza_giftshop" && missionVariables.GiantSpacePizza_status == "DEFAULT")
   {
// Set up stages for count
   if (!missionVariables.GiantSpacePizza_stage)
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_1";
     }
// then increase count on each visit
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_1")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_2";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_2")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_3";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_3")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_4";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_4")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_5";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_5")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_6";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_6")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_7";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_7")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_8";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_8")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_9";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_9")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_10";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_10")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_11";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_11")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_12";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_12")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_13";
     }
   else if (missionVariables.GiantSpacePizza_stage === "STAGE_13")
     {
       missionVariables.GiantSpacePizza_stage = "STAGE_14";
     }
   }
}

this.shipDockedWithStation = function(station)
{
 if(station.primaryRole == "smivs_pizza_giftshop")
   {
// next line deducts visitor fees from player
   player.credits -= 35;
// next lines starts 'musak' for giftshop
   this.pizza_musak = new SoundSource; 
   this.pizza_musak.sound = "pizza-musak.ogg";
   this.pizza_musak.loop = true;
   this.pizza_musak.play();
   }
}

this.shipWillLaunchFromStation = function(station) 
{
 if(station.primaryRole == "smivs_pizza_giftshop")
   {
// stops giftshop 'musak' and re-sets status and mission flag 
   this.pizza_musak.stop();
   missionVariables.GiantSpacePizza_status = "VISITED_GIFTSHOP";
   this.missionFlag = "NO";
   }
 if(station.isMainStation)
   {
// reset mission flag
   this.missionFlag = "NO";
   }
}

this.playerWillEnterWitchspace = function()
// three-jump count after each visit to deter re-visits
{
  if (missionVariables.GiantSpacePizza_status === "VISITED_GIFTSHOP" && !missionVariables.GiantSpacePizza_jumpCount)
     {
       missionVariables.GiantSpacePizza_jumpCount = "JUMPS_1";
     }
// then increase count on each jump
  else if (missionVariables.GiantSpacePizza_status === "VISITED_GIFTSHOP" && missionVariables.GiantSpacePizza_jumpCount === "JUMPS_0")
    {
       missionVariables.GiantSpacePizza_jumpCount = "JUMPS_1";
    }
  else if (missionVariables.GiantSpacePizza_status === "VISITED_GIFTSHOP" && missionVariables.GiantSpacePizza_jumpCount === "JUMPS_1")
    {
       missionVariables.GiantSpacePizza_jumpCount = "JUMPS_2";
    }
  else if (missionVariables.GiantSpacePizza_status === "VISITED_GIFTSHOP" && missionVariables.GiantSpacePizza_jumpCount === "JUMPS_2")
    {
       missionVariables.GiantSpacePizza_jumpCount = "JUMPS_3";
    }
  else if (missionVariables.GiantSpacePizza_status === "VISITED_GIFTSHOP" && missionVariables.GiantSpacePizza_jumpCount === "JUMPS_3")
    {
       missionVariables.GiantSpacePizza_jumpCount = "JUMPS_0";
       missionVariables.GiantSpacePizza_status = "DEFAULT";
    }
// Prevent pizza system going nova
// Code by cim
  if (galaxyNumber != 3) { return; }
  if (missionVariables.novacount >= 2 &&
        !missionVariables.nova &&
        (player.ship.targetSystem == 134 || player.ship.targetSystem == 189))
  {
    missionVariables.novacount = 1; //delay the nova mission
  }
}