#120 closed defect (released)
Numeric limit equipment items show large percentages
Reported by: | ibboard | Owned by: | ibboard |
---|---|---|---|
Priority: | critical | Milestone: | WarFoundry 0.1 |
Component: | WarFoundry-API | Version: | |
Keywords: | equipment amount | Cc: | |
Blocked By: | #122 | Blocking: | #117 |
Description
If a UnitEquipmentItem has a min/max number limit that isn't "unlimited" then the equipment item is taken X * 100% (e.g. ticket:117:Empire.race has Gunnery Specialists with required weapon that is taken at least 5000% for a unit of 5 Gunnery Specialists).
This is most obvious in the WinForms FrmUnit but also shows in the total army cost.
Change History (7)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Owner: | set to ibboard |
---|---|
Status: | new → accepted |
comment:3 Changed 10 years ago by
Blocked By: | 122 added |
---|
comment:4 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
(In r177) Big mess of updates, breaking our rules on "commit little and often" because the code was so ugly.
This revision will be broken for the WinForms UI, but as MonoDevelop/eSVN don't have a way of committing multiple projects in one go it can't be helped (Eclipse's Team Sync view could handle it)
Fixes #122: Make usage of percentage or ratio common
- All usage of ratio amounts for equipment items should now assume percentage
- Properly calculate number taken for ratio selection (divide by 0 now we're using percentages)
Fixes #118: Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts
- Added extra commands that differentiate between ratio and absolute amounts
Fixes #120: Numeric limit equipment items show large percentages
- Now made formatting treat ratios as percentages (don't multiply by 100)
- Move string formatting to UnitEquipmentItem...Selection classes
- Add method to Unit to say whether an equipment item is a numeric or ratio amount
comment:6 Changed 10 years ago by
released: | 1 → yes |
---|
Mark released fixes as released using radio values
comment:7 Changed 10 years ago by
Resolution: | fixed → released |
---|
Mark fix as released under a previous version
Problem appears to be because the minimum limit was 50% but the "ratio" limits are assumed to be ratios from 0 to 1, not 0 to 100% and so are multiplied by 100 to try to get the "correct" percentage.