MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes
MFM::Element_Res< CC > Class Template Reference

#include <Element_Res.h>

Inheritance diagram for MFM::Element_Res< CC >:
MFM::Element< CC >

Public Member Functions

virtual u32 PercentMovable (const T &you, const T &me, const SPoint &offset) const
 
virtual u32 DefaultPhysicsColor () const
 
virtual u32 DefaultLowlightColor () const
 
virtual const char * GetDescription () const
 
virtual void Behavior (EventWindow< CC > &window) const
 
- Public Member Functions inherited from MFM::Element< CC >
 Element (const UUID &uuid)
 
void AllocateType ()
 
u32 GetType () const
 
const char * GetAtomicSymbol () const
 
const char * GetName () const
 
virtual void AppendDescription (const T *atom, OString64 &desc) const
 
bool IsType (u32 type) const
 
const UUIDGetUUID () const
 
virtual const T & GetDefaultAtom () const
 
virtual u32 PhysicsColor () const
 
void ToggleLowlightPhysicsColor ()
 
virtual u32 LocalPhysicsColor (const T &atom, u32 selector) const
 
virtual u32 Diffusability (EventWindow< CC > &ew, SPoint nowAt, SPoint maybeAt) const
 
u32 NoDiffusability (EventWindow< CC > &ew, SPoint nowAt, SPoint maybeAt) const
 
const ElementParameters< CC > & GetElementParameters () const
 
ElementParameters< CC > & GetElementParameters ()
 
const AtomicParameters< CC > & GetAtomicParameters () const
 
AtomicParameters< CC > & GetAtomicParameters ()
 

Static Public Member Functions

static const u32 TYPE ()
 

Static Public Attributes

static Element_Res THE_INSTANCE
 
- Static Public Attributes inherited from MFM::Element< CC >
static const u32 COMPLETE_DIFFUSABILITY = 1000
 

Additional Inherited Members

- Protected Member Functions inherited from MFM::Element< CC >
virtual T BuildDefaultAtom () const
 
const BitVector
< P::BITS_PER_ATOM > & 
GetBits (const T &atom) const
 
BitVector< P::BITS_PER_ATOM > & GetBits (T &atom) const
 
bool IsValidAtomicSymbol (const char *symbol)
 
void SetAtomicSymbol (const char *symbol)
 
void SetName (const char *name)
 
void Diffuse (EventWindow< CC > &window) const
 

Detailed Description

template<class CC>
class MFM::Element_Res< CC >

A basic 'Resource' element, created in controlled amounts by DReg and available for use by other Elements that wish to have controlled growth.

Member Function Documentation

template<class CC >
virtual void MFM::Element_Res< CC >::Behavior ( EventWindow< CC > &  window) const
inlinevirtual

Describes the behavior of this Element. This is invoked when an Atom of this Element is chosen as the center of an EventWindow for an Event, which is given as a parameter.

Parameters
windowThe EventWindow describing the Event which is currently being executed.

Implements MFM::Element< CC >.

template<class CC >
virtual u32 MFM::Element_Res< CC >::DefaultLowlightColor ( ) const
inlinevirtual

Gets the 32-bit ARGB formatted color that all Atoms of this Element will be drawn with when they have lowlight drawing enabled.

Returns
The lowlight color to draw all Atoms of this Element with.

Reimplemented from MFM::Element< CC >.

template<class CC >
virtual u32 MFM::Element_Res< CC >::DefaultPhysicsColor ( ) const
inlinevirtual

Gets the 32-bit ARGB formatted color that all Atoms of this Element will be drawn with.

Returns
The 32-bit ARGB formatted color that all Atoms of this Element will be drawn with.

Implements MFM::Element< CC >.

template<class CC >
virtual const char* MFM::Element_Res< CC >::GetDescription ( ) const
inlinevirtual

Gets a string of a short description of the behavior of this Element . This will be displayed in some way when a user needs help with this Element . This string must not include newlines; they will be added when they are needed.

Returns
A helpful description string breifely describing the behavior of this Element.

Reimplemented from MFM::Element< CC >.

template<class CC >
virtual u32 MFM::Element_Res< CC >::PercentMovable ( const T &  you,
const T &  me,
const SPoint offset 
) const
inlinevirtual

Determines how likely an Atom of this type is to be swapped with during diffusal.

Returns
an integral percentage, from 0 to 100, describing the desire of an atom of this type to be moved; 0 being impossible to move and 100 being completely fine with moving.

Implements MFM::Element< CC >.


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