Merge pull request #52 from SemjonKerner/add_color_nobait_invfull

Add detection of color for invfull and nobait state
This commit is contained in:
Adam Saudagar 2021-03-28 23:04:54 +05:30 committed by GitHub
commit dd95426ab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,3 @@
apiversion = 2 apiversion = 2
chalutier = ("Chalutier", "https://www.esoui.com/downloads/dl2934/1616505502-Chalutier_1.1.1.zip", 111) chalutier = ("Chalutier", "https://github.com/fishyboteso/Chalutier/raw/619b4ab0b8ff91746afda855542e886d27b7a794/Chalutier_1.1.2.zip", 112)
lam2 = ("LibAddonMenu-2.0", "https://www.esoui.com/downloads/dl7/LibAddonMenu-2.0r32.zip", 32) lam2 = ("LibAddonMenu-2.0", "https://www.esoui.com/downloads/dl7/LibAddonMenu-2.0r32.zip", 32)

View File

@ -83,11 +83,11 @@ def fisher_callback(event: State):
State.LOOKAWAY: on_lookaway, State.LOOKAWAY: on_lookaway,
State.LOOKING: on_looking, State.LOOKING: on_looking,
State.DEPLETED: on_depleted, State.DEPLETED: on_depleted,
State.NOBAIT: on_dead, State.NOBAIT: on_nobait,
State.FISHING: on_fishing, State.FISHING: on_fishing,
State.REELIN: on_reelin, State.REELIN: on_reelin,
State.LOOT: on_loot, State.LOOT: on_loot,
State.INVFULL: on_dead, State.INVFULL: on_invfull,
State.FIGHT: on_fight, State.FIGHT: on_fight,
State.DEAD: on_dead State.DEAD: on_dead
} }
@ -126,6 +126,12 @@ def on_depleted():
FishEvent.fishCaught = 0 FishEvent.fishCaught = 0
def on_nobait():
msg = "No bait equipped!"
logging.info(msg)
web.send_notification(msg)
def on_fishing(): def on_fishing():
FishEvent.stickInitTime = time.time() FishEvent.stickInitTime = time.time()
FishEvent.FishingStarted = True FishEvent.FishingStarted = True
@ -161,6 +167,12 @@ def on_loot():
_fishing_sleep(0.3) _fishing_sleep(0.3)
def on_invfull():
msg = "Inventory full!"
logging.info(msg)
web.send_notification(msg)
def on_fight(): def on_fight():
msg = "FIGHTING!" msg = "FIGHTING!"
logging.info(msg) logging.info(msg)
@ -168,6 +180,6 @@ def on_fight():
def on_dead(): def on_dead():
msg = "DEAD or INVENTORY FULL or NO BAIT EQUIPPED" msg = "Character is dead!"
logging.info(msg) logging.info(msg)
web.send_notification(msg) web.send_notification(msg)

View File

@ -9,11 +9,11 @@ class State(Enum):
LOOKAWAY = [150, 255, 76] LOOKAWAY = [150, 255, 76]
LOOKING = [100, 255, 101] LOOKING = [100, 255, 101]
DEPLETED = [ 30, 255, 76] DEPLETED = [ 30, 255, 76]
NOBAIT = [ 0, 0, 0] NOBAIT = [ 96, 255, 255]
FISHING = [ 18, 165, 213] FISHING = [ 18, 165, 213]
REELIN = [ 60, 255, 204] REELIN = [ 60, 255, 204]
LOOT = [ 0, 255, 204] LOOT = [ 0, 255, 204]
INVFULL = [ 0, 0, 0] INVFULL = [ 0, 255, 51]
FIGHT = [120, 255, 204] FIGHT = [120, 255, 204]
DEAD = [ 0, 0, 0] DEAD = [ 0, 0, 0]