Class: Demiurge::InertStateItem

Inherits:
StateItem show all
Defined in:
lib/demiurge/inert_state_item.rb

Overview

Sometimes you just want state that sits and does nothing unless you mess with it. Player password hashes? Top-level game settings? Heck, even something sort-of-active like bank inventory can make sense to model this way since it will never do anything on its own. This is especially good for things that will never interact with the engine cycle - something that ignores ticks, intentions, notifications, etc.

Since:

  • 0.0.1

Instance Attribute Summary

Attributes inherited from StateItem

#engine, #name

Instance Method Summary collapse

Methods inherited from StateItem

#agent?, from_name_type, #get_structure, #initialize, #state, #state_type, #zone?

Constructor Details

This class inherits a constructor from Demiurge::StateItem

Instance Method Details

#intentions_for_next_step(*args) ⇒ Array<Intention>

An InertStateItem doesn't intend anything, ever.

Returns:

  • (Array<Intention>)

    This array will always be empty for an InertStateItem

Since:

  • 0.0.1



17
18
19
# File 'lib/demiurge/inert_state_item.rb', line 17

def intentions_for_next_step(*args)
  []
end