OpenXcom Forum
OpenXcom Forks => OXCE Suggestions NEW => OpenXcom Extended (OXCE) => OXCE Suggestions Archive => Topic started by: Finnik on July 10, 2022, 07:35:04 pm
-
Hey!
Could be a rare case, but when I was analyzing code I noticed, that when you `void Production::startItem(Base * b, SavedGame * g, const Mod *m) const` and your project require the craft, it would be removed and deleted. But when we look to `refundItem`, we can see that there is no way to refund the craft in case we abort construction.
I understand how coplicated proper handling of this case, you can stuck with no free hangar space. But may be at least warn the player about consequences?
-
Sounds good.
Wanna PR it?
-
Sure! :D
-
I've tried to make some generic solution like `ErrorMessageState`, but can't see the way to implement it - I need to stop running the code in btnStop method and ask for confirmation.
I can't see any examples of that - all confirmation states hold the custom logic of confirmed action. I can't see an example of something like callbacks to parent state.
Should it be done in a form of custom state with own special logic, or is there some smart way to solve the problem with a general state?
-
I don't see any need for a generic confirmation window
typical example:
parent: TransferItemsState
confirm: TransferConfirmState