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...

Bug #861867

Reduce/improve ruleset hardcoding around irrigation/mining actions in Qt client

Added by Jacob Nevins 11 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-qt
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Similar to feature #861498:

The Qt client has some UI hardcoding suited to the classic ruleset. In unit_actions::update_actions():

verbatim
if (!strcmp(terrain_rule_name(pterrain), "Jungle") || !strcmp(terrain_rule_name(pterrain), "Plains") || !strcmp(terrain_rule_name(pterrain), "Grassland") || !strcmp(terrain_rule_name(pterrain), "Swamp")) {
a->set_pixmap(fc_icons::instance()->get_pixmap("plantforest"));
} else {
a->set_pixmap(fc_icons::instance()->get_pixmap("transform"));
}
verbatim

(etc)

While it would be best to be rid of this hardcoding, it can probably be improved in the same way as the SDL client (here by looking at mining_result to see if it is "Forest", rather than assuming the classic-ruleset set of pre-Forest terrains).

m-qt-mine-irrig-hardcoding.patch (1.92 KB) m-qt-mine-irrig-hardcoding.patch master Jacob Nevins, 2020-03-01 04:46 PM
30-26-qt-mine-irrig-hardcoding.patch (1.92 KB) 30-26-qt-mine-irrig-hardcoding.patch S3_0, S2_6 Jacob Nevins, 2020-03-01 04:46 PM

Related issues

Related to Freeciv - Feature #861498: Reduce/improve ruleset hardcoding around irrigation/mining actions in SDL clientsClosed

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

History

#1 Updated by Jacob Nevins 11 months ago

(Oops, tried to use Gna markup out of habit. You know what I meant...)

#2 Updated by Jacob Nevins 11 months ago

  • Related to Feature #861498: Reduce/improve ruleset hardcoding around irrigation/mining actions in SDL clients added

#3 Updated by Jacob Nevins 11 months ago

#4 Updated by Jacob Nevins 11 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF