ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.506 by root, Wed Feb 3 20:48:22 2010 UTC vs.
Revision 1.509 by root, Mon Apr 5 03:22:25 2010 UTC

1310} 1310}
1311 1311
1312use File::Glob (); 1312use File::Glob ();
1313 1313
1314cf::player->attach ( 1314cf::player->attach (
1315 on_command => sub { 1315 on_unknown_command => sub {
1316 my ($pl, $name, $params) = @_; 1316 my ($pl, $name, $params) = @_;
1317 1317
1318 my $cb = $COMMAND{$name} 1318 my $cb = $COMMAND{$name}
1319 or return; 1319 or return;
1320 1320
1769 my $lock = cf::lock_acquire "generate_random_map"; # the random map generator is NOT reentrant ATM 1769 my $lock = cf::lock_acquire "generate_random_map"; # the random map generator is NOT reentrant ATM
1770 1770
1771 # mit "rum" bekleckern, nicht 1771 # mit "rum" bekleckern, nicht
1772 $self->_create_random_map ( 1772 $self->_create_random_map (
1773 $rmp->{wallstyle}, $rmp->{wall_name}, $rmp->{floorstyle}, $rmp->{monsterstyle}, 1773 $rmp->{wallstyle}, $rmp->{wall_name}, $rmp->{floorstyle}, $rmp->{monsterstyle},
1774 $rmp->{treasurestyle}, $rmp->{layoutstyle}, $rmp->{doorstyle}, $rmp->{decorstyle}, 1774 $rmp->{treasurestyle}, $rmp->{layoutstyle}, $rmp->{doorstyle}, $rmp->{decorstyle}, $rmp->{miningstyle},
1775 $rmp->{origin_map}, $rmp->{final_map}, $rmp->{exitstyle}, $rmp->{this_map}, 1775 $rmp->{origin_map}, $rmp->{final_map}, $rmp->{exitstyle}, $rmp->{this_map},
1776 $rmp->{exit_on_final_map}, 1776 $rmp->{exit_on_final_map},
1777 $rmp->{xsize}, $rmp->{ysize}, 1777 $rmp->{xsize}, $rmp->{ysize},
1778 $rmp->{expand2x}, $rmp->{layoutoptions1}, $rmp->{layoutoptions2}, $rmp->{layoutoptions3}, 1778 $rmp->{expand2x}, $rmp->{layoutoptions1}, $rmp->{layoutoptions2}, $rmp->{layoutoptions3},
1779 $rmp->{symmetry}, $rmp->{difficulty}, $rmp->{difficulty_given}, $rmp->{difficulty_increase}, 1779 $rmp->{symmetry}, $rmp->{difficulty}, $rmp->{difficulty_given}, $rmp->{difficulty_increase},
2093 } 2093 }
2094 2094
2095 $self->post_load; 2095 $self->post_load;
2096} 2096}
2097 2097
2098# customize the map for a given player, i.e.
2099# return the _real_ map. used by e.g. per-player
2100# maps to change the path to ~playername/mappath
2098sub customise_for { 2101sub customise_for {
2099 my ($self, $ob) = @_; 2102 my ($self, $ob) = @_;
2100 2103
2101 return find "~" . $ob->name . "/" . $self->{path} 2104 return find "~" . $ob->name . "/" . $self->{path}
2102 if $self->per_player; 2105 if $self->per_player;
3131 3134
3132 $coro 3135 $coro
3133} 3136}
3134 3137
3135cf::client->attach ( 3138cf::client->attach (
3136 on_destroy => sub { 3139 on_client_destroy => sub {
3137 my ($ns) = @_; 3140 my ($ns) = @_;
3138 3141
3139 $_->cancel for values %{ (delete $ns->{_coro}) || {} }; 3142 $_->cancel for values %{ (delete $ns->{_coro}) || {} };
3140 }, 3143 },
3141); 3144);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines