-
Notifications
You must be signed in to change notification settings - Fork 286
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
Scenario Additions (Planetary Cond. / Dialog skip) #2775
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things first
@@ -409,6 +446,69 @@ public IGame createGame() throws Exception { | |||
return g; | |||
} | |||
|
|||
private void parsePlanetaryConditions(Game g, StringMultiMap p) { | |||
if (p.containsKey(PARAM_PLANETCOND_TEMP)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we separate these if statements so that there is a whitespace between the close }
and the next if statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if we are just going to use a setter immediately after can we just use the same line and combine them. Not much point to separate them out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a) You mean an empty line after }? parsePlanetaryConditions is so uninteresting that I wanted it to be short. No complexity here.
b) What? You mean like g.getPlanetaryConditions().setTemperature(Integer.parseInt(p.getString(PARAM_PLANETCOND_TEMP)));?
I can do that but it makes lines very long and Id rather have them like this than with a break in the middle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arlith used to run a code formatter that would cut the lines very short iirc and (I think) sometimes result in awful line breaks. I'd rather break manually. But if no one does this, I can sure use long code lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly like this. The extra space is an accessibility bit that assists in separating out the statements to a reader. Otherwise, it can come off as being a single giant chained if statement even though it is not the case
Resolves #2133