Index: ps/trunk/binaries/data/mods/public/maps/scenarios/unit_motion_integration_test.xml =================================================================== --- ps/trunk/binaries/data/mods/public/maps/scenarios/unit_motion_integration_test.xml +++ ps/trunk/binaries/data/mods/public/maps/scenarios/unit_motion_integration_test.xml @@ -1,63 +1,77 @@ - default - + - + + + 0 + 0.5 + + ocean - + + 5 - 4.0 + 4 0.45 - + 0 + + 0 + 1 + 0.99 + 0.1999 + default + - + - + +{ + "CircularMap": true, + "Description": "This map is designed to test some basic unit movement cases. It will involve unitAI, unitMotion and the relevant pathfinders and thus acts as an integrated test map. Look for things such as stuck units, wrong animations, and weird pathing.", + "Keywords": [ + "trigger", + "demo" + ], + "Name": "Unit Motion Integration Test", + "PlayerData": [ + { + "Civ": "athen" + }, + { + "AI": "", + "Civ": "athen" + } + ], + "RevealMap": true, + "TriggerScripts": [ + "scripts/TriggerHelper.js", + "scenarios/unit_motion_integration_test.js" + ], + "VictoryConditions": [ + "conquest" + ] +} +]]> 2 + + Index: ps/trunk/source/tools/entity/checkrefs.pl =================================================================== --- ps/trunk/source/tools/entity/checkrefs.pl +++ ps/trunk/source/tools/entity/checkrefs.pl @@ -135,24 +135,39 @@ if ($f !~ /^template_/) { push @roots, $path; - if ($ent->{Entity}{VisualActor}) + if ($ent->{Entity}{VisualActor} and $ent->{Entity}{VisualActor}{Actor}) { - push @deps, [ $path, "art/actors/" . $ent->{Entity}{VisualActor}{Actor}{' content'} ] if $ent->{Entity}{VisualActor}{Actor}; + my $phenotypes = $ent->{Entity}{Identity}{Phenotype}{' content'} || "default"; + my @phenotypes = split /\s/,$phenotypes; + + for my $phenotype (@phenotypes) + { + # See simulation2/components/CCmpVisualActor.cpp and Identity.js for explanation. + my $actorPath = $ent->{Entity}{VisualActor}{Actor}{' content'}; + $actorPath =~ s/{phenotype}/$phenotype/g; + push @deps, [ $path, "art/actors/" . $actorPath ]; + } + push @deps, [ $path, "art/actors/" . $ent->{Entity}{VisualActor}{FoundationActor}{' content'} ] if $ent->{Entity}{VisualActor}{FoundationActor}; } if ($ent->{Entity}{Sound}) { - my $gender = $ent->{Entity}{Identity}{Gender}{' content'} || "male"; + my $phenotypes = $ent->{Entity}{Identity}{Phenotype}{' content'} || "default"; my $lang = $ent->{Entity}{Identity}{Lang}{' content'} || "greek"; - for (grep ref($_), values %{$ent->{Entity}{Sound}{SoundGroups}}) + my @phenotypes = split /\s/,$phenotypes; + + for my $phenotype (@phenotypes) { - # see simulation/components/Sound.js and Identity.js for explanation - my $soundPath = $_->{' content'}; - $soundPath =~ s/{gender}/$gender/g; - $soundPath =~ s/{lang}/$lang/g; - push @deps, [ $path, "audio/" . $soundPath ]; + for (grep ref($_), values %{$ent->{Entity}{Sound}{SoundGroups}}) + { + # see simulation/components/Sound.js and Identity.js for explanation + my $soundPath = $_->{' content'}; + $soundPath =~ s/{phenotype}/$phenotype/g; + $soundPath =~ s/{lang}/$lang/g; + push @deps, [ $path, "audio/" . $soundPath ]; + } } }