… | |
… | |
66 | $ob->reply (undef, "You can temporarily see through walls."); |
66 | $ob->reply (undef, "You can temporarily see through walls."); |
67 | |
67 | |
68 | 1 |
68 | 1 |
69 | }; |
69 | }; |
70 | |
70 | |
|
|
71 | cf::register_command reset => sub { |
|
|
72 | my ($ob, $arg) = @_; |
|
|
73 | |
|
|
74 | return unless $ob->may ("command_reset"); |
|
|
75 | |
|
|
76 | my $map = $ob->map; |
|
|
77 | |
|
|
78 | cf::sync_job { |
|
|
79 | my @pl = $map->players; |
|
|
80 | |
|
|
81 | $_->enter_link for @pl; |
|
|
82 | $map->reset; |
|
|
83 | $_->leave_link for @pl; |
|
|
84 | }; |
|
|
85 | |
|
|
86 | $ob->reply (undef, $map->{path}->as_string . " was reset."); |
|
|
87 | |
|
|
88 | 1 |
|
|
89 | }; |
|
|
90 | |
71 | for my $command (qw(reset teleport summon arrest kick banish)) { |
91 | for my $command (qw(teleport summon arrest kick banish)) { |
72 | my $method = "command_$command"; |
92 | my $method = "command_$command"; |
73 | |
93 | |
74 | cf::register_command $command => sub { |
94 | cf::register_command $command => sub { |
75 | my ($ob, $arg) = @_; |
95 | my ($ob, $arg) = @_; |
76 | |
96 | |