Auto-generate hero list when neccessary.

This commit is contained in:
Pentarctagon 2022-09-16 23:14:27 -05:00 committed by Pentarctagon
parent d01aabc81f
commit 7cf8ab0275

View file

@ -88,7 +88,7 @@ local function init_side(side_num)
faction = wc2_era.factions_wml[mathx.random(#wc2_era.factions_wml)]
end
if not faction then
if not (faction and faction.heroes) then
faction = wc2_era.create_random_faction()
end