Default Destination Checker

Started by llamazing, January 27, 2021, 01:57:34 AM

Previous topic - Next topic
So apparently if a map has no default destination designated, then the first one listed in the map data file becomes the default. This caused a bug in Ocean's Heart where if someone saved the game on a particular map then they would spawn at a destination that was blocked by a locked door, and the hero would be stuck. The solution is to always designate one of the map's destinations as the default whenever there is more than one (choosing one that won't be blocked by an obstruction, of course).

I wrote a script to scan all the map data files, reporting any found that have more than one destination without a default destination specified.

Usage:
require"scripts/default_destination_checker"()

The list of maps found is printed to the console.

Great catch llamazing, thanks for posting this.