Definition at line 30 of file rescue.py.
References escort_mission.adjsys, rescue.adjsys, patrol.adjsys, directions_mission.adjsys, bounty.adjsys, defend.adjsys, escort_local.adjsys, cargo_mission.adjsys, rescue.arrived, defend.arrived, escort_mission.arrived, escort_local.arrived, plunder.arrived, directions_mission.arrived, bounty.arrived, cargo_mission.arrived, rescue.eject, plunder.enemy, rescue.enemy, bounty.enemy, ambush.enemy, rescue.enfaction, rescue.enflightgroup, patrol_enemies.faction, rescue.faction, SystemInformation.faction, ambush.faction, plunder.faction, bounty.faction, escort_mission.faction, defend.faction, ShipTracker.faction, escort_local.faction, cargo_mission.faction, go_to_adjacent_systems.faction, Launch.faction, ClearFactionRecord.faction, PushRelation.faction, PopRelation.faction, LaunchWingmen.faction, ChangeSystemOwner.faction, ChangeShipOwners.faction, faction_ships.getRandomFighter(), launch.launch_wave_around_unit(), plunder.mplay, escort_mission.mplay, defend.mplay, patrol.mplay, patrol_ambush.mplay, rescue.mplay, escort_local.mplay, bounty.mplay, directions_mission.mplay, cargo_mission.mplay, rescue.numejectors, rescue.numenemy, plunder.obj, bounty.obj, rescue.obj, go_to_adjacent_systems.obj, directions_mission.obj, locale.str(), plunder.Win(), bounty.Win(), rescue.Win(), escort_mission.you, patrol.you, rescue.you, plunder.you, directions_mission.you, go_to_adjacent_systems.you, bounty.you, escort_local.you, defend.you, and cargo_mission.you.
33 VS.terminateMission(0)
35 if (
not self.adjsys.Execute()):
39 sys = VS.getSystemFile()
41 if sys
in dynamic_battle.rescuelist:
42 del dynamic_battle.rescuelist[sys]
53 self.eject.setMissionRelevant()
55 self.eject.setName(
"Pilot")
56 self.eject.SetHull(25);
64 L.minradius=float(VS.vsConfig(
"dynamic_universe",
"missions.rescue.enemy.minradius",
"5000"))
65 L.maxradius=float(VS.vsConfig(
"dynamic_universe",
"missions.rescue.enemy.maxradius",
"15000"))
67 L.minradius*=faction_ships.launch_distance_factor
68 L.maxradius*=faction_ships.launch_distance_factor
71 self.
enemy=L.launch(self.adjsys.SignificantUnit())
72 self.enemy.SetTarget(self.
eject)
73 self.enemy.setFgDirective(
"A.")
74 self.you.SetTarget(self.
eject)
75 VS.IOmessage(0,
"eject",self.
mplay,
"This is ejector pod 0x4032 requesting immediate rescue and pickup")
76 self.
obj=VS.addObjective(
"Tractor Ejected Pilot")
80 self.enemy.SetTarget(self.
eject)
81 self.
numejectors=self.you.GetCargo(
"Pilot").GetQuantity()
84 self.enemy.SetTarget(self.
you)
85 self.enemy.setFgDirective(
"A.")
87 if (self.
numejectors<self.you.GetCargo(
"Pilot").GetQuantity()):
88 self.you.removeCargo(
"Pilot",1,1)
89 carg=VS.getRandCargo(1,
"Passengers/Economy")
90 carg.SetMissionFlag(1)
91 VS.setCompleteness(self.
obj,1)
92 if (
not self.you.addCargo(carg)):
99 VS.IOmessage(0,
"Passenger",self.
mplay,
"Please take me to my home base: %s so I may begin to recover. Thank you!"%self.adjsys.SignificantUnit().getName())
101 VS.IOmessage(0,
"rescue_mission",self.
mplay,
"#ff0000You Lost the Pilot before you could drop the Pilot at the base. The Pilot's oxygen is currently empty. You fail.")
105 if (self.you.GetCargo(self.
cargname).GetQuantity()==0):
107 elif (self.adjsys.SignificantUnit().isDocked(self.
you)
or self.you.isDocked(self.adjsys.SignificantUnit())
or self.adjsys.SignificantUnit().getDistance(self.
you)<10):
108 if (self.you.removeCargo(self.
cargname,1,1)):
self.
Lose(1)