From b7f1bbb8d90dc587752726f1d827634208a722b0 Mon Sep 17 00:00:00 2001 From: KingCol13 Date: Sun, 2 Jan 2022 17:22:15 +0000 Subject: Reject non-fuels being placed in the furnace fuel slot. --- src/UI/SlotArea.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/UI/SlotArea.cpp') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 28f3054ce..23850e3d6 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -2001,6 +2001,17 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a return; } + if (a_SlotNum == 1) + { + cItem & DraggingItem = a_Player.GetDraggingItem(); + cFurnaceRecipe * FurnaceRecipes = cRoot::Get()->GetFurnaceRecipe(); + // Do not allow non-fuels to be placed in the fuel slot: + if (!FurnaceRecipes->IsFuel(DraggingItem)) + { + return; + } + } + Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem); } -- cgit v1.2.3