File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -109,15 +109,12 @@ internal record TypeMapping(Type type, bool shouldCreateCache = true);
109109
110110 [ typeof ( UnitData . Type ) ] = new ( ( token , duringEnumCacheCreation ) =>
111111 {
112- if ( duringEnumCacheCreation )
112+ if ( ! duringEnumCacheCreation )
113113 {
114114 if ( token [ "prefab" ] != null )
115115 {
116- Registry . prefabNames . Add ( ( int ) ( UnitData . Type ) Registry . autoidx , CultureInfo . CurrentCulture . TextInfo . ToTitleCase ( token [ "prefab" ] ! . ToString ( ) ) ) ;
116+ Registry . prefabNames . Add ( ( int ) ( UnitData . Type ) ( int ) token [ "idx" ] , CultureInfo . CurrentCulture . TextInfo . ToTitleCase ( token [ "prefab" ] ! . ToString ( ) ) ) ;
117117 }
118- }
119- else
120- {
121118 if ( token [ "embarksTo" ] != null )
122119 {
123120 string unitId = Util . GetJTokenName ( token ) ;
You can’t perform that action at this time.
0 commit comments