Example #1
0
 def launchNewDrone(self):
     global drone
     playa = VS.getPlayer()
     if (not playa.isNull()):
         self.makeQuestPersistent()
         vec = playa.Position()
         vec = Vector.Add(vec, (1000, 0, 0))
         drone = VS.launch("IO47", "drone", "unknown", "unit", "default", 1,
                           1, vec, "")
         VS.AdjustRelation("unknown", playa.getFactionName(), -1, 10)
         VS.AdjustRelation(playa.getFactionName(), "unknown", -1, 10)
         drone.SetTarget(playa)
         self.stage = 1
     else:
         drone = VS.Unit()
Example #2
0
 def Lose (self,terminate):
     VS.AdjustRelation(self.you.getFactionName(),self.faction,-.02,1)
     VS.IOmessage(0,"rescue_mission",self.mplay,"#ff0000Credit agency reports that you have failed the mission.")
     if len(self.donevar):
         quest.removeQuest(int(self.mplay[1:]),self.donevar,-1)
     if (terminate):
         debug.info("lose plunder mission")
         VS.terminateMission(0)
Example #3
0
 def FailMission (self):
     self.you.addCredits (-self.cred)
     VS.AdjustRelation(self.you.getFactionName(),self.faction,-.02,1)
     self.SetVarValue(-1)
     VS.IOmessage (0,"escort mission",self.mplay,"You Allowed the base you were to protect to be destroyed.")
     VS.IOmessage (0,"escort mission",self.mplay,"You are a failure to your race!")
     VS.IOmessage (1,"escort mission",self.mplay,"We have contacted your bank and informed them of your failure to deliver on credit. They have removed a number of your credits for this inconvenience. Let this serve as a lesson.")
     VS.terminateMission(0)
Example #4
0
 def PayMission(self):
     VS.AdjustRelation(self.you.getFactionName(),self.faction,.03,1)
     self.SetVarValue(1)
     if (self.cred>0):
         self.you.addCredits (self.cred)
         VS.IOmessage(0,"escort mission",self.mplay,"Excellent work pilot! Your effort has thwarted the foe!")
         VS.IOmessage(0,"escort mission",self.mplay,"You have been rewarded for your effort as agreed.")
     VS.terminateMission(1)
Example #5
0
 def Win (self,un,terminate):
     VS.IOmessage (0,"Passenger",self.mplay,"#00ff00Excellent work pilot.")
     VS.IOmessage (0,"Passenger",self.mplay,"#00ff00You have been rewarded for your effort as agreed.")
     VS.IOmessage (0,"Passenger",self.mplay,"#00ff00You saved my life. I owe you a drink, pal")
     un.addCredits(self.cred)
     VS.AdjustRelation(self.you.getFactionName(),self.faction,.02,1)
     if len(self.donevar):
         quest.removeQuest(self.you.isPlayerStarship(),self.donevar,1)
     if (terminate):
         VS.terminateMission(1)
 def takeCargoAndTerminate(self, you, remove):
     removenum = 0  #if you terminate without remove, you are SKREWED
     self.base.setCombatRole(self.role)
     if (remove):
         removenum = you.removeCargo(self.cargoname, self.quantity, bool(1))
         debug.debug("removed %d" % removenum)
         mpart = VS.GetMasterPartList()
         newcarg = mpart.GetCargo(self.cargoname)
         newcarg.SetQuantity(removenum)
         #self.base.addCargo(newcarg)#not for resale
         has = self.you.hasCargo(self.cargoname)
         if (has):
             has = self.you.removeCargo(self.cargoname, has, bool(1))
             newcarg.SetMissionFlag(0)
             newcarg.SetQuantity(has)
             self.you.addCargo(
                 newcarg
             )  #It seems that removing and then adding it again is the only way...
     if ((removenum >= self.quantity) or (self.quantity == 0)
             or removenum >= 1):
         VS.IOmessage(0, "cargo mission", self.mplay,
                      "#00ff00Excellent work pilot.")
         VS.IOmessage(
             0, "cargo mission", self.mplay,
             "#00ff00You have been rewarded for your effort as agreed.")
         VS.IOmessage(0, "cargo mission", self.mplay,
                      "#00ff00Your excellent work will be remembered.")
         you.addCredits(self.cred)
         VS.AdjustRelation(you.getFactionName(), self.faction,
                           .01 * self.difficulty, 1)
         self.SetVar(1)
         VS.terminateMission(1)
         return
     else:
         VS.IOmessage(
             0, "cargo mission", self.mplay,
             "#ff0000You did not follow through on your end of the deal.")
         if (self.difficulty < 1):
             VS.IOmessage(0, "cargo mission", self.mplay,
                          "#ff0000Your pay will be reduced")
             VS.IOmessage(
                 0, "cargo mission", self.mplay,
                 "#ff0000And we will consider if we will accept you on future missions."
             )
             addcred = (float(removenum) /
                        (float(self.quantity *
                               (1 + self.difficulty)))) * self.cred
             you.addCredits(addcred)
         else:
             VS.IOmessage(0, "cargo mission", self.mplay,
                          "#ff0000You will not be paid!")
             universe.punish(self.you, self.faction, self.difficulty)
         self.SetVar(-1)
         VS.terminateMission(0)
         return
Example #7
0
 def SuccessMission(self):
     self.you.addCredits(self.cred)
     VS.AdjustRelation(self.you.getFactionName(), self.faction, .03, 1)
     self.SetVarValue(1)
     VS.IOmessage(0, "defend", self.mplay,
                  "[Computer] Defend mission accomplished")
     if (self.cred > 0):
         VS.IOmessage(
             0, "defend", self.mplay,
             "[Computer] Bank account has been credited as agreed.")
     VS.terminateMission(1)
Example #8
0
 def FailMission(self):
     self.you.addCredits(-self.cred)
     VS.AdjustRelation(self.you.getFactionName(), self.faction, -.02, 1)
     self.SetVarValue(-1)
     VS.IOmessage(0, "defend", self.mplay,
                  "[Computer] Detected failure to protect mission asset.")
     VS.IOmessage(0, "defend", self.mplay, "[Computer] Mission failed!")
     VS.IOmessage(
         1, "defend", self.mplay,
         "[Computer] Bank has been informed of failure to assist asset. They have removed a number of your credits as a penalty to help pay target insurance."
     )
     VS.terminateMission(0)
 def Execute(self):
     if (VS.GetGameTime() - self.gametime > 10):
         self.escortee.setFgDirective('F')
     if self.you.isNull():
         VS.IOmessage(
             0, "escort", self.mplay,
             "#ff0000You were to protect your escort. Mission failed.")
         VS.terminateMission(0)
         return
     self.escortee.setFlightgroupLeader(self.you)
     #print 'name: '+self.escortee.getFlightgroupLeader().getName()
     #self.escortee.SetVelocity(self.you.GetVelocity())
     if (self.escortee.isNull()):
         VS.IOmessage(
             0, "escort", self.mplay,
             "#ff0000You were to protect your escort. Mission failed.")
         universe.punish(self.you, self.faction, self.difficulty)
         if (self.var_to_set != ''):
             quest.removeQuest(self.you.isPlayerStarship(), self.var_to_set,
                               -1)
         VS.terminateMission(0)
         return
     if (not self.adjsys.Execute()):
         if (self.arrived):
             self.adjsys.SignificantUnit().setSpeed(0.0)
             self.adjsys.SignificantUnit().SetVelocity((0.0, 0.0, 0.0))
         return
     if (not self.arrived):
         self.arrived = 1
         self.adjsys = go_somewhere_significant(
             self.you, 1, self.distfrombase + 15 * self.escortee.rSize(),
             self.difficulty <= 1, self.faction)
         self.role = self.adjsys.SignificantUnit().getCombatRole()
         self.adjsys.SignificantUnit().setCombatRole("INERT")
         self.adjsys.Print("You must escort your starship to the %s",
                           "defend", "docked around the %s", 0)
     elif (self.you.getDistance(self.escortee) < 2000):
         self.you.addCredits(self.creds)
         VS.AdjustRelation(self.you.getFactionName(), self.faction,
                           self.difficulty * .01, 1)
         VS.IOmessage(
             0, "escort", self.mplay,
             "#00ff00Excellent work! You have completed this mission!")
         self.escortee.setFgDirective('b')
         self.escortee.setFlightgroupLeader(self.escortee)
         self.escortee.performDockingOperations(
             self.adjsys.SignificantUnit(), 0)
         self.adjsys.SignificantUnit().setCombatRole(self.role)
         if (self.var_to_set != ''):
             quest.removeQuest(self.you.isPlayerStarship(), self.var_to_set,
                               1)
         VS.terminateMission(1)
Example #10
0
def punish(you, faction, difficulty):
    VS.AdjustRelation(you.getFactionName(), faction, difficulty * -.01, 1)
    if (difficulty >= 2):
        VS.IOmessage(0, "mission", getMessagePlayer(you),
                     "#ff0000Your idiocy will be punished.")
        VS.IOmessage(
            0, "mission", getMessagePlayer(you),
            "#ff0000You had better run for what little life you have left.")
        for i in range(difficulty):
            un = faction_ships.getRandomFighter(faction)
            newunit = launch.launch_wave_around_unit("shadow", faction, un,
                                                     "default", 1, 200.0,
                                                     400.0, you)
            newunit.setFgDirective("B")
            newunit.SetTarget(you)
Example #11
0
 def Launch(self, you):
     if (self.havelaunched == 0):
         for i in range(len(self.faction)):
             faction = self.faction[i]
             if len(self.numenemies) > i:
                 numenemies = self.numenemies[i]
             else:
                 numenemies = self.numenemies[0]
             if type(self.AdjustFaction) != bool:
                 try:
                     if len(self.AdjustFaction) > i:
                         self.AdjustFaction = self.AdjustFaction[i]
                     else:
                         self.AdjustFaction = self.AdjustFaction[0]
                 except:
                     AjdustFaction = True
             if len(self.fgname) > i:
                 fgname = self.fgname[i]
             else:
                 fgname = self.fgname[0]
             if fgname == "":
                 fgname = "Shadow"
             if len(self.dyntype) > i:
                 dyntype = self.dyntype[i]
             else:
                 dyntype = self.dyntype[0]
             for z in range(numenemies):
                 debug.info('Ambush: Launch ships!')
                 self.havelaunched = 1
                 import launch
                 L = launch.Launch()
                 L.fg = fgname
                 L.dynfg = ""  # dynfg tells launch to load flightgroup from SaveString
                 if dyntype == "":
                     import faction_ships
                     dyntype = faction_ships.getRandomFighter(faction)
                 L.type = dyntype
                 L.num = 1
                 if z == 0:
                     L.fgappend = ""
                 else:
                     L.fgappend = "_" + str(z)
                 L.minradius = 6000
                 L.maxradius = 8000
                 try:
                     import faction_ships
                     L.minradius *= faction_ships.launch_distance_factor
                     L.maxradius *= faction_ships.launch_distance_factor
                 except:
                     pass
                 L.faction = faction
                 import universe
                 enemy = L.launch(you)
                 lead = enemy.getFlightgroupLeader()
                 enemy.SetTarget(you)
                 if lead:
                     lead.SetTarget(you)
                 else:
                     enemy.setFlightgroupLeader(enemy)
                 enemy.setFgDirective("A.")
                 self.enemy = lead
                 rel = VS.GetRelation(faction, "privateer")
                 if self.AdjustFaction and rel >= 0:
                     VS.AdjustRelation(faction, "privateer", -.02 - rel,
                                       1.0)
                     rel = VS.GetRelation("privateer", faction)
                     VS.AdjustRelation("privateer", faction, -.02 - rel,
                                       1.0)
                 if i == 0 and z == 0:
                     universe.greet(self.greetingText, enemy, you)
                 debug.info('Ambush: Ships have been launched. Exiting...')
    def Execute (self):
        if (self.player and self.station):
            # launches the particpating actors
            if (self.stage==1 and VS.GetGameTime()>self.timer and self.station.getDistance(self.player)<50000):
                self.stageLaunchActors()
                self.stage = 2

            # checks to see if the self.player is within 10km of the station to initiate the dispute
            if (self.stage==2 and VS.GetGameTime()>self.timer and self.station.getDistance(self.player)<15000):
                self.stageDockingDispute()
                self.talktime = VS.GetGameTime()
                self.stage = 3

            # play the talk animation
            if (self.stage==3 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime):
                # check which animation to play
                for index in range (len(self.sequence)):
                    if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]):
                        # play the animation
                        self.player.commAnimation(self.animations[self.sequence[index][2]][0])
                        # this is how long one animation takes
                        self.anitime = VS.GetGameTime()+2
            if (self.stage==3 and VS.GetGameTime()>=self.timer):
                self.stage = 4

            # get the merchant to attack
            if (self.stage==4 and VS.GetGameTime()>self.timer):
                # the two ships start to attack each other
                self.merchant.SetTarget(self.socialist)
                VS.AdjustRelation(self.merchant.getFactionName(),self.socialist.getFactionName(),-5,1)
                self.merchant.LoadAIScript("default")
                # attack directive - no ai change, no target change
                self.merchant.setFgDirective("A.")
                self.timer = VS.GetGameTime()+5
                self.stage = 5

            # get the socialist to attack
            if (self.stage==5 and VS.GetGameTime()>self.timer):
                # the privateer gets involved...   or does he?
                VS.IOmessage (0,"[Lenin's Mercy]","privateer",self.socColor+"Mayday! We are under attack! Privateer, please help us...  we are no match for them. We have wounded on board!")
                VS.IOmessage (6,"[VulCorp Transport A-5]","privateer",self.merColor+"Privateer, if you look the other way... you will be duly compensated.")
                self.animations = [["com_dispute_socialist.ani",2],["com_dispute_merchant.ani",2]]
                self.sequence = [[0,6,0],[6,4,1]]
                self.talktime = VS.GetGameTime()
                VS.AdjustRelation(self.socialist.getFactionName(),self.merchant.getFactionName(),-5,1)
                self.socialist.SetTarget(self.merchant)
                self.socialist.LoadAIScript("default")
                self.socialist.setFgDirective("A.")
                self.timer = VS.GetGameTime()+10
                self.stage = 6

            # play the talk animation
            if (self.stage==6 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime):
                for index in range (len(self.sequence)):
                    if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]):
                        self.player.commAnimation(self.animations[self.sequence[index][2]][0])
                        self.anitime = VS.GetGameTime()+2
            if (self.stage==6 and VS.GetGameTime()>=self.timer):
                self.stage = 7

            # we need to refresh the ai during battle since it lasts for only 7 seconds
            if (self.stage==7 and VS.GetGameTime()>self.timer):
                self.merchant.LoadAIScript("default")
                self.socialist.LoadAIScript("default")
                self.timer = VS.GetGameTime()+2

            # evaluate the conflict result
            if (self.stage==7 and self.merchant.isNull()):
                VS.IOmessage (0,"[VulCorp Transport A-5]","all",self.merColor+"Oh nooooo...!!!!!")
                self.player.commAnimation("com_dispute_merchant.ani")
                self.stage = 11
            if (self.stage==7 and self.socialist.isNull()):
                VS.IOmessage (0,"[Lenin's Mercy]","all",self.socColor+"Liberte! Egalite!! Fraternite...!!!!!")
                self.player.commAnimation("com_dispute_socialist.ani")
                self.stage = 21

            # if the merchant has died, give player the socialist reward
            if (self.stage==11 and VS.GetGameTime()>self.timer):
                self.socialist.PrimeOrders()
                VS.IOmessage (0,"[Lenin's Mercy]","privateer",self.socColor+"Thank you, Privateer! The Interstellar Socialist Organization is in your debt. We are getting our wounded to the base's medical facility.")
                VS.IOmessage (5,"[Lenin's Mercy]","privateer",self.socColor+"We have no money... but we are transmitting you the coordinates of the cargo we dumped to make room for the attack victims. Do with it what you will.")
                VS.IOmessage (10,"[Lenin's Mercy]","privateer",self.socColor+"You have made a friend with the ISO today. Have a safe journey.")
                self.animations = [["com_dispute_socialist.ani",2]]
                self.sequence = [[0,15,0]]
                self.talktime = VS.GetGameTime()
                # launches various types of cargo as reward
                # launch_wave_around_unit (fgname, faction, type, ai, nr_ships, minradius, maxradius, my_unit,logo='',useani=1,skipdj=0)
                self.cargo = launch.launch_wave_around_unit("Cargo",'neutral','iron_ore.cargo',"default",2,3000,6000,self.player)
                self.cargo = launch.launch_wave_around_unit("Cargo",'neutral','tungsten_ore.cargo',"default",2,3000,6000,self.player)
                self.cargo = launch.launch_wave_around_unit("Cargo",'neutral','generic_cargo',"default",16,3000,6000,self.player)
                # reputation with ISO goes up. Not sure of the numbers
                VS.AdjustRelation(self.player.getFactionName(),self.socialist.getFactionName(),1,5)
                # publish news
                text = "PRIVATEER SAVES SHIPLOAD OF WOUNDED\\\Today, an unprecedented dispute about landing priorities took place close to a station in the Regallis system of Sol sector. "
                text += "A merchant was delivering a priority shipment to a station in the system while an ISO transport vessel requested emergency landing having twelve rescued passengers on board who were previously wounded in a pirate attack. "
                text += "A privateer approaching that base at the same time, and assisting the dispute, reacted to the situation before security forces could arrive at the scene and promptly removed the capitalist bloodsucker, thus saving many lives. "
                text += "Presently, the injured are being taken care of at the medical facilities of the station with two heavily wounded remaining under intensive care."
                news.publishNews(text)
                # set next stage conditions
                self.timer = VS.GetGameTime()+15
                self.winner = self.socialist
                self.stage = 12

            # play the talk animation
            if (self.stage==12 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime):
                for index in range (len(self.sequence)):
                    if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]):
                        self.player.commAnimation(self.animations[self.sequence[index][2]][0])
                        self.anitime = VS.GetGameTime()+2
            if (self.stage==12 and VS.GetGameTime()>=self.timer):
                self.stage = 30

            # if the merchant ship is still alive
            if (self.stage==21 and VS.GetGameTime()>self.timer):
                self.merchant.PrimeOrders()
                # if the merchant is still friends with the self.player, the merchant gives him a nice chunk of cash
                if (5 > -.1):
                    VS.IOmessage (0,"[VulCorp Transport A-5]","privateer",self.merColor+"Privateer, thank you for your cooperation.")
                    VS.IOmessage (3,"[VulCorp Transport A-5]","privateer",self.merColor+"We will be able to make a killing on this shipment thanks to you. Here are 15000 credits for your trouble.")
                    self.animations = [["com_dispute_merchant.ani",2]]
                    self.sequence = [[0,8,0]]
                    self.talktime = VS.GetGameTime()
                    self.player.addCredits(15000)
                    # rep with merchants goes up
                    VS.AdjustRelation(self.player.getFactionName(),self.merchant.getFactionName(),.1,.5)
                    # publish news
                    text = "MALICIOUS MERCHANT MASSACRES MARXIST MERCY MISSION\\\Today, an unprecedented dispute about landing priorities took place close to a station in the Regallis system of Sol sector. "
                    text += "A merchant was delivering a priority shipment to a station in the system while an ISO transport vessel requested emergency landing having twelve rescued passengers on board who were previously wounded in a pirate attack. "
                    text += "Before security forces could arrive at the scene the merchant pilot promptly applied his own justice scheme thus reducing the other vessel cum content to space dust."
                    news.publishNews(text)
                    # set next stage conditions
                    self.timer = VS.GetGameTime()+8
                    self.winner = self.merchant
                    self.stage = 22

            # play the talk animation
            if (self.stage==22 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime):
                for index in range (len(self.sequence)):
                    if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]):
                        self.player.commAnimation(self.animations[self.sequence[index][2]][0])
                        self.anitime = VS.GetGameTime()+2
            if (self.stage==22 and VS.GetGameTime()>=self.timer):
                self.stage = 30

            # let the remaining ship approach the station and dock
            if (self.stage==30 and VS.GetGameTime()>self.timer):
                self.timer = VS.GetGameTime()+5
                #if (not self.station.isDocked(self.winner)):
                if (not self.winner.isNull()):
                    # performDockingOperations is unusable
                    # 1st it lets the ship fly through the stations
                    # 2nd it doesn't dock the unit
                    #self.winner.performDockingOperations(self.station,1)
                    unit.approachAndDock(self.winner,self.station)
                else:
                    self.stage = 99

            if (self.stage==99 and VS.GetGameTime()>self.timer):
                self.playernum = -1
                self.name = "quest_dispute"
                self.removeQuest()
                self.stage += 1 # don't enter this loop anymore
                return 0
        return 1
Example #13
0
 def Launch(self, you):
     if (self.havelaunched == 0):
         if (type(self.numenemies) == type(1)):
             self.numenemies = (self.numenemies, )
             self.faction = (self.faction, )
             self.dyntype = (self.dyntype, )
             self.dynfg = (self.dynfg, )
         if (type(self.AdjustFaction) != type(())
                 and type(self.AdjustFaction) != type([])):
             self.AdjustFaction = (self.AdjustFaction, )
         for i in range(len(self.faction)):
             numenemies = self.numenemies[i]
             faction = self.faction[i]
             for z in range(numenemies):
                 AdjustFaction = self.AdjustFaction[-1]
                 if (i < len(self.AdjustFaction)):
                     AdjustFaction = self.AdjustFaction[i]
                 dynfg = ""
                 if (len(self.dynfg) > i):
                     dynfg = self.dynfg[i]
                 dyntype = ""
                 if (len(self.dyntype) > i):
                     dyntype = self.dyntype[i]
                 print('Ambush: Launch ships!')
                 self.havelaunched = 1
                 L = launch.Launch()
                 L.fg = "Shadow"
                 if (dyntype == ""):
                     dyntype = faction_ships.getRandomFighter(faction)
                 L.dynfg = dynfg
                 L.type = dyntype
                 L.num = 1
                 L.fgappend = "X"
                 L.minradius = 6000
                 L.maxradius = 8000
                 try:
                     L.minradius *= faction_ships.launch_distance_factor
                     L.maxradius *= faction_ships.launch_distance_factor
                 except:
                     pass
                 L.faction = faction
                 enemy = L.launch(you)
                 lead = enemy.getFlightgroupLeader()
                 enemy.SetTarget(you)
                 if (lead):
                     lead.SetTarget(you)
                 else:
                     enemy.setFlightgroupLeader(enemy)
                 enemy.setFgDirective("A.")
                 self.enemy = lead
                 rel = VS.GetRelation(faction, "privateer")
                 if (AdjustFaction and rel >= 0):
                     VS.AdjustRelation(faction, "privateer", -.02 - rel,
                                       1.0)
                     rel = VS.GetRelation("privateer", faction)
                     VS.AdjustRelation("privateer", faction, -.02 - rel,
                                       1.0)
                 if (i == len(self.faction) - 1 and z == 0):
                     universe.greet(self.greetingText, enemy, you)
                 #print "launchin"
                 print('Ambush: Ships have been launched. Exiting...')
Example #14
0
def MakeWeapon(concourse,
               timeofdayignored='_day',
               dealername="bases/repair_upgrade/shipdealer",
               upgradename='bases/repair_upgrade/shipupgrade',
               use_ship_320_240_upgrade=True):
    """Link ship and and weapon repair/upgrade shop to the current base concourse"""
    # Why is the player's faction relation updated whenever this is called?! --ermo
    VS.AdjustRelation("retro", "privateer", -0.1, 1.0)
    VS.AdjustRelation("kilrathi", "privateer", -0.02, 1.0)
    VS.AdjustRelation("pirates", "privateer", -0.005, 1.0)
    room = Base.Room('Ship_Dealer')
    room1 = room
    Base.Texture(room, 'background', dealername + '.spr', 0, 0)
    Base.Texture(room, 'sd', 'bases/repair_upgrade/sd.spr', 0.002, -.0775)
    room = Base.Room('Repair/Upgrade')
    room0 = room
    software = Base.Room('Software')
    Base.Texture(software, 'background', 'bases/repair_upgrade/software.spr',
                 0, 0)  # .582,-.2716)
    x = 0.0
    y = 0.0
    if use_ship_320_240_upgrade:
        x = 0.0
        y = 0.0
    Base.Texture(room, 'background', upgradename + '.spr', x, y)

    if use_ship_320_240_upgrade:
        #Base.Ship(room, 'my_ship', (1.0, 0.12, 1.5), (0, 1, 0), (-0.85, 0.03, -0.89)) # Original setting

        # (pos_vec), (up_vec), (nose_vec)
        # 180-38 degrees RotY, 1 degrees RotX (roll up)
        #Base.Ship(room, 'my_ship', (0.7, 0.12, 0.7), (0.010745, 0.999848, 0.013753), (-0.615568, 0.017452, -0.787891))
        # 180-38 degrees RotY, 2 degrees RotX (roll up)
        Base.Ship(room, 'my_ship', (0.7, 0.12, 1.0),
                  (0.021486, 0.999391, 0.027501),
                  (-0.615286, 0.034899, -0.787531))

    # move generic shipdealer to showroom from upgrades
    if TalkToStanForExtraShips:
        Base.Comp(room0, 'my_comp_id', -0.855, -0.81, 0.6325, 0.663333,
                  'Upgrade/Repair', 'Upgrade Info ')
        Base.Comp(room1, 'my_comp_id3', -0.999, -.965, 0.35, 0.35,
                  'Look At Other Ships', 'ShipDealer Info ')
    else:
        Base.Comp(room0, 'my_comp_id', -0.855, -0.81, 0.6325, 0.663333,
                  'Upgrade/Repair', 'Upgrade ShipDealer Info ')
    Base.Link(room0, 'my_comp_id', -0.15, 0.2, 0.3375, 0.24, 'Software',
              software)
    Base.Comp(software, 'my_comp_id', -1, -0.75, 2.0, 1,
              'Upgrade Computer(Radar Purchases)', 'Upgrade Info ')
    Base.Link(software, 'my_comp_id', -1, -.97333, 2.0, .2,
              'Upgrade/Repair Room', room0)
    farris = '#\nimport quest\nimport Base\nimport VS\ncp=VS.getCurrentPlayer()\nif (VS.getPlayer().getCredits()>2000):\n\tVS.getPlayer().addCredits(-2000)\n\tBase.Message("Thank you for purchasing the Farris quadrant map. 2000 credits has been deducted from your account.")\n\tquest.removeQuest(cp,"visited_Gemini/New_Caledonia",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Castor",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Sherwood",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Death",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Rygannon",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Xyanti",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Palan",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/War",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/J900",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/KM-252",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Pestilence",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Telar",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Crab-12",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/17-ar",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Capella",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Nexus",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Famine",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Regallis",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Valhalla",1.0)\nelse:\n\tBase.Message("Sorry, you don\'t have enough credits to buy this map. She sure is a fine map isn\'t she? I want to make a sale, you want to make a purchase. Lets look at the facts. I could use your other maps for tradein... plus your cash on hand--that still leaves you short.  Come back to me when you have more cash and we\'ll deal. And don\'t be embarrassed...these things happen.")\n'
    humboldt = '#\nimport quest\nimport Base\nimport VS\ncp=VS.getCurrentPlayer()\nif (VS.getPlayer().getCredits()>2000):\n\tVS.getPlayer().addCredits(-2000)\n\tBase.Message("Thank you for purchasing the Humboldt quadrant map. 2000 credits has been deducted from your account.")\n\tquest.removeQuest(cp,"visited_Gemini/Freyja",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Junction",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Pollux",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Varnus",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/CM-N1054",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Penders_Star",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Prasepe",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Padre",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Pyrenees",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/119ce",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Troy",1.0)\nelse:\n\tBase.Message("Sorry, you don\'t have enough credits to buy this map. She sure is a fine map isn\'t she? I want to make a sale, you want to make a purchase. Lets look at the facts. I could use your other maps for tradein... plus your cash on hand--that still leaves you short.  Come back to me when you have more cash and we\'ll deal. And don\'t be embarrassed...these things happen")\n'
    clarke = '#\nimport quest\nimport Base\nimport VS\ncp=VS.getCurrentPlayer()\nif (VS.getPlayer().getCredits()>2000):\n\tVS.getPlayer().addCredits(-2000)\n\tBase.Message("Thank you for purchasing the Clarke quadrant map. 2000 credits has been deducted from your account.")\n\tquest.removeQuest(cp,"visited_Gemini/Perry",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/CMF-A",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Rikel",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Sumn_Kpta",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Surtur",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Midgard",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Blockade_Point_Tango",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Ragnarok",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Tingerhoff",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Lisacc",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Hyades",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Mah_Rahn",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Nitir",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Blockade_Point_Charlie",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Tr_Pakh",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Blockade_Point_Alpha",1.0)\nelse:\n\tBase.Message("Sorry, you don\'t have enough credits to buy this map. She sure is a fine map isn\'t she? I want to make a sale, you want to make a purchase. Lets look at the facts. I could use your other maps for tradein... plus your cash on hand--that still leaves you short.  Come back to me when you have more cash and we\'ll deal. And don\'t be embarrassed...these things happen")\n'
    potter = '#\nimport quest\nimport Base\nimport VS\ncp=VS.getCurrentPlayer()\nif (VS.getPlayer().getCredits()>2000):\n\tVS.getPlayer().addCredits(-2000)\n\tBase.Message("Thank you for purchasing the Potter quadrant map. 2000 credits has been deducted from your account.")\n\tquest.removeQuest(cp,"visited_Gemini/Shangri_La",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Raxis",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/XXN-1927",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/ND-57",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Newcastle",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Oxford",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Manchester",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/New_Detroit",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Hinds_Variable_N",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/New_Constantinople",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/DN-N1912",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Saxtogue",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Auriga",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Aldebran",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/41-gs",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/Metsor",1.0)\n\tquest.removeQuest(cp,"visited_Gemini/44-p-im",1.0)\nelse:\n\tBase.Message("Sorry, you don\'t have enough credits to buy this map. She sure is a fine map isn\'t she? I want to make a sale, you want to make a purchase. Lets look at the facts. I could use your other maps for tradein... plus your cash on hand--that still leaves you short.  Come back to me when you have more cash and we\'ll deal. And don\'t be embarrassed...these things happen")\n'
    Base.Python(software, 'my_python_id', -1, .5, .4, .5,
                'Buy_Humboldt_Quadrant_Map', humboldt, True)
    Base.Python(software, 'my_python_id', -.6, .5, .4, .5,
                'Buy_Farris_Quadrant_Map', farris, True)
    Base.Python(software, 'my_python_id', -.2, .5, .4, .5,
                'Buy_Potter_Quadrant_Map', potter, True)
    Base.Python(software, 'my_python_id', .2, .5, .4, .5,
                'Buy_Clarke_Quadrant_Map', clarke, True)
    Base.Python(
        software, 'my_python_id', .6, .5, .4, .5, 'Buy_All_Maps',
        "#\nimport VS\nVS.getPlayer().addCredits(2000)\n" + humboldt + farris +
        potter + clarke +
        "Base.Message('Thank you for purchasing all map quadrants.')", True)
    Base.Link(room0, 'my_link_id', -0.975, 0.26, 0.4375, 0.353333,
              'Ship_Dealer', room1)
    Base.Python(
        room1, 'my_comp_id', -0.9925, -0.263333, 0.8875, 0.56, 'Buy Centurion',
        '#\nimport weapons_lib\nweapons_lib.ShipPurchase(\'centurion\')\n',
        True)
    Base.Python(
        room1, 'my_comp_id', -0.6825, -0.973333, 0.77, 0.516667, 'Buy Orion',
        '#\nimport weapons_lib\nweapons_lib.ShipPurchase(\'orion\')\n', True)
    Base.Python(
        room1, 'my_comp_id', 0.2925, -0.96, 0.68, 0.733333, 'Buy Galaxy',
        '#\nimport weapons_lib\nweapons_lib.ShipPurchase(\'galaxy\')\n', True)
    Base.Link(room1, 'my_to_sd_concourse_id', -0.27, 0.466667, 0.1725,
              0.293333, 'Return_To_Concourse', concourse)
    Base.Link(room1, 'my_to_upgrade_concourse_id', 0.415, 0.0533333, 0.3175,
              0.24, 'Return_To_Concourse', concourse)
    Base.Link(room1, 'my_link_id', -0.0175, 0.336667, 0.66, 0.45,
              'Upgrade_Ship', room0)
    return room1