--- deliantra/server/lib/cf/match.pm 2009/10/12 17:37:43 1.15 +++ deliantra/server/lib/cf/match.pm 2009/10/12 21:27:55 1.18 @@ -142,14 +142,17 @@ type=SPELL also in inv -=item deep in ... +=item also deep in ... Repeats the operation as many times as possible. This can be used to recursively look into objects. -=item also deep in ... +So for example, C means to take the inventory of all +objects, taking their inventories, and so on, and adding all these objects +to the context set. -C and C can be combined. +Similarly, C means to take the environment object, their +environemnt object and so on. Example: check if there are any unpaid items in an inventory, or in the inventories of the inventory objects, and so on. @@ -571,8 +574,10 @@ $expand = "map \$_->env // (),"; } elsif ($1 eq "arch") { $expand = "map \$_->arch,"; + $deep = 0; # infinite loop otherwise } elsif ($1 eq "map") { $expand = "map \$_->map->at (\$_->x, \$_->y),"; + $deep = 0; # infinite loop otherwise } } else { $expand = "map \$_->inv, grep { " . condition . " }"; @@ -680,6 +685,10 @@ } } +our $CACHE_CLEARER = AE::timer 3600, 3600, sub { + %CACHE = (); +}; + #d# $::schmorp=cf::player::find "schmorp"& #d# cf::match::match '', $::schmorp->ob