Skip to content

Commit

Permalink
fix: ignore boats when randomising ownership (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sargeantPig authored Jan 3, 2024
1 parent c4c775a commit 0e7998f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RTWLibPlus/randomiser/randEDU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static string RandomiseOwnership(EDU edu, RandWrap rnd, SMF smf, int maxP

List<IBaseObj> attributes = edu.GetItemsByIdent("attributes");
List<IBaseObj> ownerships = edu.GetItemsByIdent("ownership");
List<IBaseObj> category = edu.GetItemsByIdent("category");
List<string> factionList = smf.GetFactions();
factionList.Shuffle(rnd.RND);

Expand All @@ -42,7 +43,7 @@ public static string RandomiseOwnership(EDU edu, RandWrap rnd, SMF smf, int maxP
factionList.Shuffle(rnd.RND);
}

if (attributes[io].Value.Contains("general"))
if (attributes[io].Value.Contains("general") || category[io].Value.Contains("ship"))
{
continue;
}
Expand Down

0 comments on commit 0e7998f

Please sign in to comment.