1.6 to main #1
@@ -246,7 +246,8 @@ public sealed class Buildings : ClassWithFishPrepatches
|
||||
|
||||
if (b.Faction == Faction.OfPlayer)
|
||||
{
|
||||
cache.ColonistBuildingsByDef.GetOrAdd(def).Add(b);
|
||||
if (!cache.ColonistBuildingsByDef.GetOrAdd(def).TryAdd(b))
|
||||
return;
|
||||
if (b is Building_ResearchBench researchBench)
|
||||
cache.ColonistResearchBenches.Add(researchBench);
|
||||
|
||||
@@ -266,7 +267,7 @@ public sealed class Buildings : ClassWithFishPrepatches
|
||||
}
|
||||
else
|
||||
{
|
||||
cache.NonColonistBuildingsByDef.GetOrAdd(def).Add(b);
|
||||
cache.NonColonistBuildingsByDef.GetOrAdd(def).TryAdd(b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user