瀏覽代碼

Attempting to Merge Branches Master with ScriptExplore

david 5 年之前
父節點
當前提交
b7ff17ab5a
共有 1 個文件被更改,包括 13 次插入11 次删除
  1. 13 11
      flexible.py

+ 13 - 11
flexible.py

@@ -1008,6 +1008,19 @@ class ScriptPort(object):
         #     self.deactivate()
         #     return
 
+
+       
+
+def port_pct(port):
+    # Make sure these exist in the port data given.
+    if all( x in port for x in ['fuel', 'org', 'equ']):
+        return "{0:3},{1:3},{2:3}%".format(
+            port['fuel']['pct'],
+            port['org']['pct'],
+            port['equ']['pct'])
+    else:
+        return "---,---,---%"
+
 class ScriptExplore(object):
     """ Script Explore v1.00
         By: David Thielemann
@@ -1188,17 +1201,6 @@ class ScriptExplore(object):
             # We are in a infinite Loop! Warning! Yes we can and will eat all the turns! :P
 
 
-       
-
-def port_pct(port):
-    # Make sure these exist in the port data given.
-    if all( x in port for x in ['fuel', 'org', 'equ']):
-        return "{0:3},{1:3},{2:3}%".format(
-            port['fuel']['pct'],
-            port['org']['pct'],
-            port['equ']['pct'])
-    else:
-        return "---,---,---%"
 
 def port_show_part(sector, sector_port):
     return "{0:5} ({1}) {2}".format(sector, sector_port['port'], port_pct(sector_port))