diff --git a/add_a_building.txt b/add_a_building.txt index 5fbe147e..40227f77 100644 --- a/add_a_building.txt +++ b/add_a_building.txt @@ -1,15 +1,15 @@ create DB::Result class +add to class types in Lacuna::DB::Result::Building create RPC class create pod file link pod file in docs/Buildings.pod -add to class types in Lacuna::DB::Result::Building add to bin/lacuna.psgi add to Lacuna::DB::Result::Medals +add to var/www/public/resources.json upload a medal image upload the building images in all 4 sizes create wiki entry -add to var/www/public/building_descriptions.json -update the tech tree image # if buildable add to Lacuna::Constants::BUILDABLE_CLASSES +update the tech tree image diff --git a/bin/lacuna.psgi b/bin/lacuna.psgi index f8e0e0ff..180ae710 100644 --- a/bin/lacuna.psgi +++ b/bin/lacuna.psgi @@ -35,6 +35,12 @@ $urlmap->map("/facebook" => Lacuna::Web::Facebook->new->to_app); $urlmap->map("/apikey" => Lacuna::Web::ApiKey->new->to_app); # buildings +$urlmap->map(Lacuna::RPC::Building::ThemePark->new->to_app_with_url); +$urlmap->map(Lacuna::RPC::Building::BlackHoleGenerator->new->to_app_with_url); +$urlmap->map(Lacuna::RPC::Building::TheDillonForge->new->to_app_with_url); +$urlmap->map(Lacuna::RPC::Building::HallsOfVrbansk->new->to_app_with_url); +$urlmap->map(Lacuna::RPC::Building::GratchsGauntlet->new->to_app_with_url); +$urlmap->map(Lacuna::RPC::Building::KasternsKeep->new->to_app_with_url); $urlmap->map(Lacuna::RPC::Building::SubspaceSupplyDepot->new->to_app_with_url); $urlmap->map(Lacuna::RPC::Building::PantheonOfHagness->new->to_app_with_url); $urlmap->map(Lacuna::RPC::Building::Capitol->new->to_app_with_url); diff --git a/docs/AlgaePond.pod b/docs/AlgaePond.pod new file mode 100644 index 00000000..5c601b73 --- /dev/null +++ b/docs/AlgaePond.pod @@ -0,0 +1,7 @@ +=head1 Algae Pond Methods + +Algae Pond is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/docs/BlackHoleGenerator.pod b/docs/BlackHoleGenerator.pod new file mode 100644 index 00000000..93c428ae --- /dev/null +++ b/docs/BlackHoleGenerator.pod @@ -0,0 +1,7 @@ +=head1 Black Hole Generator Methods + +Black Hole Generator is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/docs/Buildings.pod b/docs/Buildings.pod index 52808824..0fee92a8 100644 --- a/docs/Buildings.pod +++ b/docs/Buildings.pod @@ -280,6 +280,8 @@ Below is a list of the different types of structures that can be built on planet =item L +=item L + =item L =item L @@ -288,6 +290,8 @@ Below is a list of the different types of structures that can be built on planet =item L +=item L + =item L =item L @@ -344,8 +348,12 @@ Below is a list of the different types of structures that can be built on planet =item L +=item L + =item L +=item L + =item L =item L @@ -354,6 +362,8 @@ Below is a list of the different types of structures that can be built on planet =item L +=item L + =item L =item L @@ -434,6 +444,10 @@ Below is a list of the different types of structures that can be built on planet =item L +=item L + +=item L + =item L =item L diff --git a/docs/GratchsGauntlet.pod b/docs/GratchsGauntlet.pod new file mode 100644 index 00000000..4295313a --- /dev/null +++ b/docs/GratchsGauntlet.pod @@ -0,0 +1,7 @@ +=head1 Gratch's Gauntlet Methods + +Gratch's Gauntlet is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/docs/HallsOfVrbansk.pod b/docs/HallsOfVrbansk.pod new file mode 100644 index 00000000..c7b7f5b4 --- /dev/null +++ b/docs/HallsOfVrbansk.pod @@ -0,0 +1,7 @@ +=head1 Halls Of Vrbansk Methods + +Halls Of Vrbansk is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/docs/KasternsKeep.pod b/docs/KasternsKeep.pod new file mode 100644 index 00000000..24608a55 --- /dev/null +++ b/docs/KasternsKeep.pod @@ -0,0 +1,7 @@ +=head1 Kastern's Keep Methods + +Kastern's Keep is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/docs/LibraryOfJith.pod b/docs/LibraryOfJith.pod index 4e36a501..aea9dc6c 100644 --- a/docs/LibraryOfJith.pod +++ b/docs/LibraryOfJith.pod @@ -1,6 +1,6 @@ -=head1 LibraryOfJith Methods +=head1 Algae Methods -Library of Jith is accessible via the URL C. +Algae is accessible via the URL C. The list of methods below represents changes and additions to the methods that all L share. diff --git a/docs/MassadsHenge.pod b/docs/MassadsHenge.pod index 61b4c6c7..aea9dc6c 100644 --- a/docs/MassadsHenge.pod +++ b/docs/MassadsHenge.pod @@ -1,6 +1,6 @@ -=head1 MassadsHenge Methods +=head1 Algae Methods -Massads Henge is accessible via the URL C. +Algae is accessible via the URL C. The list of methods below represents changes and additions to the methods that all L share. diff --git a/docs/OracleOfAnid.pod b/docs/OracleOfAnid.pod index 54dc9c2b..aea9dc6c 100644 --- a/docs/OracleOfAnid.pod +++ b/docs/OracleOfAnid.pod @@ -1,6 +1,6 @@ -=head1 OracleOfAnid Methods +=head1 Algae Methods -Oracle of Anid is accessible via the URL C. +Algae is accessible via the URL C. The list of methods below represents changes and additions to the methods that all L share. diff --git a/docs/TheDillonForge.pod b/docs/TheDillonForge.pod new file mode 100644 index 00000000..2d62e4e8 --- /dev/null +++ b/docs/TheDillonForge.pod @@ -0,0 +1,7 @@ +=head1 The Dillon Forge Methods + +The Dillon Forge is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/docs/ThemePark.pod b/docs/ThemePark.pod new file mode 100644 index 00000000..81e395e6 --- /dev/null +++ b/docs/ThemePark.pod @@ -0,0 +1,7 @@ +=head1 Theme Park Methods + +Theme Park is accessible via the URL C. + +The list of methods below represents changes and additions to the methods that all L share. + +=cut \ No newline at end of file diff --git a/lib/Lacuna/Constants.pm b/lib/Lacuna/Constants.pm index d536d07f..c220ae4b 100644 --- a/lib/Lacuna/Constants.pm +++ b/lib/Lacuna/Constants.pm @@ -27,6 +27,7 @@ use constant FINDABLE_PLANS => (qw( Lacuna::DB::Result::Building::Permanent::AlgaePond )); use constant BUILDABLE_CLASSES => (qw( + Lacuna::RPC::Building::ThemePark Lacuna::RPC::Building::MissionCommand Lacuna::RPC::Building::CloakingLab Lacuna::RPC::Building::MunitionsLab diff --git a/lib/Lacuna/DB/Result/Building.pm b/lib/Lacuna/DB/Result/Building.pm index 96749dac..f68d9355 100644 --- a/lib/Lacuna/DB/Result/Building.pm +++ b/lib/Lacuna/DB/Result/Building.pm @@ -1018,6 +1018,12 @@ sub spend_efficiency { 'Lacuna::DB::Result::Building::Permanent::Ravine' => 'Lacuna::DB::Result::Building::Permanent::Ravine', 'Lacuna::DB::Result::Building::Permanent::PantheonOfHagness' => 'Lacuna::DB::Result::Building::Permanent::PantheonOfHagness', 'Lacuna::DB::Result::Building::SubspaceSupplyDepot' => 'Lacuna::DB::Result::Building::SubspaceSupplyDepot', + 'Lacuna::DB::Result::Building::ThemePark' => 'Lacuna::DB::Result::Building::ThemePark', + 'Lacuna::DB::Result::Building::Permanent::BlackHoleGenerator' => 'Lacuna::DB::Result::Building::Permanent::BlackHoleGenerator', + 'Lacuna::DB::Result::Building::Permanent::GratchsGauntlet' => 'Lacuna::DB::Result::Building::Permanent::GratchsGauntlet', + 'Lacuna::DB::Result::Building::Permanent::HallsOfVrbansk' => 'Lacuna::DB::Result::Building::Permanent::HallsOfVrbansk', + 'Lacuna::DB::Result::Building::Permanent::KasternsKeep' => 'Lacuna::DB::Result::Building::Permanent::KasternsKeep', + 'Lacuna::DB::Result::Building::Permanent::TheDillonForge' => 'Lacuna::DB::Result::Building::Permanent::TheDillonForge', }); } diff --git a/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm b/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm new file mode 100644 index 00000000..ce6ea87d --- /dev/null +++ b/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm @@ -0,0 +1,40 @@ +package Lacuna::DB::Result::Building::Permanent::BlackHoleGenerator; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Building::Permanent'; + +use constant controller_class => 'Lacuna::RPC::Building::BlackHoleGenerator'; + +around can_build => sub { + my ($orig, $self, $body) = @_; + if ($body->get_plan(__PACKAGE__, 1)) { + return $orig->($self, $body); + } + confess [1013,"You can't build a Black Hole Generator."]; +}; + +sub can_upgrade { + confess [1013, "You can't upgrade a Black Hole Generator."]; +} + +use constant image => 'blackholegenerator'; + +sub image_level { + my ($self) = @_; + return $self->image.'1'; +} + +after finish_upgrade => sub { + my $self = shift; + $self->body->add_news(30, sprintf('%s is experimenting with advanced singularity technology.', $self->body->name)); +}; + +use constant name => 'Black Hole Generator'; +use constant time_to_build => 0; +use constant max_instances_per_planet => 1; + + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm b/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm new file mode 100644 index 00000000..46c8b1df --- /dev/null +++ b/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm @@ -0,0 +1,40 @@ +package Lacuna::DB::Result::Building::Permanent::GratchsGauntlet; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(randint); + +use constant controller_class => 'Lacuna::RPC::Building::GratchsGauntlet'; + +around can_build => sub { + my ($orig, $self, $body) = @_; + if ($body->get_plan(__PACKAGE__, 1)) { + return $orig->($self, $body); + } + confess [1013,"You can't build Gratch's Gauntlet."]; +}; + +sub can_upgrade { + confess [1013, "You can't upgrade an Gratch's Gauntlet."]; +} + +use constant image => 'gratchsgauntlet'; + +sub image_level { + my ($self) = @_; + return $self->image.'1'; +} + +after finish_upgrade => sub { + my $self = shift; + $self->body->add_news(30, sprintf('The agents on %s use techniques handed down for millenia, which they say makes them unbeatable.', $self->body->name)); +}; + +use constant name => 'Gratch\'s Gauntlet'; +use constant time_to_build => 0; +use constant max_instances_per_planet => 1; + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/HallsOfVrbansk.pm b/lib/Lacuna/DB/Result/Building/Permanent/HallsOfVrbansk.pm new file mode 100644 index 00000000..b6692edd --- /dev/null +++ b/lib/Lacuna/DB/Result/Building/Permanent/HallsOfVrbansk.pm @@ -0,0 +1,39 @@ +package Lacuna::DB::Result::Building::Permanent::HallsOfVrbansk; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Building::Permanent'; + +use constant controller_class => 'Lacuna::RPC::Building::HallsOfVrbansk'; + +around can_build => sub { + my ($orig, $self, $body) = @_; + if ($body->get_plan(__PACKAGE__, 1)) { + return $orig->($self, $body); + } + confess [1013,"You can't build the Halls of Vrbansk."]; +}; + +sub can_upgrade { + confess [1013, "You can't upgrade the Halls of Vrbansk."]; +} + +use constant image => 'hallsofvrbansk'; + +sub image_level { + my ($self) = @_; + return $self->image.'1'; +} + +after finish_upgrade => sub { + my $self = shift; + $self->body->add_news(30, sprintf('The ancient wisdom of the Great Race is still alive on %s.', $self->body->name)); +}; + +use constant name => 'Halls of Vrbansk'; +use constant time_to_build => 0; + + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm b/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm new file mode 100644 index 00000000..cbfe6c8c --- /dev/null +++ b/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm @@ -0,0 +1,41 @@ +package Lacuna::DB::Result::Building::Permanent::KasternsKeep; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(randint); + +use constant controller_class => 'Lacuna::RPC::Building::KasternsKeep'; + +around can_build => sub { + my ($orig, $self, $body) = @_; + if ($body->get_plan(__PACKAGE__, 1)) { + return $orig->($self, $body); + } + confess [1013,"You can't build Kastern's Keep."]; +}; + +sub can_upgrade { + confess [1013, "You can't upgrade Kastern's Keep."]; +} + +use constant image => 'kasternskeep'; + +sub image_level { + my ($self) = @_; + return $self->image.'1'; +} + +after finish_upgrade => sub { + my $self = shift; + $self->body->add_news(30, sprintf('The old castle stands alone atop a bluff on %s. And still looks magestic after all these years.', $self->body->name)); +}; + +use constant name => 'Kastern\'s Keep'; +use constant time_to_build => 0; +use constant max_instances_per_planet => 1; + + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm b/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm index 8f1df343..90dde0df 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm @@ -1,25 +1,26 @@ -package Lacuna::DB::Result::Building::Permanent::LibraryOfJith; +package Lacuna::DB::Result::Building::Permanent::AlgaePond; use Moose; use utf8; no warnings qw(uninitialized); extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(randint); -use constant controller_class => 'Lacuna::RPC::Building::LibraryOfJith'; +use constant controller_class => 'Lacuna::RPC::Building::AlgaePond'; around can_build => sub { my ($orig, $self, $body) = @_; if ($body->get_plan(__PACKAGE__, 1)) { return $orig->($self, $body); } - confess [1013,"You can't build the Library of Jith. It was left behind by the Great Race."]; + confess [1013,"You can't build an Algae Pond. It forms naturally."]; }; sub can_upgrade { - confess [1013, "You can't upgrade the Library of Jith. It was left behind by the Great Race."]; + confess [1013, "You can't upgrade an Algae Pond. It forms naturally."]; } -use constant image => 'libraryjith'; +use constant image => 'algaepond'; sub image_level { my ($self) = @_; @@ -28,15 +29,20 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('Archaeologists discovered the long rumored Library of Jith on %s this morning.', $self->body->name)); + $self->body->add_news(30, sprintf('This is no fisherman\'s tale. A local fisherman caught a '.randint(1,9).' meter Rakl out of an algae pond on %s.', $self->body->name)); }; - -use constant name => 'Library of Jith'; - +use constant name => 'Algae Pond'; use constant time_to_build => 0; use constant max_instances_per_planet => 1; +use constant algae_production => 4000; +around produces_food_items => sub { + my ($orig, $class) = @_; + my $foods = $orig->($class); + push @{$foods}, qw(algae); + return $foods; +}; no Moose; __PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm b/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm index 71d4d307..90dde0df 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm @@ -1,25 +1,26 @@ -package Lacuna::DB::Result::Building::Permanent::MassadsHenge; +package Lacuna::DB::Result::Building::Permanent::AlgaePond; use Moose; use utf8; no warnings qw(uninitialized); extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(randint); -use constant controller_class => 'Lacuna::RPC::Building::MassadsHenge'; +use constant controller_class => 'Lacuna::RPC::Building::AlgaePond'; around can_build => sub { my ($orig, $self, $body) = @_; if ($body->get_plan(__PACKAGE__, 1)) { return $orig->($self, $body); } - confess [1013,"You can't build Massad's Henge. It was left behind by the Great Race."]; + confess [1013,"You can't build an Algae Pond. It forms naturally."]; }; sub can_upgrade { - confess [1013, "You can't upgrade Massad's Henge. It was left behind by the Great Race."]; + confess [1013, "You can't upgrade an Algae Pond. It forms naturally."]; } -use constant image => 'massadshenge'; +use constant image => 'algaepond'; sub image_level { my ($self) = @_; @@ -28,14 +29,20 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('The discovery of Massad\'s Henge on %s has historians puzzled. It was assumed to only be legend.', $self->body->name)); + $self->body->add_news(30, sprintf('This is no fisherman\'s tale. A local fisherman caught a '.randint(1,9).' meter Rakl out of an algae pond on %s.', $self->body->name)); }; -use constant name => 'Massad\'s Henge'; - +use constant name => 'Algae Pond'; use constant time_to_build => 0; use constant max_instances_per_planet => 1; +use constant algae_production => 4000; +around produces_food_items => sub { + my ($orig, $class) = @_; + my $foods = $orig->($class); + push @{$foods}, qw(algae); + return $foods; +}; no Moose; __PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm b/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm index fa1b3d8f..90dde0df 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm @@ -1,41 +1,48 @@ -package Lacuna::DB::Result::Building::Permanent::OracleOfAnid; +package Lacuna::DB::Result::Building::Permanent::AlgaePond; use Moose; use utf8; no warnings qw(uninitialized); extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(randint); -use constant controller_class => 'Lacuna::RPC::Building::OracleOfAnid'; +use constant controller_class => 'Lacuna::RPC::Building::AlgaePond'; around can_build => sub { my ($orig, $self, $body) = @_; if ($body->get_plan(__PACKAGE__, 1)) { return $orig->($self, $body); } - confess [1013,"You can't build the Oracle of Anid. It was left behind by the Great Race."]; + confess [1013,"You can't build an Algae Pond. It forms naturally."]; }; sub can_upgrade { - confess [1013, "You can't upgrade the Oracle of Anid. It was left behind by the Great Race."]; + confess [1013, "You can't upgrade an Algae Pond. It forms naturally."]; } -after finish_upgrade => sub { - my $self = shift; - $self->body->add_news(50, sprintf('As the Oracle of Anid was untombed on %s today, it began to shimmer with a warm red glow.', $self->body->name)); -}; - -use constant image => 'oracleanid'; +use constant image => 'algaepond'; sub image_level { my ($self) = @_; return $self->image.'1'; } -use constant name => 'Oracle of Anid'; +after finish_upgrade => sub { + my $self = shift; + $self->body->add_news(30, sprintf('This is no fisherman\'s tale. A local fisherman caught a '.randint(1,9).' meter Rakl out of an algae pond on %s.', $self->body->name)); +}; +use constant name => 'Algae Pond'; use constant time_to_build => 0; use constant max_instances_per_planet => 1; +use constant algae_production => 4000; +around produces_food_items => sub { + my ($orig, $class) = @_; + my $foods = $orig->($class); + push @{$foods}, qw(algae); + return $foods; +}; no Moose; __PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm b/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm new file mode 100644 index 00000000..b0927745 --- /dev/null +++ b/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm @@ -0,0 +1,41 @@ +package Lacuna::DB::Result::Building::Permanent::TheDillonForge; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(randint); + +use constant controller_class => 'Lacuna::RPC::Building::TheDillonForge'; + +around can_build => sub { + my ($orig, $self, $body) = @_; + if ($body->get_plan(__PACKAGE__, 1)) { + return $orig->($self, $body); + } + confess [1013,"You can't build The Dillon Forge."]; +}; + +sub can_upgrade { + confess [1013, "You can't upgrade The Dillon Forge."]; +} + +use constant image => 'thedillonforge'; + +sub image_level { + my ($self) = @_; + return $self->image.'1'; +} + +after finish_upgrade => sub { + my $self = shift; + $self->body->add_news(30, sprintf('It is hard to believe that after going unused for nearly '.randint(10,99).',000 years, The Dillon Forge still works on %s.', $self->body->name)); +}; + +use constant name => 'The Dillon Forge'; +use constant time_to_build => 0; +use constant max_instances_per_planet => 1; + + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Building/ThemePark.pm b/lib/Lacuna/DB/Result/Building/ThemePark.pm new file mode 100644 index 00000000..c8976abc --- /dev/null +++ b/lib/Lacuna/DB/Result/Building/ThemePark.pm @@ -0,0 +1,51 @@ +package Lacuna::DB::Result::Building::ThemePark; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::DB::Result::Building'; +use DateTime; +use Lacuna::Constants qw(FOOD_TYPES); + +around 'build_tags' => sub { + my ($orig, $class) = @_; + return ($orig->($class), qw(Infrastructure Happiness)); +}; + + +use constant controller_class => 'Lacuna::RPC::Building::ThemePark'; + +use constant university_prereq => 16; + +use constant image => 'themepark'; + +use constant name => 'Theme Park'; + +use constant food_to_build => 500; + +use constant energy_to_build => 1005; + +use constant ore_to_build => 900; + +use constant water_to_build => 715; + +use constant waste_to_build => 995; + +use constant time_to_build => 300; + +use constant food_consumption => 125; + +use constant energy_consumption => 130; + +use constant ore_consumption => 15; + +use constant water_consumption => 150; + +use constant waste_production => 115; + +use constant happiness_production => 0; + + + +no Moose; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/Lacuna/DB/Result/Medals.pm b/lib/Lacuna/DB/Result/Medals.pm index 409b0ba6..51dc2836 100644 --- a/lib/Lacuna/DB/Result/Medals.pm +++ b/lib/Lacuna/DB/Result/Medals.pm @@ -163,6 +163,12 @@ use constant MEDALS => { building29 => 'Built Level 29 Building', building30 => 'Built Level 30 Building', Capitol => 'Built Capitol', + ThemePark => 'Built Theme Park', + BlackHoleGenerator => 'Discovered a Black Hole Generator', + HallsOfVrbansk => 'Discovered the Halls of Vrbansk', + GratchsGauntlet => 'Discovered Gratch\'s Gauntlet', + KasternsKeep => 'Discovered Kastern\'s Keep', + TheDillonForge => 'Discovered the Dillon Forge', SubspaceSupplyDepot => 'Received Subspace Supply Depot', Stockpile => 'Built Stockpile', Algae => 'Built Algae Cropper', diff --git a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm new file mode 100644 index 00000000..68898e54 --- /dev/null +++ b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm @@ -0,0 +1,18 @@ +package Lacuna::RPC::Building::BlackHoleGenerator; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::RPC::Building'; + +sub app_url { + return '/blackholegenerator'; +} + +sub model_class { + return 'Lacuna::DB::Result::Building::Permanent::BlackHoleGenerator'; +} + +no Moose; +__PACKAGE__->meta->make_immutable; + diff --git a/lib/Lacuna/RPC/Building/GratchsGauntlet.pm b/lib/Lacuna/RPC/Building/GratchsGauntlet.pm new file mode 100644 index 00000000..dcccdfdf --- /dev/null +++ b/lib/Lacuna/RPC/Building/GratchsGauntlet.pm @@ -0,0 +1,18 @@ +package Lacuna::RPC::Building::GratchsGauntlet; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::RPC::Building'; + +sub app_url { + return '/gratchsgauntlet'; +} + +sub model_class { + return 'Lacuna::DB::Result::Building::Permanent::GratchsGauntlet'; +} + +no Moose; +__PACKAGE__->meta->make_immutable; + diff --git a/lib/Lacuna/RPC/Building/HallsOfVrbansk.pm b/lib/Lacuna/RPC/Building/HallsOfVrbansk.pm new file mode 100644 index 00000000..c064a3f1 --- /dev/null +++ b/lib/Lacuna/RPC/Building/HallsOfVrbansk.pm @@ -0,0 +1,18 @@ +package Lacuna::RPC::Building::HallsOfVrbansk; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::RPC::Building'; + +sub app_url { + return '/hallsofvrbansk'; +} + +sub model_class { + return 'Lacuna::DB::Result::Building::Permanent::HallsOfVrbansk'; +} + +no Moose; +__PACKAGE__->meta->make_immutable; + diff --git a/lib/Lacuna/RPC/Building/KasternsKeep.pm b/lib/Lacuna/RPC/Building/KasternsKeep.pm new file mode 100644 index 00000000..e672cbb0 --- /dev/null +++ b/lib/Lacuna/RPC/Building/KasternsKeep.pm @@ -0,0 +1,18 @@ +package Lacuna::RPC::Building::KasternsKeep; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::RPC::Building'; + +sub app_url { + return '/kasternskeep'; +} + +sub model_class { + return 'Lacuna::DB::Result::Building::Permanent::KasternsKeep'; +} + +no Moose; +__PACKAGE__->meta->make_immutable; + diff --git a/lib/Lacuna/RPC/Building/LibraryOfJith.pm b/lib/Lacuna/RPC/Building/LibraryOfJith.pm index 994ecbb0..b38ce333 100644 --- a/lib/Lacuna/RPC/Building/LibraryOfJith.pm +++ b/lib/Lacuna/RPC/Building/LibraryOfJith.pm @@ -1,4 +1,4 @@ -package Lacuna::RPC::Building::LibraryOfJith; +package Lacuna::RPC::Building::AlgaePond; use Moose; use utf8; @@ -6,11 +6,11 @@ no warnings qw(uninitialized); extends 'Lacuna::RPC::Building'; sub app_url { - return '/libraryofjith'; + return '/algaepond'; } sub model_class { - return 'Lacuna::DB::Result::Building::Permanent::LibraryOfJith'; + return 'Lacuna::DB::Result::Building::Permanent::AlgaePond'; } no Moose; diff --git a/lib/Lacuna/RPC/Building/MassadsHenge.pm b/lib/Lacuna/RPC/Building/MassadsHenge.pm index 4a1b66b2..b38ce333 100644 --- a/lib/Lacuna/RPC/Building/MassadsHenge.pm +++ b/lib/Lacuna/RPC/Building/MassadsHenge.pm @@ -1,4 +1,4 @@ -package Lacuna::RPC::Building::MassadsHenge; +package Lacuna::RPC::Building::AlgaePond; use Moose; use utf8; @@ -6,11 +6,11 @@ no warnings qw(uninitialized); extends 'Lacuna::RPC::Building'; sub app_url { - return '/massadshenge'; + return '/algaepond'; } sub model_class { - return 'Lacuna::DB::Result::Building::Permanent::MassadsHenge'; + return 'Lacuna::DB::Result::Building::Permanent::AlgaePond'; } no Moose; diff --git a/lib/Lacuna/RPC/Building/OracleOfAnid.pm b/lib/Lacuna/RPC/Building/OracleOfAnid.pm index 6b1a170c..b38ce333 100644 --- a/lib/Lacuna/RPC/Building/OracleOfAnid.pm +++ b/lib/Lacuna/RPC/Building/OracleOfAnid.pm @@ -1,4 +1,4 @@ -package Lacuna::RPC::Building::OracleOfAnid; +package Lacuna::RPC::Building::AlgaePond; use Moose; use utf8; @@ -6,11 +6,11 @@ no warnings qw(uninitialized); extends 'Lacuna::RPC::Building'; sub app_url { - return '/oracleofanid'; + return '/algaepond'; } sub model_class { - return 'Lacuna::DB::Result::Building::Permanent::OracleOfAnid'; + return 'Lacuna::DB::Result::Building::Permanent::AlgaePond'; } no Moose; diff --git a/lib/Lacuna/RPC/Building/TheDillonForge.pm b/lib/Lacuna/RPC/Building/TheDillonForge.pm new file mode 100644 index 00000000..615071b3 --- /dev/null +++ b/lib/Lacuna/RPC/Building/TheDillonForge.pm @@ -0,0 +1,18 @@ +package Lacuna::RPC::Building::TheDillonForge; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::RPC::Building'; + +sub app_url { + return '/thedillonforge'; +} + +sub model_class { + return 'Lacuna::DB::Result::Building::Permanent::TheDillonForge'; +} + +no Moose; +__PACKAGE__->meta->make_immutable; + diff --git a/lib/Lacuna/RPC/Building/ThemePark.pm b/lib/Lacuna/RPC/Building/ThemePark.pm new file mode 100644 index 00000000..2f9403b0 --- /dev/null +++ b/lib/Lacuna/RPC/Building/ThemePark.pm @@ -0,0 +1,18 @@ +package Lacuna::RPC::Building::ThemePark; + +use Moose; +use utf8; +no warnings qw(uninitialized); +extends 'Lacuna::RPC::Building'; + +sub app_url { + return '/themepark'; +} + +sub model_class { + return 'Lacuna::DB::Result::Building::ThemePark'; +} + +no Moose; +__PACKAGE__->meta->make_immutable; + diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt new file mode 100644 index 00000000..a62567c0 --- /dev/null +++ b/var/www/public/changes.txt @@ -0,0 +1,12 @@ +2.3300 + - Started keeping a public change log. + - Added missioncommand.skip_mission(). + - Fixed a bug where you'd get an overflow message before you should. + - Added entertainment.duck_quack() and modified .view(). + - Added Subspace Supply Depot. + - Stopped combining items in mission objectives to make it easier to read. + - There is no longer a limit to the number of missions in a zone. + - Fixed a bug with plan matching for missions. + - Can no longer use scows for mining. + - Created stubs for Black Hole Generator, Gratch's Gauntlet, Halls of Vrbansk, Kastern's Keep, The Dillon Forge, and Theme Park. + - Fixed the bug that caused the Saben to instantly auto-recolonize planets after abandoning them. diff --git a/var/www/public/resources.json b/var/www/public/resources.json index 66fbc73f..a1a18ff3 100644 --- a/var/www/public/resources.json +++ b/var/www/public/resources.json @@ -1,5 +1,14 @@ { "buildings" : { + "/oracleofanid" : { "description" : "The all seeing Oracle can help detect enemy threats.", "wiki" : "http://community.lacunaexpanse.com/wiki/oracle-of-anid" }, + "/themepark" : { "description" : "Produces happiness for your citizens through food and entertainment.", "wiki" : "http://community.lacunaexpanse.com/wiki/theme-park" }, + "/massadshenge" : { "description" : "An ancient observatory.", "wiki" : "http://community.lacunaexpanse.com/wiki/massad-s-henge" }, + "/gratchsgauntlet" : { "description" : "The training grounds of the Great Race.", "wiki" : "http://community.lacunaexpanse.com/wiki/gratch-s-gauntlet" }, + "/kasternskeep" : { "description" : "The place from which the Great Race commanded their armies.", "wiki" : "http://community.lacunaexpanse.com/wiki/kastern-s-keep" }, + "/hallsofvrbansk" : { "description" : "The source of ancient wisdom.", "wiki" : "http://community.lacunaexpanse.com/wiki/halls-of-vrbansk" }, + "/libraryofjith" : { "description" : "Where the Great Race kept records of their experiments.", "wiki" : "http://community.lacunaexpanse.com/wiki/library-of-jith" }, + "/thedillonforge" : { "description" : "Where raw ore formed into glyphs and the glyph buildings were born.", "wiki" : "http://community.lacunaexpanse.com/wiki/the-dillon-forge" }, + "/blackholegenerator" : { "description" : "An experimental signularity lab engineered by the Great Race.", "wiki" : "http://community.lacunaexpanse.com/wiki/black-hole-generator" }, "/subspacesupplydepot" : { "description" : "Helps give a fledgling colony a kickstart.", "wiki" : "http://community.lacunaexpanse.com/wiki/subspace-supply-depot" }, "/pantheonofhagness" : { "description" : "Increases the number of available plots on your planet.", "wiki" : "http://community.lacunaexpanse.com/wiki/pantheon-of-hagness" }, "/crashedshipsite" : { "description" : "Harvest technology from a crashed ship to make your own ships better.", "wiki" : "http://community.lacunaexpanse.com/wiki/crashed-ship-site" },