Skip to content

Commit

Permalink
Fix resource spawning buildings potential deleting unrevealed resourc…
Browse files Browse the repository at this point in the history
…es for civs which do not have the resource spawning trait (#11217)
  • Loading branch information
KungCheops authored Aug 12, 2024
1 parent 99d8a44 commit 7945ab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CvGameCoreDLL_Expansion2/CvCity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13966,7 +13966,7 @@ void CvCity::processBuilding(BuildingTypes eBuilding, int iChange, bool bFirst,
if (pLoopPlot != NULL && pLoopPlot->getOwner() == owningPlayer.GetID() && !pLoopPlot->isCity() &&
pLoopPlot->isValidMovePlot(getOwner()) && !pLoopPlot->isWater() && !pLoopPlot->IsNaturalWonder() && !pLoopPlot->isMountain() && (pLoopPlot->getFeatureType() == NO_FEATURE))
{
if (pLoopPlot->getResourceType(getTeam()) == NO_RESOURCE && pLoopPlot->getImprovementType() == NO_IMPROVEMENT)
if (pLoopPlot->getResourceType() == NO_RESOURCE && pLoopPlot->getImprovementType() == NO_IMPROVEMENT)
{
pLoopPlot->setResourceType(NO_RESOURCE, 0, false);
pLoopPlot->setResourceType(eResourceToGive, 1, false);
Expand All @@ -13986,7 +13986,7 @@ void CvCity::processBuilding(BuildingTypes eBuilding, int iChange, bool bFirst,
if (pLoopPlot != NULL && (pLoopPlot->getOwner() == NO_PLAYER) && pLoopPlot->isValidMovePlot(getOwner()) &&
!pLoopPlot->isWater() && !pLoopPlot->IsNaturalWonder() && (pLoopPlot->getFeatureType() != FEATURE_OASIS))
{
if (pLoopPlot->getResourceType(getTeam()) == NO_RESOURCE && pLoopPlot->getImprovementType() == NO_IMPROVEMENT)
if (pLoopPlot->getResourceType() == NO_RESOURCE && pLoopPlot->getImprovementType() == NO_IMPROVEMENT)
{
pLoopPlot->setResourceType(NO_RESOURCE, 0, false);
pLoopPlot->setResourceType(eResourceToGive, 1, false);
Expand Down

0 comments on commit 7945ab2

Please sign in to comment.