mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Fix mine resource and productivity on map load, also made them non editable
This commit is contained in:
parent
b2cd92d937
commit
ec735aa959
@ -370,7 +370,7 @@ void Inspector::updateProperties(CGMine * o)
|
||||
|
||||
addProperty("Owner", o->tempOwner, false);
|
||||
addProperty("Resource", o->producedResource);
|
||||
addProperty("Productivity", o->producedQuantity, false);
|
||||
addProperty("Productivity", o->producedQuantity);
|
||||
}
|
||||
|
||||
void Inspector::updateProperties(CGResource * o)
|
||||
|
@ -204,6 +204,15 @@ void MapController::repairMap(CMap * map) const
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user