limoka/CommonAPI

RegisterTech crashed if there are multiple techs having the same preTech

Closed this issue · 1 comments

foreach (int tech in preTechs)
{
    //Do not do LDB.techs.Select here, proto could be not added yet.
    techUpdateList.Add(tech, proto);
}

If there are multiple newly added techs that has the same preTech, then techUpdateList as a Dictionary will crash with
ArgumentException: An item with the same key has already been added. Key: 1001

Should be fixed in v1.4.5