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

Document constructions and remove time constant #30731

Merged
merged 1 commit into from
May 22, 2019

Conversation

ymber
Copy link
Member

@ymber ymber commented May 21, 2019

Summary

SUMMARY: Infrastructure "Remove constant factor from construction time and document constructions"

Purpose of change

Standardizing units as a prelude to cutting turn time.

Describe the solution

Constructions times were already defined as minutes so I left that as is. I removed the time constant from the minute to move conversion so it will switch properly with turn time.

@@ -1275,7 +1275,7 @@ void load_construction( JsonObject &jo )
con.category = jo.get_string( "category", "OTHER" );
// constructions use different time units in json, this makes it compatible
// with recipes/requirements, TODO: should be changed in json
con.time = jo.get_int( "time" ) * 1000;
con.time = to_moves<int>( time_duration::from_minutes( jo.get_int( "time" ) ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually this should just be a duration, but that's out-of-scope for what you're doing.

@ZhilkinSerg ZhilkinSerg self-assigned this May 21, 2019
@kevingranade kevingranade merged commit 6f672ef into CleverRaven:master May 22, 2019
@ZhilkinSerg ZhilkinSerg removed their assignment May 24, 2019
@ymber ymber deleted the construction_time branch June 10, 2019 20:43
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

Successfully merging this pull request may close these issues.

None yet

3 participants