From 6ae2f24b257f88eec066e26ac9ba8f377f17df6e Mon Sep 17 00:00:00 2001 From: Matthew Musgrove Date: Mon, 11 Apr 2011 20:23:59 -0500 Subject: [PATCH 1/2] Changed nothing found message to Info --- lib/Lacuna/Role/Ship/Arrive/Excavate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lacuna/Role/Ship/Arrive/Excavate.pm b/lib/Lacuna/Role/Ship/Arrive/Excavate.pm index d40433f9..f7f16e38 100644 --- a/lib/Lacuna/Role/Ship/Arrive/Excavate.pm +++ b/lib/Lacuna/Role/Ship/Arrive/Excavate.pm @@ -94,7 +94,7 @@ after handle_arrival_procedures => sub { # wha wha wha wahaa - nothing! else { $empire->send_predefined_message( - tags => ['Correspondence'], + tags => ['Info'], filename => 'glyph_not_discovered_by_excavator.txt', params => [$remote_body->x, $remote_body->y, $remote_body->name, $body->id, $body->name], ); -- 2.51.2 From bac955bd3f972f6e7e31eebc8341d03c8a4add6c Mon Sep 17 00:00:00 2001 From: Matthew Musgrove Date: Wed, 13 Apr 2011 07:16:28 -0500 Subject: [PATCH 2/2] Added ten new Inbox tags --- bin/clean_up_market.pl | 2 +- lib/Lacuna/DB/Result/Alliance.pm | 4 +- lib/Lacuna/DB/Result/Building/Embassy.pm | 8 +- lib/Lacuna/DB/Result/Building/Intelligence.pm | 2 +- lib/Lacuna/DB/Result/Empire.pm | 2 +- lib/Lacuna/DB/Result/Laws.pm | 1 + lib/Lacuna/DB/Result/Map/Body/Planet.pm | 12 +-- lib/Lacuna/DB/Result/Propositions.pm | 6 +- .../Propositions/EvictMiningPlatform.pm | 1 + .../DB/Result/Propositions/ExpelMember.pm | 2 +- lib/Lacuna/DB/Result/Spies.pm | 84 +++++++++---------- lib/Lacuna/RPC/Building/MercenariesGuild.pm | 4 +- lib/Lacuna/RPC/Building/PoliceStation.pm | 4 +- lib/Lacuna/RPC/Building/Security.pm | 4 +- lib/Lacuna/RPC/Building/Trade.pm | 2 +- lib/Lacuna/RPC/Building/Transporter.pm | 2 +- .../Role/Ship/Arrive/CaptureWithSpies.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/Colonize.pm | 6 +- .../Role/Ship/Arrive/ConvertToStation.pm | 8 +- lib/Lacuna/Role/Ship/Arrive/DamageBuilding.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/DeployBleeder.pm | 2 +- .../Ship/Arrive/DeploySmolderingCrater.pm | 4 +- .../Ship/Arrive/DestroyMiningPlatforms.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/DestroyProbes.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/Excavate.pm | 8 +- lib/Lacuna/Role/Ship/Arrive/ScanSurface.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/StakeAClaim.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/SurveySurface.pm | 4 +- lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm | 8 +- lib/Lacuna/Role/TraderRpc.pm | 2 +- lib/Lacuna/Web/MissionCurator.pm | 2 + var/www/public/changes.txt | 2 + 33 files changed, 110 insertions(+), 104 deletions(-) diff --git a/bin/clean_up_market.pl b/bin/clean_up_market.pl index 40742f3e..65d52fdf 100644 --- a/bin/clean_up_market.pl +++ b/bin/clean_up_market.pl @@ -31,7 +31,7 @@ foreach my $id (@to_be_deleted) { $trade->body->empire->send_predefined_message( filename => 'trade_withdrawn.txt', params => [join("\n",@{$trade->format_description_of_payload}), $trade->ask.' essentia'], - tags => ['Alert'], + tags => ['Trade','Alert'], ); $trade->withdraw; } diff --git a/lib/Lacuna/DB/Result/Alliance.pm b/lib/Lacuna/DB/Result/Alliance.pm index 58d96a72..2c082c19 100644 --- a/lib/Lacuna/DB/Result/Alliance.pm +++ b/lib/Lacuna/DB/Result/Alliance.pm @@ -175,7 +175,7 @@ sub send_invite { })->insert; $empire->send_predefined_message( from => $self->leader, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_invite.txt', params => [$self->id, $self->name, $message], ); @@ -194,7 +194,7 @@ sub withdraw_invite { $invite->delete; $empire->send_predefined_message( from => $self->leader, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_withdraw_invite.txt', params => [$self->id, $self->name, $message], ); diff --git a/lib/Lacuna/DB/Result/Building/Embassy.pm b/lib/Lacuna/DB/Result/Building/Embassy.pm index d80bddb8..7de8ecdd 100644 --- a/lib/Lacuna/DB/Result/Building/Embassy.pm +++ b/lib/Lacuna/DB/Result/Building/Embassy.pm @@ -105,7 +105,7 @@ sub accept_invite { $alliance->add_member($empire); $invite->alliance->leader->send_predefined_message( from => $empire, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_accept.txt', params => [$message, $empire->name], ); @@ -122,7 +122,7 @@ sub reject_invite { my $empire = $self->body->empire; $invite->alliance->leader->send_predefined_message( from => $empire, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_reject.txt', params => [$message, $empire->name], ); @@ -142,7 +142,7 @@ sub leave_alliance { $alliance->remove_member($empire); $alliance->leader->send_predefined_message( from => $empire, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_leave.txt', params => [$message, $empire->name], ); @@ -160,7 +160,7 @@ sub expel_member { $alliance->remove_member($empire_to_remove); $empire_to_remove->send_predefined_message( from => $alliance->leader, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_expelled.txt', params => [$alliance->id, $alliance->name, $message, $alliance->name], ); diff --git a/lib/Lacuna/DB/Result/Building/Intelligence.pm b/lib/Lacuna/DB/Result/Building/Intelligence.pm index 957c48c2..a005b729 100644 --- a/lib/Lacuna/DB/Result/Building/Intelligence.pm +++ b/lib/Lacuna/DB/Result/Building/Intelligence.pm @@ -202,7 +202,7 @@ sub train_spy { } else { $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'training_accident.txt', params => [$self->body->id, $self->body->name], ); diff --git a/lib/Lacuna/DB/Result/Empire.pm b/lib/Lacuna/DB/Result/Empire.pm index 416a84cd..2b61a3e0 100644 --- a/lib/Lacuna/DB/Result/Empire.pm +++ b/lib/Lacuna/DB/Result/Empire.pm @@ -645,7 +645,7 @@ sub add_probe { next unless defined $that_empire; $that_empire->send_predefined_message( filename => 'probe_detected.txt', - tags => ['Alert'], + tags => ['Probe','Alert'], from => $that_empire, params => [$star->x, $star->y, $star->name, $self->id, $self->name], ); diff --git a/lib/Lacuna/DB/Result/Laws.pm b/lib/Lacuna/DB/Result/Laws.pm index c9307a1a..eff05b7d 100644 --- a/lib/Lacuna/DB/Result/Laws.pm +++ b/lib/Lacuna/DB/Result/Laws.pm @@ -68,6 +68,7 @@ sub notify_stellar_inhabitants { filename => $filename, from => $from, params => [$self->name, $station->name.'('.$station->x.','.$station->y.')', $planet->name, $self->description], + tags => ['Parliament','Correspondence'], ); } } diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index 5d7ede7d..13e9215e 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -1144,7 +1144,7 @@ sub add_type { filename => 'complaint_overflow.txt', params => [$type, $self->id, $self->name], repeat_check=> 'complaint_overflow'.$self->id, - tags => ['Alert'], + tags => ['Complaint','Alert'], ); } @@ -1710,7 +1710,7 @@ sub spend_food { filename => 'complaint_food_diversity.txt', params => [$self->id, $self->name], repeat_check=> 'complaint_food_diversity'.$self->id, - tags => ['Alert'], + tags => ['Complaint','Alert'], ); } } @@ -1784,7 +1784,7 @@ sub spend_happiness { filename => 'complaint_unhappy.txt', params => [$self->id, $self->name], repeat_check=> 'complaint_unhappy'.$self->id, - tags => ['Alert'], + tags => ['Complaint','Alert'], ); } } @@ -1808,7 +1808,7 @@ sub add_waste { filename => 'complaint_pollution.txt', params => [$self->id, $self->name], repeat_check=> 'complaint_pollution'.$self->id, - tags => ['Alert'], + tags => ['Complaint','Alert'], ); } } @@ -1839,7 +1839,7 @@ sub spend_waste { filename => 'complaint_lack_of_waste.txt', params => [$building_name, $self->id, $self->name, $building_name], repeat_check=> 'complaint_lack_of_waste'.$self->id, - tags => ['Alert'], + tags => ['Complaint','Alert'], ); } } @@ -1868,7 +1868,7 @@ sub complain_about_lack_of_resources { filename => 'complaint_lack_of_'.$resource.'.txt', params => [$self->id, $self->name, $building_name], repeat_check=> 'complaint_lack_of_'.$resource.$self->id, - tags => ['Alert'], + tags => ['Complaint','Alert'], ); } } diff --git a/lib/Lacuna/DB/Result/Propositions.pm b/lib/Lacuna/DB/Result/Propositions.pm index d73c08bf..8fee26fa 100644 --- a/lib/Lacuna/DB/Result/Propositions.pm +++ b/lib/Lacuna/DB/Result/Propositions.pm @@ -109,7 +109,7 @@ sub pass { my $self = shift; $self->station->alliance->send_predefined_message( filename => 'parliament_vote_passed.txt', - tag => 'Correspondence', + tags => ['Parliament','Correspondence'], params => [ $self->name, $self->name, @@ -131,7 +131,7 @@ sub fail { my $self = shift; $self->station->alliance->send_predefined_message( filename => 'parliament_vote_failed.txt', - tag => 'Correspondence', + tags => ['Parliament','Correspondence'], params => [ $self->name, $self->name, @@ -191,7 +191,7 @@ sub send_vote { my $parliament = $station->parliament; $station->alliance->send_predefined_message( filename => 'parliament_vote.txt', - tag => 'Correspondence', + tags => ['Parliament','Correspondence'], from => $self->proposed_by, params => [ $self->name, diff --git a/lib/Lacuna/DB/Result/Propositions/EvictMiningPlatform.pm b/lib/Lacuna/DB/Result/Propositions/EvictMiningPlatform.pm index 04427246..c3ededb8 100644 --- a/lib/Lacuna/DB/Result/Propositions/EvictMiningPlatform.pm +++ b/lib/Lacuna/DB/Result/Propositions/EvictMiningPlatform.pm @@ -23,6 +23,7 @@ before pass => sub { filename => 'parliament_evict_mining_platform.txt', params => [$station->alliance->name, $platform->asteroid->x, $platform->asteroid->y, $platform->asteroid->name], from => $station->alliance->leader, + tags => ['Parliament','Correspondence'], ); $platform->planet->get_building_of_class('Lacuna::DB::Result::Building::Ore::Ministry')->remove_platform($platform); } diff --git a/lib/Lacuna/DB/Result/Propositions/ExpelMember.pm b/lib/Lacuna/DB/Result/Propositions/ExpelMember.pm index 0d45213d..3a388210 100644 --- a/lib/Lacuna/DB/Result/Propositions/ExpelMember.pm +++ b/lib/Lacuna/DB/Result/Propositions/ExpelMember.pm @@ -15,7 +15,7 @@ before pass => sub { $alliance->remove_member($empire_to_remove); $empire_to_remove->send_predefined_message( from => $alliance->leader, - tags => ['Correspondence'], + tags => ['Alliance','Correspondence'], filename => 'alliance_expelled.txt', params => [$alliance->id, $alliance->name, $self->scratch->{message}, $alliance->name], ); diff --git a/lib/Lacuna/DB/Result/Spies.pm b/lib/Lacuna/DB/Result/Spies.pm index aaa2b2d9..cafe751e 100644 --- a/lib/Lacuna/DB/Result/Spies.pm +++ b/lib/Lacuna/DB/Result/Spies.pm @@ -384,12 +384,12 @@ sub burn { if (randint(1,100) < $self->level) { my $new_empire = $self->on_body->empire; $old_empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'you_cant_burn_me.txt', params => [$new_empire->id, $new_empire->name, $self->name], ); $new_empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'id_like_to_join_you.txt', params => [$old_empire->id, $old_empire->name, $self->name, $self->on_body->id, $self->on_body->name], ); @@ -641,12 +641,12 @@ sub escape { $self->task('Idle'); $self->update; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'you_cant_hold_me.txt', params => [$self->name], ); return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'i_have_escaped.txt', params => [$self->on_body->x, $self->on_body->y, $self->on_body->name, $self->name, $self->from_body->id, $self->from_body->name], ); @@ -659,7 +659,7 @@ sub go_to_jail { $self->started_assignment(DateTime->now); $self->times_captured( $self->times_captured + 1 ); return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_captured.txt', params => [$self->on_body->x, $self->on_body->y, $self->on_body->name, $self->format_from], ); @@ -704,7 +704,7 @@ sub turn { my ($self, $new_home) = @_; $self->times_turned( $self->times_turned + 1 ); my $message = $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'goodbye.txt', params => [$self->name, $self->from_body->id, $self->from_body->name], ); @@ -718,7 +718,7 @@ sub turn_a_spy { my ($self, $traitor) = @_; $self->spies_turned( $self->spies_turned + 1 ); $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'new_recruit.txt', params => [$traitor->empire->id, $traitor->empire->name, $traitor->name, $self->name, $self->from_body->id, $self->from_body->name], ); @@ -736,7 +736,7 @@ sub sow_discontent { $self->seeds_planted( $self->seeds_planted + 1 ); $self->on_body->spend_happiness($amount)->update; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'created_disturbance.txt', params => [$self->on_body->name, $amount, $self->on_body->happiness, $self->format_from], ); @@ -753,7 +753,7 @@ sub killed_in_action { $self->available_on(DateTime->now->add(years => 5)); $self->task('Killed In Action'); return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_killed.txt', params => [$self->name, $self->from_body->id, $self->from_body->name, $self->on_body->x, $self->on_body->y, $self->on_body->name], ); @@ -762,7 +762,7 @@ sub killed_in_action { sub no_contact { my ($self) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'no_contact.txt', params => [$self->format_from], ); @@ -771,7 +771,7 @@ sub no_contact { sub no_target { my ($self) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'no_target.txt', params => [$self->format_from], ); @@ -780,7 +780,7 @@ sub no_target { sub building_not_found { my ($self) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'could_not_find_building.txt', params => [$self->format_from], ); @@ -789,7 +789,7 @@ sub building_not_found { sub mission_objective_not_found { my ($self, $objective) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'could_not_find_mission_objective.txt', params => [$objective, $self->format_from], ); @@ -798,7 +798,7 @@ sub mission_objective_not_found { sub ship_not_found { my ($self) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'could_not_find_ship.txt', params => [$self->format_from], ); @@ -807,7 +807,7 @@ sub ship_not_found { sub probe_not_found { my ($self) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'could_not_find_probe.txt', params => [$self->format_from], ); @@ -817,7 +817,7 @@ sub hack_successful { my ($self, $amount) = @_; $self->on_body->spend_happiness($amount)->update; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'hack_successful.txt', params => [$self->on_body->name, $amount, $self->on_body->happiness, $self->format_from], ); @@ -826,7 +826,7 @@ sub hack_successful { sub hack_filtered { my ($self) = @_; return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'hack_filtered.txt', params => [$self->on_body->name, $self->format_from], ); @@ -1182,7 +1182,7 @@ sub steal_planet { my $failure = randint(1,100) > $chance; if ($planet_happiness > 0 || $failure) { # lose $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'insurrection_luck.txt', params => [$self->on_body_id, $self->on_body->name], ); @@ -1194,7 +1194,7 @@ sub steal_planet { } else { # win $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'lost_planet_to_insurrection.txt', params => [$self->on_body->name, $self->on_body->x, $self->on_body->y, $self->on_body->name], ); @@ -1225,7 +1225,7 @@ sub uprising { params => [$self->on_body->empire_id, $self->on_body->empire->name, $self->on_body->x, $self->on_body->y, $self->on_body->name, $loss, $self->on_body->happiness, $self->format_from], ); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'uprising.txt', params => [$self->name, $self->on_body->id, $self->on_body->name, $loss], ); @@ -1365,12 +1365,12 @@ sub prevent_insurrection { } } $defender->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'prevented_insurrection.txt', params => [$self->on_body_id, $self->on_body->name, $defender->format_from], ); $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'insurrection_attempt_failed.txt', params => [$self->on_body_id, $self->on_body->name, $self->format_from], )->id; @@ -1400,12 +1400,12 @@ sub abduct_operative { $defender->send($self->from_body_id, DateTime->now->add(days => 7), 'Waiting On Trade'); $self->send($self->from_body_id, $ship->date_available); $defender->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_abducted.txt', params => [$defender->format_from, $defender->name], ); return $self->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'bringing_home_abductee.txt', params => [$defender->format_from, $self->format_from], )->id; @@ -1443,7 +1443,7 @@ sub destroy_infrastructure { return $self->building_not_found->id if ($building->class eq 'Lacuna::DB::Result::PlanetaryCommand'); $building->body($self->on_body); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'building_kablooey.txt', params => [$building->level, $building->name, $self->on_body->id, $self->on_body->name], ); @@ -1464,7 +1464,7 @@ sub destroy_infrastructure { # return $self->building_not_found->id unless defined $building; # $building->body($self->on_body); # $self->on_body->empire->send_predefined_message( -# tags => ['Alert'], +# tags => ['Spies','Alert'], # filename => 'building_kablooey.txt', # params => [$building->level + 1, $building->name, $self->on_body->id, $self->on_body->name], # ); @@ -1496,7 +1496,7 @@ sub destroy_ship { return $self->ship_not_found->id unless (defined $ship); $self->things_destroyed( $self->things_destroyed + 1 ); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'ship_blew_up_at_port.txt', params => [$ship->type_formatted, $self->on_body->id, $self->on_body->name], ); @@ -1517,7 +1517,7 @@ sub destroy_plan { $self->things_destroyed( $self->things_destroyed + 1 ); my $stolen = 'level '.$plan->level_formatted.' '.$plan->class->name.' plan'; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'item_destroyed.txt', params => [$stolen, $self->on_body->id, $self->on_body->name], ); @@ -1538,7 +1538,7 @@ sub destroy_glyph { $self->things_destroyed( $self->things_destroyed + 1 ); my $stolen = $glyph->type.' glyph'; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'item_destroyed.txt', params => [$stolen, $self->on_body->id, $self->on_body->name], ); @@ -1560,7 +1560,7 @@ sub destroy_resources { my $stolen = 'bunch of '. $resource; $self->on_body->spend_type($resource, int($self->on_body->type_stored($resource) / 2))->update; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'item_destroyed.txt', params => [$stolen, $self->on_body->id, $self->on_body->name], ); @@ -1585,7 +1585,7 @@ sub destroy_mining_ship { $ship->delete; $ministry->recalc_ore_production; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'ship_blew_up_at_port.txt', params => ['mining '.$ship->type_formatted, $self->on_body->id, $self->on_body->name], ); @@ -1659,7 +1659,7 @@ sub steal_resources { push @table, [ $type, $resources{$type} ]; } $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'ship_stolen.txt', params => [$ship->type_formatted, $self->on_body->id, $self->on_body->name], attachments=> { table => \@table}, @@ -1700,7 +1700,7 @@ sub steal_glyph { my @table = (['Glyph'],[$glyph->type]); $glyph->delete; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'ship_stolen.txt', params => [$ship->type_formatted, $self->on_body->id, $self->on_body->name], attachments=> { table => \@table}, @@ -1740,7 +1740,7 @@ sub steal_ships { payload => { spies => [ $self->id ] } ); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'ship_stolen.txt', params => [$ship->type_formatted, $self->on_body->id, $self->on_body->name], ); @@ -1772,7 +1772,7 @@ sub steal_building { $on_body->update; $self->from_body->add_plan($building->class, $level); $on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'building_level_stolen.txt', params => [$building->name, $on_body->id, $on_body->name], ); @@ -1791,7 +1791,7 @@ sub steal_plan { $plan->body_id($self->from_body_id); $plan->update; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'plan_stolen.txt', params => [$plan->level_formatted, $plan->class->name, $self->on_body->id, $self->on_body->name], ); @@ -1838,7 +1838,7 @@ sub shut_down_building { my $building = $self->on_body->get_building_of_class($building_class); return $self->building_not_found->id unless defined $building; $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'building_loss_of_power.txt', params => [$building->name, $self->on_body->id, $self->on_body->name], ); @@ -1858,7 +1858,7 @@ sub take_control_of_probe { return $self->probe_not_found->id unless defined $probe; $self->things_stolen( $self->things_stolen + 1 ); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'probe_destroyed.txt', params => [$probe->star->x, $probe->star->y, $probe->star->name], ); @@ -1884,7 +1884,7 @@ sub kill_contact_with_mining_platform { return $self->mission_objective_not_found('mining platform')->id unless defined $asteroid; $ministry->remove_platform($platform); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'we_lost_contact_with_a_mining_platform.txt', params => [$asteroid->x, $asteroid->y, $asteroid->name], ); @@ -1908,7 +1908,7 @@ sub hack_observatory_probes { params => [$probe->star->x, $probe->star->y, $probe->star->name, $probe->empire->id, $probe->empire->name, $self->format_from], ); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'probe_destroyed.txt', params => [$probe->star->x, $probe->star->y, $probe->star->name], ); @@ -1931,7 +1931,7 @@ sub hack_offending_probes { ); $self->on_body->add_news(25,'%s scientists say they have lost control of a research satellite in the %s system.', $probe->empire->name, $self->on_body->star->name); my $message = $probe->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'probe_destroyed.txt', params => [$probe->star->x, $probe->star->y, $probe->star->name], ); @@ -1945,7 +1945,7 @@ sub hack_local_probes { return $self->probe_not_found->id unless defined $probe; $self->things_destroyed( $self->things_destroyed + 1 ); $self->on_body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'probe_destroyed.txt', params => [$probe->star->x, $probe->star->y, $probe->star->name], ); diff --git a/lib/Lacuna/RPC/Building/MercenariesGuild.pm b/lib/Lacuna/RPC/Building/MercenariesGuild.pm index 97d4c717..bed0483b 100644 --- a/lib/Lacuna/RPC/Building/MercenariesGuild.pm +++ b/lib/Lacuna/RPC/Building/MercenariesGuild.pm @@ -112,7 +112,7 @@ sub accept_from_market { #})->insert; $trade->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Trade','Alert'], filename => 'trade_accepted.txt', params => [$trade->format_description_of_payload, $trade->ask.' essentia', $empire->id, $empire->name], ); @@ -244,7 +244,7 @@ sub report_abuse { $trade->body->empire->send_predefined_message( filename => 'trade_abuse.txt', params => [join("\n",@{$trade->format_description_of_payload}), $trade->ask.' essentia'], - tags => ['Alert'], + tags => ['Trade','Alert'], ); $trade->withdraw($trade->body); } diff --git a/lib/Lacuna/RPC/Building/PoliceStation.pm b/lib/Lacuna/RPC/Building/PoliceStation.pm index d5fdca7d..08ace1bd 100644 --- a/lib/Lacuna/RPC/Building/PoliceStation.pm +++ b/lib/Lacuna/RPC/Building/PoliceStation.pm @@ -56,7 +56,7 @@ sub execute_prisoner { $body->add_news(60, sprintf('%s was executed on %s today. Citizens were outraged at the lack of compassion.', $prisoner->name, $body->name)); $prisoner->empire->send_predefined_message( from => $empire, - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_executed.txt', params => [$prisoner->name, $prisoner->from_body->id, $prisoner->from_body->name, $body->x, $body->y, $body->name, $empire->id, $empire->name], ); @@ -82,7 +82,7 @@ sub release_prisoner { $prisoner->available_on(DateTime->now); $prisoner->update; $prisoner->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_released.txt', params => [$empire->id, $empire->name, $body->x, $body->y, $body->name, $prisoner->name, $prisoner->from_body->id, $prisoner->from_body->name], ); diff --git a/lib/Lacuna/RPC/Building/Security.pm b/lib/Lacuna/RPC/Building/Security.pm index 9eb056f2..96d0869e 100644 --- a/lib/Lacuna/RPC/Building/Security.pm +++ b/lib/Lacuna/RPC/Building/Security.pm @@ -57,7 +57,7 @@ sub execute_prisoner { $body->add_news(60, sprintf('%s was executed on %s today. Citizens were outraged at the lack of compassion.', $prisoner->name, $body->name)); $prisoner->empire->send_predefined_message( from => $empire, - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_executed.txt', params => [$prisoner->name, $prisoner->from_body->id, $prisoner->from_body->name, $body->x, $body->y, $body->name, $empire->id, $empire->name], ); @@ -83,7 +83,7 @@ sub release_prisoner { $prisoner->available_on(DateTime->now); $prisoner->update; $prisoner->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'spy_released.txt', params => [$empire->id, $empire->name, $body->x, $body->y, $body->name, $prisoner->name, $prisoner->from_body->id, $prisoner->from_body->name], ); diff --git a/lib/Lacuna/RPC/Building/Trade.pm b/lib/Lacuna/RPC/Building/Trade.pm index e31a02d1..e08de15f 100644 --- a/lib/Lacuna/RPC/Building/Trade.pm +++ b/lib/Lacuna/RPC/Building/Trade.pm @@ -142,7 +142,7 @@ sub accept_from_market { #})->insert; $trade->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Trade','Alert'], filename => 'trade_accepted.txt', params => [join("; ",@{$trade->format_description_of_payload}), $trade->ask.' essentia', $empire->id, $empire->name], ); diff --git a/lib/Lacuna/RPC/Building/Transporter.pm b/lib/Lacuna/RPC/Building/Transporter.pm index 6ddc0c75..89175237 100644 --- a/lib/Lacuna/RPC/Building/Transporter.pm +++ b/lib/Lacuna/RPC/Building/Transporter.pm @@ -149,7 +149,7 @@ sub accept_from_market { # object_id => $trade->id, #})->insert; $trade->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Trade','Alert'], filename => 'trade_accepted.txt', params => [join("; ",@{$trade->format_description_of_payload}), $trade->ask.' essentia', $empire->id, $empire->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/CaptureWithSpies.pm b/lib/Lacuna/Role/Ship/Arrive/CaptureWithSpies.pm index dce154eb..669f851b 100644 --- a/lib/Lacuna/Role/Ship/Arrive/CaptureWithSpies.pm +++ b/lib/Lacuna/Role/Ship/Arrive/CaptureWithSpies.pm @@ -52,12 +52,12 @@ after handle_arrival_procedures => sub { $spy->update; } $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'ship_captured_with_spies.txt', params => [$self->name, $body->x, $body->y, $body->name], ); $body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Spies','Alert'], filename => 'we_captured_ship_with_spies.txt', params => [$body->id, $body->name, $self->body->empire->id, $self->body->empire->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/Colonize.pm b/lib/Lacuna/Role/Ship/Arrive/Colonize.pm index ddbfdb2e..6440ef6c 100644 --- a/lib/Lacuna/Role/Ship/Arrive/Colonize.pm +++ b/lib/Lacuna/Role/Ship/Arrive/Colonize.pm @@ -14,7 +14,7 @@ after handle_arrival_procedures => sub { my $planet = $self->foreign_body; if ($planet->is_locked || $planet->empire_id) { $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'cannot_colonize.txt', params => [$planet->x, $planet->y, $planet->name, $planet->name], ); @@ -24,7 +24,7 @@ after handle_arrival_procedures => sub { elsif ($planet->is_claimed && $planet->is_claimed != $empire->id) { my $claimer = $planet->claimed_by; $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'cannot_colonize_staked.txt', params => [$planet->x, $planet->y, $planet->name, $claimer->id, $claimer->name, $planet->name], ); @@ -35,7 +35,7 @@ after handle_arrival_procedures => sub { $planet->lock; $planet->found_colony($empire); $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'colony_founded.txt', params => [$planet->id, $planet->name, $planet->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/ConvertToStation.pm b/lib/Lacuna/Role/Ship/Arrive/ConvertToStation.pm index f14b03f0..53b7253e 100644 --- a/lib/Lacuna/Role/Ship/Arrive/ConvertToStation.pm +++ b/lib/Lacuna/Role/Ship/Arrive/ConvertToStation.pm @@ -14,7 +14,7 @@ after handle_arrival_procedures => sub { my $planet = $self->foreign_body; if ($planet->is_locked || $planet->empire_id) { $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'cannot_convert_to_station.txt', params => [$planet->x, $planet->y, $planet->name, $planet->name], ); @@ -24,7 +24,7 @@ after handle_arrival_procedures => sub { elsif ($planet->is_claimed && $planet->is_claimed != $empire->id) { my $claimer = $planet->claimed_by; $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'cannot_convert_to_station_staked.txt', params => [$planet->x, $planet->y, $planet->name, $claimer->id, $claimer->name, $planet->name], ); @@ -33,7 +33,7 @@ after handle_arrival_procedures => sub { # can't convert because not in an alliance elsif (!$empire->alliance_id) { $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'cannot_convert_to_station_no_alliance.txt', params => [$planet->x, $planet->y, $planet->name, $planet->name], ); @@ -44,7 +44,7 @@ after handle_arrival_procedures => sub { $planet->lock; $planet->convert_to_station($empire); $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'station_founded.txt', params => [$planet->id, $planet->name, $planet->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/DamageBuilding.pm b/lib/Lacuna/Role/Ship/Arrive/DamageBuilding.pm index 704fd42a..80e6f49f 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DamageBuilding.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DamageBuilding.pm @@ -34,12 +34,12 @@ after handle_arrival_procedures => sub { # let everyone know what's going on $body_attacked->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'ship_hit_building.txt', params => [$self->type_formatted, $building->name, $body_attacked->id, $body_attacked->name, $self->body->empire_id, $self->body->empire->name], ); $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'our_ship_hit_building.txt', params => [$self->type_formatted, $body_attacked->x, $body_attacked->y, $body_attacked->name, $building->name, $amount], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/DeployBleeder.pm b/lib/Lacuna/Role/Ship/Arrive/DeployBleeder.pm index eca6ee71..6a10260b 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DeployBleeder.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DeployBleeder.pm @@ -25,7 +25,7 @@ after handle_arrival_procedures => sub { # notify home $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'bleeder_deployed.txt', params => [$body_attacked->x, $body_attacked->y, $body_attacked->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/DeploySmolderingCrater.pm b/lib/Lacuna/Role/Ship/Arrive/DeploySmolderingCrater.pm index 517abd6c..558383dd 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DeploySmolderingCrater.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DeploySmolderingCrater.pm @@ -27,14 +27,14 @@ after handle_arrival_procedures => sub { # notify home $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'thud_hit_target.txt', params => [$body_attacked->x, $body_attacked->y, $body_attacked->name], ); # notify attacked $body_attacked->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'thud_hit_us.txt', params => [$self->body->empire->id, $self->body->empire->name, $body_attacked->id, $body_attacked->name], ) if $body_attacked->empire_id; diff --git a/lib/Lacuna/Role/Ship/Arrive/DestroyMiningPlatforms.pm b/lib/Lacuna/Role/Ship/Arrive/DestroyMiningPlatforms.pm index 1784a9e1..c4861978 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DestroyMiningPlatforms.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DestroyMiningPlatforms.pm @@ -19,7 +19,7 @@ after handle_arrival_procedures => sub { # destroy those suckers while (my $platform = $platforms->next) { my $empire = $platform->planet->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'mining_platform_destroyed.txt', params => [$self->foreign_body->x, $self->foreign_body->y, $self->foreign_body->name, $self->body->empire_id, $self->body->empire->name], ); @@ -29,7 +29,7 @@ after handle_arrival_procedures => sub { # notify about destruction $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'detonator_destroyed_mining_platforms.txt', params => [$count, $self->foreign_body->x, $self->foreign_body->y, $self->foreign_body->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/DestroyProbes.pm b/lib/Lacuna/Role/Ship/Arrive/DestroyProbes.pm index 5ad338de..73631b1e 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DestroyProbes.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DestroyProbes.pm @@ -19,7 +19,7 @@ after handle_arrival_procedures => sub { # destroy those suckers while (my $probe = $probes->next) { $probe->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'probe_detonated.txt', params => [$self->foreign_star->x, $self->foreign_star->y, $self->foreign_star->name, $self->body->empire_id, $self->body->empire->name], ); @@ -29,7 +29,7 @@ after handle_arrival_procedures => sub { # notify about destruction $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'detonator_destroyed_probes.txt', params => [$count, $self->foreign_star->x, $self->foreign_star->y, $self->foreign_star->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm b/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm index 2b881c6c..988bba36 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm @@ -17,12 +17,12 @@ after handle_arrival_procedures => sub { $body_attacked->add_waste($self->hold_size); $body_attacked->update; $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'our_scow_hit.txt', params => [$body_attacked->x, $body_attacked->y, $body_attacked->name, $self->hold_size], ); $body_attacked->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'hit_by_scow.txt', params => [$self->body->empire_id, $self->body->empire->name, $body_attacked->id, $body_attacked->name, $self->hold_size], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/Excavate.pm b/lib/Lacuna/Role/Ship/Arrive/Excavate.pm index f7f16e38..552411e3 100644 --- a/lib/Lacuna/Role/Ship/Arrive/Excavate.pm +++ b/lib/Lacuna/Role/Ship/Arrive/Excavate.pm @@ -53,7 +53,7 @@ after handle_arrival_procedures => sub { )]); my $plan = $body->add_plan($class, 1, ($find == 1) ? randint(1,4) : 0); $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Excavator','Alert'], filename => 'plan_discovered_by_excavator.txt', params => [$remote_body->x, $remote_body->y, $remote_body->name, ($plan->level + $plan->extra_build_level), $class->name, $body->id, $body->name], ); @@ -64,7 +64,7 @@ after handle_arrival_procedures => sub { my $ore = random_element([ORE_TYPES]); $body->add_glyph($ore); $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Excavator','Alert'], filename => 'glyph_discovered_by_excavator.txt', params => [$remote_body->x, $remote_body->y, $remote_body->name, $ore, $body->id, $body->name], attachments => { @@ -85,7 +85,7 @@ after handle_arrival_procedures => sub { my $amount = randint(100 + $distance_modifier, 2500 + $distance_modifier); $body->add_type($type, $amount)->update; $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Excavator','Alert'], filename => 'resources_discovered_by_excavator.txt', params => [$remote_body->x, $remote_body->y, $remote_body->name, $amount, $type, $body->id, $body->name], ); @@ -94,7 +94,7 @@ after handle_arrival_procedures => sub { # wha wha wha wahaa - nothing! else { $empire->send_predefined_message( - tags => ['Info'], + tags => ['Excavator','Alert'], filename => 'glyph_not_discovered_by_excavator.txt', params => [$remote_body->x, $remote_body->y, $remote_body->name, $body->id, $body->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/ScanSurface.pm b/lib/Lacuna/Role/Ship/Arrive/ScanSurface.pm index 3be4d3de..ea65dfbb 100644 --- a/lib/Lacuna/Role/Ship/Arrive/ScanSurface.pm +++ b/lib/Lacuna/Role/Ship/Arrive/ScanSurface.pm @@ -23,7 +23,7 @@ after handle_arrival_procedures => sub { # phone home $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'scanner_data.txt', params => [$self->type_formatted, $self->type_formatted, $self->name, $body_attacked->x, $body_attacked->y, $body_attacked->name], attachments => { @@ -37,7 +37,7 @@ after handle_arrival_procedures => sub { # alert empire scanned, if any if ($body_attacked->empire_id && defined $body_attacked->empire) { $body_attacked->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'we_were_scanned.txt', params => [$body_attacked->id, $body_attacked->name, $self->type_formatted, $self->body->empire_id, $self->body->empire->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/StakeAClaim.pm b/lib/Lacuna/Role/Ship/Arrive/StakeAClaim.pm index 03de15fc..d676b044 100644 --- a/lib/Lacuna/Role/Ship/Arrive/StakeAClaim.pm +++ b/lib/Lacuna/Role/Ship/Arrive/StakeAClaim.pm @@ -30,7 +30,7 @@ after handle_arrival_procedures => sub { } if ($claimed) { $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'cannot_stake.txt', params => [$self->name, $planet->x, $planet->y, $planet->name, $claimer_id, $claimed_by], ); @@ -40,7 +40,7 @@ after handle_arrival_procedures => sub { else { $planet->claim($empire->id); $empire->send_predefined_message( - tags => ['Alert'], + tags => ['Colonization','Alert'], filename => 'planet_claimed.txt', params => [$planet->id, $planet->name, $planet->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/SurveySurface.pm b/lib/Lacuna/Role/Ship/Arrive/SurveySurface.pm index b84f370f..69647e42 100644 --- a/lib/Lacuna/Role/Ship/Arrive/SurveySurface.pm +++ b/lib/Lacuna/Role/Ship/Arrive/SurveySurface.pm @@ -31,7 +31,7 @@ after handle_arrival_procedures => sub { # phone home $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'scanner_data.txt', params => [$self->type_formatted, $self->type_formatted, $self->name, $body_attacked->x, $body_attacked->y, $body_attacked->name], attachments => { @@ -46,7 +46,7 @@ after handle_arrival_procedures => sub { # alert empire scanned, if any if ($body_attacked->empire_id && defined $body_attacked->empire) { $body_attacked->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'we_were_scanned.txt', params => [$body_attacked->id, $body_attacked->name, $self->type_formatted, $self->body->empire_id, $self->body->empire->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm b/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm index 7c12622f..07c94c40 100644 --- a/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm +++ b/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm @@ -48,12 +48,12 @@ sub attacker_shot_down { my ($self, $defender) = @_; my $body_attacked = $self->foreign_body; $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'ship_shot_down.txt', params => [$self->type_formatted, $body_attacked->x, $body_attacked->y, $body_attacked->name, $self->body->id, $self->body->name], ); $defender->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'we_shot_down_a_ship.txt', params => [$self->type_formatted, $body_attacked->id, $body_attacked->name, $self->body->empire_id, $self->body->empire->name], ); @@ -64,12 +64,12 @@ sub defender_shot_down { my ($self, $defender) = @_; my $body_attacked = $self->foreign_body; $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'we_shot_down_a_defender.txt', params => [$defender->type_formatted, $body_attacked->x, $body_attacked->y, $body_attacked->name, $defender->body->empire_id, $defender->body->empire->name], ); $defender->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Attack','Alert'], filename => 'defender_shot_down.txt', params => [$defender->type_formatted, $defender->body->id, $defender->body->name, $body_attacked->x, $body_attacked->y, $body_attacked->name], ); diff --git a/lib/Lacuna/Role/TraderRpc.pm b/lib/Lacuna/Role/TraderRpc.pm index 2e58d307..2d39ed2b 100644 --- a/lib/Lacuna/Role/TraderRpc.pm +++ b/lib/Lacuna/Role/TraderRpc.pm @@ -203,7 +203,7 @@ sub report_abuse { $trade->body->empire->send_predefined_message( filename => 'trade_abuse.txt', params => [join("\n",@{$trade->format_description_of_payload}), $trade->ask.' essentia'], - tags => ['Alert'], + tags => ['Trade','Alert'], ); $trade->withdraw($trade->body); } diff --git a/lib/Lacuna/Web/MissionCurator.pm b/lib/Lacuna/Web/MissionCurator.pm index e433892e..b3ece5a4 100644 --- a/lib/Lacuna/Web/MissionCurator.pm +++ b/lib/Lacuna/Web/MissionCurator.pm @@ -26,11 +26,13 @@ sub www_add_essentia { from => $curator, subject => 'Mission Bounty', body => 'I have approved your mission pack and awarded you 100 essentia.', + tags => ['Mission','Correspondence'], ); $jt->send_message( from => $curator, subject => 'Mission Bounty', body => 'I have approved a mission pack for '.$empire->name.'.', + tags => ['Mission','Correspondence'], ); my $recent = Lacuna->db->resultset('Lacuna::DB::Result::Log::Essentia')->search({ empire_id => $curator->id, description => 'Mission Curator', date_stamp => { '>' => DateTime->now->subtract(days => 7)}})->count; $curator->add_essentia(100, 'Mission Curator')->update unless $recent; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 0d5aa3bf..ab72b174 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,5 +1,7 @@ 3.0600 - API: Added trash methods to the Inbox. + - API: Parliament messages will be tagged as such instead of Correspondence. + - API: Added Alliance, Attack, Colonization, Complaint, Excavator, Mission, Parliament, Probe, Spies, and Trade tags to the Inbox. - Rule: Archived messages will no longer be deleted. Trashed messages will be purged thirty days after they were sent. - Fix: Corrected documentation for the rename method in Body. -- 2.51.2