eidolon 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/eidolon/rgssx/table.rb +15 -1
- data/lib/eidolon/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzM5OGJhNmNhNmY4YzU5OWQ5OGIyYTIzMDhiMmU5ODMyZjBiMzQ4Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjQ5NzgxYzNiZWMyNWM3NDlkOWIyYTBiNGY3Nzk1ZTQ4OGJiNzBjMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzQwMTNkNDc3ZDk5ZThiOWIxODlhMDk3MDM2YmIzNDJiOWVkNGI1NjQ4M2Rj
|
10
|
+
MzJhNmE5YzljNDlkYjU1YzgxODUyY2NjYmYyM2VjM2ZlZDBmZDBlMmEzY2U5
|
11
|
+
YTdlYjA0NGQzNDc4NDhmZTllM2NjMmM4N2IwNTUxZTk0ZWE3MWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDAzMjhmNmNlNjlkYzk2OGM3ZjE3MTU0YWY1MWFkYWEwM2EwZDdiNjU4NDJl
|
14
|
+
ZWRhNjBmYzc0MDMwODVlYjk5NGUzNmExMTk2YzRhMTFhOGFhZjJhZWI4NGMy
|
15
|
+
MjRjZDhmNWE3ODRlMWI1ZGI2OWM2N2ViZDc2ZWY4YjBiOTQ3Njk=
|
data/lib/eidolon/rgssx/table.rb
CHANGED
@@ -14,10 +14,24 @@ class Table
|
|
14
14
|
# Size of the Table's Z dimension.
|
15
15
|
attr_reader :zsize
|
16
16
|
|
17
|
+
# Accesses the array's elements. Pulls the same number of arguments as there
|
18
|
+
# are dimensions in the created array. Returns +nil+ if the specified element
|
19
|
+
# does not exist.
|
20
|
+
def [](x, y = 0, z = 0)
|
21
|
+
return nil if x >= @xsize || y >= @ysize
|
22
|
+
@data[x + y * @xsize + z * @xsize * @ysize]
|
23
|
+
end
|
24
|
+
|
25
|
+
# Provides object inspection identical to that provided by RGSSx.
|
26
|
+
def to_s
|
27
|
+
"#<Table:0x#{(object_id << 1).to_s(16)}>"
|
28
|
+
end
|
29
|
+
alias :inspect :to_s
|
30
|
+
|
17
31
|
private
|
18
32
|
def self._load(array)
|
19
33
|
self.new.instance_eval do
|
20
|
-
|
34
|
+
_, @xsize, @ysize, @zsize, _, *@data = array.unpack('LLLLLS*')
|
21
35
|
self
|
22
36
|
end
|
23
37
|
end
|
data/lib/eidolon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eidolon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solistra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|