Games::Lacuna::Task::Role::Building - Helper methods for buildings
package Games::Lacuna::Task::Action::MyTask; use Moose; extends qw(Games::Lacuna::Task::Action); with qw(Games::Lacuna::Task::Role::Building);
This role provides building-related helper methods.
my $avaliable_buildspots = $self->find_buildspot($planet_id);
Returns all available build spots as an Array Reference.
my $upgrade_ok = $self->upgrade_building($planet_stats,$building_data);
Tries to upgrade the given building while performing various checks.
my $count = $self->build_queue_size($planet_stats);
Calculates the build queue size
my $is_upgradeable = $self->check_upgrade_building($planet_stats,$building_data);
Checks if a building is upgradeable