Skip to content

Commit

Permalink
feat: show base effects in module customization UI
Browse files Browse the repository at this point in the history
  • Loading branch information
SWeini authored and shpaass committed Jan 6, 2025
1 parent 981f1fe commit 7e4af85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Yafc/Workspace/ProductionTable/ModuleCustomizationScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ void doToSelectedItem(EntityCrafter selectedCrafter) {
DrawRecipeModules(gui, modules.beacon, ref effects);
}

if (recipe?.entity?.target.effectReceiver.baseEffect is { } baseEffect) {
effects.productivity += baseEffect.productivity;
effects.speed += baseEffect.speed;
effects.consumption += baseEffect.consumption;
}

if (recipe != null) {
float craftingSpeed = (recipe.entity?.GetCraftingSpeed() ?? 1f) * effects.speedMod;
gui.BuildText("Current effects:", Font.subheader);
Expand Down

0 comments on commit 7e4af85

Please sign in to comment.