File tree Expand file tree Collapse file tree 3 files changed +44
-2
lines changed
Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 1010 https://polymod.dev/nuget/v3/index.json;
1111 </RestoreAdditionalProjectSources >
1212 <Configurations >IL2CPP</Configurations >
13- <Version >1.1.8 </Version >
13+ <Version >1.3.0-pre </Version >
1414 <PolytopiaVersion >2.13.0.14218</PolytopiaVersion >
1515 <Authors >PolyModdingTeam</Authors >
1616 <Description >The Battle of Polytopia's mod loader.</Description >
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Threading . Tasks ;
5+ using HarmonyLib ;
6+
7+ namespace PolyMod . Managers
8+ {
9+ public static class Multiplayer
10+ {
11+ internal static void Init ( )
12+ {
13+ Harmony . CreateAndPatchAll ( typeof ( Multiplayer ) ) ;
14+ BuildConfigHelper . GetSelectedBuildConfig ( ) . buildServerURL = BuildServerURL . Custom ;
15+ BuildConfigHelper . GetSelectedBuildConfig ( ) . customServerURL = Plugin . config . backendUrl ;
16+ }
17+
18+ [ HarmonyPostfix ]
19+ [ HarmonyPatch ( typeof ( MultiplayerScreen ) , nameof ( MultiplayerScreen . Show ) ) ]
20+ public static void MultiplayerScreen_Show ( MultiplayerScreen __instance )
21+ {
22+ __instance . multiplayerSelectionScreen . TournamentsButton . gameObject . SetActive ( false ) ;
23+ }
24+
25+
26+ [ HarmonyPostfix ]
27+ [ HarmonyPatch ( typeof ( ProfileScreen ) , nameof ( ProfileScreen . Start ) ) ]
28+ public static void ProfileScreen_Start ( ProfileScreen __instance )
29+ {
30+ }
31+
32+ [ HarmonyPostfix ]
33+ [ HarmonyPatch ( typeof ( StartScreen ) , nameof ( StartScreen . Start ) ) ]
34+ private static void StartScreen_Start ( StartScreen __instance )
35+ {
36+ __instance . highscoreButton . gameObject . SetActive ( false ) ;
37+ __instance . weeklyChallengesButton . gameObject . SetActive ( false ) ;
38+ }
39+ }
40+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ namespace PolyMod;
1010public partial class Plugin : BepInEx . Unity . IL2CPP . BasePlugin
1111{
1212 internal record PolyConfig (
13- bool debug = false
13+ bool debug = false ,
14+ string backendUrl = "http://127.0.0.1:8090"
1415 ) ;
1516
1617 internal const int AUTOIDX_STARTS_FROM = 1000 ;
@@ -59,6 +60,7 @@ public override void Load()
5960 Hub . Init ( ) ;
6061
6162 Main . Init ( ) ;
63+ Multiplayer . Init ( ) ;
6264 }
6365
6466 internal static Stream GetResource ( string id )
You can’t perform that action at this time.
0 commit comments