Use formatting for that exception msg

This commit is contained in:
Kae 2024-08-21 17:20:49 +10:00 committed by GitHub
parent d9ca18198e
commit 25386deef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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