lib/demiurge/agent.rb
# If we're in a room but don't know where, pick a legal location.
If we're in a room but don't know where, pick a legal location.
If we ' re in a room but don ' t know where pick a legal location .
def finished_init
      super
      @wander_intention = AgentInternal::WanderIntention.new(engine, name)
      unless state["position"] && state["position"]["#"]
        if self.location.respond_to?(:any_legal_position)
          state["position"] = self.location.any_legal_position
        end
      end
    end
def finished_init super @wander_intention = AgentInternal :: WanderIntention . new ( engine , name ) unless state [ "position" ] && state [ "position" ] [ "#" ] if self . location . respond_to? ( :any_legal_position ) state [ "position" ] = self . location . any_legal_position end end end
If we're in a room but don't know where, pick a legal location.
If we ' re in a room but don ' t know where pick a legal location .
# Move to legal position. If this is a TMX location or similar, it will assign a specific position.