mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Rewardable town buildings prototype
This commit is contained in:
@@ -627,6 +627,12 @@ void CTownHandler::loadBuilding(CTown * town, const std::string & stringID, cons
|
||||
for(auto & bonus : ret->onVisitBonuses)
|
||||
bonus->sid = Bonus::getSid32(ret->town->faction->getIndex(), ret->bid);
|
||||
}
|
||||
|
||||
if(!source["rewards"].isNull() && ret->subId == BuildingSubID::NONE)
|
||||
{
|
||||
ret->subId = BuildingSubID::CONFIGURABLE_REWARD;
|
||||
ret->rewardableObjectInfo.init(source["rewards"]);
|
||||
}
|
||||
}
|
||||
//MODS COMPATIBILITY FOR 0.96
|
||||
if(!ret->produce.nonZero())
|
||||
|
||||
Reference in New Issue
Block a user