Skip to content

Commit

Permalink
Fix max build variable dependencies (#1278)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Herrera <[email protected]>
  • Loading branch information
Pablete1234 authored Nov 23, 2023
1 parent a9b3762 commit 81f4a16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/tc/oc/pgm/api/module/ModuleGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -60,7 +60,7 @@ protected void loadAll() throws ModuleLoadException {

protected void unloadAll() {
if (loaded.compareAndSet(true, false)) {
modules = new HashMap<>(factories.size());
modules = new LinkedHashMap<>(factories.size());
}
}

Expand Down
7 changes: 6 additions & 1 deletion core/src/main/java/tc/oc/pgm/variables/VariablesModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import tc.oc.pgm.api.module.exception.ModuleLoadException;
import tc.oc.pgm.blitz.BlitzMatchModule;
import tc.oc.pgm.filters.Filterable;
import tc.oc.pgm.regions.RegionMatchModule;
import tc.oc.pgm.score.ScoreMatchModule;
import tc.oc.pgm.teams.TeamMatchModule;
import tc.oc.pgm.util.math.Formula;
Expand All @@ -50,7 +51,11 @@ public VariablesModule(ImmutableList<VariableDefinition<?>> variables) {

@Override
public @Nullable Collection<Class<? extends MatchModule>> getWeakDependencies() {
return ImmutableList.of(TeamMatchModule.class, BlitzMatchModule.class, ScoreMatchModule.class);
return ImmutableList.of(
TeamMatchModule.class,
BlitzMatchModule.class,
ScoreMatchModule.class,
RegionMatchModule.class);
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 81f4a16

Please sign in to comment.