gamefic 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/gamefic/props/multiple_choice.rb +2 -1
- data/lib/gamefic/scene/default.rb +1 -1
- data/lib/gamefic/scene/multiple_choice.rb +6 -0
- data/lib/gamefic/scriptable.rb +2 -2
- data/lib/gamefic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea395014528ad74c93bfc7e33809a6b6ea24c0c8e2d37a2f6e0d7067eef564d1
|
4
|
+
data.tar.gz: ec2fcf7c80c501cf93c036bf2416f3f583755460d38aca464a5844eb2705151f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7875f99a1d9d327f0251fdbeae15ddf31820091fd0cbdc43a1e5cbe7cabd8697057fe6333b84400d5e545fc31e3720c82ecc366dc2cc0066b71f3e2794b6e196
|
7
|
+
data.tar.gz: 91353478d4a994758c6fcc0a843335819cdb9086be9a29fdd429b333abdf58c4e2179e147b685a2f4720fb9e160ecd83ef5f4e5b4ab41a0ad582f583845f2843
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 3.2.1 - July 1, 2024
|
2
|
+
- MultipleChoice accepts shortened text
|
3
|
+
- Return Proxy::Agent from attr_seed and make_seed
|
4
|
+
- MultipleChoice skips finish blocks for invalid input
|
5
|
+
|
1
6
|
## 3.2.0 - April 9, 2024
|
2
7
|
- Bug fix for marshal of structs in Opal
|
3
8
|
- Add last_input and last_prompt at start of take
|
@@ -58,7 +58,8 @@ module Gamefic
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def index_by_text
|
61
|
-
options.
|
61
|
+
matches = options.map.with_index { |text, idx| next idx if text.downcase.start_with?(input.downcase) }.compact
|
62
|
+
matches.first if matches.one?
|
62
63
|
end
|
63
64
|
end
|
64
65
|
end
|
data/lib/gamefic/scriptable.rb
CHANGED
@@ -104,7 +104,7 @@ module Gamefic
|
|
104
104
|
def make_seed klass, **opts
|
105
105
|
@count ||= 0
|
106
106
|
seed { make(klass, **opts) }
|
107
|
-
@count.tap { @count += 1 }
|
107
|
+
Proxy::Agent.new(@count.tap { @count += 1 })
|
108
108
|
end
|
109
109
|
|
110
110
|
# Seed an entity with an attribute method.
|
@@ -124,7 +124,7 @@ module Gamefic
|
|
124
124
|
instance_variable_set("@#{name}", make(klass, **opts))
|
125
125
|
self.class.define_method(name) { instance_variable_get("@#{name}") }
|
126
126
|
end
|
127
|
-
@count.tap { @count += 1 }
|
127
|
+
Proxy::Agent.new(@count.tap { @count += 1 })
|
128
128
|
end
|
129
129
|
|
130
130
|
if RUBY_ENGINE == 'opal'
|
data/lib/gamefic/version.rb
CHANGED
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: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|