Tokens reworked:

- removed outdated code;
 - updated logic to choose a set code for a tokens in different use cases (related to #10150);
 - added many tests for client and server token's data (related to #10139);
 - prepare for tokens database (related #6955);
This commit is contained in:
Oleg Agafonov 2023-04-13 16:18:53 +04:00
parent ff15edbce8
commit d17df585c5
13 changed files with 409 additions and 89 deletions

View file

@ -259,7 +259,7 @@ public class MageBook extends JComponent {
if (newToken instanceof Token) {
((Token) newToken).setOriginalExpansionSetCode(currentSet);
((Token) newToken).setExpansionSetCodeForImage(currentSet);
((Token) newToken).setTokenType(token.getType());
((Token) newToken).setTokenType(token.getType()); // must be called after set code, so it keep the type
res.add(newToken);
}
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {