# TODO: JSON support is currently experimental. #require 'gamefic/entityloader' require 'gamefic/stage' require 'gamefic/tester' require 'gamefic/source' require 'gamefic/script' require 'gamefic/query' module Gamefic class Plot autoload :SceneMount, 'gamefic/plot/scene_mount' autoload :CommandMount, 'gamefic/plot/command_mount' autoload :Entities, 'gamefic/plot/entities' autoload :ArticleMount, 'gamefic/plot/article_mount' autoload :YouMount, 'gamefic/plot/you_mount' autoload :Snapshot, 'gamefic/plot/snapshot' autoload :Host, 'gamefic/plot/host' autoload :Players, 'gamefic/plot/players' autoload :Playbook, 'gamefic/plot/playbook' autoload :Callbacks, 'gamefic/plot/callbacks' attr_reader :commands, :imported_scripts, :source # TODO: Metadata could use better protection attr_accessor :metadata include Stage mount Gamefic, Tester, Players, SceneMount, CommandMount, Entities, ArticleMount, YouMount, Snapshot, Host, Callbacks expose :script, :metadata # @param [Source::Base] def initialize(source = nil) @source = source || Source::Text.new({}) @working_scripts = [] @imported_scripts = [] @running = false @playbook = Playbook.new post_initialize end def playbook @playbook ||= Playbook.new end def running? @running end # Get an Array of all scripts that have been imported into the Plot. # # @return [Array