Forráskód Böngészése

ColoScript, Removed 3 configs

 Colo_MaxHolds,
 Colo_PercentHolds,
 Colo_MinTurns

 Since all this settings are not really useful/important.
david 5 éve
szülő
commit
982421e801
1 módosított fájl, 4 hozzáadás és 39 törlés
  1. 4 39
      flexible.py

+ 4 - 39
flexible.py

@@ -2520,36 +2520,6 @@ class ColoScript(object):
         self.loops = 0
         self.maxloops = 0
         
-        # Minimum Turns
-        mT = self.game.gamedata.get_config('Colo_minTurns', '200')
-        uMH = self.game.gamedata.get_config('Colo_MaxHolds', 'Y')
-        uHP = self.game.gamedata.get_config('Colo_PercentHolds', '100')
-        try:
-            self.minTurns = int(mT)
-        except ValueError:
-            self.minTurns = 200
-            log.debug("self.minTurns = {0}".format(mT))
-        
-        # Do we just use max Holds or do we check the percent of holds?
-        if uMH is None:
-            self.useMaxHolds = True
-        else:
-            if uMH.upper()[0] == 'Y':
-                self.useMaxHolds = True
-            else:
-                self.useMaxHolds = False
-
-        if not self.useMaxHolds:
-            # Require this percent of holds empty
-            try:
-                self.useHoldsPercent = int(uHP)
-            except ValueError:
-                self.useHoldsPercent = 100
-                log.debug("self.useMaxHolds = False")
-                log.debug("self.useHoldsPercent = {0}".format(uHP))
-        else:
-            log.debug("self.useMaxHolds = True")
-        
         # Activate
         self.prompt = game.buffer
         self.save = self.observer.save()
@@ -2763,7 +2733,7 @@ class ColoScript(object):
                 work = line[19:].replace(' turns left.', '').strip()
                 self.turns = work
                 log.debug("TURNS LEFT: {0}".format(self.turns))
-                if int(self.turns) < self.minTurns:
+                if int(self.turns) < 200:
                     self.send2player("\r" + Boxes.alert("Low Turns! ({0})".format(self.turns)))
                     self.deactivate(True)
         # IF at any state we see how many holds avalible let's get that
@@ -2780,14 +2750,9 @@ class ColoScript(object):
                     log.debug("EMPTY HOLDS = {0}".format(self.holds))
                     self.holds_percent = int((self.holds / self.total_holds) * 100.0)
                     log.debug("HOLDS PERCENT = {0}%".format(self.holds_percent))
-                    if self.useMaxHolds:
-                        if(self.holds < self.total_holds):
-                            self.send2player("\r" + Boxes.alert("You need {0} holds empty! ({1} Empty)".format(self.total_holds, self.holds)))
-                            self.deactivate(True)
-                    else:
-                        if(self.holds_percent < self.useHoldsPercent):
-                            self.send2player("\r" + Boxes.alert("You need {0}% holds empty! ({1}% Empty)".format(self.useHoldsPercent, self.holds_percent)))
-                            self.deactivate(True)
+                    if(self.holds < self.total_holds):
+                        self.send2player("\r" + Boxes.alert("You need {0} holds empty! ({1} Empty)".format(self.total_holds, self.holds)))
+                        self.deactivate(True)
         # Now back to our scheduled program
         if self.state == 1:
             if 'Personal Planet Scan' in line or 'Corporate Planet Scan' in line: