|
@@ -1122,6 +1122,8 @@ class ScriptExplore(object):
|
|
|
self.observer.connect("prompt", self.game_prompt)
|
|
|
self.observer.connect("game-line", self.game_line)
|
|
|
|
|
|
+ self.prefer_ports = self.game.gamedata.get_config('Explorer_PrefPorts', 'N').upper()[0] == 'Y'
|
|
|
+
|
|
|
self.defer = None
|
|
|
self.send2player(Boxes.alert("Explorer", base="green"))
|
|
|
|
|
@@ -1312,73 +1314,20 @@ class ScriptExplore(object):
|
|
|
self.dead_end()
|
|
|
return
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
self.clear = [ x for x in self.dense if not x['anom'] and not x['navhaz'] and x['density'] in (0,1,100,101) ]
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
if self.clear:
|
|
|
log.debug("Clear Sectors: {0}".format(len(self.clear)))
|
|
|
|
|
|
|
|
|
|
|
|
- self.highwarp, self.highsector = max( (x['warps'], x['sector']) for x in self.clear)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if self.prefer_ports:
|
|
|
+ _, self.highwarp, self.highsector = max( (x['density'], x['warps'], x['sector']) for x in self.clear)
|
|
|
+ else:
|
|
|
+ self.highwarp, self.highsector = max( (x['warps'], x['sector']) for x in self.clear)
|
|
|
+
|
|
|
log.info("Sector: {0:5d} Warps: {1}".format(self.highsector, self.highwarp))
|
|
|
self.state += 1
|
|
|
else:
|