Skip to content

Commit d8ba8de

Browse files
authored
v2.0.3 bugfixes and added mac support
1 parent 41df6be commit d8ba8de

7 files changed

Lines changed: 73 additions & 44 deletions

File tree

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Robert Zhao
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ Low memory (compared to porofessor) usage. ~100mb of RAM needed. And 260 mb disk
66

77
# Status
88

9-
Probably broken right now... will fix in about 3 business years!
10-
11-
🟢 - Done!
9+
🟢 - Done! - Bugfixes will still happen!
1210

1311
# Installation
1412

@@ -30,6 +28,8 @@ Use the trash tool to clear everything
3028

3129
Use the exit tool to exit the application
3230

31+
There is an auto-match finder you can disable in settings.
32+
3333

3434
# Run into any issues?
3535

@@ -51,3 +51,4 @@ Go to the issues tab on github and create an issue with the bug name as the titl
5151
- A ton more!
5252

5353
```8/12/24 - v2.0.1 - BUGFIX (If you spawned top side, the app will fill in you and your teammates' spells rather than the enemies lol)```
54+
```10-5-24 - v2.0.3 - BUGFIX + FEATURE (Fixed top/bot side glitch and fixed the unleashed teleport bug. Added mac support)```

main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ var matchDetect;
66

77

88
const isMac = process.platform === "darwin";
9-
9+
// Default 270x360
1010
const mainWidth = 270;
11-
const mainHeight = 370;
11+
const mainHeight = 360;
1212

1313
var data = {
1414
"zoomLevel": 1,
@@ -49,6 +49,7 @@ function createMainWindow(width, height, dev) {
4949
mainWindow.webContents.send("message", data);
5050
//console.log("Sending packet of data to main window...")
5151
}, 100)
52+
mainWindow.webContents.openDevTools()
5253
mainWindow.on("closed", () => {
5354
app.quit();
5455
})
@@ -167,7 +168,7 @@ app.whenReady().then(() => {
167168
// Create settings window
168169
ipcMain.handle("settingsWindow", () => {
169170
if(BrowserWindow.getAllWindows().length < 2) {
170-
createSettingsWindow(500, 500, true);
171+
createSettingsWindow(500, 500, false);
171172
console.log("Created a settings window!")
172173
} else {
173174
console.warn("User attempted to create another settings window but a settings window is already open.");

package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"author": "deR0R0",
1212
"license": "MIT",
1313
"dependencies": {
14-
"electron": "^31.3.1"
14+
"electron": "^31.6.0"
1515
}
1616
}

renderer/main/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,36 @@
1515
<input type="text" class="champion-div-names" maxlength="15">
1616
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerHaste.png" class="champion-div-imgs" width="40" draggable="false">
1717
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerFlash.png" class="champion-div-imgs" width="40" draggable="false">
18-
<span style="top: 18px; right: 67px" class="champion-div-ps">000</span>
19-
<span style="top: 18px; right: 16px" class="champion-div-ps">000</span>
18+
<span style="top: 5vh; right: 24.5vw" class="champion-div-ps">000</span>
19+
<span style="top: 5vh; right: 4.5vw" class="champion-div-ps">000</span>
2020
</div>
2121
<div class="champion-div no-highlight">
2222
<input type="text" class="champion-div-names" maxlength="15">
2323
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerHaste.png" class="champion-div-imgs" width="40" draggable="false">
2424
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerFlash.png" class="champion-div-imgs" width="40" draggable="false">
25-
<span style="top: 73px; right: 67px" class="champion-div-ps">000</span>
26-
<span style="top: 73px; right: 16px" class="champion-div-ps">000</span>
25+
<span style="top: 20.5vh; right: 24.5vw" class="champion-div-ps">000</span>
26+
<span style="top: 20.5vh; right: 4.5vw" class="champion-div-ps">000</span>
2727
</div>
2828
<div class="champion-div no-highlight">
2929
<input type="text" class="champion-div-names" maxlength="15">
3030
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerHaste.png" class="champion-div-imgs" width="40" draggable="false">
3131
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerFlash.png" class="champion-div-imgs" width="40" draggable="false">
32-
<span style="top: 127px; right: 67px" class="champion-div-ps">000</span>
33-
<span style="top: 127px; right: 16px" class="champion-div-ps">000</span>
32+
<span style="top: 35.5vh; right: 24.5vw" class="champion-div-ps">000</span>
33+
<span style="top: 35.5vh; right: 4.5vw" class="champion-div-ps">000</span>
3434
</div>
3535
<div class="champion-div no-highlight">
3636
<input type="text" class="champion-div-names" maxlength="15">
3737
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerHaste.png" class="champion-div-imgs" width="40" draggable="false">
3838
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerFlash.png" class="champion-div-imgs" width="40" draggable="false">
39-
<span style="top: 181px; right: 67px" class="champion-div-ps">000</span>
40-
<span style="top: 181px; right: 16px" class="champion-div-ps">000</span>
39+
<span style="top: 51vh; right: 24.5vw" class="champion-div-ps">000</span>
40+
<span style="top: 51vh; right: 4.5vw" class="champion-div-ps">000</span>
4141
</div>
4242
<div class="champion-div no-highlight">
4343
<input type="text" class="champion-div-names" maxlength="15">
4444
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerHaste.png" class="champion-div-imgs" width="40" draggable="false">
4545
<img src="https://ddragon.leagueoflegends.com/cdn/14.15.1/img/spell/SummonerFlash.png" class="champion-div-imgs" width="40" draggable="false">
46-
<span style="top: 233px; right: 67px" class="champion-div-ps">000</span>
47-
<span style="top: 233px; right: 16px" class="champion-div-ps">000</span>
46+
<span style="top: 66.5vh; right: 24.5vw" class="champion-div-ps">000</span>
47+
<span style="top: 66.5vh; right: 4.5vw" class="champion-div-ps">000</span>
4848
</div>
4949
<!--Toolbar-->
5050
<div class="toolbox no-highlight">

renderer/main/script.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const ipc = window.elecApi;
33

44
// VERSION
5-
const _VERSION_ = "2.0.2";
5+
const _VERSION_ = "2.0.3";
66

77

88
// Elements
@@ -46,6 +46,7 @@ var spellIGNToCodeName = {
4646
"Ghost": "SummonerHaste",
4747
"Heal": "SummonerHeal",
4848
"Teleport": "SummonerTeleport",
49+
"Unleashed Teleport": "SummonerTeleport",
4950
"Smite": "SummonerSmite"
5051
}
5152
var spellDir = {
@@ -422,15 +423,20 @@ function checkMatch(popup) {
422423
.then((response) => response.json())
423424
.then(playerdata => {
424425
try {
425-
currentPlayerTopSide = false;
426+
currentPlayerBotSide = false;
426427
currentPlayer = playerdata.activePlayer.riotId
428+
// i couldn't tell you whats going on if i knew
427429
for(let i=0; i<5; i++) {
428-
if(playerdata.allPlayers[i].riotId != currentPlayer) {
429-
currentPlayerTopSide = true;
430+
console.log(playerdata.allPlayers[i].riotId)
431+
console.log(currentPlayer)
432+
if(playerdata.allPlayers[i].riotId == currentPlayer) {
433+
currentPlayerBotSide = true;
434+
break;
430435
}
431436
}
437+
console.log("-------")
432438
for(let i=0; i<5; i++) {
433-
if(currentPlayerTopSide) {
439+
if(!currentPlayerBotSide) {
434440
playerName = playerdata.allPlayers[i].championName;
435441
} else {
436442
playerName = playerdata.allPlayers[i+5].championName;
@@ -440,7 +446,7 @@ function checkMatch(popup) {
440446
}
441447
for(let i=0; i<10; i+=2) {
442448
x = i / 2
443-
if(currentPlayerTopSide) {
449+
if(!currentPlayerBotSide) {
444450
playerSummonerSpells = playerdata.allPlayers[x].summonerSpells;
445451
} else {
446452
playerSummonerSpells = playerdata.allPlayers[x+5].summonerSpells;

0 commit comments

Comments
 (0)