From 8e294c8ffaf9e8fdf4b1154f83da2af8156feadb Mon Sep 17 00:00:00 2001 From: Cody <363316191@qq.com> Date: Fri, 31 Dec 2021 14:05:51 +0800 Subject: [PATCH] gui --- farmer.py | 2 +- gui.py | 8 -------- gui.spec | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 9 deletions(-) delete mode 100644 gui.py create mode 100644 gui.spec diff --git a/farmer.py b/farmer.py index 9e3d5a9..959b4c2 100644 --- a/farmer.py +++ b/farmer.py @@ -721,7 +721,7 @@ def scan_plants(self): self.log.debug("get_buildings_info:{0}".format(resp.text)) resp = resp.json() for item in resp["rows"]: - if item["template_id"] == 298592: + if item["template_id"] == 298592 and item["is_ready"] == 1: slots_num = 8 - item["slots_used"] if slots_num > 0: self.plant_corps(slots_num) diff --git a/gui.py b/gui.py deleted file mode 100644 index cbf878d..0000000 --- a/gui.py +++ /dev/null @@ -1,8 +0,0 @@ -# Form implementation generated from reading ui file 'gui.pyw' -# -# Created by: PyQt6 UI code generator 6.2.2 -# -# WARNING: Any manual changes made to this file will be lost when pyuic6 is -# run again. Do not edit this file unless you know what you are doing. - - diff --git a/gui.spec b/gui.spec new file mode 100644 index 0000000..692088d --- /dev/null +++ b/gui.spec @@ -0,0 +1,50 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + +add_files = [ +('./chromedriver.exe','./'), +('./inject.js','./'), +('./waxjs.js','./'), +('./user.yml','./'), +('./favicon.ico','./'), +] +a = Analysis(['gui.pyw'], + pathex=[], + binaries=[], + datas=add_files, + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + [], + exclude_binaries=True, + name='gui', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None , icon='favicon.ico') +coll = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='gui')