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

Catch invalid default game speeds while loading the ruleset #14149

Merged
merged 1 commit into from Oct 14, 2017

Conversation

Projects
None yet
4 participants
@abcdefg30
Member

abcdefg30 commented Oct 7, 2017

Testcase, add

World:
	MapOptions:
		GameSpeed: normal

to the rules of a RA map. (If it loads without an error start the map and then use 'restart'.)

{
var gameSpeeds = Game.ModData.Manifest.Get<GameSpeeds>().Speeds;
if (!gameSpeeds.ContainsKey(GameSpeed))
throw new YamlException("Invalid default game speed '{0}'.".F(GameSpeed));

This comment has been minimized.

@Phrohdoh

Phrohdoh Oct 10, 2017

Member

List the available speeds?

@Phrohdoh

Phrohdoh Oct 10, 2017

Member

List the available speeds?

@pchote

pchote approved these changes Oct 14, 2017

@pchote pchote added the PR: Needs +2 label Oct 14, 2017

@reaperrr reaperrr merged commit 7ccf41b into OpenRA:bleed Oct 14, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr
Contributor

reaperrr commented Oct 14, 2017

@abcdefg30 abcdefg30 deleted the abcdefg30:checkSpeeds branch Oct 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment