nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::CraftWindow Class Reference

#include <craft_window.h>

Public Member Functions

 CraftWindow (Content content)
bool visible () const
void Toggle ()
std::optional< protocol::CraftAction > Build (const std::vector< Figure > &figures, const protocol::Inventory &bag, const protocol::Crafting &making)

Detailed Description

The recipes the player knows, which are those of their level or below, in a window of its own, which K opens and closes: what each takes, as how many they have of how many it needs, what it makes, and a button to make it, which is off while they can't. While they're making something, a bar over the hotbar shows how far it's got, open or not.

Definition at line 34 of file craft_window.h.

Constructor & Destructor Documentation

◆ CraftWindow()

nanommo::CraftWindow::CraftWindow ( Content content)
inlineexplicit

Definition at line 36 of file craft_window.h.

Member Function Documentation

◆ Build()

std::optional< protocol::CraftAction > nanommo::CraftWindow::Build ( const std::vector< Figure > & figures,
const protocol::Inventory & bag,
const protocol::Crafting & making )

Draws the bar, while the player's making something, and the window, while it's open, with their bag. Returns what they ask for: to start making a recipe, or to stop.

Definition at line 70 of file craft_window.cc.

◆ Toggle()

void nanommo::CraftWindow::Toggle ( )
inline

Definition at line 39 of file craft_window.h.

◆ visible()

bool nanommo::CraftWindow::visible ( ) const
inline

Definition at line 38 of file craft_window.h.


The documentation for this class was generated from the following files: