diff --git a/lib/Lacuna/DB/Result/Building/Permanent/AlgaePond.pm b/lib/Lacuna/DB/Result/Building/Permanent/AlgaePond.pm index 1df9e249..a54b04d8 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/AlgaePond.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/AlgaePond.pm @@ -27,11 +27,11 @@ my @fish = ( after finish_upgrade => sub { my $self = shift; - my @msg = ('This is no fisherman\'s tale. A local fisherman caught a %.1f meter %s out of an algae pond on %s.', - randint(10,95), + my @msg = (q[This is no fisherman's tale. A local fisherman caught a %.1f meter %s out of an algae pond on %s.], + randint(10,95)/10, random_element(\@fish), $self->body->name); - $self->body->add_news(130, @msg); + $self->body->add_news(30, @msg); }; use constant name => 'Algae Pond'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/AmalgusMeadow.pm b/lib/Lacuna/DB/Result/Building/Permanent/AmalgusMeadow.pm index bc189a73..6ffe341c 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/AmalgusMeadow.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/AmalgusMeadow.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Children everywhere on %s were heard singing "Beans, beans, the music fruit" after they discovered an Amalgus Meadow today.', $self->body->name)); + $self->body->add_news(30, 'Children everywhere on %s were heard singing "Beans, beans, the music fruit" after they discovered an Amalgus Meadow today.', $self->body->name); }; use constant min_orbit => 4; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/BeeldebanNest.pm b/lib/Lacuna/DB/Result/Building/Permanent/BeeldebanNest.pm index a882abb8..1d4854f9 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/BeeldebanNest.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/BeeldebanNest.pm @@ -4,6 +4,7 @@ use Moose; use utf8; no warnings qw(uninitialized); extends 'Lacuna::DB::Result::Building::Permanent'; +use Lacuna::Util qw(random_element); use constant controller_class => 'Lacuna::RPC::Building::BeeldebanNest'; @@ -17,9 +18,14 @@ sub image_level { return $self->image.'1'; } +my @upgrades = ( + 'A boy was nearly killed today when he and his sister wandered into a wild Beeldeban nest on %s today.', + 'A girl was nearly killed today when she and her brother wandered into a wild Beeldeban nest on %s today.', + ); + after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('A boy was nearly killed today when he and his sister wandered into a wild Beeldeban nest on %s today.', $self->body->name)); + $self->body->add_news(30, random_element(\@upgrades), $self->body->name); }; use constant name => 'Beeldeban Nest'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm b/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm index 8009f46e..0e99531a 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/BlackHoleGenerator.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('%s is experimenting with advanced singularity technology.', $self->body->name)); + $self->body->add_news(30, '%s is experimenting with advanced singularity technology.', $self->body->name); }; sub can_build_on { diff --git a/lib/Lacuna/DB/Result/Building/Permanent/CitadelOfKnope.pm b/lib/Lacuna/DB/Result/Building/Permanent/CitadelOfKnope.pm index e683152e..9dff1cb5 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/CitadelOfKnope.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/CitadelOfKnope.pm @@ -20,7 +20,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('Research students say that the Citadel of Knope, which remained dormant for years on %s, sprang to life.', $self->body->name)); + $self->body->add_news(50, 'Research students say that the Citadel of Knope, which remained dormant for years on %s, sprang to life.', $self->body->name); }; use constant name => 'Citadel of Knope'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/CrashedShipSite.pm b/lib/Lacuna/DB/Result/Building/Permanent/CrashedShipSite.pm index 09fe24e7..c6f23fdc 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/CrashedShipSite.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/CrashedShipSite.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('Construction workers uncovered the hull of an ancient ship on %s as they were digging the foundation of a house.', $self->body->name)); + $self->body->add_news(50, 'Construction workers uncovered the hull of an ancient ship on %s as they were digging the foundation of a house.', $self->body->name); }; use constant name => 'Crashed Ship Site'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/DentonBrambles.pm b/lib/Lacuna/DB/Result/Building/Permanent/DentonBrambles.pm index 0f159158..9c177b4e 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/DentonBrambles.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/DentonBrambles.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Tender and juicy denton roots await those souls of %s who are brave enough to tackle the Denton Brambles.', $self->body->name)); + $self->body->add_news(30, 'Tender and juicy denton roots await those souls of %s who are brave enough to tackle the Denton Brambles.', $self->body->name); }; use constant min_orbit => 5; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/EssentiaVein.pm b/lib/Lacuna/DB/Result/Building/Permanent/EssentiaVein.pm index c25fc5e1..38f5aca3 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/EssentiaVein.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/EssentiaVein.pm @@ -36,7 +36,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Though officials on %s tried to keep it secret, news of the discovery of an Essentia vein broke.', $self->body->name)); + $self->body->add_news(30, 'Though officials on %s tried to keep it secret, news of the discovery of an Essentia vein broke.', $self->body->name); # Removed any scheduled work that is already running # Reschedule work. # diff --git a/lib/Lacuna/DB/Result/Building/Permanent/Fissure.pm b/lib/Lacuna/DB/Result/Building/Permanent/Fissure.pm index 1a0b5813..3557299e 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/Fissure.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/Fissure.pm @@ -32,7 +32,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Scientists are worried that %s may collapse in on itself.', $self->body->name)); + $self->body->add_news(30, 'Scientists are worried that %s may collapse in on itself.', $self->body->name); }; before 'can_demolish' => sub { diff --git a/lib/Lacuna/DB/Result/Building/Permanent/GeoThermalVent.pm b/lib/Lacuna/DB/Result/Building/Permanent/GeoThermalVent.pm index ad1bb9d8..bc31c779 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/GeoThermalVent.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/GeoThermalVent.pm @@ -14,7 +14,7 @@ use constant image => 'geothermalvent'; after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('%s considers itself a very efficient planet, much of its energy production coming from thermal vents.', $self->body->name)); + $self->body->add_news(30, '%s considers itself a very efficient planet, much of its energy production coming from thermal vents.', $self->body->name); }; sub image_level { diff --git a/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm b/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm index 2a53d6eb..cdf3cf17 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/GratchsGauntlet.pm @@ -20,7 +20,7 @@ sub image_level { 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)); + $self->body->add_news(30, 'The agents on %s use techniques handed down for millenia, which they say makes them unbeatable.', $self->body->name); }; before 'repair' => sub { diff --git a/lib/Lacuna/DB/Result/Building/Permanent/InterDimensionalRift.pm b/lib/Lacuna/DB/Result/Building/Permanent/InterDimensionalRift.pm index 682478cd..cfa214b1 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/InterDimensionalRift.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/InterDimensionalRift.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('An ancient interdimensional rift was opened on %s today. Onlookers stood speechless.', $self->body->name)); + $self->body->add_news(50, 'An ancient interdimensional rift was opened on %s today. Onlookers stood speechless.', $self->body->name); }; use constant name => 'Interdimensional Rift'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/KalavianRuins.pm b/lib/Lacuna/DB/Result/Building/Permanent/KalavianRuins.pm index 22d074de..26aa73d9 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/KalavianRuins.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/KalavianRuins.pm @@ -20,7 +20,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('Archaeologists estimate that the Kalavian Ruins they uncovered on %s were buried for '.randint(10,99).',000 years.', $self->body->name)); + $self->body->add_news(50, 'Archaeologists estimate that the Kalavian Ruins they uncovered on %s were buried for %d,000 years.', $self->body->name, randint(10,99)); }; use constant name => 'Kalavian Ruins'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm b/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm index e43f02fe..369ff3c7 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/KasternsKeep.pm @@ -40,7 +40,7 @@ sub image_level { 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)); + $self->body->add_news(30, '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'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/LapisForest.pm b/lib/Lacuna/DB/Result/Building/Permanent/LapisForest.pm index 85990495..be3f1613 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/LapisForest.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/LapisForest.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(40, sprintf('The poet known for his "Ode To A Lapis Forest" is scheduled to speak today on %s.', $self->body->name)); + $self->body->add_news(40, 'The poet known for his "Ode To A Lapis Forest" is scheduled to speak today on %s.', $self->body->name); }; use constant name => 'Lapis Forest'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm b/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm index dc596f85..6a6d295d 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/LibraryOfJith.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Scientists on %s have unlocked the secrets of the origin of species.', $self->body->name)); + $self->body->add_news(30, 'Scientists on %s have unlocked the secrets of the origin of species.', $self->body->name); }; use constant name => 'Library of Jith'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/MalcudField.pm b/lib/Lacuna/DB/Result/Building/Permanent/MalcudField.pm index 5f965d21..ac1186a7 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/MalcudField.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/MalcudField.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Today the governor of %s announced that a wild malcud field would be set aside as a nature preserve.', $self->body->name)); + $self->body->add_news(30, 'Today the governor of %s announced that a wild malcud field would be set aside as a nature preserve.', $self->body->name); }; use constant name => 'Malcud Field'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm b/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm index d9178337..6067ace8 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/MassadsHenge.pm @@ -40,7 +40,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('The whole of the heavens are exposed to the citizens of %s.', $self->body->name)); + $self->body->add_news(30, 'The whole of the heavens are exposed to the citizens of %s.', $self->body->name); }; use constant name => 'Massad\'s Henge'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/NaturalSpring.pm b/lib/Lacuna/DB/Result/Building/Permanent/NaturalSpring.pm index c5069d67..c7c9521b 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/NaturalSpring.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/NaturalSpring.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('Worries of drought ended today as a natural spring bubbled to the surface of %s today.', $self->body->name)); + $self->body->add_news(30, 'Worries of drought ended today as a natural spring bubbled to the surface of %s today.', $self->body->name); }; use constant name => 'Natural Spring'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm b/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm index 0d652122..d59e2b8a 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/OracleOfAnid.pm @@ -30,7 +30,7 @@ sub probes { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('A warning to all enemies foreign and domestic. The government of %s sees all.', $self->body->name)); + $self->body->add_news(30, 'A warning to all enemies foreign and domestic. The government of %s sees all.', $self->body->name); my $work_secs = 60; if ($self->is_working) { diff --git a/lib/Lacuna/DB/Result/Building/Permanent/PantheonOfHagness.pm b/lib/Lacuna/DB/Result/Building/Permanent/PantheonOfHagness.pm index be695304..7f9ab7bf 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/PantheonOfHagness.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/PantheonOfHagness.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('No one is certain how, but measurements of %s from the ground indicate it\'s bigger than measurements from space.', $self->body->name)); + $self->body->add_news(50, 'No one is certain how, but measurements of %s from the ground indicate it\'s bigger than measurements from space.', $self->body->name); }; use constant name => 'Pantheon of Hagness'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/Ravine.pm b/lib/Lacuna/DB/Result/Building/Permanent/Ravine.pm index 85d792ae..6f815a47 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/Ravine.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/Ravine.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('A tectonic shift shook the inhabitants of %s today as the ground quaked beneath their feet.', $self->body->name)); + $self->body->add_news(30, 'A tectonic shift shook the inhabitants of %s today as the ground quaked beneath their feet.', $self->body->name); }; use constant name => 'Ravine'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/TempleOfTheDrajilites.pm b/lib/Lacuna/DB/Result/Building/Permanent/TempleOfTheDrajilites.pm index 22ea5c77..eb9b7162 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/TempleOfTheDrajilites.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/TempleOfTheDrajilites.pm @@ -12,7 +12,7 @@ use constant controller_class => 'Lacuna::RPC::Building::TempleOfTheDrajilites'; after finish_upgrade => sub { my $self = shift; - $self->body->add_news(50, sprintf('The followers of the Drajilite religion rejoiced when their ancient temple was uncovered on %s.', $self->body->name)); + $self->body->add_news(50, 'The Disciples of Drajilite rejoiced when their ancient temple was uncovered on %s.', $self->body->name); }; use constant image => 'templedrajilites'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm b/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm index f414856a..44f8f6fa 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/TheDillonForge.pm @@ -42,7 +42,7 @@ sub image_level { 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)); + $self->body->add_news(30, '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'; diff --git a/lib/Lacuna/DB/Result/Building/Permanent/Volcano.pm b/lib/Lacuna/DB/Result/Building/Permanent/Volcano.pm index c0423a5a..d6ab256e 100644 --- a/lib/Lacuna/DB/Result/Building/Permanent/Volcano.pm +++ b/lib/Lacuna/DB/Result/Building/Permanent/Volcano.pm @@ -19,7 +19,7 @@ sub image_level { after finish_upgrade => sub { my $self = shift; - $self->body->add_news(30, sprintf('A volcano erupted on %s today spewing tons of ash on the inhabitants.', $self->body->name)); + $self->body->add_news(30, 'A volcano erupted on %s today spewing tons of ash on the inhabitants.', $self->body->name); }; use constant name => 'Volcano';