#118 closed enhancement (released)
Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts
Reported by: | ibboard | Owned by: | ibboard |
---|---|---|---|
Priority: | major | Milestone: | WarFoundry 0.1 |
Component: | WarFoundry-API | Version: | |
Keywords: | equipment ratio ui | Cc: | |
Blocked By: | Blocking: | #117 |
Description
Although a UnitEquipmentItem can be ratio limited (e.g. "can give to up to 33% of the unit") the user's selection shouldn't necessarily be forced to be a ratio.
The assumption at the moment is that if up to X% of a unit can take an item then the user will want to take a percentage amount. This might not be the case, though, and the user might want to take 10 for their unit of 30 (33%) but still only take 10 when their unit size grows to 40. Currently the API doesn't allow for this distinction.
Change History (13)
comment:1 Changed 10 years ago by
Owner: | set to ibboard |
---|---|
Status: | new → accepted |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
(In r171) Re #118: Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts
- Rework Unit's internals on how it stores equipment selection amounts
- Fix logic error in "IsValidValue()" for absolute equipment selections
- Fix calculation error when using "equip all" for absolute equipment selections
- Make abstract equipment selection object set amount taken using property to trigger value checking
Also:
- Line ending cleanup in UnitEquipmentItem
comment:4 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
(In r172) Fixes #118: Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts
- Add extra "NumericSelection" type so that ratio selections check the absolute value is within their ratio range
- Update structure of checking for valid values
- Move cost calculation for equipment selection in to abstract class and add abstract method to get "number of items taken"
- Handle numeric selection and numeric selection for ratio differently in Unit
comment:5 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Re-opening because of errors when using #117:Empire.race - Gunnery Specialists get 5000% of the gun instead of a maximum of 5. Seems to be a confusion between ratio limits and numeric limits, possibly caused by the minimum of 0.
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Re-close ticket - now opened as #120 since it is a separate issue.
comment:7 Changed 10 years ago by
comment:8 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Re-open to cover changes to commands.
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → 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:10 Changed 10 years ago by
(In r178) Re #118: Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts
- Use new commands created in previous revision
Re #122: Make usage of percentage or ratio common
- Make sure all usage of percentages are correct
Re #117: Add percentage and number boxes to equipment item dialogs
- Fix some enable/disable inconsistencies for percentage amounts
- Fix problems where fixed limits weren't honoured by widgets
comment:12 Changed 10 years ago by
released: | 1 → yes |
---|
Mark released fixes as released using radio values
comment:13 Changed 10 years ago by
Resolution: | fixed → released |
---|
Mark fix as released under a previous version
(In r170) Re #118: Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts