Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #732512

Show terrain-specific extra bonuses in autogenerated help

Added by Jacob Nevins almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Client
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Since extras were generalised, the bonuses accruing from extras like mine or irrigation are not documented anywhere in most clients, either in autogenerated help or handwritten help.

As a first step, this patch series tries to largely remedy that in autogenerated help. In each terrain's help, it augments the existing "Build as mine [Oil well] 10 turns" to say "Build as mine [Oil well] 10 turns, +1 shield" where possible. It does this by navigating the effects system (plus non-effect-based road bonuses).

To achieve this, it adds a new utility, effect_value_from_universals(), which navigates the effects system looking for effects matching a specific template (in this case, effects that only depend on extra, terrain, and output type). This might be useful for other autogenerated help, and possibly other uses.

Also, removed the fixed head with "Mine Rslt/Time" etc from the Gtk clients, since that was unhelpfully saying "n/a" when extras were available. The Gtk clients now look like the Qt client for terrain conversions.

(The Xaw client is left alone. At the moment, its output is not too broken for traditional rulesets, although it is incomplete.)

Administrative note: the attachment is a mailbox containing a series of logically related patches. I intend to commit it as the series (with all commits referring to this ticket), rather than a single squashed commit, if no-one objects. (I think this is a decent balance between a single giant patch and a series of atomised tickets with the motivation of the earlier refactor-y ones being unclear due to lack of context.)

26-help-extra-bonus-autogen-wip.mbox (62.4 KB) 26-help-extra-bonus-autogen-wip.mbox S2_6; fully functional but not commit candidate Jacob Nevins, 2018-02-11 04:42 PM
26-help-extra-bonus-autogen.mbox (62.5 KB) 26-help-extra-bonus-autogen.mbox Commit candidate (S2_6) Jacob Nevins, 2018-02-11 09:44 PM
30-help-extra-bonus-autogen.mbox (64.5 KB) 30-help-extra-bonus-autogen.mbox Commit candidate (S3_0) Jacob Nevins, 2018-02-11 09:44 PM
m-help-extra-bonus-autogen.mbox (64.3 KB) m-help-extra-bonus-autogen.mbox Commit candidate (master) Jacob Nevins, 2018-02-11 09:44 PM

Related issues

Blocks Freeciv - Feature #657410: Help updates for gen-extrasClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Jacob Nevins almost 4 years ago

#2 Updated by Jacob Nevins almost 4 years ago

Oh, feh, my WIP patch series against S2_6 doesn't cleanly apply to later branches, and I'm out of time for now.

So the attached S2_6 patch series isn't a commit candidate, and even this S2_6 version is likely to be reworked in light of later branches (and may become smaller) -- but is fully functional on S2_6 and can be tested.

(As usual, I can't check if Gtk3.22 compiles; but the Gtk3.0 patch applied cleanly so I don't expect trouble.)

#3 Updated by Jacob Nevins almost 4 years ago

#4 Updated by Jacob Nevins almost 4 years ago

#5 Updated by Jacob Nevins almost 4 years ago

Resolved against later branches (more or less trivially), so these are commit candidates.

(I haven't tried compiling the Gtk-4.0 client on master either.)

#6 Updated by Jacob Nevins almost 4 years ago

  • Status changed from Resolved to Closed

I intend to commit it as the series [...] rather than a single squashed commit, if no-one objects.

No-one did.

If you now regret this, shout, otherwise I'll probably write it up as a standard way of doing things in the contributor docs.

#7 Updated by frank e almost 4 years ago

Jacob Nevins wrote:

If you now regret this, shout, otherwise I'll probably write it up as a standard way of doing things in the contributor docs.

Please don't, those mbox files are horrible, I'm not tempted to download and look into another mbox file. HRM somehow manages to present patches/diffs visually, for mbox it only offers download.

#8 Updated by Marko Lindqvist almost 4 years ago

Use of mbox stopped me from reviewing the patch at all. Didn't bother to go through the extra hops compared to just clicking the link and reading through the differences.

#9 Updated by Jacob Nevins almost 4 years ago

OK, I'll refrain from submitting patch series as mbox in future.

#10 Updated by frank e almost 4 years ago

Jacob Nevins wrote:

OK, I'll refrain from submitting patch series as mbox in future.

Off topic, if you happen to have a mbox for, say, the complete developer mailing list before Gna! or similar, it would be very interesting. I still miss Larsi's GMaNe (Gateway Mail 2 News)...

Also available in: Atom PDF