Skip to content

Commit 06a3579

Browse files
committed
RELEASE THE GATES
1 parent 32abdca commit 06a3579

File tree

7 files changed

+52
-22
lines changed

7 files changed

+52
-22
lines changed

assets/scripts/modlist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function generateModItems(modData) {
100100

101101
// Add download count and score
102102
const downloadsDiv = document.createElement('div');
103-
downloadsDiv.style = "font-size: 18px;";
103+
downloadsDiv.style = "font-size: 20px;";
104104
downloadsDiv.innerHTML = `
105105
<img src="/assets/web/download.png" style="vertical-align: middle; width: 22px; height: 22px;"/> ${mod.totalDownloads.toLocaleString()}
106106
<img src="/assets/web/like.png" style="vertical-align: middle; width: 22px; height: 22px;"/> ${mod.modScore.toLocaleString()}

data/config.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

main.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
</div>
118118
</div>
119119

120-
<div id="creditsMenu" class="settingTab">
120+
<div id="creditsMenu" class="settingTab" style="font-size: 18px;">
121121
<text>Credits to Zoiudolo for the Rod n' Mod Banner, Icons, Point & Click cursors</text><br>
122122
<text>westwerst for the Game Sounds & Cursor</text>
123123
</div>
@@ -200,9 +200,15 @@
200200
</div>
201201
</div>
202202

203-
<button type="normalButton" style="width: 150px; margin-left: auto;" onmouseup="handleChange()">
204-
<text style="pointer-events: none;">REFRESH MODS</text>
205-
</button>
203+
<div style="margin-left: auto;">
204+
<button type="normalButton" style="width: 125px;" onmouseup="window.pywebview.api.updateAllMods()">
205+
<text style="pointer-events: none;">UPDATE MODS</text>
206+
</button>
207+
208+
<button type="normalButton" style="width: 140px;" onmouseup="handleChange()">
209+
<text style="pointer-events: none;">REFRESH MODS</text>
210+
</button>
211+
</div>
206212
</div>
207213
</div>
208214

main.py

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from json import load, dump
66
from rapidfuzz import fuzz, process
77
from webbrowser import open as openWeb
8-
from os import path, rename, walk, chdir
98
from re import IGNORECASE, compile as comp
109
from psutil import process_iter, NoSuchProcess
10+
from os import path, rename, walk, chdir, listdir
1111
from webview import create_window, start, windows as webWindows
1212

1313
from rodnmod.fishfinder import findWebfishing
@@ -55,11 +55,18 @@ def launchWebfishing(self, vanilla: bool = False):
5555
def configure(self, configItem: str, configValue = None):
5656
configPath = "data/config.json"
5757
if not path.exists(configPath):
58-
default_config = {"debugging": "debdis"}
58+
default_config = {
59+
"debugging": "debdis",
60+
"hlsmods": "findhls",
61+
"reelsound": "reel",
62+
"transition": "transition",
63+
"filter": "installed",
64+
"category": "all",
65+
"nsfw": "hidensfw"
66+
}
5967
with open(configPath, 'w') as file:
6068
dump(default_config, file, indent=4)
6169

62-
# If config file exists, load it
6370
with open(configPath) as file:
6471
config = load(file)
6572

@@ -270,12 +277,12 @@ def downloadMod(self, mod: str):
270277
if dependencyPath:
271278
try:
272279
with open(dependencyPath + "\\rnmInfo.json", "r") as f:
273-
mnrInfo = load(f)
280+
rnmInfo = load(f)
274281
except:
275282
# cant do anything about this, probbably a mod installed via HLS.
276-
mnrInfo = {"version": "1.0.0"}
283+
rnmInfo = {"version": "1.0.0"}
277284

278-
if mnrInfo["version"] != dependencyVersion:
285+
if rnmInfo["version"] != dependencyVersion:
279286
download(dependencyDownload, installationPath + "\\GDWeave\\mods", {"name": dependencyName, "author": dependencyAuthor, "version": dependencyVersion})
280287

281288
else:
@@ -288,15 +295,15 @@ def downloadMod(self, mod: str):
288295
try:
289296
if modPath != None:
290297
with open(modPath + "\\rnmInfo.json", "r") as f:
291-
mnrInfo = load(f)
298+
rnmInfo = load(f)
292299

293-
if mnrInfo["version"] != modVersion:
300+
if rnmInfo["version"] != modVersion:
294301
download(modDownload, installationPath + "\\GDWeave\\mods", {"name": modName, "author": modAuthor, "version": modVersion})
295302
window.evaluate_js(f"notify('{modName} has been updated successfully!', 3000)")
296303
else:
297304
window.evaluate_js(f"notify('{modName} is currently up to date!', 3000)")
298305

299-
except FileNotFoundError: # mnrInfo.json missing, skip version check and download mod immediately instead
306+
except FileNotFoundError: # rnmInfo.json missing, skip version check and download mod immediately instead
300307
window.evaluate_js(f"notify('rnmInfo.json for {modName} missing. Forcing download...', 3000)")
301308
download(modDownload, installationPath + "\\GDWeave\\mods", {"name": modName, "author": modAuthor, "version": modVersion})
302309

@@ -330,6 +337,28 @@ def uninstallMod(self, mod: str, checkExists: bool = False):
330337
except PermissionError:
331338
window.evaluate_js(f"notify('Permission denied! Please close WEBFISHING first to uninstall the mod!', 3000)")
332339

340+
def updateAllMods(self):
341+
window.evaluate_js(f"notify('Updating Mods...', 3000)")
342+
fpath = installationPath + "\\GDWeave\\mods"
343+
folders = [entry for entry in listdir(fpath) if path.isdir(path.join(fpath, entry))]
344+
345+
for mod in folders:
346+
try: mod = mod.split(".")[1]
347+
except IndexError: pass
348+
_, value = next(iter(self.searchModList(mod, "none", "all", "shownsfw").items()))
349+
350+
try:
351+
with open(f"{fpath}\\" + value.get("modAuthor") + "." + value.get("modName") + "\\rnmInfo.json", "r") as f:
352+
modInfo = load(f)
353+
except FileNotFoundError:
354+
modInfo = {"version": "null"}
355+
356+
if value.get("latestVersion") != modInfo["version"]:
357+
self.downloadMod(value.get("modAuthor") + "-" + value.get("modName"))
358+
359+
window.evaluate_js(f"notify('Updated all mods!', 3000)")
360+
361+
333362
rnm = RodNMod()
334363

335364
if __name__ == "__main__":

rodnmod/fishfinder.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ def findWebfishing():
3131
if path.isfile(path.join(installationPath, "webfishing.exe")):
3232
return installationPath
3333

34-
return None
35-
36-
print(findWebfishing())
34+
return None

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
setup(
2222
name="Rod n' Mod",
2323
version=version,
24-
description="A webfishing-themed mod manager!",
24+
description="Rod n' Mod",
2525
options={
2626
"build_exe": {
2727
"include_files": include_files,

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.3.0-alpha"
2+
"version": "1.3.1-alpha"
33
}

0 commit comments

Comments
 (0)