mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-20 02:21:11 +01:00
Bugfix: Load all icons for monsters spawned on maps, even when they're not part of the list of monsters that may spawn on maps
This commit is contained in:
@@ -104,10 +104,16 @@ public final class TileManager {
|
||||
|
||||
public HashSet<Integer> getTileIDsFor(PredefinedMap map, LayeredTileMap tileMap, WorldContext world) {
|
||||
HashSet<Integer> iconIDs = new HashSet<Integer>();
|
||||
for(MonsterSpawnArea a : map.spawnAreas) {
|
||||
for(String monsterTypeID : a.monsterTypeIDs) {
|
||||
for (MonsterSpawnArea a : map.spawnAreas) {
|
||||
for (String monsterTypeID : a.monsterTypeIDs) {
|
||||
iconIDs.add(world.monsterTypes.getMonsterType(monsterTypeID).iconID);
|
||||
}
|
||||
// Add icons for monsters that are already spawned, but that do not belong to the group of
|
||||
// monsters that usually spawn here. This could happen if we change the contents of spawn-
|
||||
// areas in a later release,
|
||||
for (Monster m : a.monsters) {
|
||||
iconIDs.add(m.iconID);
|
||||
}
|
||||
}
|
||||
iconIDs.addAll(tileMap.usedTileIDs);
|
||||
return iconIDs;
|
||||
|
||||
Reference in New Issue
Block a user