Skip to content

Commit b3e0719

Browse files
committed
Merge branch 'dev1.2' into autoupdate
2 parents 79cf372 + 1f9cd49 commit b3e0719

File tree

18 files changed

+936
-173
lines changed

18 files changed

+936
-173
lines changed

PolyMod.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</RestoreAdditionalProjectSources>
1212
<Configurations>IL2CPP</Configurations>
1313
<Version>1.2.0-pre</Version>
14-
<PolytopiaVersion>2.12.3.14031</PolytopiaVersion>
14+
<PolytopiaVersion>2.13.0.14218</PolytopiaVersion>
1515
<Authors>PolyModdingTeam</Authors>
1616
<Description>The Battle of Polytopia's mod loader.</Description>
1717
<NoWarn>IDE0130</NoWarn>

installer/main.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import zipfile
66
import requests
77
import threading
8+
import subprocess
89
import customtkinter
910
import CTkMessagebox as messagebox
1011

@@ -78,7 +79,7 @@ def install(path):
7879
)
7980
progress_bar.step()
8081

81-
customtkinter.CTkButton(app, text="Launch", command=launch).grid(
82+
customtkinter.CTkButton(app, text="Launch", command=lambda: launch(path)).grid(
8283
column=0, row=2, columnspan=2, padx=5, pady=5
8384
)
8485

@@ -111,8 +112,13 @@ def uninstall(path):
111112
)
112113

113114

114-
def launch():
115-
os.startfile("steam://rungameid/874390")
115+
def launch(path):
116+
if sys.platform != "win32":
117+
subprocess.check_call(f"chmod +x {path}/run_bepinex.sh", shell=True)
118+
subprocess.check_call(f"{path}/run_bepinex.sh {path}/Polytopia.*", shell=True)
119+
subprocess.check_call(f"xdg-open https://docs.bepinex.dev/articles/advanced/steam_interop.html", shell=True)
120+
else:
121+
subprocess.check_call(f"start steam://rungameid/874390", shell=True)
116122
quit()
117123

118124

resources/localization.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,33 @@
172172
"polymod_autoupdate_update": {
173173
"English": "Update",
174174
"Russian": "Обновить"
175+
},
176+
"polymod_hub_config": {
177+
"English": "CONFIG",
178+
"Russian": "КОНФИГ"
179+
},
180+
"polymod_hub_config_enable": {
181+
"English": "ENABLE {0}",
182+
"Russian": "ВКЛЮЧИТЬ {0}"
183+
},
184+
"polymod_hub_config_disable": {
185+
"English": "DISABLE {0}",
186+
"Russian": "ВЫЛЮЧИТЬ {0}"
187+
},
188+
"polymod_config_setto": {
189+
"English": "{0} is set to {1}!",
190+
"Russian": "{0} задан на {1}!"
191+
},
192+
"polymod_hub_spriteinfo_update": {
193+
"English": "UPDATE SPRITES",
194+
"Russian": "ОБНОВИТЬ СПРАЙТЫ"
195+
},
196+
"polymod_spriteinfo_updated": {
197+
"English": "Sprite info for mod {0} updated!",
198+
"Russian": "Данные спрайтов обновлены для мода {0}!"
199+
},
200+
"polymod_spriteinfo_notupdated": {
201+
"English": "No sprite infos were found!",
202+
"Russian": "Данные спрайтов не найдены!"
175203
}
176204
}

src/Json/EnumCacheJson.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Text.Json.Serialization;
33

44
namespace PolyMod.Json;
5+
56
internal class EnumCacheJson<T> : JsonConverter<T> where T : struct, Enum
67
{
78
public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

src/Json/Vector2Json.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using UnityEngine;
44

55
namespace PolyMod.Json;
6+
67
internal class Vector2Json : JsonConverter<Vector2>
78
{
89
public override Vector2 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

src/Json/VersionJson.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Text.Json.Serialization;
33

44
namespace PolyMod.Json;
5+
56
internal class VersionJson : JsonConverter<Version>
67
{
78
public override Version? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

0 commit comments

Comments
 (0)