Page 1 of 1

previous_target for on_marked_for_upgrade

Posted: Tue Sep 13, 2022 5:02 pm
by _CodeGreen
I've been trying to figure out how to fix a certain bug with redo, which involves upgrading the same entity twice in a row. The first upgrade works fine, but the second upgrade is causing some trouble. on_marked_for_upgrade happens after the entity was marked, which makes sense, but there's no way for me to tell what the entity was supposed to be upgraded into before giving it a new upgrade. An on_pre_marked_for_upgrade event is not necessary, but as the title says, an event data field like previous_target would completely solve that issue.

Re: previous_target for on_marked_for_upgrade

Posted: Thu Sep 11, 2025 2:17 pm
by Bilka
While it won't help with your mod anymore since redo is now part of the base game, I still added previous_target and previous_quality to the on_marked_for_upgrade event for 2.0.67.

Re: previous_target for on_marked_for_upgrade

Posted: Thu Sep 11, 2025 4:37 pm
by protocol_1903
Bilka wrote: Thu Sep 11, 2025 2:17 pm While it won't help with your mod anymore since redo is now part of the base game, I still added previous_target and previous_quality to the on_marked_for_upgrade event for 2.0.67.
Thats an awesome fix. Thank you!