def CreateMissions(minsys=0,maxsys=4): eraseExtras() global plr,basefac,baseship plrun=VS.getPlayer() plr=plrun.isPlayerStarship() debug.debug("VS.getUnitList()") i = VS.getUnitList() un = i.current() while(not i.isDone() and not un.isDocked(plrun)): un = next(i) # iterate until the docked player unit is found if (not un.isNull()): baseship=un basefac=un.getFactionName() if (basefac=='neutral'): basefac=VS.GetGalaxyFaction(VS.getSystemFile()) contractMissionsFor(basefac,baseship,minsys,maxsys) news.processNews(plr)
def CreateMissions(minsys=0, maxsys=4): eraseExtras() global plr, basefac, baseship plrun = VS.getPlayer() plr = plrun.isPlayerStarship() debug.debug("VS.getUnitList()") i = VS.getUnitList() un = i.current() while (not i.isDone() and not un.isDocked(plrun)): un = next(i) # iterate until the docked player unit is found if (not un.isNull()): baseship = un basefac = un.getFactionName() if (basefac == 'neutral'): basefac = VS.GetGalaxyFaction(VS.getSystemFile()) contractMissionsFor(basefac, baseship, minsys, maxsys) news.processNews(plr)
def CreateMissions(minsys=0, maxsys=4): generate_dyn_universe.KeepUniverseGenerated() if VS.networked(): # No generating stuff while networked. return eraseExtras() global plr, basefac plrun = VS.getPlayer() plr = plrun.isPlayerStarship() i = VS.getUnitList() while (i.notDone() and not i.current().isDocked(plrun)): i.advance() if (i.notDone()): basefac = i.current().getFactionName() if (basefac == 'neutral'): basefac = VS.GetGalaxyFaction(VS.getSystemFile()) contractMissionsFor(basefac, minsys, maxsys) import news news.processNews(plr)
def CreateMissions(minsys=0,maxsys=4): generate_dyn_universe.KeepUniverseGenerated() if VS.networked(): # No generating stuff while networked. return eraseExtras() global plr,basefac plrun=VS.getPlayer() plr=plrun.isPlayerStarship() i = VS.getUnitList() while(i.notDone() and not i.current().isDocked(plrun)): i.advance() if (i.notDone()): basefac=i.current().getFactionName() if (basefac=='neutral'): basefac=VS.GetGalaxyFaction(VS.getSystemFile()) contractMissionsFor(basefac,minsys,maxsys) import news news.processNews(plr)
def CreateMissions(minsys=0,maxsys=4): eraseExtras() i=0 global plr,basefac plrun=VS.getPlayer() plr=plrun.isPlayerStarship() un=VS.getUnit(i) while(un): i+=1 if (un.isDocked(plrun)): break un=VS.getUnit(i) if (un): basefac=un.getFactionName() if (basefac=='neutral'): basefac=VS.GetGalaxyFaction(VS.getSystemFile()) contractMissionsFor(basefac,minsys,maxsys) import news news.processNews(plr)
def CreateMissions(minsys=0, maxsys=4): eraseExtras() i = 0 global plr, basefac, baseship plrun = VS.getPlayer() plr = plrun.isPlayerStarship() un = VS.getUnit(i) while un: i += 1 if un.isDocked(plrun): break un = VS.getUnit(i) if un: baseship = un basefac = un.getFactionName() if basefac == "neutral": basefac = VS.GetGalaxyFaction(VS.getSystemFile()) contractMissionsFor(basefac, baseship, minsys, maxsys) import news news.processNews(plr) print "GOOG OGOO"