|
1 | 1 | # ElectricityMachine |
2 | | -# Version: 0.2.0 |
| 2 | +# Version: 0.2.5 |
3 | 3 | # Description: A script to automate tasks when signalling for SCR |
4 | 4 | # Keybinds: 1 2 3 for Danger, Caution, and Proceed signal settings. C for Camera |
5 | 5 | # How to use: Hover over a signal and press the corresponding keybind to perform the action |
|
21 | 21 | starttime = time.time() |
22 | 22 | colorama.init() # Needed to work on Windows devices, see colorama docs |
23 | 23 |
|
24 | | -version = "v0.2.4" |
| 24 | +version = "v0.2.5" |
25 | 25 | key_wait = 0 |
26 | 26 | backspace_wait = 0 |
27 | 27 | dialog_wait = 0.085 |
28 | 28 | debug = False |
29 | | -update_check = True |
| 29 | +check_for_update = True |
30 | 30 |
|
31 | 31 | color_vals ={ |
32 | 32 | (0, 201, 0), # Lit Green |
33 | | - # (204, 153, 0), # Lit Yellow |
| 33 | + (204, 153, 0), # Lit Yellow |
34 | 34 | (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 |
37 | 37 | (99, 0, 0), # Unlit Red |
38 | 38 | } |
39 | 39 |
|
40 | 40 | disable = False |
41 | 41 | running = False |
42 | 42 |
|
43 | 43 | def update_check(): |
| 44 | + if not check_for_update: return |
44 | 45 | URL = "https://api.github.com/repos/ElectricityMachine/SCR-SGPlus/releases/latest" |
45 | 46 | r = requests.get(url = URL) |
46 | 47 | data = r.json() |
@@ -164,8 +165,9 @@ def scan_for_dialog(type): |
164 | 165 | upperw, upperh = upper.size |
165 | 166 | lowerw, lowerh = lower.size |
166 | 167 | 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)) |
168 | 169 | imagesToProcess = [lowershelf, uppershelf] |
| 170 | + |
169 | 171 | flag = False |
170 | 172 | for image in imagesToProcess: |
171 | 173 | for i in range(math.ceil(image.width/1.6)): |
|
0 commit comments