Sha256: d3c24fa98ad41f43e2ee79c41d4ecc6e278b758b826cbaef9c73d7b7937464eb

Contents?: true

Size: 621 Bytes

Versions: 2

Compression:

Stored size: 621 Bytes

Contents

require 'gamefic'

module Gamefic::Sdk::Debug
  class Plot < Gamefic::Plot
    attr_reader :main_dir
    def post_initialize
      meta :debug, Query::Text.new(/^unused$/) do |actor, text|
        unused = []
        actions.each { |a|
          if !a.standard? and !a.executed?
            unused.push "#{a.verb}:#{a.source_location}"
          end
        }
        actor.tell "#{unused.join("\r\n")}"
      end
    end
    def action(command, *queries, &proc)
      act = Gamefic::Sdk::Debug::Action.new(command, *queries, &proc)
      playbook.send :add_action, act
      act
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gamefic-sdk-1.7.0 lib/gamefic-sdk/debug/plot.rb
gamefic-sdk-1.6.0 lib/gamefic-sdk/debug/plot.rb