test(compare): trace deterministic monthly seed progression
This commit is contained in:
@@ -94,6 +94,21 @@ class ProcessIncome extends \sammo\Event\Action
|
||||
foreach ($generalRawList as $rawGeneral) {
|
||||
$generalObj = new General($rawGeneral, null, null, null, null, $year, $month, false);
|
||||
$gold = Util::round(getBill($generalObj->getVar('dedication')) * $ratio);
|
||||
if (
|
||||
getenv('REF_DETERMINISTIC_INSTALL_ENABLED') === '1'
|
||||
&& getenv('SEED_PARITY_MONTHLY_RESOURCE_TRACE') === '1'
|
||||
&& in_array((string)$generalObj->getID(), explode(',', (string)getenv('REF_AI_TRACE_GENERAL_IDS')), true)
|
||||
) {
|
||||
fwrite(STDOUT, 'MONTHLY_RESOURCE_REF ' . json_encode([
|
||||
'action' => 'ProcessIncome',
|
||||
'type' => 'gold',
|
||||
'generalId' => $generalObj->getID(),
|
||||
'current' => $generalObj->getVar('gold'),
|
||||
'pay' => $gold,
|
||||
'ratio' => $ratio,
|
||||
'originOutcome' => $originoutcome,
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "\n");
|
||||
}
|
||||
$generalObj->increaseVar('gold', $gold);
|
||||
|
||||
$logger = $generalObj->getLogger();
|
||||
|
||||
Reference in New Issue
Block a user