Add "special events" log. Add console command, include in crash logs.

This commit is contained in:
Jonathan G Rennison
2021-10-04 20:54:12 +01:00
parent 2e022d5194
commit 6f16655e6e
8 changed files with 96 additions and 0 deletions

View File

@@ -590,6 +590,12 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
cur_company.Restore();
if (new_owner != INVALID_OWNER) {
AppendSpecialEventsLogEntry(stdstr_fmt("Company merge: old: %u, new %u", old_owner, new_owner));
} else {
AppendSpecialEventsLogEntry(stdstr_fmt("Company deletion: old: %u", old_owner));
}
RegisterGameEvents(new_owner != INVALID_OWNER ? GEF_COMPANY_MERGE : GEF_COMPANY_DELETE);
MarkWholeScreenDirty();