longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
219 stars 42 forks source link

Add Helptext for resources in packaged rulesets #655

Closed jwrober closed 9 months ago

jwrober commented 3 years ago

Is your feature request related to a problem? Please describe. We don't provide extra helptext in default packaged ruleset for tile special resources. This leaves help incomplete.

Describe the solution you'd like Fill in the helptext field for the tile resources in terrain.ruleset for the following rulesets we package:

Describe alternatives you've considered None

Additional context Attempting to make the in game help more immersive with fully populated information on the ruleset being played

lmoureaux commented 2 years ago

https://github.com/longturn/freeciv21/blob/eff5fd14f815080f333ac763a470c9ac8ee2781f/common/networking/packets.def#L2064-L2068

lmoureaux commented 10 months ago

Steps:

  1. Add the information to one resource in your favorite ruleset. Make sure to use a _("translatable string")
  2. Add support for loading it in load_terrain_names (ruleset.cpp)
  3. Add a new network capability and a new field to PACKET_RULESET_RESOURCE controlled by this capability
  4. Update send_ruleset_extras, send_ruleset_bases, send_ruleset_roads and the receiving functions to use this information (providing a fallback when it doesn't exist)
  5. Update helpdata.cpp to display the help text
lmoureaux commented 10 months ago

Here is an example commit that changes the network protocol: https://github.com/longturn/freeciv21/commit/76f85245fa16a899d285cc12dcddffcb209cca80