lib/demiurge/dsl.rb
# Declare an agent in this zone. If the agent doesn't get a
# location declaration, by default the agent will usually be
# invisible (not an interactable location) but will be
# instantiable as a parent.
Declare an agent in this zone. If the agent doesn't get a
location declaration, by default the agent will usually be
invisible (not an interactable location) but will be
instantiable as a parent.
Declare an agent in this zone . If the agent doesn ' t get a location declaration by default the agent will usually be invisible ( not an interactable location ) but will be instantiable as a parent .
def agent(name, options = {}, &block)
      state = { "zone" => @name, "home_zone" => @name }.merge(options)
      builder = AgentBuilder.new(name, @engine, "type" => options["type"] || "Agent", "state" => state)
      builder.instance_eval(&block)
      @built_item.state["contents"] << name
      nil
    end
def agent ( name , options = { } , & block ) state = { "zone" => @name , "home_zone" => @name } . merge ( options ) builder = AgentBuilder . new ( name , @engine , "type" => options [ "type" ] || "Agent" , "state" => state ) builder . instance_eval ( & block ) @built_item . state [ "contents" ] << name nil end
Declare an agent in this zone.
Declare an agent in this zone .
name
options
block