From 8b31ede76ad7754e651df2e1b1383e19bd8c7fe6 Mon Sep 17 00:00:00 2001 From: lemming552 Date: Fri, 9 Aug 2013 10:50:55 -0600 Subject: [PATCH] Fissure tag added to emails involving fissures. --- bin/tick_fissures.pl | 22 +++++++++---------- lib/Lacuna/RPC/Building/BlackHoleGenerator.pm | 2 +- lib/Lacuna/Role/Ship/Arrive/SealFissure.pm | 8 +++---- var/www/public/changes.txt | 1 + 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/bin/tick_fissures.pl b/bin/tick_fissures.pl index 13d9711e..e4c3e46f 100644 --- a/bin/tick_fissures.pl +++ b/bin/tick_fissures.pl @@ -174,21 +174,21 @@ sub fissure_alert { $already{$eid} = 1; if ($type eq "spawn") { $to_alert->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_alert_spawn.txt', params => [$body->x, $body->y, $body->name], ); } elsif ($type eq "level") { $to_alert->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_alert_level.txt', params => [$body->x, $body->y, $body->name], ); } elsif ($type eq "critical") { $to_alert->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_alert_critical.txt', params => [$body->x, $body->y, $body->name], ); @@ -234,7 +234,7 @@ sub fissure_spawn { out(" Converted building ".$building->class." into a level $fissure_level Fissure!"); if ($body->empire_id) { $body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_replaced_energy.txt', params => [$body->name, $building->x,$building->y, $fissure_level], ); @@ -269,7 +269,7 @@ sub fissure_spawn { # send email to empire and N19 news if ($body->empire_id) { $body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_spawned.txt', params => [$body->name], ); @@ -298,7 +298,7 @@ sub fissure_level { } if ($body->empire_id) { $body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_damaged_energy.txt', params => [$body->name, $fissure->x,$fissure->y, $fissure->level], ); @@ -323,7 +323,7 @@ sub fissure_explode { $empire->update; # Send the empire an email $empire->send_predefined_message( - tags => ['Colonization','Alert'], + tags => ['Colonization','Alert', 'Fissure'], filename => 'fissure_capitol_moved.txt', params => [$new_capitol->name], ); @@ -346,7 +346,7 @@ sub fissure_explode { out($new_capitol->name.' new cap'); # Send an email with the new planet $empire->send_predefined_message( - tags => ['Colonization','Alert'], + tags => ['Colonization','Alert', 'Fissure'], filename => 'fissure_capitol_moved.txt', params => [$new_capitol->name], ); @@ -356,7 +356,7 @@ sub fissure_explode { # else it is 'just' a colony # Send an email about the destruction $empire->send_predefined_message( - tags => ['Colonization','Alert'], + tags => ['Colonization','Alert', 'Fissure'], filename => 'fissure_colony_destroyed.txt', params => [$body->name], ); @@ -404,7 +404,7 @@ sub fissure_explode { out("Growing ".$to_grab_mass->name." to ".$size."."); if ($to_grab_mass->empire) { $to_grab_mass->empire->send_predefined_message( - tags => ['Colonization','Alert'], + tags => ['Colonization','Alert', 'Fissure'], filename => 'changed_size.txt', params => [$to_grab_mass->name, $size, $new_size], ); @@ -471,7 +471,7 @@ sub fissure_explode { $to_damage->tick; $to_damage->empire->send_predefined_message( - tags => ['Colonization','Alert'], + tags => ['Colonization','Alert', 'Fissure'], filename => 'fissure_collateral_damage.txt', params => [$body->name, $to_damage->name], ); diff --git a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm index 95f6f9ab..4e240efa 100644 --- a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm +++ b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm @@ -1478,7 +1478,7 @@ sub bhg_random_fissure { unless ($already{$eid} == 1) { $already{$eid} = 1; $to_alert->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'fissure_alert_spawn.txt', params => [$target->x, $target->y, $target->name], ); diff --git a/lib/Lacuna/Role/Ship/Arrive/SealFissure.pm b/lib/Lacuna/Role/Ship/Arrive/SealFissure.pm index aa20f961..1936c9e8 100644 --- a/lib/Lacuna/Role/Ship/Arrive/SealFissure.pm +++ b/lib/Lacuna/Role/Ship/Arrive/SealFissure.pm @@ -20,7 +20,7 @@ after handle_arrival_procedures => sub { # Turn around if occupied if ($self->foreign_body->empire_id) { $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'occupied_fissure.txt', params => [$self->type_formatted, $body_hit->x, $body_hit->y, $body_hit->name ], ); @@ -32,7 +32,7 @@ after handle_arrival_procedures => sub { my ($fissure) = grep {$_->class eq 'Lacuna::DB::Result::Building::Permanent::Fissure'} @{$body_hit->building_cache}; if (not defined($fissure)) { $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'no_fissure_found.txt', params => [$self->type_formatted, $body_hit->x, $body_hit->y, $body_hit->name ], ); @@ -66,7 +66,7 @@ after handle_arrival_procedures => sub { if ($curr_lev < 1) { $fissure->delete; $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'we_destroyed_a_fissure.txt', params => [$self->type_formatted, $body_hit->x, $body_hit->y, $body_hit->name ], ); @@ -76,7 +76,7 @@ after handle_arrival_procedures => sub { $fissure->efficiency($curr_eff); $fissure->update; $self->body->empire->send_predefined_message( - tags => ['Alert'], + tags => ['Alert', 'Fissure'], filename => 'our_ship_hit_fissure.txt', params => [$self->type_formatted, $body_hit->x, $body_hit->y, $body_hit->name, $curr_lev, $curr_eff ], ); diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 87b0e108..1d4f40af 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -9,6 +9,7 @@ - Fix: BHG cooldown time of 5 minutes during warmup. - API: get_buildings now returns repair costs if building is damaged. - API: Api call repair_list from Body will attempt to repair buildings supplied to function in order of list. + - Mod: FIssure tag added to fissure related emails. 3.0892: - Fix: Fix schedule to remove past jobs when rescheduling. -- 2.51.2