@@ -74,9 +74,10 @@ public class PreviewTile
7474 public static Dictionary < string , AudioSource > audioClips = new ( ) ;
7575 public static Dictionary < string , Mod > mods = new ( ) ;
7676 public static Dictionary < int , int > climateToTribeData = new ( ) ;
77- public static Dictionary < string , List < PreviewTile > > tribePreviews = new ( ) ;
78- public static int climateAutoidx = ( int ) Enum . GetValues ( typeof ( TribeData . Type ) ) . Cast < TribeData . Type > ( ) . Last ( ) ;
79- public static bool shouldInitializeSprites = true ;
77+ private static List < TribeData . Type > customTribes = new ( ) ;
78+ internal static Dictionary < string , List < PreviewTile > > tribePreviews = new ( ) ;
79+ private static int climateAutoidx = ( int ) Enum . GetValues ( typeof ( TribeData . Type ) ) . Cast < TribeData . Type > ( ) . Last ( ) ;
80+ private static bool shouldInitializeSprites = true ;
8081
8182
8283 [ HarmonyPrefix ]
@@ -100,6 +101,16 @@ private static void PurchaseManager_IsSkinUnlocked(ref bool __result, SkinType s
100101 __result = ( ( int ) skinType >= Plugin . AUTOIDX_STARTS_FROM && ( int ) skinType != 2000 ) || __result ;
101102 }
102103
104+ [ HarmonyPostfix ]
105+ [ HarmonyPatch ( typeof ( PurchaseManager ) , nameof ( PurchaseManager . GetUnlockedTribes ) ) ]
106+ private static void PurchaseManager_GetUnlockedTribes (
107+ ref Il2CppSystem . Collections . Generic . List < TribeData . Type > __result ,
108+ bool forceUpdate = false
109+ )
110+ {
111+ foreach ( var tribe in customTribes ) __result . Add ( tribe ) ;
112+ }
113+
103114 [ HarmonyPrefix ]
104115 [ HarmonyPatch ( typeof ( AudioManager ) , nameof ( AudioManager . SetAmbienceClimate ) ) ]
105116 private static void AudioManager_SetAmbienceClimatePrefix ( ref int climate )
@@ -419,6 +430,7 @@ private static void GameLogicDataPatch(JObject gld, JObject patch)
419430 {
420431 case "tribeData" :
421432 EnumCache < TribeData . Type > . AddMapping ( id , ( TribeData . Type ) autoidx ) ;
433+ customTribes . Add ( ( TribeData . Type ) autoidx ) ;
422434 climateToTribeData [ climateAutoidx ++ ] = autoidx ;
423435 break ;
424436 case "techData" :
0 commit comments