Last active
December 23, 2015 06:49
-
-
Save Mumfrey/6596200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Called from acceptOptions after parsing out command line arguments | |
* | |
* @param gameDirectory | |
* @param assetsDirectory | |
*/ | |
public void provideRequiredArgs(File gameDirectory, File assetsDirectory) | |
{ | |
@SuppressWarnings("unchecked") | |
final List<String> argumentList = (List<String>)Launch.blackboard.get("ArgumentList"); | |
if (argumentList != null) | |
{ | |
if (!argumentList.contains("--version")) | |
{ | |
argumentList.add("--version"); | |
argumentList.add(this.VERSION); | |
} | |
if (!argumentList.contains("--gameDir") && gameDirectory != null) | |
{ | |
argumentList.add("--gameDir"); | |
argumentList.add(gameDirectory.getAbsolutePath()); | |
} | |
if (!argumentList.contains("--assetsDir") && assetsDirectory != null) | |
{ | |
argumentList.add("--assetsDir"); | |
argumentList.add(assetsDirectory.getAbsolutePath()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment