… | |
… | |
20 | # this is not a correctness issue, it simply saves diskspace |
20 | # this is not a correctness issue, it simply saves diskspace |
21 | # because old files will get cleaned up on reset time |
21 | # because old files will get cleaned up on reset time |
22 | Coro::Timer::sleep 0.25; |
22 | Coro::Timer::sleep 0.25; |
23 | |
23 | |
24 | for my $path (@{ cf::map::tmp_maps or [] }, @{ cf::map::random_maps or [] }) { |
24 | for my $path (@{ cf::map::tmp_maps or [] }, @{ cf::map::random_maps or [] }) { |
25 | cf::cede_to_tick; |
|
|
26 | cf::map::find $path; |
25 | cf::map::find $path; |
27 | } |
26 | } |
28 | |
27 | |
29 | # now hunt for resettable per-player maps |
28 | # now hunt for resettable per-player maps |
30 | for my $login (@{ cf::player::list_logins or [] }) { |
29 | for my $login (@{ cf::player::list_logins or [] }) { |
31 | for my $path (@{ cf::player::maps $login or [] }) { |
30 | for my $path (@{ cf::player::maps $login or [] }) { |
32 | cf::cede_to_tick; |
|
|
33 | |
|
|
34 | $path =~ /^~[^\/]+(\/.*)$/ |
31 | $path =~ /^~[^\/]+(\/.*)$/ |
35 | or next; # doh |
32 | or next; # doh |
36 | |
33 | |
37 | my $base = cf::map::find $1; |
34 | my $base = cf::map::find $1; |
38 | |
35 | |