76 lines
1.3 KiB
Perl
76 lines
1.3 KiB
Perl
package LasTres::Planet::Bahdder::BosqueDelHeroe::BosqueDelHeroeI;
|
|
|
|
use v5.36.0;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use feature 'signatures';
|
|
|
|
use utf8;
|
|
|
|
use Module::Pluggable search_path => ['LasTres::Planet::Bahdder::BosqueDelHeroe::BosqueDelHeroeI'],
|
|
instantiate => 'instance',
|
|
on_require_error => sub ($plugin, $error) {
|
|
die $error;
|
|
};
|
|
|
|
use Moo;
|
|
|
|
use LasTres::Planet::Bahdder::BosqueDelHeroe;
|
|
|
|
has locations => (
|
|
is => 'ro',
|
|
builder => \&_build_locations,
|
|
lazy => 1,
|
|
);
|
|
|
|
has identifier => (
|
|
is => 'ro',
|
|
builder => \&_build_identifier,
|
|
);
|
|
|
|
has name => (
|
|
is => 'ro',
|
|
builder => \&_build_name,
|
|
);
|
|
|
|
has parent => (
|
|
is => 'ro',
|
|
builder => \&_build_parent,
|
|
);
|
|
|
|
with 'LasTres::Area';
|
|
|
|
sub _build_identifier {
|
|
return 'bosque_del_heroe_i';
|
|
}
|
|
|
|
sub _build_locations {
|
|
my $self = shift;
|
|
my $hash = {};
|
|
my @locations = $self->plugins();
|
|
for my $location (@locations) {
|
|
$hash->{$location->identifier} = $location;
|
|
}
|
|
return $hash;
|
|
}
|
|
|
|
sub _build_name {
|
|
return 'Bosque del Héroe (I)';
|
|
}
|
|
|
|
sub _build_parent {
|
|
return LasTres::Planet::Bahdder::BosqueDelHeroe->instance;
|
|
}
|
|
|
|
my $singleton;
|
|
sub instance {
|
|
my $class = shift;
|
|
if (!defined $singleton) {
|
|
$singleton = $class->new(@_);
|
|
}
|
|
return $singleton;
|
|
}
|
|
1;
|