ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/util/rmuniq
Revision: 1.1
Committed: Wed Jan 3 03:59:52 2007 UTC (17 years, 5 months ago) by pippijn
Branch: MAIN
Log Message:
added script to remove unique exits from unique-items (maps)

File Contents

# User Rev Content
1 pippijn 1.1 #! perl
2    
3     cf::async {
4     my $maps = Coro::AIO::aio_readdir "/home/pippijn/testbin/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