Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#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 11 years ago by ibboard

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.

comment:2 Changed 11 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:3 Changed 11 years ago by ibboard

Blocked By: 122 added

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

released: 1

Mark released changes as released

comment:6 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:7 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.