Skip to content

Commit

Permalink
Cache all language strings
Browse files Browse the repository at this point in the history
Some lookups are expensive to do in draw()
  • Loading branch information
notfood committed Jun 8, 2019
1 parent f9a990d commit 5e3d75a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Extensions/ResearchProjectDef_Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public static List<Pair<Def, string>> GetUnlockDefsAndDescs( this ResearchProjec

unlocks.AddRange( research.GetThingsUnlocked()
.Where( d => d.IconTexture() != null )
.Select( d => new Pair<Def, string>( d, ResourceBank.String.AllowsBuildingX( d.LabelCap ) ) ) );

.Select(
d => new Pair<Def, string>( d, ResourceBank.String.AllowsBuildingX( d.LabelCap ) ) ) );
unlocks.AddRange( research.GetTerrainUnlocked()
.Where( d => d.IconTexture() != null )
.Select( d => new Pair<Def, string>( d, ResourceBank.String.AllowsBuildingX( d.LabelCap ) ) ) );
Expand Down

0 comments on commit 5e3d75a

Please sign in to comment.