gamefic 4.0.0 → 4.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab6b04620f4d61106e3d7a3321dfc1833f0a7cce7eeb0e509ca77bdc5388d7c0
4
- data.tar.gz: d8d37b580f71e20870cbe4124a8af41a953448b4bd5296e8f6f73d5e8a0e5092
3
+ metadata.gz: dc53c7427d9e153ee3a41dfe297cf2c038733024a8d79c6feec8e648f6efd83a
4
+ data.tar.gz: 88be2b8ba3d282e762692f39ce63fde315609d0b2f9a766f0a99ede59554ba30
5
5
  SHA512:
6
- metadata.gz: ac226d280d8e1a07ad2bc154ae1cbc49a4496a847986f4d8919aef89999386432122673b568c64e2012ef3b910652aa67a31545e59eb65633105854fd0228d4b
7
- data.tar.gz: 2b271b4061e74ab43d4cd11e080261b595404f7add90ea017934e49c4d1beda47a44c3ed88b53d4ba57cc6a6602fabf5e330a18544e783b09c56129642f6f82a
6
+ metadata.gz: d97432e274e89b7202df2c5f1bebae60450db5c71813cf8f7c711997920fa1e41ca2a63e22bdb29b2e77b29b37174858e61e145004440b1dfa0c96403cd5d6b4
7
+ data.tar.gz: 89023cc5765cabb26c86848ae73fd2871b22015aaeeadd48307ddbea004cb1ecb9a857d3e870b63497fc19405d7e07848643ede4bd80bf90336057ba2d9d49be
data/CHANGELOG.md CHANGED
@@ -1,4 +1,7 @@
1
- ## 4.0.0
1
+ ## 4.0.1 - January 26, 2025
2
+ - Cue#prepare flushes messages
3
+
4
+ ## 4.0.0 - January 25, 2025
2
5
  - Nuanced scans
3
6
  - Command hooks
4
7
  - Refactored queries
@@ -66,7 +66,7 @@ module Gamefic
66
66
  props.output.merge!({
67
67
  scene: scene.to_hash,
68
68
  prompt: props.prompt,
69
- messages: actor.messages,
69
+ messages: actor.flush,
70
70
  queue: actor.queue
71
71
  })
72
72
  actor.narratives.player_output_blocks.each { |block| block.call actor, props.output }
@@ -94,7 +94,6 @@ module Gamefic
94
94
 
95
95
  # @return [void]
96
96
  def prepare_output
97
- scene
98
97
  props.output.last_input = actor.last_cue&.props&.input
99
98
  props.output.last_prompt = actor.last_cue&.props&.prompt
100
99
  end
@@ -17,7 +17,7 @@ module Gamefic
17
17
  #
18
18
  # @param selection [Array<Entity>]
19
19
  # @param token [String]
20
- # @param use [Array<Scanner::Base>]
20
+ # @param use [Array<Class<Scanner::Base>>]
21
21
  # @return [Result]
22
22
  def self.scan(selection, token, use = processors)
23
23
  result = nil
@@ -13,7 +13,7 @@ module Gamefic
13
13
 
14
14
  # @param actor [Actor]
15
15
  # @param narrative [Narrative]
16
- # @param props [Props::Base]
16
+ # @param props [Props::Default]
17
17
  def initialize(actor, narrative = nil, props = nil, **context)
18
18
  @actor = actor
19
19
  @narrative = narrative
@@ -96,14 +96,14 @@ module Gamefic
96
96
  end
97
97
 
98
98
  # @yieldparam [Actor] The scene's actor
99
- # @yieldparam [Props::Base] The scene's props
99
+ # @yieldparam [Props::Default] The scene's props
100
100
  # @yieldparam [Hash] Additional context
101
101
  def on_start(&block)
102
102
  start_blocks.push block
103
103
  end
104
104
 
105
105
  # @yieldparam [Actor] The scene's actor
106
- # @yieldparam [Props::Base] The scene's props
106
+ # @yieldparam [Props::Default] The scene's props
107
107
  # @yieldparam [Hash] Additional context
108
108
  def on_finish(&block)
109
109
  finish_blocks.push block
@@ -113,7 +113,7 @@ module Gamefic
113
113
 
114
114
  attr_writer :context
115
115
 
116
- # @param klass [Class<Props::Base>]
116
+ # @param klass [Class<Props::Default>]
117
117
  def use_props_class(klass)
118
118
  @props_class = klass
119
119
  end
@@ -21,7 +21,7 @@ module Gamefic
21
21
  # descendants of siblings and children.
22
22
  #
23
23
  # @param args [Array<Object>] Query arguments
24
- # @return [Query::Scoped]
24
+ # @return [Query::Family]
25
25
  def available *args
26
26
  Query::Family.new(*args, name: 'available')
27
27
  end
@@ -31,7 +31,7 @@ module Gamefic
31
31
  # Define a query that returns the actor's parent.
32
32
  #
33
33
  # @param args [Array<Object>] Query arguments
34
- # @return [Query::Scoped]
34
+ # @return [Query::Parent]
35
35
  def parent *args
36
36
  Query::Parent.new(*args, name: 'parent')
37
37
  end
@@ -39,7 +39,7 @@ module Gamefic
39
39
  # Define a query that searches an actor's children.
40
40
  #
41
41
  # @param args [Array<Object>] Query arguments
42
- # @return [Query::Scoped]
42
+ # @return [Query::Children]
43
43
  def children *args
44
44
  Query::Children.new(*args, name: 'children')
45
45
  end
@@ -47,7 +47,7 @@ module Gamefic
47
47
  # Define a query that searches an actor's descendants.
48
48
  #
49
49
  # @param args [Array<Object>] Query arguments
50
- # @return [Query::Scoped]
50
+ # @return [Query::Descendants]
51
51
  def descendants *args
52
52
  Query::Descendants.new(*args)
53
53
  end
@@ -55,7 +55,7 @@ module Gamefic
55
55
  # Define a query that searches an actor's siblings.
56
56
  #
57
57
  # @param args [Array<Object>] Query arguments
58
- # @return [Query::Scoped]
58
+ # @return [Query::Siblings]
59
59
  def siblings *args
60
60
  Query::Siblings.new(*args, name: 'siblings')
61
61
  end
@@ -63,7 +63,7 @@ module Gamefic
63
63
  # Define a query that searches an actor's siblings and their descendants.
64
64
  #
65
65
  # @param args [Array<Object>] Query arguments
66
- # @return [Query::Scoped]
66
+ # @return [Query::Extended]
67
67
  def extended *args
68
68
  Query::Extended.new(*args, name: 'extended')
69
69
  end
@@ -71,7 +71,7 @@ module Gamefic
71
71
  # Define a query that returns the actor itself.
72
72
  #
73
73
  # @param args [Array<Object>] Query arguments
74
- # @return [Query::Scoped]
74
+ # @return [Query::Myself]
75
75
  def myself *args
76
76
  Query::Myself.new(*args, name: 'myself')
77
77
  end
@@ -93,6 +93,7 @@ module Gamefic
93
93
  # a string representation of an integer. A successful query returns the
94
94
  # integer instead of an entity.
95
95
  #
96
+ # @return [Query::Integer]
96
97
  def integer
97
98
  Query::Integer.new name: 'integer'
98
99
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gamefic
4
- VERSION = '4.0.0'
4
+ VERSION = '4.0.1'
5
5
  end
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: 4.0.0
4
+ version: 4.0.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: 2025-01-25 00:00:00.000000000 Z
11
+ date: 2025-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal