Feature #1554
closed
Tell user about goods a unit is carrying
Added by Dean Brown 27 days ago.
Updated 6 days ago.
Description
If goods_selection = "Leaving" then commerce units are built carrying goods of some type. Let's display that info to the user, in the pop-up info text and in the "finished building" message.
Files
Had to fix some un-noticed bugs
- in packhand.c, handle_unit_packet_common(), despite all the warning comments about keeping it in synch, was failing to copy the >carrying
unittools.c, unit_get_goods() needs to check unit_can_do_action(punit, ACTION_TRADE_ROUTE)
- unittools.c, in place_unit(), unit_get_goods() needs to be called before call to send_unit_info()
Changes in text.c and cityturn.c will require translations.
Patch should be good for S3_3 and Main.
They say that "Subject of a ticket should never contain word 'and'"
Please don't include multiple separate changes to a one ticket, like bug fixes that should go to all branches and a completely new feature for latest branches only (but should this particular improvement go to all branches? It's only a UI improvement, not subject to any freeze). Likely you should create a separate ticket for fixing sending info about the good unit is carrying, to the client.
I'm not convinced that we should check 'unit_can_do_action(punit, ACTION_TRADE_ROUTE)' before assigning goods to a unit. Too many things may change while unit is enroute, causing it to require goods information in the end anyway. It's safer to assign goods always (like the old code does), but not to do anything with the information when the unit cannot establish trade route.
Spun off #1579 for the bug fixes.
Blocked by #1579.
Agree the check for 'unit_can_do_action(punit, ACTION_TRADE_ROUTE)' should only be done at the time the user gets the info.
These fixes do require translations, so not sure which version to target. S3_2 included just in case.
- Blocked by Bug #1579: bugs with carrying goods added
- Target version set to 3.2.1
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
- Status changed from In Review to Closed
Also available in: Atom
PDF