Skip to content
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

"Delay Shroud Updates" should apply to recalls #2196

Closed
jostephd opened this issue Nov 14, 2017 · 6 comments
Closed

"Delay Shroud Updates" should apply to recalls #2196

jostephd opened this issue Nov 14, 2017 · 6 comments
Assignees
Labels
Enhancement Issues that are requests for new features or changes to existing ones. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine.

Comments

@jostephd
Copy link
Member

Hi,

Recalling a unit unveils the shroud, and hence is not undoable, even while "Delay Shroud Updates" is enabled.

To reproduce, enable "Delay Shroud Updates" and recall any dwarf onto (8,16) at the very start of HttT Hasty Alliance. The recall will unveil (4,13) and be non-undoable. I expect the recall not to unveil any hexes and to be undoable, until "Update Shroud Now" is invoked.

@jostephd
Copy link
Member Author

I've tried to implement this by making place_recruit return early if team::auto_shroud_updates() is false, but then I ran into the undo list handling: actions::undo::recall_action unconditionally clears the shroud. I'm not sure how to proceed.

@Wedge009 Wedge009 added Enhancement Issues that are requests for new features or changes to existing ones. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine. labels Nov 14, 2017
@AI0867 AI0867 self-assigned this Nov 15, 2017
@AI0867
Copy link
Member

AI0867 commented Nov 15, 2017

This appears to be due to the initiative special, and its associated events. It triggers on all prerecruit and prerecall events, breaking undo for recall and traitless recruit.

@AI0867 AI0867 closed this as completed in ca0b503 Nov 15, 2017
@jostephd
Copy link
Member Author

@AI0867 Thanks but I can still reproduce the original problem with current master (b4c08f4). Could you double check please?

jostephd added a commit to jostephd/wesnoth that referenced this issue Nov 16, 2017
Fixes wesnoth#2196 (in addition to ca0b503
which was HttT-specific).
jostephd added a commit to jostephd/wesnoth that referenced this issue Nov 16, 2017
Fixes wesnoth#2196 (in addition to ca0b503
which was HttT-specific).
jostephd added a commit to jostephd/wesnoth that referenced this issue Nov 16, 2017
Fixes wesnoth#2196 (in addition to ca0b503
which was HttT-specific).
jostephd added a commit to jostephd/wesnoth that referenced this issue Nov 16, 2017
Fixes wesnoth#2196 (in addition to ca0b503
which was HttT-specific).
@jostephd
Copy link
Member Author

I think there are three separate issues here:

  1. When recalling a merman onto (8,16), it was not possible to undo the recall. ca0b503 fixed that.
  2. Now that it's possible to undo the recall, invoking "redo" causes a sync error. I just filed that as HttT: "initiative" special causes sync/checksum errors in recalls #2216.
  3. Recalls don't honor the "Delay Shroud Updates" option. We can track that under Make the "Delay Shroud Updates" option apply to recalls. #2207.

Thanks for fixing (1), @AI0867.

@AI0867
Copy link
Member

AI0867 commented Nov 19, 2017

After my fix, recalls did appear to honor "delay shroud updates" in the tests I did in Hasty Alliance.

@jostephd
Copy link
Member Author

With current master, if I start HttT anew, :create a dwarvish unit, :change_level to Hasty Alliance, enable Delay Shroud Updates and recall the unit onto (8,16), then shroud is removed from some hexes and the recall is not undoable. So it seems it's fixed for you but not for me..?

GregoryLundberg pushed a commit that referenced this issue Dec 2, 2017
Fixes #2196 (in addition to ca0b503
which was HttT-specific).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issues that are requests for new features or changes to existing ones. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine.
Projects
None yet
Development

No branches or pull requests

3 participants