Skip to content

Commit

Permalink
Auto-assign beacons to recipes before modules. (#120)
Browse files Browse the repository at this point in the history
This way, effectivity modules will fill to the limit or to the point of
counteracting the beacons' effects, rather than stopping at 80% of the
0-beacon consumption.

In the attached IR3 yafc file (save also attached) the original behavior
incorrectly auto-assigned two EFF 3 modules to the recipe, when it
should have received four. The recipe should get four modules because
there are four speed beacons also affecting the building, substantially
increasing its consumption. Switching the order to assign beacons first
causes the EFF modules to get auto-added correctly.

[IR
test.zip](https://github.com/have-fun-was-taken/yafc-ce/files/15268818/IR.test.zip)
[IR3
game.zip](https://github.com/have-fun-was-taken/yafc-ce/files/15268826/IR3.game.zip)

(This is rebased from ShadowTheAge#201)
  • Loading branch information
shpaass committed May 10, 2024
2 parents 950402e + 34a23e0 commit 128596e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Yafc.Model/Model/ModuleFillerParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void AutoFillModules(RecipeParameters recipeParams, Recipe recipe, Entity
}

public void GetModulesInfo(RecipeParameters recipeParams, Recipe recipe, EntityCrafter entity, Goods fuel, ref ModuleEffects effects, ref RecipeParameters.UsedModule used) {
AutoFillModules(recipeParams, recipe, entity, fuel, ref effects, ref used);
AutoFillBeacons(recipeParams, recipe, entity, fuel, ref effects, ref used);
AutoFillModules(recipeParams, recipe, entity, fuel, ref effects, ref used);
}

private void AddModuleSimple(Item module, ref ModuleEffects effects, EntityCrafter entity, ref RecipeParameters.UsedModule used) {
Expand Down

0 comments on commit 128596e

Please sign in to comment.