mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Removed unnecessary warnings about replace area requirement-related
properties. Added code to clear the "isApplied" flag on a replace area when another replace area is applied later and intersects with the first one.
This commit is contained in:
@@ -186,6 +186,13 @@ public final class MapController {
|
||||
if (!satisfiesCondition(replacement)) continue;
|
||||
else ConversationController.requirementFulfilled(world, replacement.requirement);
|
||||
tileMap.applyReplacement(replacement);
|
||||
for (ReplaceableMapSection impactedReplacement : tileMap.replacements) {
|
||||
if (impactedReplacement.isApplied && impactedReplacement.replacementArea.intersects(replacement.replacementArea)) {
|
||||
//The applied replacement has overwritten changes made by a previously applied replacement.
|
||||
//This previous replacement must now be considered as unapplied to let it be reapplied later eventually.
|
||||
impactedReplacement.isApplied = false;
|
||||
}
|
||||
}
|
||||
hasUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +288,8 @@ public final class TMXMapTranslator {
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_ABOVE)) layerNames.aboveLayersName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_WALKABLE)) layerNames.walkableLayersName = prop.value;
|
||||
else if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
|
||||
L.log("OPTIMIZE: Map " + map.name + " contains replace area with unknown property \"" + prop.name + "\".");
|
||||
if (!requirementPropertiesNames.contains(prop.name))
|
||||
L.log("OPTIMIZE: Map " + map.name + " contains replace area with unknown property \"" + prop.name + "\".");
|
||||
}
|
||||
}
|
||||
MapSection replacementSection = transformMapSection(map, tileCache, position, layersPerLayerName, usedTileIDs, layerNames);
|
||||
|
||||
Reference in New Issue
Block a user