allow cancelling of training queues
authorxangelo <git@xangelo.ca>
Mon, 6 Jun 2022 20:29:08 +0000 (16:29 -0400)
committerxangelo <git@xangelo.ca>
Mon, 6 Jun 2022 20:29:08 +0000 (16:29 -0400)
commit23651f2cfe342a32503dec70f56f8ffaf03f2616
treef758dcb35ec7d0757907317fae00df22babbc01b
parent9cb3a0584377f61cf3382fef4541246d1b1202bc
allow cancelling of training queues

When cancelling a training queue you end up with a minimum of 20% loss
on resources (credits/food/alloy/energy), 0% loss of people. The 20%
loss is based on the percentage completion.. after 20% completion, you
get the inverse of resources back.

IE: 40% completion means you get 60% of your resources back.
IE: 99% completion means you get 1% of your resources back
src/api.ts
src/render/unit-training.ts