Minetest  5.4.0
InventoryLocation Struct Reference

#include <inventorymanager.h>

+ Collaboration diagram for InventoryLocation:

Public Types

enum  Type {
  UNDEFINED , CURRENT_PLAYER , PLAYER , NODEMETA ,
  DETACHED
}
 

Public Member Functions

 InventoryLocation ()
 
void setUndefined ()
 
void setCurrentPlayer ()
 
void setPlayer (const std::string &name_)
 
void setNodeMeta (const v3s16 &p_)
 
void setDetached (const std::string &name_)
 
bool operator== (const InventoryLocation &other) const
 
bool operator!= (const InventoryLocation &other) const
 
void applyCurrentPlayer (const std::string &name_)
 
std::string dump () const
 
void serialize (std::ostream &os) const
 
void deSerialize (std::istream &is)
 
void deSerialize (const std::string &s)
 

Public Attributes

enum InventoryLocation::Type type
 
std::string name
 
v3s16 p
 

Member Enumeration Documentation

◆ Type

Enumerator
UNDEFINED 
CURRENT_PLAYER 
PLAYER 
NODEMETA 
DETACHED 

Constructor & Destructor Documentation

◆ InventoryLocation()

InventoryLocation::InventoryLocation ( )
inline

References setUndefined().

+ Here is the call graph for this function:

Member Function Documentation

◆ applyCurrentPlayer()

void InventoryLocation::applyCurrentPlayer ( const std::string &  name_)
inline

References CURRENT_PLAYER, setPlayer(), and type.

Referenced by Server::handleCommand_InventoryAction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deSerialize() [1/2]

void InventoryLocation::deSerialize ( const std::string &  s)

References deSerialize().

+ Here is the call graph for this function:

◆ deSerialize() [2/2]

void InventoryLocation::deSerialize ( std::istream &  is)

References CURRENT_PLAYER, DETACHED, infostream, name, BasicStrfnd< T >::next(), NODEMETA, p, PLAYER, stoi, type, and UNDEFINED.

Referenced by ICraftAction::ICraftAction(), IDropAction::IDropAction(), IMoveAction::IMoveAction(), RollbackAction::applyRevert(), deSerialize(), RollbackAction::getPosition(), GUIFormSpecMenu::parseList(), and GUIFormSpecMenu::parseListRing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump()

std::string InventoryLocation::dump ( ) const

References serialize().

Referenced by IMoveAction::apply(), IDropAction::apply(), ICraftAction::apply(), GUIInventoryList::draw(), Server::handleCommand_InventoryAction(), GUIFormSpecMenu::OnEvent(), IMoveAction::serialize(), IDropAction::serialize(), and ICraftAction::serialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator!=()

bool InventoryLocation::operator!= ( const InventoryLocation other) const
inline

◆ operator==()

bool InventoryLocation::operator== ( const InventoryLocation other) const
inline

◆ serialize()

void InventoryLocation::serialize ( std::ostream &  os) const

References CURRENT_PLAYER, DETACHED, FATAL_ERROR, name, NODEMETA, p, PLAYER, type, and UNDEFINED.

Referenced by IMoveAction::apply(), IDropAction::apply(), and dump().

+ Here is the caller graph for this function:

◆ setCurrentPlayer()

void InventoryLocation::setCurrentPlayer ( )
inline

References CURRENT_PLAYER, and type.

Referenced by IMoveAction::clientApply(), IDropAction::clientApply(), Game::dropSelectedItem(), and Game::openInventory().

+ Here is the caller graph for this function:

◆ setDetached()

void InventoryLocation::setDetached ( const std::string &  name_)
inline

References DETACHED, name, and type.

Referenced by ModApiInventory::l_create_detached_inventory_raw(), and ModApiInventory::l_get_inventory().

+ Here is the caller graph for this function:

◆ setNodeMeta()

void InventoryLocation::setNodeMeta ( const v3s16 p_)
inline

References NODEMETA, p, and type.

Referenced by InvRef::createNodeMeta(), ModApiInventory::l_get_inventory(), and Game::nodePlacement().

+ Here is the caller graph for this function:

◆ setPlayer()

void InventoryLocation::setPlayer ( const std::string &  name_)
inline

References name, PLAYER, and type.

Referenced by applyCurrentPlayer(), InvRef::createPlayer(), PlayerSAO::getInventoryLocation(), ModApiInventory::l_get_inventory(), and Server::UpdateCrafting().

+ Here is the caller graph for this function:

◆ setUndefined()

void InventoryLocation::setUndefined ( )
inline

References type, and UNDEFINED.

Referenced by InventoryLocation().

+ Here is the caller graph for this function:

Member Data Documentation

◆ name

◆ p

◆ type


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