Add in consumable crafting. Allow specifying a quantity for item crafts. Add Flower Petals to Flower Turret drop table.
This commit is contained in:
@@ -57,17 +57,12 @@ void Menu::InitializeConsumableCraftingWindow(){
|
||||
[](MenuFuncData data){
|
||||
RowItemDisplay*comp=DYNAMIC_CAST<RowItemDisplay*>(data.component);
|
||||
const std::weak_ptr<Item>item=comp->GetItem();
|
||||
|
||||
std::string label="";
|
||||
if(item.lock()->EnhancementIsPossible()&&item.lock()->GetEnhancementInfo().size()>item.lock()->EnhancementLevel()+1){
|
||||
label=std::format("Level {} ->#00AA00 {}",item.lock()->EnhancementLevel(),item.lock()->EnhancementLevel()+1);
|
||||
}
|
||||
Component<MenuLabel>(CRAFT_ITEM,"Enhancement Level Header")->SetLabel(label);
|
||||
Component<MenuLabel>(CRAFT_ITEM,"Item Name Header")->SetLabel(std::format("Crafting {}",item.lock()->DisplayName()));
|
||||
Component<EnhancementStatsLabel>(CRAFT_ITEM,"Enhancement Stats Label")->SetItem(item);
|
||||
Component<RequiredMaterialsList>(CRAFT_ITEM,"Required Materials List")->SetItem(item);
|
||||
Component<MenuComponent>(CRAFT_ITEM,"Craft Button")->SetGrayedOut(!item.lock()->CanEnhanceItem());
|
||||
Menu::OpenMenu(CRAFT_ITEM);
|
||||
Component<MenuLabel>(CONSUMABLE_CRAFT_ITEM,"Item Name Header")->GetString(A::ITEM_NAME)=item.lock()->ActualName();
|
||||
Component<MenuLabel>(CONSUMABLE_CRAFT_ITEM,"Amount to Craft Amount Label")->SetLabel("1");
|
||||
Component<MenuLabel>(CONSUMABLE_CRAFT_ITEM,"Item Name Header")->SetLabel(std::format("Crafting {}",item.lock()->DisplayName()));
|
||||
Component<RequiredMaterialsList>(CONSUMABLE_CRAFT_ITEM,"Required Materials List")->SetItem(item);
|
||||
Component<MenuComponent>(CONSUMABLE_CRAFT_ITEM,"Craft Button")->SetGrayedOut(!item.lock()->CanEnhanceItem());
|
||||
Menu::OpenMenu(CONSUMABLE_CRAFT_ITEM);
|
||||
return true;
|
||||
},
|
||||
[](MenuFuncData data){
|
||||
|
||||
Reference in New Issue
Block a user