Fix AutoDeath not triggering after type replacement that bypasses ConvertToType - #2359
Fix AutoDeath not triggering after type replacement that bypasses ConvertToType#2359DeathFishAtEase wants to merge 1 commit into
Conversation
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
|
Why not change those type replacements to use ConvertToType? |
|
if there're still cases that bypass type conversion then maybe we should just revert #2300 since it's not just about AutoDeath. Though this will bring a noticeable lag source which I think it's not worthy for a case that's rarely used ideal solution will be patching these cases to let them execute UpdateTypeExtData only once when they're converted, but maybe it's inconvenient to rewrite it for some cases. IDK what would be the best option here |
I didn't choose this solution initially because I wasn't sure whether For such customization features that are only used for specific settings, I don't favor rewriting them into a more generic form - we can certainly extract the main logic and create a copy under a general framework - but for these features themselves, if some characteristics are broken (even if they are not commendable from many perspectives), it might not necessarily be good (for example,
I think all similar scenarios have been affected. @Rhosalth7, could you try whether ScriptAction#44 and ScriptAction#45 also have the same issue, and whether they are also normal in DevBuild#48 but problematic in v0.5-alpha? |
The script actions work fine with the trucka and truckb from what i noticed |
|
I mean that replacing a unit without the auto death attribute with a unit that has the auto death attribute through these two scripts might also not execute auto death. |
What kind of change is this?
Skip Changelog).Skip Changelog,Skip Docs).Skip Docs).Skip Changelog,Skip Docs,Skip Credits).Description
Resolve #2353
Type replacement that bypasses
ConvertToType(e.g. visceroid merge) leavesTechnoExt::TypeExtDatastale, so AutoDeath never fires. Resync the extension once per object viaUpdateTypeData+RegisterAutoDeathinCheckDeathConditions.