… | |
… | |
26 | use Carp (); |
26 | use Carp (); |
27 | use AnyEvent (); |
27 | use AnyEvent (); |
28 | use BerkeleyDB; |
28 | use BerkeleyDB; |
29 | use Pod::POM (); |
29 | use Pod::POM (); |
30 | use Scalar::Util (); |
30 | use Scalar::Util (); |
31 | use JSON::Syck (); |
|
|
32 | use Storable (); # finally |
31 | use Storable (); # finally |
33 | |
32 | |
34 | our %STAT_TOOLTIP = ( |
33 | our %STAT_TOOLTIP = ( |
35 | Str => "<b>Physical Strength</b>, determines damage dealt with weapons, how much you can carry, and how often you can attack", |
34 | Str => "<b>Physical Strength</b>, determines damage dealt with weapons, how much you can carry, and how often you can attack", |
36 | Dex => "<b>Dexterity</b>, your physical agility. Determines chance of being hit and affects armor class and speed", |
35 | Dex => "<b>Dexterity</b>, your physical agility. Determines chance of being hit and affects armor class and speed", |
… | |
… | |
105 | } |
104 | } |
106 | |
105 | |
107 | die "FATAL: can't find required file $_[0]\n"; |
106 | die "FATAL: can't find required file $_[0]\n"; |
108 | } |
107 | } |
109 | |
108 | |
110 | $JSON::Syck::ImplicitUnicode = 1; |
109 | BEGIN { |
111 | |
110 | use Crossfire::Protocol::Base (); |
112 | sub from_json { |
111 | *to_json = \&Crossfire::Protocol::Base::to_json; |
113 | JSON::Syck::Load $_[0] |
112 | *from_json = \&Crossfire::Protocol::Base::from_json; |
114 | } |
|
|
115 | |
|
|
116 | sub to_json { |
|
|
117 | JSON::Syck::Dump $_[0] |
|
|
118 | } |
113 | } |
119 | |
114 | |
120 | sub read_cfg { |
115 | sub read_cfg { |
121 | my ($file) = @_; |
116 | my ($file) = @_; |
122 | |
117 | |