Olib 0.1.2 → 2.0.0.pre.rc.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 +5 -5
- data/Olib.gemspec +1 -1
- data/README.md +0 -0
- data/TODOS.md +0 -0
- data/lib/Olib.rb +6 -79
- data/lib/Olib/actor/actor.rb +0 -0
- data/lib/Olib/area.rb +22 -37
- data/lib/Olib/bounty.rb +8 -10
- data/lib/Olib/character/char.rb +64 -68
- data/lib/Olib/character/disk.rb +31 -9
- data/lib/Olib/character/group.rb +122 -40
- data/lib/Olib/character/inventory.rb +0 -0
- data/lib/Olib/character/mind.rb +0 -0
- data/lib/Olib/character/stance.rb +0 -0
- data/lib/Olib/combat/creature.rb +77 -128
- data/lib/Olib/combat/creatures.rb +52 -36
- data/lib/Olib/core/action.rb +8 -0
- data/lib/Olib/core/container.rb +32 -236
- data/lib/Olib/core/containers.rb +42 -0
- data/lib/Olib/core/errors.rb +69 -71
- data/lib/Olib/core/exist.rb +88 -0
- data/lib/Olib/core/item.rb +43 -598
- data/lib/Olib/core/kinds.rb +6 -0
- data/lib/Olib/core/rummage.rb +42 -0
- data/lib/Olib/core/transaction.rb +53 -0
- data/lib/Olib/core/use.rb +2 -5
- data/lib/Olib/core/utils.rb +25 -123
- data/lib/Olib/core/verbs.rb +304 -0
- data/lib/Olib/dictionary/dictionary.rb +150 -150
- data/lib/Olib/ext/hash.rb +7 -0
- data/lib/Olib/ext/matchdata.rb +14 -0
- data/lib/Olib/ext/string.rb +9 -0
- data/lib/Olib/ext/symbol.rb +13 -0
- data/lib/Olib/go2.rb +48 -112
- data/lib/Olib/loot.rb +44 -0
- data/lib/Olib/npcs/npc.rb +4 -0
- data/lib/Olib/npcs/npcs.rb +45 -0
- data/lib/Olib/objects/box.rb +1 -1
- data/lib/Olib/objects/clothing.rb +1 -1
- data/lib/Olib/objects/herb.rb +1 -1
- data/lib/Olib/objects/jar.rb +0 -0
- data/lib/Olib/objects/jewel.rb +7 -7
- data/lib/Olib/objects/jewelry.rb +1 -1
- data/lib/Olib/objects/scroll.rb +1 -1
- data/lib/Olib/objects/uncommon.rb +1 -1
- data/lib/Olib/objects/wand.rb +1 -1
- data/lib/Olib/pattern_matching/any.rb +11 -0
- data/lib/Olib/pattern_matching/err.rb +4 -0
- data/lib/Olib/pattern_matching/ok.rb +4 -0
- data/lib/Olib/pattern_matching/outcome.rb +35 -0
- data/lib/Olib/pattern_matching/pattern_matching.rb +5 -0
- data/lib/Olib/pattern_matching/result.rb +80 -0
- data/lib/Olib/pattern_matching/rill.rb +43 -0
- data/lib/Olib/pattern_matching/where.rb +4 -0
- data/lib/Olib/shops.rb +147 -155
- data/lib/Olib/supervisor/supervisor.rb +0 -0
- data/lib/Olib/version.rb +1 -1
- data/lib/Olib/xml.rb +43 -0
- metadata +28 -15
- data/lib/Olib/core/extender.rb +0 -29
- data/lib/Olib/interface/queryable.rb +0 -50
- data/lib/Olib/npcs.rb +0 -5
- data/lib/Olib/pattern.rb +0 -34
- data/lib/Olib/storage/app_data.rb +0 -32
- data/lib/Olib/try/try.rb +0 -58
- data/lib/Olib/utils/cli.rb +0 -81
- data/lib/Olib/utils/help_menu.rb +0 -166
- data/lib/Olib/utils/monsterbold.rb +0 -5
- data/lib/Olib/utils/vbulletin.rb +0 -101
data/lib/Olib/utils/vbulletin.rb
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
class VBulletin
|
2
|
-
attr_accessor :post
|
3
|
-
def initialize
|
4
|
-
@post = String.new
|
5
|
-
self
|
6
|
-
end
|
7
|
-
def open_bold
|
8
|
-
@post.concat "[B]"
|
9
|
-
self
|
10
|
-
end
|
11
|
-
def open_underline
|
12
|
-
@post.concat '[U]'
|
13
|
-
self
|
14
|
-
end
|
15
|
-
def close_underline
|
16
|
-
@post.concat '[/U]'
|
17
|
-
self
|
18
|
-
end
|
19
|
-
def close_bold
|
20
|
-
@post.concat '[/B]'
|
21
|
-
self
|
22
|
-
end
|
23
|
-
def open_color(hexcode)
|
24
|
-
@post.concat "[COLOR=\"#{hexcode}\"]"
|
25
|
-
self
|
26
|
-
end
|
27
|
-
def open_table(width=500)
|
28
|
-
@post.contat "[TABLE=\"width: #{width}\""
|
29
|
-
self
|
30
|
-
end
|
31
|
-
def close_table
|
32
|
-
@post.concat "[/TABLE]"
|
33
|
-
self
|
34
|
-
end
|
35
|
-
def open_tr
|
36
|
-
@post.contact "[TR]"
|
37
|
-
self
|
38
|
-
end
|
39
|
-
def close_tr
|
40
|
-
@post.contact "[/TR]"
|
41
|
-
self
|
42
|
-
end
|
43
|
-
def open_cell
|
44
|
-
@post.concat "[TD]"
|
45
|
-
self
|
46
|
-
end
|
47
|
-
def close_cell
|
48
|
-
@post.concat '[/TD]'
|
49
|
-
self
|
50
|
-
end
|
51
|
-
def close_color
|
52
|
-
@post.concat '[/COLOR]'
|
53
|
-
self
|
54
|
-
end
|
55
|
-
def add(str)
|
56
|
-
@post.concat str
|
57
|
-
self
|
58
|
-
end
|
59
|
-
def add_line(str)
|
60
|
-
@post.concat "#{str}\n"
|
61
|
-
self
|
62
|
-
end
|
63
|
-
def open_size(sz)
|
64
|
-
@post.concat "[SIZE=#{sz}]"
|
65
|
-
self
|
66
|
-
end
|
67
|
-
def close_size
|
68
|
-
@post.concat "[/SIZE]"
|
69
|
-
self
|
70
|
-
end
|
71
|
-
def open_italics
|
72
|
-
@post.concat"[I]"
|
73
|
-
self
|
74
|
-
end
|
75
|
-
def close_italics
|
76
|
-
@post.concat "[/I]"
|
77
|
-
self
|
78
|
-
end
|
79
|
-
def open_indent
|
80
|
-
@post.concat "[INDENT]"
|
81
|
-
self
|
82
|
-
end
|
83
|
-
def close_indent
|
84
|
-
@post.concat "[/INDENT]"
|
85
|
-
self
|
86
|
-
end
|
87
|
-
def tab
|
88
|
-
@post.concat "\t"
|
89
|
-
self
|
90
|
-
end
|
91
|
-
def enter
|
92
|
-
@post.concat "\n"
|
93
|
-
self
|
94
|
-
end
|
95
|
-
def VBulletin.commafy(n)
|
96
|
-
n.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse
|
97
|
-
end
|
98
|
-
def to_s
|
99
|
-
@post
|
100
|
-
end
|
101
|
-
end
|