@Override
	public void setFieldTMs(List<Integer> fieldTMs) {
		if (!mapLoadingDone) {
			preprocessMaps();
			mapLoadingDone = true;
		}
		Iterator<Integer> iterTMs = fieldTMs.iterator();
		int[] givenTMs = new int[512];

		for (int offset : itemOffs) {
			int itemHere = readWord(offset);
			if (allowedItems.isTM(itemHere)) {
				// Cache replaced TMs to duplicate repeats
				if (givenTMs[itemHere] != 0) {
					rom[offset] = (byte) givenTMs[itemHere];
				} else {
					// Replace this with a TM from the list
					int tm = iterTMs.next();
					tm += 0x120;
					givenTMs[itemHere] = tm;
					writeWord(offset, tm);
				}
			}
		}
	}