gamefic-standard 4.1.1 → 4.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e0ab938b3b4ed3af64714173dfe10ae80d67b60a8e50cf26b2551932413e330
4
- data.tar.gz: 4f719431c70c129a37ff18ffda659189e7f5104acc879c1475182a1d26229e8f
3
+ metadata.gz: 5c29d19f21e034d9d210c8a4c83941acbd8c8758c10e825905fdd92a393f01a1
4
+ data.tar.gz: ffe7642cb6204d682d493784e6937075237c73dadd1c9642f563d3cc077ddf87
5
5
  SHA512:
6
- metadata.gz: 3b2f5bd3bffc1d3a0007612dee1c15f30281dbca24d554362df6f92948409b9f5b480d4aff2495047f7c7fd993683250954af1f6938f5ee25ed7e6be48182d14
7
- data.tar.gz: 253c0943bcbd39d9de01a3937af56b5e9ccfee61f86b49ced2708c9a3bb3352a99a7bef302b00f5d90ed8d4dca446abbd6cc9bc754a433e332604d7f76ce8067
6
+ metadata.gz: 2470adf0c1e3920efcdac549c95394afe841c2d07c894dd0c726db9045efbf365d7f79bac0d8ef98c46243b500065cb1907367e097219640b0894108c4f41ba0
7
+ data.tar.gz: 00fe97eeed9b3eb3382a20338de501d83d1a7fd59d01ab722e4551f829475193527f3618496d7bbf8990ccc1a71e0884283ad4411ea17c60ef492668ec97dad1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 4.1.3 - November 29, 2026
2
+ - Suppress redundant parent descriptions when examining rooms
3
+
4
+ ## 4.1.2 - June 17, 2026
5
+ - Monkey patch Entity and Actor
6
+
1
7
  ## 4.1.1 - June 16, 2026
2
8
  - Surface Thing and Character aliases in YARD
3
9
 
@@ -11,6 +11,10 @@ module Gamefic
11
11
 
12
12
  extend Gamefic::Scriptable
13
13
 
14
+ # Tell the actor about other entities in the current room.
15
+ #
16
+ # @param actor [Actor]
17
+ # @return [void]
14
18
  def itemize_room(actor)
15
19
  return unless (room = actor.room)
16
20
 
@@ -35,6 +39,11 @@ module Gamefic
35
39
  itemize_parent(actor)
36
40
  end
37
41
 
42
+ # Tell the actor about available portals if the room is configured to
43
+ # have explicit exits.
44
+ #
45
+ # @param actor [Actor]
46
+ # @return [void]
38
47
  def itemize_explicit_portals(actor)
39
48
  return unless actor.room&.explicit_exits?
40
49
 
@@ -57,9 +66,13 @@ module Gamefic
57
66
  end
58
67
  end
59
68
 
69
+ # Tell the actor about the current parent if it's different from the room.
70
+ #
71
+ # @param actor [Actor]
72
+ # @return [void]
60
73
  def itemize_parent(actor)
61
- parent = actor.parent if parent != actor.room
62
- return unless parent
74
+ return unless actor.parent && actor.parent != actor.room
75
+ parent = actor.parent
63
76
 
64
77
  siblings = parent.children.that_are_not(actor)
65
78
  if siblings.empty?
@@ -2,11 +2,11 @@
2
2
 
3
3
  module Gamefic
4
4
  module Standard
5
+ # @return [Class<Gamefic::Actor>]
5
6
  Character = Gamefic::Actor
6
- # @!parse
7
- # class Character < Gamefic::Actor; end
8
7
 
9
- class Character
8
+ class Gamefic::Actor
9
+ include Standardized
10
10
  include ImplicitTaking
11
11
 
12
12
  set_default gender: :other
@@ -2,11 +2,13 @@
2
2
 
3
3
  module Gamefic
4
4
  module Standard
5
+ # @return [Class<Gamefic::Entity>]
5
6
  Thing = Gamefic::Entity
6
- # @!parse
7
- # class Thing < Gamefic::Entity; end
8
7
 
9
- Thing.set_default itemized: true, portable: false
10
- Thing.include Gamefic::Standard::Standardized
8
+ class Gamefic::Entity
9
+ include Standardized
10
+
11
+ set_default itemized: true, portable: false
12
+ end
11
13
  end
12
14
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gamefic
4
4
  module Standard
5
- VERSION = '4.1.1'
5
+ VERSION = '4.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamefic-standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder