Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#122 closed defect (released)

Make usage of percentage or ratio common

Reported by: ibboard Owned by: ibboard
Priority: critical Milestone: WarFoundry 0.1
Component: WarFoundry-API Version:
Keywords: percentage equipment limit Cc:
Blocked By: Blocking: #120

Description

As discovered in a visual way for #120, some of the code assumes ratios are 0 to 1, some assume that ratios are a percentage (0 to 100). All of this needs to be made common and handled properly.

Change History (6)

comment:1 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:2 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(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:3 Changed 10 years ago by ibboard

(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:4 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:5 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:6 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.