@@ -179,26 +179,23 @@ private static void GameModeScreen_Init(GameModeScreen __instance)
179179
180180 [ HarmonyPrefix ]
181181 [ HarmonyPatch ( typeof ( TechView ) , nameof ( TechView . CreateNode ) ) ]
182- private static bool TechView_CreateNode ( TechView __instance , TechData data , TechItem parentItem , float angle ) {
183- float baseAngle = 360 / GameManager . GameState . GameLogicData . GetTechData ( TechData . Type . Basic ) . techUnlocks . Count ;
182+ public static bool TechView_CreateNode ( TechView __instance , TechData data , TechItem parentItem , float angle )
183+ {
184+ GameLogicData gameLogicData = GameManager . GameState . GameLogicData ;
185+ TribeData tribeData = gameLogicData . GetTribeData ( GameManager . LocalPlayer . tribe ) ;
186+ float baseAngle = 360 / gameLogicData . GetOverride ( gameLogicData . GetTechData ( TechData . Type . Basic ) , tribeData ) . techUnlocks . Count ;
184187 float childAngle = 0f ;
185188 if ( parentItem != null )
186- {
187189 childAngle = angle + baseAngle * ( data . techUnlocks . Count - 1 ) / 2f ;
188- }
189- GameLogicData gameLogicData = GameManager . GameState . GameLogicData ;
190- TribeData tribeData = gameLogicData . GetTribeData ( GameManager . LocalPlayer . tribe ) ;
191- foreach ( TechData techData in data . techUnlocks )
190+ foreach ( var techData in data . techUnlocks )
192191 {
193192 if ( gameLogicData . TryGetData ( techData . type , out TechData techData2 ) )
194193 {
195- TechData @override = GameManager . GameState . GameLogicData . GetOverride ( techData , tribeData ) ;
194+ TechData @override = gameLogicData . GetOverride ( techData , tribeData ) ;
196195 TechItem techItem = __instance . CreateTechItem ( @override , parentItem , childAngle ) ;
197196 __instance . currTechIdx ++ ;
198197 if ( @override . techUnlocks != null && @override . techUnlocks . Count > 0 )
199- {
200198 __instance . CreateNode ( @override , techItem , childAngle ) ;
201- }
202199 childAngle -= baseAngle ;
203200 }
204201 }
0 commit comments