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

Tweaks to modding docs & error reporting based on discovered issues

This commit is contained in:
Ivan Savenko
2024-05-16 15:14:36 +00:00
parent 1f1e693a5b
commit 65f63e862c
3 changed files with 18 additions and 3 deletions

View File

@@ -53,7 +53,13 @@ void CRewardableConstructor::configureObject(CGObjectInstance * object, CRandomG
bonus.sid = BonusSourceID(rewardableObject->ID);
}
}
assert(!rewardableObject->configuration.info.empty());
if (rewardableObject->configuration.info.empty())
{
if (objectInfo.getParameters()["rewards"].isNull())
logMod->error("Object %s has invalid configuration! No defined rewards found!", getJsonKey());
else
logMod->error("Object %s has invalid configuration! Make sure that defined appear chances are continious!", getJsonKey());
}
}
}