Mercurial > eagle-eye
comparison agent.pl @ 208:a2bb38589172
refined debug file name
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Mon, 03 Nov 2008 20:07:05 +0800 |
parents | 48ea8222782a |
children | 5f94d8d8370a |
comparison
equal
deleted
inserted
replaced
207:48ea8222782a | 208:a2bb38589172 |
---|---|
365 $cities->{$cityId}->{parse_path} = []; | 365 $cities->{$cityId}->{parse_path} = []; |
366 $cities->{$cityId}->{parse_answer} = undef; | 366 $cities->{$cityId}->{parse_answer} = undef; |
367 if (my $action = ParseTree($tree, $rules, $cities->{$cityId})) { | 367 if (my $action = ParseTree($tree, $rules, $cities->{$cityId})) { |
368 triggerAction($action, $cityId); | 368 triggerAction($action, $cityId); |
369 } | 369 } |
370 DumpFile("army-dump.yaml", $cities); | 370 DumpFile("military-$cityId-dump.yaml", $cities->{$cityId}); |
371 | 371 |
372 # build and upgrade for cities | 372 # build and upgrade for cities |
373 $tree = LoadFile('city.yaml'); | 373 $tree = LoadFile('city.yaml'); |
374 $cities->{$cityId}->{parse_path} = []; | 374 $cities->{$cityId}->{parse_path} = []; |
375 $cities->{$cityId}->{parse_answer} = undef; | 375 $cities->{$cityId}->{parse_answer} = undef; |
376 if (my $action = ParseTree($tree, $rules, $cities->{$cityId})) { | 376 if (my $action = ParseTree($tree, $rules, $cities->{$cityId})) { |
377 triggerAction($action, $cityId); | 377 triggerAction($action, $cityId); |
378 } | 378 } |
379 DumpFile("cities-dump.yaml", $cities); | 379 DumpFile("city-$cityId-dump.yaml", $cities->{$cityId}); |
380 } | 380 } |
381 DumpFile("research-dump.yaml", $i->{'research'}); | 381 DumpFile("research-dump.yaml", $i->{'research'}); |
382 DumpFile("military-dump.yaml", $i->{'military'}); | 382 DumpFile("wares-dump.yaml", $i->{'military'}); |
383 | 383 |
384 $i->logout; | 384 $i->logout; |
385 | 385 |
386 sub triggerAction { | 386 sub triggerAction { |
387 my ($action, $cityId) = @_; | 387 my ($action, $cityId) = @_; |