Ver código fonte

EvilTrade: Updated commments...

  Updated comments/guidelines for states.
  Changed player stats from INFO to DEBUG logging level.
david 5 anos atrás
pai
commit
c038ef2fd5
1 arquivos alterados com 9 adições e 9 exclusões
  1. 9 9
      flexible.py

+ 9 - 9
flexible.py

@@ -3779,16 +3779,16 @@ class evilTrade(object):
         States:
         0 = Pre-State, Asks the user how many times to run
         1 = Gather user info
-        2 = Verify Cargo is full of Equ
-        3 = Find and move to nearest port buying Equ (Express mode!)
+        2 = Verify Cargo is full of Equ, else jump to state 3.5
+        3 = Find nearest "Evil Pair" of ports, move to first, jump to 4
         3.5 = User does not have Equ, lets buy it, then move on
         (SSM: Sell-Steal-Move)
         4 = Port and Sell Equ
         5 = Port and Steal Equ
-        6 = Move to 2nd nearest port buying Equ (Express mode!)
+        6 = Move to 2nd "Evil Pair"
         7 = Port and Sell Equ
         8 = Port and Steal Equ
-        9 = Move to 1st Port
+        9 = Move to 1st "Evil Pair"
         10 = Decide to loop, if so we jump back to state 4, else exit
     """
 
@@ -3802,14 +3802,14 @@ class evilTrade(object):
         self.nl = "\n\r"
 
         self.state = 0  # Pre-state
-        self.holds = 0  # Total holds empty
+        self.holds = 0  # Total holds empty, self.holds == self.cargo["Empty"]
         self.cargo = {
             "Ore": 0,
             "Org": 0,
             "Equ": 0,
             "Colo": 0,
             "Empty": 0,
-        }
+        }  # What is in our holds?
         self.maxHolds = 0  # Total holds
         self.maxLoops = 0  # So when we display done show the total loops asked to do
         self.loops = 0  # Current number of loops left to do
@@ -3879,8 +3879,8 @@ class evilTrade(object):
         elif self.state == 1:
             if re.match(r"Command \[TL=.* \(\?=Help\)\? :", prompt):
                 if self.completeINFO:  # We have all our info, lets display it into logs
-                    log.info("{0}'s Stats...".format(self.name))
-                    log.info(
+                    log.debug("{0}'s Stats...".format(self.name))
+                    log.debug(
                         "Experience: {0} Alignment: {1} Turns: {2} Credits: {3} Total Holds: {4} Avaible Holds: {5} Current Sector: {6}".format(
                             self.exp,
                             self.alignment,
@@ -3891,7 +3891,7 @@ class evilTrade(object):
                             self.sector,
                         )
                     )
-                    log.info(
+                    log.debug(
                         "Ore: {0} Org: {1} Equ: {2} Colo: {3} Empty: {4}".format(
                             self.cargo["Ore"],
                             self.cargo["Org"],