From 795d071d6b9a412564a0bef923552c64ac7a63ec Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 16 Mar 2011 11:12:51 -0500 Subject: [PATCH] If an account has essentia after 21 days of inactivity, it will spend 1 essentia (if possible) rather than enabling self-destruct. This allows people to keep their accounts long-term even if they want to take a break for a while. --- bin/clean_up_empires.pl | 12 +++++++++--- var/www/public/changes.txt | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/clean_up_empires.pl b/bin/clean_up_empires.pl index fe1c2dcb..ec1a8df5 100644 --- a/bin/clean_up_empires.pl +++ b/bin/clean_up_empires.pl @@ -60,9 +60,15 @@ my $abandons_tally; my $inactivity_time_out = Lacuna->config->get('self_destruct_after_inactive_days') || 20; my $inactives = $empires->search({ last_login => { '<' => DateTime->now->subtract( days => $inactivity_time_out ) }, self_destruct_active => 0, id => { '>' => 1}}); while (my $empire = $inactives->next) { - out('Enabling self destruct on '.$empire->name); - $empire->enable_self_destruct; - $abandons_tally++; + if ($empire->essentia >= 1) { + out('Preventing self-destruct by spending essentia.'); + $empire->spend_essentia(1, 'prevent self-destruct')->update; + } + else { + out('Enabling self destruct on '.$empire->name); + $empire->enable_self_destruct; + $abandons_tally++; + } } out('Updating Viral Log'); diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index f2d1c58e..626e3fdb 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,12 +1,13 @@ 3.0100 - Add: The space station lab is now capable of producing some module plans. - Rule: Deployed bleeders now require a captcha to be demolished. + - Rule: Only ships that are performing hostile actions will trigger captchas. + - Rule: If an account has essentia after 21 days of inactivity, it will spend 1 essentia (if possible) rather than enabling self-destruct. This allows people to keep their accounts long-term even if they want to take a break for a while. - API: Added get_stored_resources method to Distribution Center. - Fix: "can" result in distribution center returned 0 always. - Fix: All body resource attributes have been upgraded to support 9223372036854775807 instead of 2147483647. - Fix: Space stations now count against your next colony cost while in transit. - Fix: Added missing Malcud Field, Ravine, Lapis Forest, and Beeldeban Nest API docs. - - Rule: Only ships that are performing hostile actions will trigger captchas. 3.0001 - Add: Added Space Station Lab building, which will eventually allow building space station modules. -- 2.51.2