ceml 0.5.2 → 0.5.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.
- data/VERSION +1 -1
- data/ceml.gemspec +1 -1
- data/lib/ceml/driver.rb +2 -1
- data/lib/ceml/script.rb +5 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/ceml.gemspec
CHANGED
data/lib/ceml/driver.rb
CHANGED
@@ -34,7 +34,8 @@ module CEML
|
|
34
34
|
|
35
35
|
def post incident_id, player
|
36
36
|
player_id = player[:id]
|
37
|
-
player[:roles] = Set.new([*player[:roles]
|
37
|
+
player[:roles] = Set.new([*player[:roles] || []])
|
38
|
+
player[:roles] << :agents
|
38
39
|
if existing_player = PLAYERS[incident_id].find{ |p| p[:id] == player_id }
|
39
40
|
existing_player.update player
|
40
41
|
else
|
data/lib/ceml/script.rb
CHANGED
@@ -20,6 +20,10 @@ module CEML
|
|
20
20
|
return cast.criteria(self)
|
21
21
|
end
|
22
22
|
|
23
|
+
def nabs?
|
24
|
+
cast.type == :nab
|
25
|
+
end
|
26
|
+
|
23
27
|
|
24
28
|
# ===============
|
25
29
|
# = likelihoods =
|
@@ -167,7 +171,7 @@ module CEML
|
|
167
171
|
def type
|
168
172
|
return 'mission' if title
|
169
173
|
return 'unknown' if instructions.empty?
|
170
|
-
return 'question' if not instructions.asks.empty?
|
174
|
+
return 'question' if not instructions.asks(:agents).empty?
|
171
175
|
return 'message' if instructions.tell(:agents)
|
172
176
|
return 'unknown'
|
173
177
|
end
|