test(compare): trace deterministic monthly seed progression

This commit is contained in:
2026-08-03 18:57:01 +00:00
parent 3b2fd1082f
commit f16a6b6880
23 changed files with 1274 additions and 213 deletions
+15
View File
@@ -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();