Changeset View
Changeset View
Standalone View
Standalone View
source/tools/entity/checkrefs.pl
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | for my $f (sort @entfiles) | ||||
push @deps, [ $path, "simulation/templates/" . $ent->{Entity}{'@parent'}{' content'} . ".xml" ] if $ent->{Entity}{'@parent'}; | push @deps, [ $path, "simulation/templates/" . $ent->{Entity}{'@parent'}{' content'} . ".xml" ] if $ent->{Entity}{'@parent'}; | ||||
if ($f !~ /^template_/) | if ($f !~ /^template_/) | ||||
{ | { | ||||
push @roots, $path; | push @roots, $path; | ||||
if ($ent->{Entity}{VisualActor} and $ent->{Entity}{VisualActor}{Actor}) | if ($ent->{Entity}{VisualActor} and $ent->{Entity}{VisualActor}{Actor}) | ||||
{ | { | ||||
my $phenotypes = $ent->{Entity}{Identity}{Phenotype}{' content'} || "default"; | my $phenotypes = $ent->{Entity}{Identity}{Phenotype}{' content'} || "default"; | ||||
my $civ = $ent->{Entity}{Identity}{Civ}{' content'} || "athen"; | |||||
my @phenotypes = split /\s/,$phenotypes; | my @phenotypes = split /\s/,$phenotypes; | ||||
for my $phenotype (@phenotypes) | for my $phenotype (@phenotypes) | ||||
{ | { | ||||
# See simulation2/components/CCmpVisualActor.cpp and Identity.js for explanation. | # See simulation2/components/CCmpVisualActor.cpp and Identity.js for explanation. | ||||
my $actorPath = $ent->{Entity}{VisualActor}{Actor}{' content'}; | my $actorPath = $ent->{Entity}{VisualActor}{Actor}{' content'}; | ||||
$actorPath =~ s/{phenotype}/$phenotype/g; | $actorPath =~ s/{phenotype}/$phenotype/g; | ||||
$actorPath =~ s/{civ}/$civ/g; | |||||
push @deps, [ $path, "art/actors/" . $actorPath ]; | push @deps, [ $path, "art/actors/" . $actorPath ]; | ||||
} | } | ||||
push @deps, [ $path, "art/actors/" . $ent->{Entity}{VisualActor}{FoundationActor}{' content'} ] if $ent->{Entity}{VisualActor}{FoundationActor}; | push @deps, [ $path, "art/actors/" . $ent->{Entity}{VisualActor}{FoundationActor}{' content'} ] if $ent->{Entity}{VisualActor}{FoundationActor}; | ||||
} | } | ||||
if ($ent->{Entity}{Sound}) | if ($ent->{Entity}{Sound}) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 537 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator