gamefic-standard 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca3a0186e345a9afcd439decd174e1e0d25af882a3c12a4fae8c93ce7dc148a9
|
4
|
+
data.tar.gz: 983d0edf810abcade4ccca1ebcdb45d9052968cea7e614f4dd478d79d4fdc94b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10f9e483b14180248220dec5dfb2d99a331ef54f06f3e2cedd869a2577fdd6bc968457e0675bbc6af16f48f79a4585b5c0215d247053ee089f742a3d5ebe3dc7
|
7
|
+
data.tar.gz: 5afbf188e3dde7b5850aedc9e7f45bc5dc9b0c46f0cd913a16f60142e8d2d2ddcf184507b4f7c2cb68b72671d2ec1df1307a1171f421428bf68d387961d84c2d
|
data/CHANGELOG.md
CHANGED
@@ -10,10 +10,22 @@ module Gamefic
|
|
10
10
|
actor.tell "You can't lock #{the thing}."
|
11
11
|
end
|
12
12
|
|
13
|
+
respond :lock, available(Lockable) do |actor, thing|
|
14
|
+
if thing.has_lock_key? && actor.children.include?(thing.lock_key)
|
15
|
+
actor.execute :lock, thing, thing.lock_key
|
16
|
+
else
|
17
|
+
actor.tell "You can't lock #{the thing}."
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
13
21
|
respond :lock, available(Lockable, proc(&:has_lock_key?)), children do |actor, thing, key|
|
14
22
|
if thing.lock_key == key
|
15
|
-
thing.locked
|
16
|
-
|
23
|
+
if thing.locked?
|
24
|
+
actor.tell "It's already locked."
|
25
|
+
else
|
26
|
+
thing.locked = true
|
27
|
+
actor.tell "You lock #{the thing} with #{the key}."
|
28
|
+
end
|
17
29
|
else
|
18
30
|
actor.tell "You can't lock #{the thing} with #{the key}."
|
19
31
|
end
|
@@ -24,7 +36,7 @@ module Gamefic
|
|
24
36
|
actor.proceed if key.parent == actor
|
25
37
|
end
|
26
38
|
|
27
|
-
interpret "lock :container with :key", "lock :container :key"
|
39
|
+
interpret "lock :container with :key", "lock :container :key"
|
28
40
|
end
|
29
41
|
end
|
30
42
|
end
|
@@ -16,8 +16,12 @@ module Gamefic
|
|
16
16
|
|
17
17
|
respond :unlock, available(Lockable, proc(&:has_lock_key?)), children do |actor, thing, key|
|
18
18
|
if thing.lock_key == key
|
19
|
-
thing.locked
|
20
|
-
|
19
|
+
if thing.locked?
|
20
|
+
thing.locked = false
|
21
|
+
actor.tell "You unlock #{the thing} with #{the key}."
|
22
|
+
else
|
23
|
+
actor.tell "It's already unlocked."
|
24
|
+
end
|
21
25
|
else
|
22
26
|
actor.tell "You can't unlock #{the thing} with #{the key}."
|
23
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamefic-standard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gamefic
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
217
|
+
rubygems_version: 3.5.22
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: The Gamefic standard script library.
|