Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
LuaABM Class Reference
+ Inheritance diagram for LuaABM:
+ Collaboration diagram for LuaABM:

Public Member Functions

 LuaABM (int id, const std::vector< std::string > &trigger_contents, const std::vector< std::string > &required_neighbors, const std::vector< std::string > &without_neighbors, float trigger_interval, u32 trigger_chance, bool simple_catch_up, s16 min_y, s16 max_y)
 
virtual const std::vector< std::string > & getTriggerContents () const
 
virtual const std::vector< std::string > & getRequiredNeighbors () const
 
virtual const std::vector< std::string > & getWithoutNeighbors () const
 
virtual float getTriggerInterval ()
 
virtual u32 getTriggerChance ()
 
virtual bool getSimpleCatchUp ()
 
virtual s16 getMinY ()
 
virtual s16 getMaxY ()
 
virtual void trigger (ServerEnvironment *env, v3s16 p, MapNode n, u32 active_object_count, u32 active_object_count_wider)
 
- Public Member Functions inherited from ActiveBlockModifier
 ActiveBlockModifier ()=default
 
virtual ~ActiveBlockModifier ()=default
 
virtual void trigger (ServerEnvironment *env, v3s16 p, MapNode n)
 

Private Attributes

const int m_id
 
std::vector< std::string > m_trigger_contents
 
std::vector< std::string > m_required_neighbors
 
std::vector< std::string > m_without_neighbors
 
float m_trigger_interval
 
u32 m_trigger_chance
 
bool m_simple_catch_up
 
s16 m_min_y
 
s16 m_max_y
 

Constructor & Destructor Documentation

◆ LuaABM()

LuaABM::LuaABM ( int id,
const std::vector< std::string > & trigger_contents,
const std::vector< std::string > & required_neighbors,
const std::vector< std::string > & without_neighbors,
float trigger_interval,
u32 trigger_chance,
bool simple_catch_up,
s16 min_y,
s16 max_y )
inline

Member Function Documentation

◆ getMaxY()

virtual s16 LuaABM::getMaxY ( )
inlinevirtual

Implements ActiveBlockModifier.

References m_max_y.

◆ getMinY()

virtual s16 LuaABM::getMinY ( )
inlinevirtual

Implements ActiveBlockModifier.

References m_min_y.

◆ getRequiredNeighbors()

virtual const std::vector< std::string > & LuaABM::getRequiredNeighbors ( ) const
inlinevirtual

Implements ActiveBlockModifier.

References m_required_neighbors.

◆ getSimpleCatchUp()

virtual bool LuaABM::getSimpleCatchUp ( )
inlinevirtual

Implements ActiveBlockModifier.

References m_simple_catch_up.

◆ getTriggerChance()

virtual u32 LuaABM::getTriggerChance ( )
inlinevirtual

Implements ActiveBlockModifier.

References m_trigger_chance.

◆ getTriggerContents()

virtual const std::vector< std::string > & LuaABM::getTriggerContents ( ) const
inlinevirtual

Implements ActiveBlockModifier.

References m_trigger_contents.

◆ getTriggerInterval()

virtual float LuaABM::getTriggerInterval ( )
inlinevirtual

Implements ActiveBlockModifier.

References m_trigger_interval.

◆ getWithoutNeighbors()

virtual const std::vector< std::string > & LuaABM::getWithoutNeighbors ( ) const
inlinevirtual

Implements ActiveBlockModifier.

References m_without_neighbors.

◆ trigger()

virtual void LuaABM::trigger ( ServerEnvironment * env,
v3s16 p,
MapNode n,
u32 active_object_count,
u32 active_object_count_wider )
inlinevirtual

Reimplemented from ActiveBlockModifier.

References ServerEnvironment::getScriptIface(), m_id, p(), and ScriptApiEnv::triggerABM().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_id

const int LuaABM::m_id
private

Referenced by trigger().

◆ m_max_y

s16 LuaABM::m_max_y
private

Referenced by getMaxY().

◆ m_min_y

s16 LuaABM::m_min_y
private

Referenced by getMinY().

◆ m_required_neighbors

std::vector<std::string> LuaABM::m_required_neighbors
private

Referenced by getRequiredNeighbors().

◆ m_simple_catch_up

bool LuaABM::m_simple_catch_up
private

Referenced by getSimpleCatchUp().

◆ m_trigger_chance

u32 LuaABM::m_trigger_chance
private

Referenced by getTriggerChance().

◆ m_trigger_contents

std::vector<std::string> LuaABM::m_trigger_contents
private

Referenced by getTriggerContents().

◆ m_trigger_interval

float LuaABM::m_trigger_interval
private

Referenced by getTriggerInterval().

◆ m_without_neighbors

std::vector<std::string> LuaABM::m_without_neighbors
private

Referenced by getWithoutNeighbors().


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