Basic mission vessel tunnel
This commit is contained in:
25
lib.py
Normal file
25
lib.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from connector import get_connexion
|
||||
|
||||
|
||||
def get_contract(title):
|
||||
for c in get_connexion().space_center.contract_manager.active_contracts:
|
||||
if c.title == title:
|
||||
return c
|
||||
|
||||
raise LookupError('Contract "{}" not found'.format(title))
|
||||
|
||||
|
||||
def get_vessel(name):
|
||||
for v in get_connexion().space_center.vessels:
|
||||
if v.name == name:
|
||||
return v
|
||||
|
||||
raise LookupError("Vessel {} not found".format(name))
|
||||
|
||||
|
||||
def get_rescuee_vessel(rescuee_name):
|
||||
for v in get_connexion().space_center.vessels:
|
||||
if rescuee_name in v.name:
|
||||
return v
|
||||
|
||||
raise LookupError("Rescuee {} vessel not found".format(rescuee_name))
|
||||
Reference in New Issue
Block a user