working crafting workbench

This commit is contained in:
minjaesong
2023-09-20 16:01:40 +09:00
parent a168db23de
commit 5957f70ff8
12 changed files with 145 additions and 31 deletions

View File

@@ -74,8 +74,7 @@ class UIItemCraftingCandidateGrid(
craftingRecipes.clear()
CraftingRecipeCodex.props.forEach { (_, recipes) ->
recipes.forEach {
// TODO check for nearby crafting stations
if (isCraftable((parentUI as UICrafting).getPlayerInventory(), it, listOf(/*todo: nearby crafting stations*/))) craftingRecipes.add(it)
if (isCraftable((parentUI as UICrafting).getPlayerInventory(), it, (parentUI as UICrafting).nearbyCraftingStations)) craftingRecipes.add(it)
}
}