MCPcopy Create free account
hub / github.com/akeranen/the-one / readOkMapNodeTypes

Method readOkMapNodeTypes

movement/MapBasedMovement.java:102–123  ·  view source on GitHub ↗

Reads the OK map node types from settings @param settings The settings where the types are read

(Settings settings)

Source from the content-addressed store, hash-verified

100 * @param settings The settings where the types are read
101 */
102 private void readOkMapNodeTypes(Settings settings) {
103 if (settings.contains(MAP_SELECT_S)) {
104 this.okMapNodeTypes = settings.getCsvInts(MAP_SELECT_S);
105 for (int i : okMapNodeTypes) {
106 if (i < MapNode.MIN_TYPE || i > MapNode.MAX_TYPE) {
107 throw new SettingsError("Map type selection '" + i +
108 "' is out of range for setting " +
109 settings.getFullPropertyName(MAP_SELECT_S));
110 }
111 if (i > nrofMapFilesRead) {
112 throw new SettingsError("Can't use map type selection '" + i
113 + "' for setting " +
114 settings.getFullPropertyName(MAP_SELECT_S)
115 + " because only " + nrofMapFilesRead +
116 " map files are read");
117 }
118 }
119 }
120 else {
121 this.okMapNodeTypes = null;
122 }
123 }
124
125 /**
126 * Copyconstructor.

Callers 1

MapBasedMovementMethod · 0.95

Calls 3

containsMethod · 0.80
getCsvIntsMethod · 0.80
getFullPropertyNameMethod · 0.80

Tested by

no test coverage detected