|
@@ -997,6 +997,7 @@ class ScriptExplore(object):
|
|
|
self.clear = []
|
|
|
self.highsector = 0
|
|
|
self.highwarp = 0
|
|
|
+ self.stacksector = set()
|
|
|
self.oneMoveSector = False
|
|
|
self.times = 0
|
|
|
self.maxtimes = 0
|
|
@@ -1009,7 +1010,7 @@ class ScriptExplore(object):
|
|
|
self.observer.connect("game-line", self.game_line)
|
|
|
|
|
|
self.defer = None
|
|
|
- self.send2player("Explorer v1.00")
|
|
|
+ self.send2player("Explorer v1.01")
|
|
|
|
|
|
|
|
|
ask = PlayerInput(self.game)
|
|
@@ -1025,7 +1026,7 @@ class ScriptExplore(object):
|
|
|
self.send2game("D")
|
|
|
self.state = 1
|
|
|
|
|
|
- d = ask.prompt("How many sectors would you like to explore?", 5, name="times", digits=True)
|
|
|
+ d = ask.prompt("How many sectors would you lick to explode?", 5, name="times", digits=True)
|
|
|
|
|
|
|
|
|
d.addCallback(settimes)
|
|
@@ -1067,8 +1068,9 @@ class ScriptExplore(object):
|
|
|
|
|
|
def game_line(self, line: str):
|
|
|
log.msg("{0} | {1}".format(self.state, line))
|
|
|
- if "Mine Control" in line:
|
|
|
+ if "Mine Control" in line:
|
|
|
self.deactivate()
|
|
|
+
|
|
|
if self.state == 1:
|
|
|
|
|
|
if not self.didScan:
|
|
@@ -1083,6 +1085,7 @@ class ScriptExplore(object):
|
|
|
work = re.split(r"\s+", work)
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
if work[1] == '(':
|
|
|
temp1 = True
|
|
@@ -1091,6 +1094,7 @@ class ScriptExplore(object):
|
|
|
|
|
|
|
|
|
if temp1:
|
|
|
+
|
|
|
if(work[9] == 'No'):
|
|
|
temp = False
|
|
|
else:
|
|
@@ -1113,20 +1117,32 @@ class ScriptExplore(object):
|
|
|
|
|
|
|
|
|
|
|
|
- if not self.dense:
|
|
|
+
|
|
|
+ if not self.dense:
|
|
|
log.msg("No New Sectors Found!")
|
|
|
self.send2player("Find a new area for me to search in!")
|
|
|
+
|
|
|
+ if self.stacksector:
|
|
|
+ self.highsector = self.stacksector.pop()
|
|
|
+
|
|
|
+
|
|
|
self.deactivate()
|
|
|
- elif self.dense:
|
|
|
- t = []
|
|
|
+ elif self.dense:
|
|
|
+ t = []
|
|
|
for d in self.dense:
|
|
|
if d['warps'] != 1:
|
|
|
t.append(d['sector'])
|
|
|
- if not t:
|
|
|
+ if not t:
|
|
|
log.msg("No Sectors Found except one move sector!")
|
|
|
self.send2player("Find a new area for me to look at!")
|
|
|
+
|
|
|
+ if self.stacksector:
|
|
|
+ self.highsector = self.stacksector.pop()
|
|
|
+
|
|
|
+
|
|
|
self.deactivate()
|
|
|
|
|
|
+
|
|
|
for d in self.dense:
|
|
|
if not d['anom']:
|
|
|
|
|
@@ -1138,7 +1154,7 @@ class ScriptExplore(object):
|
|
|
|
|
|
self.clear.append(d['sector'])
|
|
|
|
|
|
- if self.clear:
|
|
|
+ if self.clear:
|
|
|
log.msg("Clear Sectors: {0}".format(len(self.clear)))
|
|
|
self.state = 5
|
|
|
elif self.state == 5:
|
|
@@ -1160,10 +1176,7 @@ class ScriptExplore(object):
|
|
|
elif d['warps'] == self.highwarp:
|
|
|
if c > self.highsector:
|
|
|
self.highsector = c
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
if self.highwarp != 0 or self.highsector != 0:
|
|
|
log.msg("Sector: {0:5d} Warps: {1}".format(self.highsector, self.highwarp))
|
|
@@ -1172,6 +1185,13 @@ class ScriptExplore(object):
|
|
|
log.msg("Oh Nose! We didn't find any Sector with higher Warps than any of the others!")
|
|
|
self.deactivate()
|
|
|
elif self.state == 6:
|
|
|
+
|
|
|
+ for d in self.dense:
|
|
|
+ self.stacksector.add(d['sector'])
|
|
|
+
|
|
|
+
|
|
|
+ self.stacksector.discard(self.highsector)
|
|
|
+
|
|
|
|
|
|
self.send2game("m{0}\n\r".format(self.highsector))
|
|
|
|
|
@@ -1183,7 +1203,7 @@ class ScriptExplore(object):
|
|
|
self.highsector = 0
|
|
|
self.state = 1
|
|
|
|
|
|
-
|
|
|
+
|
|
|
self.times -= 1
|
|
|
if self.times <= 0:
|
|
|
self.send2player("Completed {0}".format(self.maxtimes))
|