Skip to content

Commit

Permalink
Fix code for 2.0.196.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
koboldunderlord authored Oct 26, 2019
1 parent 0caca90 commit 90888be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
10 changes: 1 addition & 9 deletions LegendaryDogsGenerateFriendOrFoe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,7 @@ public static string getLikeReason()

public static string getRandomFaction(GameObject parent)
{
List<string> list = new List<string>(Factions.FactionList.Count);
foreach (KeyValuePair<string, FactionInfo> Faction in Factions.FactionList)
{
if (Faction.Value.bVisible && !parent.pBrain.FactionMembership.ContainsKey(Faction.Key))
{
list.Add(Faction.Key);
}
}
return list.GetRandomElement();
return GenerateFriendOrFoe.getRandomFaction(parent);
}
}
}
12 changes: 6 additions & 6 deletions LegendaryDogsGivesRep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ public void ReplaceFactions()
if (HeroPart.GoodFactionPenalty > 0)
{
GivesRepPart.ResetRelatedFactions();
foreach (KeyValuePair<string, FactionInfo> Faction in Factions.FactionList)
foreach (FactionInfo Faction in Factions.loop())
{
if (Faction.Value.bVisible && !ParentObject.pBrain.FactionMembership.ContainsKey(Faction.Value.Name))
if (Faction.bVisible && !ParentObject.pBrain.FactionMembership.ContainsKey(Faction.Name))
{
FriendorFoe FoF = new FriendorFoe();
FoF.faction = Faction.Value.Name;
FoF.faction = Faction.Name;
FoF.status = "friend";
FoF.reason = "for being a " + HeroPart.VeryGoodText + " dog";
GivesRepPart.relatedFactions.Add(FoF);
if (ParentObject.pBrain.FactionFeelings.ContainsKey(Faction.Value.Name))
if (ParentObject.pBrain.FactionFeelings.ContainsKey(Faction.Name))
{
Dictionary<string, int> factionFeelings = ParentObject.pBrain.FactionFeelings;
factionFeelings[Faction.Value.Name] += HeroPart.GoodFactionPenalty;
factionFeelings[Faction.Name] += HeroPart.GoodFactionPenalty;
}
else
{
ParentObject.pBrain.FactionFeelings.Add(Faction.Value.Name, HeroPart.GoodFactionPenalty);
ParentObject.pBrain.FactionFeelings.Add(Faction.Name, HeroPart.GoodFactionPenalty);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion workshop.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"workshopId":1802123778,"Title":"Legendary Dogs","Description":"Ever think there aren't enough dogs in Qud? This mod fixes that!\n\nIntroducing: Legedary Dogs! This mod introduces a new type of dog, the Worg, a dog that has supernatural intelligence and ego, tapped into the psychic aether under the nose of Ptoh.\n\nAny place you can potentially find a dog you should also be able to find legendary dogs of the same type!\n\nTitle guide for legendary dogs (not worgs):\n\n- Playful, Energetic, Exciting, Wild: Increases move speed\n- Funny, Awkward, Clueless, Floppy-tongued: Has a unique descriptor\n- Clever: Can dig up water on the surface\n- Soft, Fluffy, Smooth, Warm: has a unique pet action descriptor\n- Loving, Caring, Loyal: Spawns with 5 extra dogsin their pack\n- Good: Friendly with all factions. Don't hurt them!\n\nAnything not listed here has no bonus associated with them.","Tags":"dog,pack,creature,animal,monster,legendary,good","Visibility":"0","ImagePath":"preview.png"}
{"workshopId":1802123778,"Title":"Legendary Dogs","Description":"Ever think there aren't enough dogs in Qud? This mod fixes that!\n\nIntroducing: Legedary Dogs! This mod introduces a new type of dog, the Worg, a dog that has supernatural intelligence and ego, tapped into the psychic aether under the nose of Ptoh.\n\nAny place you can potentially find a dog you should also be able to find legendary dogs of the same type!\n\nTitle guide for legendary dogs (not worgs):\n\n- Playful, Energetic, Exciting, Wild: Increases move speed\n- Funny, Awkward, Clueless, Floppy-tongued: Has a unique descriptor\n- Clever: Can dig up water on the surface\n- Soft, Fluffy, Smooth, Warm: has a unique pet action descriptor\n- Loving, Caring, Loyal: Spawns with 5 extra dogsin their pack\n- Good: Friendly with all factions. Don't hurt them!\n\nAnything not listed here has no bonus associated with them.","Tags":"dog,pack,creature,animal,monster,legendary,good","Visibility":"2","ImagePath":"preview.png"}

0 comments on commit 90888be

Please sign in to comment.