Luanti 5.16.0-dev
Loading...
Searching...
No Matches
ObjectProperties Struct Reference

#include <object_properties.h>

Collaboration diagram for ObjectProperties:

Public Member Functions

 ObjectProperties ()
std::string dump () const
bool operator== (const ObjectProperties &other) const
bool operator!= (const ObjectProperties &other) const
bool validate ()
 Check limits of some important properties that'd cause exceptions later on.
void serialize (std::ostream &os) const
void deSerialize (std::istream &is)

Public Attributes

std::vector< std::string > textures
std::vector< video::SColor > colors
aabb3f collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f)
aabb3f selectionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f)
ObjectVisual visual = OBJECTVISUAL_SPRITE
std::string mesh
std::string damage_texture_modifier = "^[brighten"
std::string nametag
std::string infotext
std::string wield_item
v3f visual_size = v3f(1, 1, 1)
video::SColor nametag_color = video::SColor(255, 255, 255, 255)
std::optional< video::SColor > nametag_bgcolor
v2s16 spritediv = v2s16(1, 1)
v2s16 initial_sprite_basepos
f32 stepheight = 0.0f
float automatic_rotate = 0.0f
f32 automatic_face_movement_dir_offset = 0.0f
f32 automatic_face_movement_max_rotation_per_sec = -1.0f
float eye_height = 1.625f
float zoom_fov = 0.0f
std::optional< u32 > nametag_fontsize
MapNode node = MapNode(CONTENT_IGNORE)
u16 hp_max = 1
u16 breath_max = 0
s8 glow = 0
PointabilityType pointable = PointabilityType::POINTABLE
bool physical = false
bool collideWithObjects = true
bool rotate_selectionbox = false
bool is_visible = true
bool makes_footstep_sound = false
bool automatic_face_movement_dir = false
bool backface_culling = true
bool static_save = true
bool use_texture_alpha = false
bool shaded = true
bool show_on_minimap = false
bool nametag_scale_z = false

Constructor & Destructor Documentation

◆ ObjectProperties()

ObjectProperties::ObjectProperties ( )

References textures.

Referenced by operator!=(), and operator==().

Here is the caller graph for this function:

Member Function Documentation

◆ deSerialize()

◆ dump()

◆ operator!=()

bool ObjectProperties::operator!= ( const ObjectProperties & other) const
inline

References ObjectProperties().

Here is the call graph for this function:

◆ operator==()

bool ObjectProperties::operator== ( const ObjectProperties & other) const

References ObjectProperties(), and tie().

Here is the call graph for this function:

◆ serialize()

◆ validate()

bool ObjectProperties::validate ( )

Check limits of some important properties that'd cause exceptions later on.

Errornous values are discarded after printing a warning.

Returns
true if a problem was found

References infotext, nametag, textures, U16_MAX, warningstream, and wield_item.

Referenced by ObjectRef::l_set_nametag_attributes().

Here is the caller graph for this function:

Member Data Documentation

◆ automatic_face_movement_dir

bool ObjectProperties::automatic_face_movement_dir = false

◆ automatic_face_movement_dir_offset

f32 ObjectProperties::automatic_face_movement_dir_offset = 0.0f

◆ automatic_face_movement_max_rotation_per_sec

f32 ObjectProperties::automatic_face_movement_max_rotation_per_sec = -1.0f

◆ automatic_rotate

float ObjectProperties::automatic_rotate = 0.0f

◆ backface_culling

bool ObjectProperties::backface_culling = true

◆ breath_max

u16 ObjectProperties::breath_max = 0

◆ collideWithObjects

bool ObjectProperties::collideWithObjects = true

◆ collisionbox

aabb3f ObjectProperties::collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f)

◆ colors

std::vector<video::SColor> ObjectProperties::colors

◆ damage_texture_modifier

std::string ObjectProperties::damage_texture_modifier = "^[brighten"

◆ eye_height

float ObjectProperties::eye_height = 1.625f

◆ glow

s8 ObjectProperties::glow = 0

◆ hp_max

◆ infotext

std::string ObjectProperties::infotext

◆ initial_sprite_basepos

v2s16 ObjectProperties::initial_sprite_basepos

◆ is_visible

◆ makes_footstep_sound

bool ObjectProperties::makes_footstep_sound = false

◆ mesh

◆ nametag

◆ nametag_bgcolor

◆ nametag_color

video::SColor ObjectProperties::nametag_color = video::SColor(255, 255, 255, 255)

◆ nametag_fontsize

std::optional<u32> ObjectProperties::nametag_fontsize

◆ nametag_scale_z

bool ObjectProperties::nametag_scale_z = false

◆ node

◆ physical

bool ObjectProperties::physical = false

◆ pointable

◆ rotate_selectionbox

◆ selectionbox

aabb3f ObjectProperties::selectionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f)

◆ shaded

◆ show_on_minimap

bool ObjectProperties::show_on_minimap = false

◆ spritediv

v2s16 ObjectProperties::spritediv = v2s16(1, 1)

◆ static_save

bool ObjectProperties::static_save = true

◆ stepheight

f32 ObjectProperties::stepheight = 0.0f

◆ textures

◆ use_texture_alpha

bool ObjectProperties::use_texture_alpha = false

◆ visual

◆ visual_size

◆ wield_item

◆ zoom_fov

float ObjectProperties::zoom_fov = 0.0f

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