File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,8 +91,15 @@ private void LoadNpcs(Savegame? savegame)
9191 return ;
9292 }
9393
94+ var groupBy = vailWorldSim [ "Spawners" ] ? . ToObject < List < Spawner > > ( ) ?
95+ . GroupBy ( s => s . UniqueId )
96+ . Where ( g => g . ToList ( ) . Count > 1 )
97+ . ToDictionary ( g => g . Key , g => g . ToList ( ) ) ;
98+
99+
94100 var spawnersBySpawnerUniqueId = vailWorldSim [ "Spawners" ] ? . ToObject < List < Spawner > > ( ) ?
95- . ToDictionary ( s => s . UniqueId ) ?? new Dictionary < int , Spawner > ( ) ;
101+ . GroupBy ( s => s . UniqueId )
102+ . ToDictionary ( s => s . Key , s => s . First ( ) ) ?? new Dictionary < int , Spawner > ( ) ;
96103 var influenceMemoryByUniqueId = vailWorldSim [ "InfluenceMemory" ] ? . ToObject < List < InfluenceMemory > > ( ) ?
97104 . GroupBy ( s => s . UniqueId )
98105 . ToDictionary ( s => s . Key , s => s . ToList ( ) ) ?? new Dictionary < int , List < InfluenceMemory > > ( ) ;
You can’t perform that action at this time.
0 commit comments