Add build_patch task

This commit is contained in:
2024-08-26 15:49:34 -03:00
parent fc3472692b
commit 60f8efc6df
3 changed files with 49 additions and 0 deletions

29
build_patch/patch.diff Normal file
View File

@ -0,0 +1,29 @@
233a234
> import os # @UnresolvedImport
236a238,263
>
> # MODS STUFF
> APP_ID = 1895350
>
> if not renpy.android:
> try: # Android will try to run this for some reason and fail
> mod_paths = [
> f"../../workshop/content/{APP_ID}/",
> f"/Users/{os.getlogin()}/Library/Application Support/Steam/steamapps/workshop/content/{APP_ID}/",
> os.path.expanduser(f"~/Library/Application Support/Steam/steamapps/workshop/content/{APP_ID}/")
> ]
> except:
> mod_paths = []
>
> new_paths = []
> for path in mod_paths:
> try:
> if os.path.exists(path):
> for name in os.listdir(path):
> full_path = os.path.join(path, name)
> if os.path.isdir(full_path):
> new_paths.append(full_path)
> except Exception as e:
> renpy.display.log.write(f"Error while adding mod search paths: {e}")
>
> searchpath += new_paths