Skip to content

Commit 9773d7d

Browse files
author
ElectricityMachine
committed
Credits to novikeks for finding the following bugs:
Fixed fullscreen mode not working for the upper dialog box Fixed edge signals at the Leighton triangle not being recognized
1 parent 30c168d commit 9773d7d

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

script.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ElectricityMachine
2-
# Version: 0.2.0
2+
# Version: 0.2.5
33
# Description: A script to automate tasks when signalling for SCR
44
# Keybinds: 1 2 3 for Danger, Caution, and Proceed signal settings. C for Camera
55
# How to use: Hover over a signal and press the corresponding keybind to perform the action
@@ -21,26 +21,27 @@
2121
starttime = time.time()
2222
colorama.init() # Needed to work on Windows devices, see colorama docs
2323

24-
version = "v0.2.4"
24+
version = "v0.2.5"
2525
key_wait = 0
2626
backspace_wait = 0
2727
dialog_wait = 0.085
2828
debug = False
29-
update_check = True
29+
check_for_update = True
3030

3131
color_vals ={
3232
(0, 201, 0), # Lit Green
33-
# (204, 153, 0), # Lit Yellow
33+
(204, 153, 0), # Lit Yellow
3434
(213, 0, 0), # Lit Red
35-
#(0, 94, 0), # Unlit Green
36-
#(96, 60, 0), # Unlit Yellow
35+
(0, 94, 0), # Unlit Green
36+
(96, 60, 0), # Unlit Yellow
3737
(99, 0, 0), # Unlit Red
3838
}
3939

4040
disable = False
4141
running = False
4242

4343
def update_check():
44+
if not check_for_update: return
4445
URL = "https://api.github.com/repos/ElectricityMachine/SCR-SGPlus/releases/latest"
4546
r = requests.get(url = URL)
4647
data = r.json()
@@ -164,8 +165,9 @@ def scan_for_dialog(type):
164165
upperw, upperh = upper.size
165166
lowerw, lowerh = lower.size
166167
lowershelf = lower.crop((0, lowerh*2/3, lowerw, lowerh*2/3 + 1))
167-
uppershelf = upper.crop((0, upperh/2, upperw, upperh/2 + 1))
168+
uppershelf = upper.crop((0, upperh/2, upperw, upperh/2 + 2))
168169
imagesToProcess = [lowershelf, uppershelf]
170+
169171
flag = False
170172
for image in imagesToProcess:
171173
for i in range(math.ceil(image.width/1.6)):

0 commit comments

Comments
 (0)