Changeset View
Changeset View
Standalone View
Standalone View
source/tools/entity/checkrefs.pl
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | sub add_entities | ||||
s~^simulation/templates/(.*)\.xml$~$1~ for @entfiles; | s~^simulation/templates/(.*)\.xml$~$1~ for @entfiles; | ||||
for my $f (sort @entfiles) | for my $f (sort @entfiles) | ||||
{ | { | ||||
my $path = "simulation/templates/$f.xml"; | my $path = "simulation/templates/$f.xml"; | ||||
push @files, $path; | push @files, $path; | ||||
my $ent = Entity::load_inherited($f, "$mod_list_string"); | my $ent = Entity::load_inherited($f, "$mod_list_string"); | ||||
push @deps, [ $path, "simulation/templates/" . $ent->{Entity}{'@parent'}{' content'} . ".xml" ] if $ent->{Entity}{'@parent'}; | if ($ent->{Entity}{'@parent'}) | ||||
{ | |||||
my @parents = split(/\|/, $ent->{Entity}{'@parent'}{' content'}); | |||||
for my $parentPath (@parents) | |||||
{ | |||||
push @deps, [ $path, "simulation/templates/" . $parentPath . ".xml" ]; | |||||
} | |||||
} | |||||
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 @phenotypes = split /\s/,$phenotypes; | my @phenotypes = split /\s/,$phenotypes; | ||||
▲ Show 20 Lines • Show All 564 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator