C7-Game / Prototype

An early-stage, open-source 4X strategy game
https://c7-game.github.io/
MIT License
34 stars 9 forks source link

#326 - Use scenario-specified barbarian units #331

Closed QuintillusCFC closed 1 year ago

QuintillusCFC commented 2 years ago

This allows scenarios that don't use Warrior/Horseman/Galley for barbarians to work in that regard.

Notably, 06 MP Age of Discovery now loads with Archer barbarians.

This work spawned #329 and #330 to make further improvements to this area.


Note: With this change, the whole list of unit prototypes is imported (rather than a whitelisted subset), and the limiter of what can be built is moved to CanBuildCity in City.cs. Eventually this will disappear, but this change allows the barbarians to build units that aren't on that whitelist.

It should also be noted that 06 MP Age of Discovery is not really playable yet, since you can only build Settlers and Workers and that rapidly leads to crashes due to running out of citizens. But it can load its barbarians properly, and a custom scenario with modified barbarians should work too.

WildWeazel commented 2 years ago

bumping to resolve conflicts

QuintillusCFC commented 1 year ago

Fixed the conflicts. Still looks sensible to me. I'd kind of forgotten that this was still here and not merged.

QuintillusCFC commented 1 year ago

I'm going to go ahead and merge this since I self-reviewed it 3 days ago and there hasn't been another review since 7/23. Also because I was looking at #140 and that will be easier once these changes are merged due to more scenarios being openable.