Page MenuHomeWildfire Games

Allow free Upgrades and/or Technologies.
Needs ReviewPublic

Authored by Freagarach on Mar 17 2020, 2:51 PM.

Details

Reviewers
bb
Summary

@wraitii noticed in D2337 that free Upgrades error out the tooltip.
This patch corrects that and allows free technologies as well.

Note that free entities are out of scope, IMHO.

Test Plan

Verify that:

  • free upgrades do not let the tooltips error out.
  • free technologies can be researched.

Event Timeline

Freagarach created this revision.Mar 17 2020, 2:51 PM
Owners added a subscriber: Restricted Owners Package.Mar 17 2020, 2:51 PM

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

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

Freagarach planned changes to this revision.Mar 17 2020, 2:59 PM

Meh,,,
Needs to be elaborated.

Freagarach updated this revision to Diff 11494.Mar 17 2020, 7:13 PM
Freagarach retitled this revision from Early return free upgrades in "getEntityCostComponentsTooltipString" in tooltips.js. to Allow free Upgrades and/or Technologies..
Freagarach edited the summary of this revision. (Show Details)
Freagarach edited the test plan for this revision. (Show Details)

Also include techs.

Stan added a subscriber: Stan.Mar 17 2020, 7:17 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/ProductionQueue.js
371–372

Maybe not create the object.

Freagarach marked an inline comment as done.Mar 17 2020, 7:21 PM
Freagarach added inline comments.
binaries/data/mods/public/simulation/components/ProductionQueue.js
396

Its needed here.

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

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

bb added a subscriber: bb.May 31 2020, 11:49 PM

Shouldn't the sele paired tech benefit from this immediately?

Trying to train a unit without a cost component errors out (I tried brittain dogs, probably happens with all units)

Slightly more offtopic (maybe out of scope): disabling the resource tag in the cost component errors out (tried with ptol houses).

Note that this patch does not add any functionality, only sets a default value.

bb requested changes to this revision.May 31 2020, 11:50 PM
bb removed a reviewer: Restricted Owners Package.
This revision now requires changes to proceed.May 31 2020, 11:50 PM
Freagarach updated this revision to Diff 12457.Thu, Jun 25, 4:45 PM
Freagarach edited the summary of this revision. (Show Details)
Freagarach edited the test plan for this revision. (Show Details)

Let sele-tech benefit.

In D2654#117688, @bb wrote:

Trying to train a unit without a cost component errors out (I tried brittain dogs, probably happens with all units)
Slightly more offtopic (maybe out of scope): disabling the resource tag in the cost component errors out (tried with ptol houses).

Both require so much more effort that I would consider them out of scope. I did write the split of the cost component on my ToDo-list and may create a ticket.

Owners added a subscriber: Restricted Owners Package.Thu, Jun 25, 4:45 PM

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

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

wraitii added inline comments.Sun, Jun 28, 3:20 PM
binaries/data/mods/public/simulation/components/ProductionQueue.js
373

Maybe you can go in template.cost || []? I'm not sure.