Elaborate on dungeon air vs ground error message

This commit is contained in:
SilverSokolova 2024-08-21 00:21:51 -05:00 committed by GitHub
parent b2f8ac594a
commit d9ca18198e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -654,12 +654,13 @@ namespace Dungeon {
}); });
ground[1] = max(ground[1], liquid[1]); ground[1] = max(ground[1], liquid[1]);
if (air.y() < ground.y()) if (air.y() < ground.y())
throw DungeonException("Invalid ground vs air contraint. Ground at: " + toString(ground.y()) + " Air at: " throw DungeonException("Invalid ground vs air constraint. Ground at: " + toString(ground.y()) + ". Air at: "
+ toString(air.y()) + toString(air.y())
+ " Pixels: highest ground:" + ". Pixels: highest ground:"
+ toString(ground) + toString(ground)
+ " lowest air:" + ", lowest air:"
+ toString(air)); + toString(air)
+ ". Try moving your 'require there be air here' anchors above any other 'require there be (something) here' anchors.");
return air.y(); return air.y();
} }