Page MenuHomeWildfire Games

Show number of builders besides (not in space) build time.
Needs ReviewPublic

Authored by Freagarach on Nov 14 2019, 8:41 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

This patch lets the number of builders show, as well as the build time left, see rP21121.

There are several options how to show this:

  • Next to eachother (either number first or not).
  • Underneath eachother (either number first or not).
Test Plan

Verify that the manner of translation is correct.

Event Timeline

Freagarach created this revision.Nov 14 2019, 8:41 PM
Owners added a subscriber: Restricted Owners Package.Nov 14 2019, 8:41 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/577/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/selection_details.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/selection_details.js
| 259| 259| 		resourceCarryingIcon.sprite = "stretched:session/icons/repair.png";
| 260| 260| 		resourceCarryingIcon.tooltip = getBuildTimeTooltip(entState);
| 261| 261| 		resourceCarryingText.caption = entState.foundation.numBuilders ? sprintf(translate("%(time)s\n(%(number)s)"), {
| 262|    |-				"time": Engine.FormatMillisecondsIntoDateStringGMT(entState.foundation.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")),
|    | 262|+			"time": Engine.FormatMillisecondsIntoDateStringGMT(entState.foundation.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")),
| 263| 263| 				"number": entState.foundation.numBuilders
| 264| 264| 			}) : "";
| 265| 265| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/selection_details.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/selection_details.js
| 260| 260| 		resourceCarryingIcon.tooltip = getBuildTimeTooltip(entState);
| 261| 261| 		resourceCarryingText.caption = entState.foundation.numBuilders ? sprintf(translate("%(time)s\n(%(number)s)"), {
| 262| 262| 				"time": Engine.FormatMillisecondsIntoDateStringGMT(entState.foundation.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")),
| 263|    |-				"number": entState.foundation.numBuilders
|    | 263|+			"number": entState.foundation.numBuilders
| 264| 264| 			}) : "";
| 265| 265| 	}
| 266| 266| 	else if (entState.resourceSupply && (!entState.resourceSupply.killBeforeGather || !entState.hitpoints))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/selection_details.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/selection_details.js
| 261| 261| 		resourceCarryingText.caption = entState.foundation.numBuilders ? sprintf(translate("%(time)s\n(%(number)s)"), {
| 262| 262| 				"time": Engine.FormatMillisecondsIntoDateStringGMT(entState.foundation.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")),
| 263| 263| 				"number": entState.foundation.numBuilders
| 264|    |-			}) : "";
|    | 264|+		}) : "";
| 265| 265| 	}
| 266| 266| 	else if (entState.resourceSupply && (!entState.resourceSupply.killBeforeGather || !entState.hitpoints))
| 267| 267| 	{
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1091/display/redirect

bb added a subscriber: bb.Jan 14 2020, 9:11 PM

Adding the number of builders to the "front page" should imply adding the time left to the tooltip

wrt the ordering, keep it consistent with the tooltip