@@ -17,8 +17,8 @@ public void ChangeFuelEntityModules_ShouldPreserveFixedAmount() {
17
17
table . AddRecipe ( Database . recipes . all . Single ( r => r . name == "recipe" ) , DataUtils . DeterministicComparer ) ;
18
18
RecipeRow row = table . GetAllRecipes ( ) . Single ( ) ;
19
19
20
- table . modules . beacon = Database . allBeacons . Single ( ) ;
21
- table . modules . beaconModule = Database . allModules . Single ( m => m . name == "speed-module" ) ;
20
+ table . modules . beacon = new ( Database . allBeacons . Single ( ) , Quality . Normal ) ;
21
+ table . modules . beaconModule = new ( Database . allModules . Single ( m => m . name == "speed-module" ) , Quality . Normal ) ;
22
22
table . modules . beaconsPerBuilding = 2 ;
23
23
table . modules . autoFillPayback = MathF . Sqrt ( float . MaxValue ) ;
24
24
@@ -28,7 +28,7 @@ public void ChangeFuelEntityModules_ShouldPreserveFixedAmount() {
28
28
// assert will ensure the currently fixed value has not changed by more than 0.01%.
29
29
static void testCombinations ( RecipeRow row , ProductionTable table , Action assert ) {
30
30
foreach ( EntityCrafter crafter in Database . allCrafters ) {
31
- row . entity = crafter ;
31
+ row . entity = new ( crafter , Quality . Normal ) ;
32
32
33
33
foreach ( Goods fuel in crafter . energy . fuels ) {
34
34
row . fuel = fuel ;
@@ -37,7 +37,7 @@ static void testCombinations(RecipeRow row, ProductionTable table, Action assert
37
37
ModuleTemplateBuilder builder = new ( ) ;
38
38
39
39
if ( module != null ) {
40
- builder . list . Add ( ( module , 0 ) ) ;
40
+ builder . list . Add ( ( new ( module , Quality . Normal ) , 0 ) ) ;
41
41
}
42
42
43
43
row . modules = builder . Build ( row ) ;
@@ -70,7 +70,7 @@ public void ChangeProductionTableModuleConfig_ShouldPreserveFixedAmount() {
70
70
// Call assert for each combination. assert will ensure the currently fixed value has not changed by more than 0.01%.
71
71
void testCombinations ( RecipeRow row , ProductionTable table , Action assert ) {
72
72
foreach ( EntityCrafter crafter in Database . allCrafters ) {
73
- row . entity = crafter ;
73
+ row . entity = new ( crafter , Quality . Normal ) ;
74
74
75
75
foreach ( Goods fuel in crafter . energy . fuels ) {
76
76
row . fuel = fuel ;
@@ -82,14 +82,14 @@ void testCombinations(RecipeRow row, ProductionTable table, Action assert) {
82
82
// Pre-emptive code for if ProductionTable.modules is made writable.
83
83
// The ProductionTable.modules setter must notify all relevant recipes if it is added.
84
84
_ = method . Invoke ( table , [ new ModuleFillerParameters ( table ) {
85
- beacon = beacon ,
86
- beaconModule = module ,
85
+ beacon = new ( beacon , Quality . Normal ) ,
86
+ beaconModule = new ( module , Quality . Normal ) ,
87
87
beaconsPerBuilding = beaconCount ,
88
88
} ] ) ;
89
89
}
90
90
else {
91
- table . modules . beacon = beacon ;
92
- table . modules . beaconModule = module ;
91
+ table . modules . beacon = new ( beacon , Quality . Normal ) ;
92
+ table . modules . beaconModule = new ( module , Quality . Normal ) ;
93
93
table . modules . beaconsPerBuilding = beaconCount ;
94
94
}
95
95
table . Solve ( ( ProjectPage ) table . owner ) . Wait ( ) ;
@@ -140,7 +140,7 @@ private static void RunTest(RecipeRow row, Action<RecipeRow, ProductionTable, Ac
140
140
141
141
// The complicated tests for when the fixed value is expected to reset when fixed fuels are involved.
142
142
Action testFuel ( RecipeRow row , ProductionTable table ) => ( ) => {
143
- if ( row . entity . energy . fuels . Contains ( oldFuel ) ) {
143
+ if ( row . entity . target . energy . fuels . Contains ( oldFuel ) ) {
144
144
Assert . Equal ( fuelAmount , row . FuelInformation . Amount , fuelAmount * .0001 ) ;
145
145
assertCalls ++ ;
146
146
}
0 commit comments