File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -93,13 +93,17 @@ private static void CollectSpecs()
93
93
#else
94
94
private static void CollectSpecs ( )
95
95
{
96
+ BH . Engine . Base . Compute . StartSuppressRecordingEvents ( true , true , true ) ;
97
+
96
98
m_SpecsWithNames = new Dictionary < string , ForgeTypeId > ( ) ;
97
99
foreach ( PropertyInfo info in typeof ( SpecTypeId ) . GetProperties ( ) )
98
100
{
99
101
ForgeTypeId unitType = info . GetValue ( null ) as ForgeTypeId ;
100
102
if ( unitType != null )
101
103
m_SpecsWithNames . Add ( info . Name , unitType ) ;
102
104
}
105
+
106
+ BH . Engine . Base . Compute . StopSuppressRecordingEvents ( ) ;
103
107
}
104
108
105
109
Original file line number Diff line number Diff line change @@ -93,13 +93,17 @@ private static void CollectUnits()
93
93
94
94
private static void CollectUnits ( )
95
95
{
96
+ BH . Engine . Base . Compute . StartSuppressRecordingEvents ( false , true , true ) ;
97
+
96
98
m_UnitsWithNames = new Dictionary < string , ForgeTypeId > ( ) ;
97
99
foreach ( PropertyInfo info in typeof ( UnitTypeId ) . GetProperties ( ) )
98
100
{
99
101
ForgeTypeId unitType = info . GetValue ( null ) as ForgeTypeId ;
100
102
if ( unitType != null )
101
103
m_UnitsWithNames . Add ( info . Name , unitType ) ;
102
104
}
105
+
106
+ BH . Engine . Base . Compute . StopSuppressRecordingEvents ( ) ;
103
107
}
104
108
105
109
You can’t perform that action at this time.
0 commit comments