Skip to content

Pickable/included civs + a few bugs#918

Merged
stavrosfa merged 3 commits intoC7-Game:Developmentfrom
stavrosfa:feature/pickable-playable
May 3, 2026
Merged

Pickable/included civs + a few bugs#918
stavrosfa merged 3 commits intoC7-Game:Developmentfrom
stavrosfa:feature/pickable-playable

Conversation

@stavrosfa
Copy link
Copy Markdown
Contributor

This PR's details in short:

Implemented pickable and included-in-game civs
Fix bug in .biq and .sav files where we would assign barbarians to another civ.
Added barb camp tiles for .sav and .biq
Fix bug when loading a .sav to assign the correct civ color

The camps and colors could have been added separately, but trey arerather minor changes, and since I already had some tests in place to also test them, I though I might as well include them here.

These are some features/fixes that I choose to introduce at this point, because I was working on something else entirely, but my unit tests kept breaking. The main reason was the Mongols being included as a playable player in the Middle Ages scenario (which they are not), which we weren't really accounting for, causing numerous issues.

Fix bug in .biq and .sav files where we would assign barbarians to another civ.
Added barb camp tiles for .sav and .biq
Fix bug when loading a .sav to assign the correct civ color
Comment thread C7Engine/C7GameData/ImportCiv3.cs Outdated
Copy link
Copy Markdown
Contributor

@ajhalme ajhalme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. I might have gone for 'playable' over 'pickable', but maybe the latter is more explicit.

@stavrosfa
Copy link
Copy Markdown
Contributor Author

Looks reasonable. I might have gone for 'playable' over 'pickable', but maybe the latter is more explicit.

Playable is already used by the original game to mark those civs whose data is included in the game (I think I have left a comment somewhere, that's the case with Mongols in the Middle Ages scenario), regardless of whether they can be picked by the AI or a human, hence the name.

I changed the for loop to a linq as suggested, and added a isBarbarian field in the SavePlayer class to make it easier to parse. Also did some minor related clean ups

@stavrosfa stavrosfa merged commit 068b659 into C7-Game:Development May 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants