gamefic 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gamefic/action_ext.rb +7 -0
- data/lib/gamefic/character.rb +2 -1
- data/lib/gamefic/core_ext/array.rb +3 -0
- data/lib/gamefic/entity_ext.rb +7 -0
- data/lib/gamefic/entity_ext/room.rb +0 -3
- data/lib/gamefic/keywords.rb +3 -0
- data/lib/gamefic/query.rb +2 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 455d6e35dc1a52a6bb5199fc7149ed0fa63a78b6
|
4
|
+
data.tar.gz: e9fca3998e0753390c5e10e83c2ecfee28313f8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbcfef9ac4c0ae7b970048c13c2a5fb8a0efd636918d41e0aedc2a64956a3576ce07ebaf163a199a70df6f7fedc550c074f90fa1e9ec3fb732c3aa060968ddb9
|
7
|
+
data.tar.gz: 6200517ed19c41d98a9d881b799cf843211a1a20128852a194ad22a775fc7b2b9761ab7c7a07cdf4f0b299fc7a18acd28f7bbacd341edb5953ad82436ceeb923
|
data/lib/gamefic/character.rb
CHANGED
@@ -3,9 +3,6 @@ require "gamefic/entity_ext/portal"
|
|
3
3
|
module Gamefic
|
4
4
|
|
5
5
|
class Room < Entity
|
6
|
-
def post_initialize
|
7
|
-
|
8
|
-
end
|
9
6
|
def connect(destination, direction, type = Portal, two_way = true)
|
10
7
|
portal = type.new self.plot, :name => direction, :parent => self, :destination => destination
|
11
8
|
if two_way == true
|
data/lib/gamefic/keywords.rb
CHANGED
@@ -7,6 +7,9 @@ module Gamefic
|
|
7
7
|
if statement.kind_of?(Keywords)
|
8
8
|
self.concat statement
|
9
9
|
else
|
10
|
+
if statement.kind_of?(Array)
|
11
|
+
statement = statement.join(' ')
|
12
|
+
end
|
10
13
|
self.concat statement.to_s.gsub(/[^a-z0-9]/i, ' ').strip.downcase.split(' ')
|
11
14
|
end
|
12
15
|
self.delete_if { |w|
|
data/lib/gamefic/query.rb
CHANGED
@@ -12,7 +12,8 @@ module Gamefic
|
|
12
12
|
STRING = :string
|
13
13
|
def initialize(context, *arguments)
|
14
14
|
if context != :family and context != :children and context != :siblings and context != :parent and context != :self and context != :plot and context != :string
|
15
|
-
|
15
|
+
#if self.class.constants.include?(context.to_sym) == false
|
16
|
+
raise "Invalid Query context '#{context.to_sym}'"
|
16
17
|
end
|
17
18
|
#if context == :string and arguments.length > 0
|
18
19
|
# raise "Query with :string context cannot take additional arguments."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamefic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: An adventure game engine
|
14
14
|
email: fsnyder@gamefic.com
|
@@ -19,9 +19,11 @@ files:
|
|
19
19
|
- lib/gamefic.rb
|
20
20
|
- lib/gamefic/entity.rb
|
21
21
|
- lib/gamefic/character.rb
|
22
|
+
- lib/gamefic/action_ext.rb
|
22
23
|
- lib/gamefic/story.rb
|
23
24
|
- lib/gamefic/base.rb
|
24
25
|
- lib/gamefic/query.rb
|
26
|
+
- lib/gamefic/entity_ext.rb
|
25
27
|
- lib/gamefic/action.rb
|
26
28
|
- lib/gamefic/node.rb
|
27
29
|
- lib/gamefic/director.rb
|