Skip to content
Draft

2.0 #149

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/installer.yml

This file was deleted.

4 changes: 2 additions & 2 deletions PolyMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</RestoreAdditionalProjectSources>
<Configurations>IL2CPP</Configurations>
<RootNamespace>PolyMod</RootNamespace>
<Version>1.2.18</Version>
<Version>2.0.0-pre</Version>
<PolytopiaVersion>2.17.3.16375</PolytopiaVersion>
<Authors>PolyModdingTeam</Authors>
<Description>The Battle of Polytopia's mod loader.</Description>
Expand All @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.785" />
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.788" />
<PackageReference Include="Costura.Fody" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| | x86 | ARM |
|:-------:|:---:|:---:|
| Windows | ✅ | ❌ |
| Linux | ⏺️ | ❌ |
| MacOS | ⏺️ | ❌ |
| Linux | ✅ | ❌ |
| MacOS | ❌ | ❌ |
| Android | ➖ | 🚧 |
| IOS | ➖ | ❌ |
19 changes: 0 additions & 19 deletions installer/build.py

This file was deleted.

Binary file removed installer/icon.ico
Binary file not shown.
154 changes: 0 additions & 154 deletions installer/main.py

This file was deleted.

4 changes: 0 additions & 4 deletions installer/requirements.txt

This file was deleted.

34 changes: 21 additions & 13 deletions resources/localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,14 @@
"Russian": "{0} задан на {1}!",
"Elyrion": "{0} iȓ ȓ∑Ŧ Ŧȱ {1}!"
},
"polymod_hub_spriteinfo_update": {
"English": "UPDATE SPRITES",
"Russian": "ОБНОВИТЬ СПРАЙТЫ",
"Elyrion": "₺πΔaŦ∑ ȓπriŦ∑ȓ"
},
"polymod_spriteinfo_updated": {
"English": "Sprite info for mod {0} updated!",
"Russian": "Данные спрайтов обновлены для мода {0}!",
"Elyrion": "ȓπriŦ∑ iŋ₼ȱ ₼ȱr mȱΔ {0} ₺πΔaŦ∑Δ!"
},
"polymod_spriteinfo_notupdated": {
"English": "No sprite infos were found!",
"polymod_hub_hotreload": {
"English": "HOT RELOAD"
},
"polymod_hotreload_success": {
"English": "Hot reload completed for the mod {0}!"
},
"polymod_hotreload_failure": {
"English": "No mods for hot reload!",
"Russian": "Данные спрайтов не найдены!",
"Elyrion": "ŋȱ ȓπriŦ∑ iŋ₼ȱȓ ~∑r∑ ₼ȱ₺ŋΔ!"
},
Expand All @@ -242,5 +238,17 @@
"English": "PROCEED",
"Russian": "ПРОДОЛЖИТЬ",
"Elyrion": "πrȱ#∑∑Δ"
},
"polymod_title_invalid": {
"English": "Invalid Launch",
"Russian": "Неверный Запуск"
},
"polymod_description_invalid": {
"English": "PolyMod launch was invalid. Please, open the game via the PolyMod Launcher or proceed to our site to install it :)",
"Russian": "PolyMod запущен неккоректно. Пожалуйста, откройте игру через PolyMod Launcher или перейдите на наш сайт и установите его :)"
},
"buttons_download_launcher": {
"English": "OUR SITE",
"Russian": "НАШ САЙТ"
}
}
}
29 changes: 29 additions & 0 deletions src/Json/EnumNameJson.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Text.Json;
using System.Text.Json.Serialization;

namespace PolyMod.Json;

/// <summary>
/// Converts fixed (non-extensible) enums to and from their plain string names.
/// Use this for enums that are not registered in EnumCache.
/// </summary>
public class EnumNameJson<EnumType> : JsonConverter<EnumType> where EnumType : struct, Enum
{
public override EnumType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
string? enumName = reader.GetString();

if (enumName != null && Enum.TryParse(enumName, true, out EnumType parsedValue))
{
return parsedValue;
}

string validNames = string.Join(", ", Enum.GetNames(typeof(EnumType)));
throw new JsonException($"Unknown {typeof(EnumType).Name} value '{enumName}'. Valid values: {validNames}");
}

public override void Write(Utf8JsonWriter writer, EnumType value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString());
}
}
Loading
Loading