Sha256: dc7b000ee4b1b8ce544ff118ba5b2a5c50ea52a112a3170b783194b780ceb387

Contents?: true

Size: 745 Bytes

Versions: 2

Compression:

Stored size: 745 Bytes

Contents

module Demiurge

  # 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
  class InertStateItem < StateItem
    # An InertStateItem doesn't intend anything, ever.
    #
    # @return [Array<Intention>] This array will always be empty for an InertStateItem
    # @since 0.0.1
    def intentions_for_next_step(*args)
      []
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
demiurge-0.4.0 lib/demiurge/inert_state_item.rb
demiurge-0.2.0 lib/demiurge/inert_state_item.rb