Support an arbitrary number of eras and avoid hard coding the era names

Open
#655 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
22/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, godot
Domain
game-dev

Research direction

Start from the discussion in pull request 644 about string-to-int era conversions. Trace how era names are currently hard-coded and how the science advisor maps era names to background pcx art in the JSON files. Decide on enums, ints, or another scheme that supports an arbitrary number of eras, then add the corresponding art-name mappings. Done means eras are no longer hard-coded and the advisor still finds the right backgrounds.

Written by the indexing model from the issue text.

Description

assets data files enhancement

This came up in discussion in https://github.com/C7-Game/Prototype/pull/644; right now we have some string->int conversions related to eras, which isn't ideal. We should figure out a better way, either by using enums, or always using ints, or something along those lines.

Genuinely supporting a generic number of eras is interesting, but we'd need to be sure to have some art name mappings in the JSON files, since the science advisor needs a mapping from era name to background pcx.

Dominant language
C#
Stars
662
Forks
67
Avg merge
5d 20h
Merged PRs (30d)
29

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from C7-Game/OpenCiv3

All issues in C7-Game/OpenCiv3

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.