1#ifndef NANOMMO_CLIENT_CRAFT_WINDOW_H_
2#define NANOMMO_CLIENT_CRAFT_WINDOW_H_
11#include "protocol/nanommo.pb.h"
17uint32_t
HowMany(
const protocol::Inventory& bag, uint32_t item);
22bool CanMake(
const recipes::Recipe& recipe,
const protocol::Inventory& bag,
27float MadeShare(
const recipes::Recipe& recipe, uint32_t done);
39 void Toggle() { visible_ = !visible_; }
44 std::optional<protocol::CraftAction>
Build(
const std::vector<Figure>& figures,
45 const protocol::Inventory& bag,
46 const protocol::Crafting& making);
49 void DrawProgress(
const protocol::Crafting& making)
const;
52 bool visible_ =
false;
std::optional< protocol::CraftAction > Build(const std::vector< Figure > &figures, const protocol::Inventory &bag, const protocol::Crafting &making)
CraftWindow(Content content)
bool CanMake(const recipes::Recipe &recipe, const protocol::Inventory &bag, int level)
float MadeShare(const recipes::Recipe &recipe, uint32_t done)
uint32_t HowMany(const protocol::Inventory &bag, uint32_t item)