Olib 0.0.7 → 0.0.8
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 +4 -4
- data/Olib.gemspec +1 -1
- data/lib/Olib/core/item.rb +31 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 901479e6bec498eac64a1efcd4614d52e7f7e4a5
|
4
|
+
data.tar.gz: 0cbde613e5bf68f9a6a53be5bcb7e3a22a48a53e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef96e09e9b39f404f240d7a33f0c7445f240441386360d2f6801f7d2b24fc379bc588b39e4321f9d83521623597c88e00da12c83eed13db3b9ffcb2f2dea651e
|
7
|
+
data.tar.gz: 742745addc4ab4a8539f0e05a2e3bd58df57a27ffa8535e4cbfa917c8e205096411b9eb6eee6edd57180bb5058f58034cc78a9a9176b8240663ec5ad513b5b4a
|
data/Olib.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'Olib'
|
6
|
-
s.version = '0.0.
|
6
|
+
s.version = '0.0.8'
|
7
7
|
s.date = '2014-09-12'
|
8
8
|
s.summary = "Useful Lich extensions for Gemstone IV"
|
9
9
|
s.description = "Useful Lich extensions for Gemstone IV including hostile creature management, group management, syntactically pleasing movement, locker management, etc"
|
data/lib/Olib/core/item.rb
CHANGED
@@ -14,6 +14,8 @@ module Olib
|
|
14
14
|
|
15
15
|
@props[:name] = obj.name
|
16
16
|
@props[:after_name] = obj.after_name
|
17
|
+
@props[:before_name]= obj.before_name
|
18
|
+
@props[:desc] = [obj.before_name, obj.name, obj.after_name].compact.join(' ')
|
17
19
|
|
18
20
|
define :tags, []
|
19
21
|
obj.type.split(',').map { |t| tag(t) }
|
@@ -317,7 +319,35 @@ module Olib
|
|
317
319
|
end
|
318
320
|
|
319
321
|
def analyze
|
320
|
-
|
322
|
+
fput "analyze ##{@id}"
|
323
|
+
should_detect = false
|
324
|
+
begin
|
325
|
+
Timeout::timeout(1) do
|
326
|
+
while(line = get)
|
327
|
+
next if Olib::Dictionary.ignorable?(line)
|
328
|
+
next if line =~ /sense that the item is free from merchant alteration restrictions|and sense that the item is largely free from merchant alteration restrictions|these can all be altered by a skilled merchant|please keep the messaging in mind when designing an alterations|there is no recorded information on that item|The creator has also provided the following information/
|
329
|
+
@props['max_light'] = true if line =~ /light as it can get/
|
330
|
+
@props['max_deep'] = true if line =~ /pockets could not possibly get any deeper/
|
331
|
+
@props['max_deep'] = false if line =~ /pockets deepened/
|
332
|
+
@props['max_light'] = false if line =~ /talented merchant lighten/
|
333
|
+
if line =~ /Casting Elemental Detection/
|
334
|
+
should_detect = true
|
335
|
+
next
|
336
|
+
end
|
337
|
+
break if line =~ /pockets deepened|^You get no sense of whether|light as it can get|pockets could not possibly get any deeper|talented merchant lighten/
|
338
|
+
@props['analyze'] = String.new unless @props['analyze']
|
339
|
+
@props['analyze'].concat line.strip
|
340
|
+
@props['analyze'].concat " "
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
rescue Timeout::Error
|
345
|
+
# Silent
|
346
|
+
end
|
347
|
+
detect if should_detect
|
348
|
+
temp_analysis = @props['analyze'].split('.').map(&:strip).map(&:downcase).reject {|ln| ln.empty? }
|
349
|
+
@props['analyze'] = temp_analysis unless temp_analysis.empty?
|
350
|
+
return self
|
321
351
|
end
|
322
352
|
|
323
353
|
def take
|