Project

General

Profile

Actions

Feature #1554

closed

Tell user about goods a unit is carrying

Added by Dean Brown 26 days ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
07/02/2025
Due date:
% Done:

0%

Estimated time:

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

1554.patch (4.29 KB) 1554.patch Dean Brown, 07/02/2025 08:24 AM
1554CorrectedS3_2.patch (2.51 KB) 1554CorrectedS3_2.patch Dean Brown, 07/07/2025 12:19 AM
1554CorrectedS3_3.patch (2.47 KB) 1554CorrectedS3_3.patch Dean Brown, 07/07/2025 12:19 AM

Related issues 1 (0 open1 closed)

Blocked by Bug #1579: bugs with carrying goodsClosedMarko Lindqvist07/06/2025

Actions
Actions #1

Updated by Dean Brown 26 days ago

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.

Actions #2

Updated by Marko Lindqvist 24 days ago

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.

Updated by Dean Brown 22 days ago

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.

Actions #4

Updated by Marko Lindqvist 22 days ago

  • Blocked by Bug #1579: bugs with carrying goods added
Actions #5

Updated by Marko Lindqvist 22 days ago

  • Target version set to 3.2.1
Actions #6

Updated by Marko Lindqvist 11 days ago

  • Status changed from New to In Review
  • Assignee set to Marko Lindqvist
Actions #7

Updated by Marko Lindqvist 6 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF