Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing scenario loader and making sure all supplied scenarios load
- Loading branch information
Showing
12 changed files
with
987 additions
and
694 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ScenarioLoaderException.exceptionReadingFile=Exception while reading scenario file | ||
ScenarioLoaderException.invalidFactionCamoGroup=Invalid faction camo group '%s' for %s | ||
ScenarioLoaderException.invalidFactionCamoName=Invalid faction camo '%s' in group '%s' for %s | ||
ScenarioLoaderException.invalidIndividualCamoGroup=Invalid individual camo group '%s' for %s | ||
ScenarioLoaderException.invalidIndividualCamoName=Invalid individual camo '%s' in group '%s' for %s | ||
ScenarioLoaderException.missingFactions=Not a valid MMS file. No Factions defined. | ||
ScenarioLoaderException.missingMMSVersion=Not a valid MMS file. No MMSVersion. | ||
ScenarioLoaderException.missingRequiredEntity=Scenario requires missing entity: %s | ||
ScenarioLoaderException.multipleUnitDeclarations=Multiple unit declarations '%s' | ||
ScenarioLoaderException.nonexistantBoard=Couldn't find board '%s' | ||
ScenarioLoaderException.unparsableEntityLine=Unparseable entity line: %s |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package megamek.server; | ||
|
||
import java.util.MissingResourceException; | ||
import java.util.ResourceBundle; | ||
|
||
import megamek.common.preference.PreferenceManager; | ||
import megamek.common.util.EncodeControl; | ||
|
||
public class Messages { | ||
private static final String BUNDLE_NAME = "megamek.server.messages"; //$NON-NLS-1$ | ||
|
||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, | ||
PreferenceManager.getClientPreferences().getLocale(), new EncodeControl()); | ||
|
||
private Messages() {} | ||
|
||
public static String getString(String key) { | ||
try { | ||
return RESOURCE_BUNDLE.getString(key); | ||
} catch(MissingResourceException e) { | ||
System.out.println("Missing i18n entry: " + key); //$NON-NLS-1$ | ||
return '!' + key + '!'; | ||
} | ||
} | ||
} |
Oops, something went wrong.