1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Remove more subID access

This commit is contained in:
Ivan Savenko
2023-10-28 12:27:10 +03:00
parent 5cdbf408c7
commit 8346d71c98
33 changed files with 92 additions and 90 deletions

View File

@@ -129,6 +129,14 @@ bool CGMine::isAbandoned() const
return (getObjTypeIndex() >= 7);
}
ResourceSet CGMine::dailyIncome() const
{
ResourceSet result;
result[producedResource] += defaultResProduction();
return result;
}
std::string CGMine::getObjectName() const
{
return VLC->generaltexth->translate("core.minename", getObjTypeIndex());
@@ -466,7 +474,7 @@ TeleportChannelID CGMonolith::findMeChannel(const std::vector<Obj> & IDs, int Su
if(!obj)
continue;
const auto * teleportObj = dynamic_cast<const CGTeleport *>(cb->getObj(obj->id));
const auto * teleportObj = dynamic_cast<const CGMonolith *>(cb->getObj(obj->id));
if(teleportObj && vstd::contains(IDs, teleportObj->ID) && teleportObj->subID == SubID)
return teleportObj->channel;
}