mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix mine resource and productivity on map load, also made them non editable
This commit is contained in:
@@ -370,7 +370,7 @@ void Inspector::updateProperties(CGMine * o)
|
|||||||
|
|
||||||
addProperty("Owner", o->tempOwner, false);
|
addProperty("Owner", o->tempOwner, false);
|
||||||
addProperty("Resource", o->producedResource);
|
addProperty("Resource", o->producedResource);
|
||||||
addProperty("Productivity", o->producedQuantity, false);
|
addProperty("Productivity", o->producedQuantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inspector::updateProperties(CGResource * o)
|
void Inspector::updateProperties(CGResource * o)
|
||||||
|
@@ -204,6 +204,15 @@ void MapController::repairMap(CMap * map) const
|
|||||||
art->storedArtifact = a;
|
art->storedArtifact = a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//fix mines
|
||||||
|
if(auto * mine = dynamic_cast<CGMine*>(obj.get()))
|
||||||
|
{
|
||||||
|
if(!mine->isAbandoned())
|
||||||
|
{
|
||||||
|
mine->producedResource = GameResID(mine->subID);
|
||||||
|
mine->producedQuantity = mine->defaultResProduction();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user