Skip to content

Commit

Permalink
Don't show ingredient, product, or module dropdowns for disabled reci…
Browse files Browse the repository at this point in the history
…pes.
  • Loading branch information
DaleStan authored and shpaass committed May 14, 2024
1 parent 35806d6 commit 39ee2c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Yafc/Workspace/ProductionTable/ProductionTableView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public override void BuildElement(ImGui gui, RecipeRow recipe) {
using var grid = gui.EnterInlineGrid(3f);
if (recipe.parameters.modules.modules == null || recipe.parameters.modules.modules.Length == 0) {
grid.Next();
if (gui.BuildFactorioObjectWithAmount(null, 0, UnitOfMeasure.None)) {
if (gui.BuildFactorioObjectWithAmount(null, 0, UnitOfMeasure.None) && recipe.hierarchyEnabled) {
ShowModuleDropDown(gui, recipe);
}
}
Expand Down Expand Up @@ -888,7 +888,7 @@ private void BuildGoodsIcon(ImGui gui, Goods goods, ProductionLink link, float a
textColor = SchemeColor.BackgroundTextFaint;
}

if (gui.BuildFactorioObjectWithAmount(goods, amount, goods?.flowUnitOfMeasure ?? UnitOfMeasure.None, iconColor, textColor)) {
if (gui.BuildFactorioObjectWithAmount(goods, amount, goods?.flowUnitOfMeasure ?? UnitOfMeasure.None, iconColor, textColor) && goods is not null) {
OpenProductDropdown(gui, gui.lastRect, goods, amount, link, dropdownType, recipe, context, variants);
}
}
Expand Down

0 comments on commit 39ee2c7

Please sign in to comment.