MCPcopy Create free account
hub / github.com/Card-Forge/forge / preloadTokens

Method preloadTokens

forge-core/src/main/java/forge/token/TokenDb.java:68–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 }
67
68 public void preloadTokens() {
69 for (CardEdition edition : this.editions) {
70 for (Map.Entry<String, Collection<CardEdition.EditionEntry>> inSet : edition.getTokens().asMap().entrySet()) {
71 String name = inSet.getKey();
72 String fullName = String.format("%s_%s", name, edition.getCode().toLowerCase());
73 for (CardEdition.EditionEntry t : inSet.getValue()) {
74 allTokenByName.put(fullName, addTokenInSet(edition, name, t));
75 }
76 }
77 }
78 }
79
80 protected boolean loadTokenFromSet(CardEdition edition, String name) {
81 String fullName = String.format("%s_%s", name, edition.getCode().toLowerCase());

Callers 1

CEditorTokenViewerMethod · 0.80

Calls 6

addTokenInSetMethod · 0.95
getTokensMethod · 0.45
getKeyMethod · 0.45
getCodeMethod · 0.45
getValueMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected