Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
ItemDefinition Struct Reference

#include <itemdef.h>

+ Collaboration diagram for ItemDefinition:

Public Member Functions

 ItemDefinition ()
 
 ItemDefinition (const ItemDefinition &def)
 
ItemDefinitionoperator= (const ItemDefinition &def)
 
 ~ItemDefinition ()
 
void reset ()
 
void serialize (std::ostream &os, u16 protocol_version) const
 
void deSerialize (std::istream &is, u16 protocol_version)
 

Public Attributes

ItemType type
 
std::string name
 
std::string description
 
std::string short_description
 
std::string inventory_image
 
std::string inventory_overlay
 
std::string wield_image
 
std::string wield_overlay
 
std::string palette_image
 
video::SColor color
 
v3f wield_scale
 
u16 stack_max
 
bool usable
 
bool liquids_pointable
 
std::optional< Pointabilitiespointabilities
 
ToolCapabilitiestool_capabilities
 
std::optional< WearBarParamswear_bar_params
 
ItemGroupList groups
 
SoundSpec sound_place
 
SoundSpec sound_place_failed
 
SoundSpec sound_use
 
SoundSpec sound_use_air
 
f32 range
 
std::string node_placement_prediction
 
std::optional< u8 > place_param2
 
bool wallmounted_rotate_vertical
 
TouchInteraction touch_interaction
 

Private Member Functions

void resetInitial ()
 

Constructor & Destructor Documentation

◆ ItemDefinition() [1/2]

ItemDefinition::ItemDefinition ( )

References resetInitial().

+ Here is the call graph for this function:

◆ ItemDefinition() [2/2]

ItemDefinition::ItemDefinition ( const ItemDefinition & def)

References resetInitial().

+ Here is the call graph for this function:

◆ ~ItemDefinition()

ItemDefinition::~ItemDefinition ( )

References reset().

+ Here is the call graph for this function:

Member Function Documentation

◆ deSerialize()

void ItemDefinition::deSerialize ( std::istream & is,
u16 protocol_version )

◆ operator=()

ItemDefinition & ItemDefinition::operator= ( const ItemDefinition & def)

◆ reset()

void ItemDefinition::reset ( )

◆ resetInitial()

void ItemDefinition::resetInitial ( )
private

References reset(), tool_capabilities, and wear_bar_params.

Referenced by ItemDefinition(), and ItemDefinition().

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

◆ serialize()

void ItemDefinition::serialize ( std::ostream & os,
u16 protocol_version ) const

References color, description, groups, inventory_image, inventory_overlay, liquids_pointable, name, node_placement_prediction, palette_image, place_param2, pointabilities, range, ToolCapabilities::serialize(), TouchInteraction::serialize(), SoundSpec::serializeSimple(), serializeString16(), short_description, sound_place, sound_place_failed, sound_use, sound_use_air, stack_max, tool_capabilities, touch_interaction, type, usable, wallmounted_rotate_vertical, wear_bar_params, wield_image, wield_overlay, wield_scale, writeARGB8(), writeF32(), writeS16(), writeU16(), writeU8(), and writeV3F32().

Referenced by CItemDefManager::serialize().

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

Member Data Documentation

◆ color

video::SColor ItemDefinition::color

◆ description

◆ groups

◆ inventory_image

◆ inventory_overlay

◆ liquids_pointable

◆ name

◆ node_placement_prediction

◆ palette_image

std::string ItemDefinition::palette_image

◆ place_param2

◆ pointabilities

◆ range

f32 ItemDefinition::range

◆ short_description

◆ sound_place

◆ sound_place_failed

◆ sound_use

◆ sound_use_air

◆ stack_max

◆ tool_capabilities

◆ touch_interaction

◆ type

◆ usable

◆ wallmounted_rotate_vertical

bool ItemDefinition::wallmounted_rotate_vertical

◆ wear_bar_params

◆ wield_image

◆ wield_overlay

◆ wield_scale


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