mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
0.2.5 fixed path joining error for shortcut and addon
- added a warning for addon not visible - added requests and bs4 in requirements
This commit is contained in:
parent
6a708e55e6
commit
7361cc46ee
@ -1,2 +1,2 @@
|
||||
from fishy.__main__ import main
|
||||
__version__ = "0.2.3"
|
||||
__version__ = "0.2.5"
|
||||
|
@ -51,6 +51,7 @@ class Fishy:
|
||||
|
||||
# check for game window and stuff
|
||||
self.gui.call(GUIFunction.STARTED, (True,))
|
||||
Thread(target=wait_and_check).start()
|
||||
while self.start:
|
||||
# Services to be ran in the start of the main loop
|
||||
Window.Loop()
|
||||
@ -120,6 +121,13 @@ def initialize(c: Config, gui):
|
||||
rootLogger.addHandler(new_console)
|
||||
|
||||
|
||||
def wait_and_check():
|
||||
time.sleep(10)
|
||||
if not G.FishingStarted:
|
||||
logging.info("\nDoesn't look like fishing has started\n"
|
||||
"Make sure ProvisionsChalutier addon is visible on top left corner of the screen")
|
||||
|
||||
|
||||
def main():
|
||||
c = Config()
|
||||
events_buffer = []
|
||||
|
@ -110,6 +110,7 @@ class StickEvent(FishEvent):
|
||||
:param previousMode: previous mode in the state machine
|
||||
"""
|
||||
G.stickInitTime = time.time()
|
||||
G.FishingStarted = True
|
||||
|
||||
def onExitCallback(self, currentMode):
|
||||
pass
|
||||
|
@ -16,7 +16,6 @@ class FishingMode:
|
||||
PrevLabel = -1
|
||||
CurrentMode = None
|
||||
PrevMode = None
|
||||
FishingStarted = False
|
||||
|
||||
Modes = []
|
||||
|
||||
|
@ -5,3 +5,4 @@ class G:
|
||||
fishCaught = 0
|
||||
totalFishCaught = 0
|
||||
stickInitTime = 0
|
||||
FishingStarted = False
|
||||
|
@ -118,16 +118,17 @@ def get_data_file_path(rel_path):
|
||||
|
||||
|
||||
def create_shortcut():
|
||||
desktop = os.path.expanduser(r"~/Desktop/")
|
||||
shutil.copy(get_data_file_path('FishybotESO.lnk'), os.path.join(desktop, "Fishybot ESO.lnk"))
|
||||
user = os.path.expanduser("~")
|
||||
shutil.copy(get_data_file_path('FishybotESO.lnk'), os.path.join(user, "Desktop", "Fishybot ESO.lnk"))
|
||||
logging.info("Shortcut created")
|
||||
|
||||
|
||||
def check_addon():
|
||||
addon_dir = os.path.expanduser(r"~/Documents/Elder Scrolls Online/live/Addons")
|
||||
folder_path = os.path.join(addon_dir, 'ProvisionsChalutier')
|
||||
if not os.path.exists(folder_path):
|
||||
user = os.path.expanduser("~")
|
||||
addon_dir = os.path.join(user, "Documents", "Elder Scrolls Online", "live", "Addons")
|
||||
if not os.path.exists(os.path.join(addon_dir, 'ProvisionsChalutier')):
|
||||
logging.info("Addon not found, installing it...")
|
||||
with ZipFile(get_data_file_path("ProvisionsChalutier.zip"), 'r') as zip:
|
||||
zip.extractall(path=addon_dir)
|
||||
logging.info("Please make sure you enable \"Allow outdated addons\" in-game")
|
||||
logging.info("Please make sure you enable \"Allow outdated addons\" in-game\n"
|
||||
"Also, make sure the addon is visible clearly on top left corner of the game window")
|
||||
|
@ -6,3 +6,4 @@ pypiwin32
|
||||
ttkthemes
|
||||
pyautogui
|
||||
requests
|
||||
beautifulsoup4
|
||||
|
Loading…
Reference in New Issue
Block a user