Commits

Anonymous committed 2e0264e

No more accidental test-mode-checked-to-prod bug; considering mercy feature; tired now

Comments (0)

Files changed (5)

ProduceDefendWin.py

 from Source import Title
 from Source import mainline
 
+
+
 def main(continuing, firstRun):
     
     if firstRun:

Source/MotherShip.py

         
         self.deadFighterList = []
         self.enterNoiseCounter = 0
+        self.hitCount = 0
         
     def test(self, targetSprite, nextState, laserPower):
         # given a bomb and the shield object, see if we hit the shield
             pygame.draw.rect(enviro.screen, [0,0,0], [740,126,30,300], 0) 
             
         if self.state == "Hit":
+            self.hitCount += 1
+            print "The mother has died ",self.hitCount," times, do we need a mercy rule?"
             self.state = "Waiting"
             self.waitCount = enviro.MOTHER_RESTART_WAIT - self.fasterNextTime
             if self.waitCount < 0:
             if enviro.MOTHER_BUILD_SPEED < 200:
                 enviro.MOTHER_BUILD_SPEED = 200
             
-        
             self.life = self.fullHealth
             
         return [bombList, dramaState, self.state]
 
 import Noise
 
-test = 1
+# There, this kludge will keep me from checking the code in with test mode
+# enabled, provided I don't add AAAmytest.py to the repository :)
+test = 0
 testMenuSkip = 0
 testEntryScreenSkip = 0
 testing_modules = 0
+try:
+    from Source import AAAmytest
+    print AAAmytest.test
+    test = AAAmytest.test
+    print AAAmytest.testMenuSkip
+    testMenuSkip = AAAmytest.testMenuSkip
+    print AAAmytest.testEntryScreenSkip
+    testEntryScreenSkip = AAAmytest.testEntryScreenSkip
+    print AAAmytest.testing_modules
+    testing_modules = AAAmytest.testing_modules
+except ImportError:
+    #print "prod mode!"
+
 
 """ GLOBAL variables """
 """ First some static items we need to run the game:"""

Source/fonts/default.ttf

Binary file added.

Source/pyconsole.cfg

+# # # # # # # # # # # # # # # # # # # # # # # # # # #
+# Available variables:
+#
+# bg_alpha - background alpha value, range 0 to 255 (Pretty, but a big performance hit)
+# bg_color - Background Color, RGB format
+# txt_color_i - Text Color (Input). Color of the input line, RGB format
+# txt_color_o - Text Color (Output). Color of the output lines, RGB format
+# ps1/ps2/ps3 - strings that are prefixed to each input line, like their POSIX counterparts
+# active - Whether or not the console is initially displayed
+# repeat_rate - value to pass to pygame.key.set_repeat
+# preserve_events - determines whether or not the console puts unused events back on the event queue
+# python_mode - Send commands to the python interpreter instead of the pyconsole interpreter
+# # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+bg_alpha 200
+bg_color [0x0,0x44,0xAA]
+
+txt_color_i [0xFF,0xFF,0xFF]
+txt_color_o [0xEE,0xEE,0xEE]
+
+ps1 "] "
+ps2 ">>> "
+ps3 "... "
+
+active False
+
+repeat_rate [500,30]
+
+preserve_events False
+
+python_mode False
+
+motd ["|PyConsole 0.7|","Type help for a list of commands","Press Ctrl_w to hide the console"]