We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
90 stars 37 forks source link

after the destruction of the lower building, the higher one continues to be built #922

Open MrZorG33 opened 1 year ago

MrZorG33 commented 1 year ago

Sorry, I didn’t know how else to formulate the title.

So, the situation: during a raid by the natives, the Pier in the colony was destroyed. At the same time, the construction of the Dock was underway. construction was successfully completed and the Pier appeared on the list of buildings available for construction (by the way, even if there was a Doc in the colony, it was impossible to send Treasures to Europe). after the construction of the Pier, the Dock again appeared in the list of available buildings, although its construction time was equal to 1 turn.

Question: is it possible to cancel the construction of a building if the previous necessary buildings were destroyed?

johan-buret commented 1 year ago

That also opens the question about how the game should behave when a specific building is needed to form a unit:

Nightinggale commented 1 year ago

Yeah this is more of a design issue than a technical one. I don't think it's a major technical issue to change how the construction queue behaves, but we need to figure out how we want it to behave in terms of gameplay. I can easily see issues like annoyingly removing a million hammers fro current production in addition to having lost a building. We need to figure out what we want to do for good gameplay without making people rage quit the game.

johan-buret commented 1 year ago

Before I leap : apparently there are in our codebase routines whose goal is to pop out of the construction queue buildings that are missing Yields or prerequisites, but don't work as designed

void CvCity::popOrder(int iNum, bool bFinish, bool bChoose) in CvCity.cpp line 6582

Razonatair commented 10 months ago

Perhaps we can prevent finishing construction of the unit/building until the prerequisite building is constructed once more, similar to how when you don't have enough tools/stone/etc it remains stuck with like 1 hammer left to finish?