Sha256: b772e2457087fce4381e2e1e8a3c278ee90cbe7c11c7c6e8fdc8fb3fcf7d7011

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

module Gamefic
  module Standard
    module Actions
      module Repeat
        extend Gamefic::Scriptable

        meta :repeat do |actor|
          if actor.last_input && !actor.last_input.empty?
            actor.tell "Repeating <kbd>\"#{actor.last_input}\"</kbd>..."
            actor.queue.push actor.last_input
          else
            actor.tell "You don't have a previous command to repeat right now."
          end
        end

        interpret 'again', 'repeat'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-standard-3.3.0 lib/gamefic-standard/actions/repeat.rb