@@ -124,7 +124,7 @@ private void OpenProductDropdown(ImGui targetGui, Rect rect, Goods goods, float
124124
125125 void DropDownContent ( ImGui gui , ref bool close )
126126 {
127- if ( type == ProductDropdownType . Fuel && recipe ? . entity != null && recipe . entity . energy . fuels . Count > 1 )
127+ if ( type == ProductDropdownType . Fuel && recipe ? . entity != null && ( recipe . entity . energy . fuels . Count > 1 || recipe . entity . energy . fuels [ 0 ] != recipe . fuel ) )
128128 {
129129 close |= gui . BuildInlineObejctListAndButton ( recipe . entity . energy . fuels , DataUtils . FavouriteFuel , selectFuel , "Select fuel" , extra : fuelDisplayFunc ) ;
130130 }
@@ -259,7 +259,7 @@ private void BuildGoodsIcon(ImGui gui, Goods goods, ProductionLink link, float a
259259 {
260260 var linkIsError = link != null && ( ( link . flags & ( ProductionLink . Flags . HasProductionAndConsumption | ProductionLink . Flags . LinkRecursiveNotMatched | ProductionLink . Flags . ChildNotMatched ) ) != ProductionLink . Flags . HasProductionAndConsumption ) ;
261261 var linkIsForeign = link != null && link . owner != context ;
262- if ( gui . BuildFactorioObjectWithAmount ( goods , amount , goods ? . flowUnitOfMeasure ?? UnitOfMeasure . None , link != null ? linkIsError ? SchemeColor . Error : linkIsForeign ? SchemeColor . Secondary : SchemeColor . Primary : goods . IsSourceResource ( ) ? SchemeColor . Green : SchemeColor . None ) && goods != Database . voidEnergy )
262+ if ( gui . BuildFactorioObjectWithAmount ( goods , amount , goods ? . flowUnitOfMeasure ?? UnitOfMeasure . None , link != null ? linkIsError ? SchemeColor . Error : linkIsForeign ? SchemeColor . Secondary : SchemeColor . Primary : goods . IsSourceResource ( ) ? SchemeColor . Green : SchemeColor . None ) )
263263 {
264264 OpenProductDropdown ( gui , gui . lastRect , goods , amount , link , dropdownType , recipe , context , variants ) ;
265265 }
@@ -287,7 +287,7 @@ private void BuildRecipeEntity(ImGui gui, RecipeRow recipe)
287287 }
288288
289289 gui . AllocateSpacing ( 0.5f ) ;
290- if ( recipe . fuel != Database . voidEnergy )
290+ if ( recipe . fuel != Database . voidEnergy || recipe . entity == null || recipe . entity . energy . type != EntityEnergyType . Void )
291291 {
292292 BuildGoodsIcon ( gui , recipe . fuel , recipe . links . fuel , ( float ) ( recipe . parameters . fuelUsagePerSecondPerRecipe * recipe . recipesPerSecond ) , ProductDropdownType . Fuel , recipe , recipe . linkRoot ) ;
293293 }
0 commit comments