File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,8 @@ private void GenerateTemporaryFaction()
5454 private void GeneratePawnsForConfigurePage ( )
5555 {
5656 var prevProgramState = Current . programStateInt ;
57+ SetEntryProgramStateForCorrectPawnCreation ( ) ;
5758
58- // Old Comment: Set ProgramState.Entry so that InInterface is false
59- // TODO: Why is this necessary?
60- // TODO: feel like there is a better way to do this
61- Current . programStateInt = ProgramState . Entry ;
6259 Current . Game . InitData . playerFaction = _temporaryFactionForPawnCreation ;
6360
6461 try
@@ -71,6 +68,16 @@ private void GeneratePawnsForConfigurePage()
7168 }
7269 }
7370
71+ private static void SetEntryProgramStateForCorrectPawnCreation ( )
72+ {
73+ // Set ProgramState.Entry to ensure InInterface is false.
74+ // (#508 Tick-git) InInterface seems unrelated to PawnCreation to me,
75+ // but it's necessary because it makes Faction.OfPlayer return
76+ // the temporary generated faction — which is required for proper apparel generation.
77+
78+ Current . programStateInt = ProgramState . Entry ;
79+ }
80+
7481 private void GeneratingPawns ( )
7582 {
7683 _scenario . PostIdeoChosen ( ) ;
You can’t perform that action at this time.
0 commit comments