Эх сурвалжийг харах

Add debug flag to make jobs complete instantly

Tankernn 7 жил өмнө
parent
commit
4836483fb0

+ 1 - 1
citybuilder/player.py

@@ -18,7 +18,7 @@ class Job:
         self.finish_time = time.time() + product['time']
 
     def check_finish(self):
-        if time.time() > self.finish_time:
+        if time.time() > self.finish_time or core.config['debug']:
             if self.product['type'] == "building":
                 self.player.buildings[self.product['name']] += 1
             elif self.product['type'] == "unit":

+ 1 - 0
config/game.yaml

@@ -1,4 +1,5 @@
 game:
+  debug: True # Makes jobs complete instantly
   server:
     port: 6060
   general: