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

UnitsManager shows incorrect mass production for some units in tooltips #1202

Closed
HUSSAR-mtrela opened this issue Apr 15, 2016 · 7 comments
Closed
Assignees
Milestone

Comments

@HUSSAR-mtrela
Copy link
Collaborator

HUSSAR-mtrela commented Apr 15, 2016

Reported by @PerfectWay on forum thread:
http://forums.faforever.com/viewtopic.php?f=45&t=11336&sid=41029a21b41b033930ec7cf76e9ac216&p=125309#p125309

I noticed a few issues related to the economic characteristics of the units:

  • T2 Mass Fabs show "Mass production: 0", but it should be 1
  • ACUs (all factions) show "Mass production: 0", but it should be 1
  • SACUs (except Seraphim) show "Mass production: 0", but it should be 1
@aeoncleanse
Copy link
Member

aeoncleanse commented Apr 18, 2016

It's probably this, no?

local function init(value) return value > 1 and value or 0 end

Why is this here again?

UnitsAnalyzer.lua line 369

@HUSSAR-mtrela
Copy link
Collaborator Author

I'm working on it but I dont think this code is the root cause of this issue. This code ensure that stats don't throw error when a value is nil.

@aeoncleanse
Copy link
Member

It also ensures that values ranging 0-1 are returned 0, even if == 1. Should it not be return value => 1 ?

@HUSSAR-mtrela
Copy link
Collaborator Author

yes, that should be => 1

@aeoncleanse
Copy link
Member

eda30c3

@HUSSAR-mtrela
Copy link
Collaborator Author

@aeoncleanse please push PR #1206 because it has a hotfix for this issue

@aeoncleanse
Copy link
Member

It's done. A close comment with a hash means the fix is merged :)

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

No branches or pull requests

3 participants