This reverts commit 02de08338c.
Mainline does *not* contain paths with backslashes. If it did, the game
would be broken on GNU/Linux and macOS (and we'd need to fix it anyway).
Instead, it's more likely that we have code somewhere that generates
paths dynamically using backslashes on Windows, and the correct fix is
to change that code to use forward slashes instead.
This reverts commit 1b9c07eb40.
I'm reverting this (at least temporarily) since it seems mainline contains *numerous* paths with
backslashes. This change basically spams console with warnings just from mainline/core content,
in addition to having other negative side effects such as leader image generation failing when
populating a save_index file. Plus, if backslashes really broke things on Linux, I think we'd have
had a multitude of people complaining about half their images not showing up on that platform, which
(AFAIK) has not been the case.
Backslashes only work on Windows. A UMC author may accidentally use them in
their add-on that won't then work properly on GNU/Linux and macOS.
Just disallow them on all platforms to avoid problems.
This accomplishes two main things:
- Creates a mapgen_helper.lua module containing functions useful for Lua map generators
- Paves the way for allowing the cave generator to produce scenarios and accept user configuration
The support parameter in the attack evaluation quantifies how much
power the AI can bring to an attack hex. This is supposed to include
the attacking unit itself. However, in some circumstances (such as when
the unit cannot move for one reason or another) this unit is not
accounted for. If no other units can get to this hex either, support is
(erroneously) set to zero, resulting in an attack score of zero, which
in turn results in no attack. Skipping the multiplication of the score
by support in this case does not affect comparison with other attacks
here, as this is by definition the only attack possible on the given
hex.
Note that the '!is_surrounded' conditional is also covered by 'support
!= 0' and can therefore be deleted.
This fixes bug #23720.