Project

General

Profile

Actions

Bug #1792

open

inconsistent reporting of one time bonus and revenues

Added by Dean Brown 12 days ago. Updated 11 days ago.

Status:
In Review
Priority:
Normal
Category:
client-common
Target version:
Start date:
12/01/2025
Due date:
% Done:

0%

Estimated time:

Description

Only happens when caravan_bonus_style = CLASSIC, which is the default.

Client says -
"Your Caravan ... reaches the city ...", "Enter Marketplace (109 one time bonus...)"

Server says -
"Your Caravan ... has arrived ... revenues amount to 119 in gold and research."

Cause is in common/traderoutes.c routine get_caravan_enter_city_trade_bonus() this line

    tb = (tb * (pc1->surplus[O_TRADE] + pc2->surplus[O_TRADE])) / 24;

When called from the client, foreign city's surplus is unknown (=0), so the
client should say "estimated".


Files

1792.patch (3.71 KB) 1792.patch Dean Brown, 12/02/2025 05:14 AM
Actions #1

Updated by Dean Brown 12 days ago

  • File 1792.patch added

Patch OK for S3_3 & Main.

Actions #2

Updated by Marko Lindqvist 11 days ago

Should it be "estimated" only if the target city is a foreign one? For domestic trade routes client knows both ends' trade surplus.

Actions #3

Updated by Marko Lindqvist 11 days ago

  • Category set to client-common
Actions #4

Updated by Dean Brown 11 days ago

Yes, good catch. Better patch.

Actions #5

Updated by Dean Brown 11 days ago

  • File deleted (1792.patch)
Actions #6

Updated by Marko Lindqvist 11 days ago

  • Status changed from New to In Review
  • Assignee set to Marko Lindqvist
  • Target version set to 3.2.2

I've recently written documentation of the commit message rules: https://www.freeciv.org/wiki/Commit_rules#Commit_message
It would be nice if you followed that format in your future patches (no need to update any of the existing ones, I've already update d the commit messages when I've taken them to my work trees)

Actions

Also available in: Atom PDF