From fd1be0f57960be6146dda5c7359fad32142d484d Mon Sep 17 00:00:00 2001 From: Mark Benson Date: Fri, 29 Sep 2023 02:26:22 +0100 Subject: [PATCH] Revert "12260-Pre & Post Refresh Hotkeys (#12694)" This reverts commit 0ee87145f0bb821cbfe045e7aa70ed5a7df9f496. --- .../java/VASSAL/build/module/GameRefresher.java | 8 -------- .../ReferenceManual/GameRefresher.adoc | 13 ++----------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/vassal-app/src/main/java/VASSAL/build/module/GameRefresher.java b/vassal-app/src/main/java/VASSAL/build/module/GameRefresher.java index 01c7081342..30f4ac4f97 100644 --- a/vassal-app/src/main/java/VASSAL/build/module/GameRefresher.java +++ b/vassal-app/src/main/java/VASSAL/build/module/GameRefresher.java @@ -47,7 +47,6 @@ import VASSAL.i18n.Resources; import VASSAL.tools.BrowserSupport; import VASSAL.tools.ErrorDialog; -import VASSAL.tools.NamedKeyStroke; import VASSAL.tools.swing.FlowLabel; import VASSAL.tools.swing.SwingUtils; import net.miginfocom.swing.MigLayout; @@ -341,10 +340,6 @@ public void execute(Set options, Command command) throws IllegalBuildExc } } - // About to commence refreshing the game, allow a custom start... - GameModule.getGameModule().fireKeyStroke(NamedKeyStroke.of("VassalGHKpreRefresh")); - - /* * 2. Build a list in visual order of all stacks, decks, mats and other pieces that need refreshing */ @@ -541,11 +536,8 @@ else if (!decksToDelete.isEmpty()) { log(Resources.getString("GameRefresher.refreshable_decks", refreshable)); log(Resources.getString(options.contains("DeleteOldDecks") ? "GameRefresher.deletable_decks" : "GameRefresher.deletable_decks_2", deletable)); //NON-NLS log(Resources.getString(options.contains("AddNewDecks") ? "GameRefresher.addable_decks" : "GameRefresher.addable_decks_2", addable)); //NON-NLS - } } - // After all refreshing, allow a custom finish... - GameModule.getGameModule().fireKeyStroke(NamedKeyStroke.of("VassalGHKpostRefresh")); } diff --git a/vassal-doc/src/main/readme-referencemanual/ReferenceManual/GameRefresher.adoc b/vassal-doc/src/main/readme-referencemanual/ReferenceManual/GameRefresher.adoc index 32378753c5..3e3c115f22 100644 --- a/vassal-doc/src/main/readme-referencemanual/ReferenceManual/GameRefresher.adoc +++ b/vassal-doc/src/main/readme-referencemanual/ReferenceManual/GameRefresher.adoc @@ -18,7 +18,7 @@ Whenever a piece is created in a VASSAL game, the Id of the definition used to c The Game Refresher works by matching the Id in each piece in the current game to the Id's of all piece definitions in the current module to find the new definition. If a match is found, then the piece is replaced with one created from the new defintion. Then each trait in the new Piece is checked to see if there is an EXACTLY matching trait in the old definition. If an EXACT match is found, then the 'state' of the old trait is copied over (e.g. what is the current layer showing, or current rotation facing). -Problems occur when the definition used to create the piece no longer exists in the module, or if traits are modified slightly so that they no longer EXACTLY match the old piece. There are various options in the Game Refresher dialog that can be used to help match and update these pieces and traits. In addition to these options, <<#RefreshHotkeys,special hotkeys>> can be used to perform custom maintenance routines which you have designed. +Problems occur when the definition used to create the piece no longer exists in the module, or if traits are modified slightly so that they no longer EXACTLY match the old piece. There are various options in the Game Refresher dialog that can be used to help match and update these pieces and traits. [.text-center] image:images/GameRefresher.png[] @@ -61,7 +61,7 @@ Remove Decks from the game that no longer exist in the module. See the <<#DeckRe *Add decks to game which have been added to the module since this game was created (empty deck will be added):*:: -Add Decks to the game that have been added to the module. See the <<#DeckRefresher,Deck Refresher>> section below for full details. +Add Decks to teh game that have been added to the module. See the <<#DeckRefresher,Deck Refresher>> section below for full details. |=== @@ -81,12 +81,3 @@ If you select the _Delete decks_ option, then any deck found in the current game If you select the _Add decks_ option, then any _new_ deck found in the module definition that does not exist in the game being refreshed will be _added_. Note this will not add any _contents_ (e.g., cards) to the deck, it will only add the deck. If you need to add contents you will need to arrange to add them separately, e.g., from a piece palette, or dragged in from some other location. -[#RefreshHotkeys] -==== Pre & Post-Refresh Hotkeys -If this option is checked, the Refresher will trigger special hotkeys. _VassalGHKpreRefresh_ is triggered before refreshing and _VassalGHKpostRefresh_ after refreshing. You may use this feature to perform maintenance that you wish to carry out on Predefined Setup or game files. Potential uses include converting counters or populating a new deck. - -Design and test your maintenance actions carefully. You can use _Refresh Counters_ to do one-off tests. Also, remember that Startup GKCs are not executed during Refresh Predefined Setups. - -After a Refeshing Predefined Setups, save your module as a different file name so you can do re-runs on the original if need be. - -Once you are done, consider disabling or removing the maintenance components so that further refreshes don’t trigger them accidentally. \ No newline at end of file