Games::Lacuna::Task::Role::Storage - Storage helper methods
package Games::Lacuna::Task::Action::MyTask; use Moose; extends qw(Games::Lacuna::Task::Action); with qw(Games::Lacuna::Task::Role::Storage);
This role provides helper method to query storage buildings.
my $type = $self->resource_type('magnetite'); # $type is 'ore'
Returns the type of the requested resource
my $quantity1 = $self->resource_type($planet_stats,'magnetite'); my $quantity2 = $self->resource_type($planet_stats,'water');
Returns the stored quantity for the given resource
$self->food_stored($planet_id);
Returns a hashref of all stored foods
$self->ore_stored($planet_id);
Returns a hashref of all stored ores
Returns an arrayref of all stored plans
$self->_resource_stored($planet_id,'ore','OreStorage');
Helper method to query storage building for details.
To install Games::Lacuna::Task, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Lacuna::Task
CPAN shell
perl -MCPAN -e shell install Games::Lacuna::Task
For more information on module installation, please visit the detailed CPAN module installation guide.