From bb43a714604348140667da123c41c04ce77c0ed6 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Mon, 5 May 2014 01:09:53 +0000 Subject: [PATCH] Updates checkrefs.pl to support skirmish maps This was SVN commit r15112. --- source/tools/entity/checkrefs.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/tools/entity/checkrefs.pl b/source/tools/entity/checkrefs.pl index 4930a72894..a0030dbe28 100755 --- a/source/tools/entity/checkrefs.pl +++ b/source/tools/entity/checkrefs.pl @@ -7,7 +7,7 @@ use JSON; use Entity; -use constant CHECK_SCENARIOS_XML => 0; +use constant CHECK_MAPS_XML => 0; use constant ROOT_ACTORS => 1; my @files; @@ -171,10 +171,11 @@ sub add_particles } } -sub add_scenarios_xml +sub add_maps_xml { - print "Loading scenario XML...\n"; + print "Loading maps XML...\n"; my @mapfiles = find_files('maps/scenarios', 'xml'); + push @mapfiles, find_files('maps/skirmishes', 'xml'); for my $f (sort @mapfiles) { print " $f\n"; @@ -215,9 +216,9 @@ sub add_scenarios_xml } } -sub add_scenarios_pmp +sub add_maps_pmp { - print "Loading scenario PMP...\n"; + print "Loading maps PMP...\n"; # Need to generate terrain texture filename=>path lookup first my %terrains; @@ -234,6 +235,7 @@ sub add_scenarios_pmp } my @mapfiles = find_files('maps/scenarios', 'pmp'); + push @mapfiles, find_files('maps/skirmishes', 'pmp'); for my $f (sort @mapfiles) { push @files, $f; @@ -510,9 +512,9 @@ sub check_unused } -add_scenarios_xml() if CHECK_SCENARIOS_XML; +add_maps_xml() if CHECK_MAPS_XML; -add_scenarios_pmp(); +add_maps_pmp(); add_entities();