ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/util/rmuniq
Revision: 1.2
Committed: Wed Jan 3 04:00:16 2007 UTC (17 years, 5 months ago) by pippijn
Branch: MAIN
Changes since 1.1: +1 -1 lines
Log Message:
not in my home

File Contents

# Content
1 #! perl
2
3 cf::async {
4 my $maps = Coro::AIO::aio_readdir "/var/crossfire/unique-items";
5 for my $mapname (grep !/\.pst$/, @$maps) {
6 $mapname =~ s/∕/\//g;
7 my $map = cf::map::find_map $mapname or next;
8 $map->load;
9
10 for my $x (0.. $map->width - 1) {
11 for my $y (0.. $map->height - 1) {
12 for my $ob (grep $_->type == 66, $map->at ($x, $y)) {
13 $ob->destroy
14 if $ob->flag (cf::FLAG_UNIQUE);
15 }
16 }
17 }
18
19 Coro::Timer::sleep 0.2;
20 }
21 };
22
23 1