-
-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor undo handling with of synced actions. #2979
Comments
I was thinking about that when I looked at it before, but since I didn't really know how the undo stack works and didn't feel it was high priority, I elected to let it go. I also kinda wonder if we should be using |
Iirc show basically forward things like 'skip_ai_turn', 'skip_replay' etc. Maybe we refactor it out in favour of a function like play_comtroller->is_skipping() , error_handler is mostly used to indicate invalid content inthe'child' parameter, not sure how to implement the since Lua dies not have something like typed exceptions |
I am also considering dropping the use_undo parameter, afaik the onyl reason it exists is an optimisation in the ai code not to bother with undo stacks. But that is probably negltable while on the other hand it surely does make that code a bit more complicated. |
also fixes menu items beeing marked as undoabel even if they used the synced rng. #2979
the main issue is fixed, i still think it'd be nice to refactor it soemhow so that this type of error is no longer possible. |
also fixes menu items beeing marked as undoabel even if they used the synced rng. wesnoth#2979
also fixes menu items beeing marked as undoabel even if they used the synced rng. wesnoth#2979 (cherry-picked from commit 7751b79)
Closing since the issue reportedly was fixed, and IMO "refactor it somehow" isn't a valid issue topic (especially since gfgtdf is MIA). |
i didn't test this but from looking at the source it very much looks like this won't work as
SYNCED_COMMAND_HANDLER_FUNCTION(custom_command, child, /*use_undo*/, /*show*/, /*error_handler*/)
contains no code than deals with the undo stack.The text was updated successfully, but these errors were encountered: