Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map file check uses foldernames for files instead of scenario.lua #1046

Open
CookieNoob opened this issue May 29, 2018 · 0 comments
Open

map file check uses foldernames for files instead of scenario.lua #1046

CookieNoob opened this issue May 29, 2018 · 0 comments

Comments

@CookieNoob
Copy link
Member

CookieNoob commented May 29, 2018

client/src/fa/maps.py

Lines 101 to 112 in ecf3715

def isMapFolderValid(folder):
"""
Check if the folder got all the files needed to be a map folder.
"""
baseName = os.path.basename(folder).split('.')[0]
files_required = {
baseName + ".scmap",
baseName + "_save.lua",
baseName + "_scenario.lua",
baseName + "_script.lua"
}
files_present = set(os.listdir(folder))

The map files can be named differently than the foldername of the maps, but the check for valid map files only tries the foldername instead of the paths that are stored inside of the scenario.lua file. Maps that differ from that naming convention wont be loaded when selecting them in the hostgame-popup and the default map (Four Corners) will be opened instead. Switching to the map inside of the game lobby (and launching it) works fine.

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant