mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
fixupfixup enum-dict
This commit is contained in:
parent
f790a83acf
commit
ac18f3f2cc
@ -18,17 +18,17 @@ class State(Enum):
|
|||||||
DEAD = 15
|
DEAD = 15
|
||||||
|
|
||||||
Colors = {
|
Colors = {
|
||||||
"IDLE" : [255, 255, 255],
|
State.IDLE : [255, 255, 255],
|
||||||
"LOOKAWAY" : [ 76, 0, 76],
|
State.LOOKAWAY : [ 76, 0, 76],
|
||||||
"LOOKING" : [101, 69, 0],
|
State.LOOKING : [101, 69, 0],
|
||||||
"DEPLETED" : [ 0, 76, 76],
|
State.DEPLETED : [ 0, 76, 76],
|
||||||
"NOBAIT" : [255, 204, 0],
|
State.NOBAIT : [255, 204, 0],
|
||||||
"FISHING" : [ 75, 156, 213],
|
State.FISHING : [ 75, 156, 213],
|
||||||
"REELIN" : [ 0, 204, 0],
|
State.REELIN : [ 0, 204, 0],
|
||||||
"LOOT" : [ 0, 0, 204],
|
State.LOOT : [ 0, 0, 204],
|
||||||
"INVFULL" : [ 0, 0, 51],
|
State.INVFULL : [ 0, 0, 51],
|
||||||
"FIGHT" : [204, 0, 0],
|
State.FIGHT : [204, 0, 0],
|
||||||
"DEAD" : [ 51, 51, 51]
|
State.DEAD : [ 51, 51, 51]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ def loop(rgb):
|
|||||||
"""
|
"""
|
||||||
FishingMode.CurrentMode = State.IDLE
|
FishingMode.CurrentMode = State.IDLE
|
||||||
for s in State:
|
for s in State:
|
||||||
if all(rgb == Colors[s.name]):
|
if all(rgb == Colors[s]):
|
||||||
FishingMode.CurrentMode = s
|
FishingMode.CurrentMode = s
|
||||||
|
|
||||||
if FishingMode.CurrentMode != FishingMode.PrevMode:
|
if FishingMode.CurrentMode != FishingMode.PrevMode:
|
||||||
|
Loading…
Reference in New Issue
Block a user