Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public class StargateDimensionConfig {
private static File dimensionConfigFile;
private static Map<Integer, StargateDimensionConfigEntry> dimensionIntMap;
private static Map<Integer, StargateDimensionConfigEntry> dimensionMap;
//new code sparcky
public static Map<Integer, StargateDimensionConfigEntry> getDimensionMap() {
return dimensionMap;
}
//end


static {
DEFAULTS_MAP.put("overworld", new StargateDimensionConfigEntry("overworld", 0, new ArrayList<String>() {{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import tauri.dev.jsg.JSG;
import tauri.dev.jsg.config.JSGConfig;
import tauri.dev.jsg.config.JSGConfigUtil;
//new sparcky
import tauri.dev.jsg.config.stargate.StargateDimensionConfig;
import tauri.dev.jsg.config.stargate.StargateDimensionConfigEntry;
//end
import tauri.dev.jsg.stargate.network.StargateAddress;
import tauri.dev.jsg.stargate.network.StargateNetwork;
import tauri.dev.jsg.stargate.network.StargatePos;
Expand Down Expand Up @@ -49,6 +53,16 @@ public static void tryGenerate(@Nonnull World worldServer) {
continue;
}
if(id == 1) symbolType = SymbolTypeEnum.UNIVERSE;
//new code sparcky
StargateDimensionConfigEntry data = StargateDimensionConfig.getDimensionMap().get(id);
if (data.groups.contains("milkyway")) {
symbolType = SymbolTypeEnum.MILKYWAY;
} else if (data.groups.contains("pegasus")) {
symbolType = SymbolTypeEnum.PEGASUS;
} else if (data.groups.contains("universe")){
symbolType = SymbolTypeEnum.UNIVERSE;
}
//end
if (id == 0 || id == -1) {
JSG.debug("Dim " + id + " is internally blacklisted. Skipping...");
continue;
Expand Down Expand Up @@ -76,6 +90,7 @@ public static void tryGenerate(@Nonnull World worldServer) {
}
}


GeneratedStargate gs = generateAndPutAddresses(sgn, id, symbolType);
JSG.debug("Found unknown dimension " + id + "! This is it's address:");
JSG.debug(gs.address.toString());
Expand Down Expand Up @@ -104,4 +119,4 @@ public static GeneratedStargate generateAndPutAddresses(StargateNetwork sgn, int
}
return gs;
}
}
}