Skip to content

Commit

Permalink
Issue #19 - Feature Request: showModulesWithMissingTraderLoyalty, sho…
Browse files Browse the repository at this point in the history
…wModulesWithMissingArea
  • Loading branch information
Solethia committed Jul 12, 2024
1 parent 01c7bd5 commit ad6d316
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
35 changes: 35 additions & 0 deletions MoreCheckmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class MoreCheckmarksMod : BaseUnityPlugin
public static int barterPriority = 0;
public static int craftPriority = 1;
public static bool showFutureModulesLevels = false;
public static bool showModulesMissingArea = false;
public static bool showModulesMissingTraderLoyalty = false;
public static bool showBarter = true;
public static bool showCraft = true;
public static bool showFutureCraft = true;
Expand Down Expand Up @@ -699,6 +701,14 @@ private void LoadConfig()
{
showFutureModulesLevels = (bool)config["showFutureModulesLevels"];
}
if (config["showModulesMissingArea"] != null)
{
showModulesMissingArea = (bool)config["showModulesMissingArea"];
}
if (config["showModulesMissingTraderLoyalty"] != null)
{
showModulesMissingTraderLoyalty = (bool)config["showModulesMissingTraderLoyalty"];
}
if (config["showBarter"] != null)
{
showBarter = (bool)config["showBarter"];
Expand Down Expand Up @@ -837,6 +847,31 @@ public static NeededStruct GetNeeded(string itemTemplateID, ref List<string> are
{
continue;
}

// If missing area requirement for next level skip
if (!MoreCheckmarksMod.showModulesMissingArea)
{
var hasMissingAreaRequirements = lastStage.Requirements
.Where(x => x.Type == ERequirementType.Area)
.Where(x => x.Fulfilled == false)
.Any();
if (hasMissingAreaRequirements)
break;
break;
}

// If missing trader requirement for next level skip
if (!MoreCheckmarksMod.showModulesMissingTraderLoyalty)
{
var hasMissingTraderRequirements = lastStage.Requirements
.Where(x => x.Type == ERequirementType.TraderLoyalty || x.Type == ERequirementType.TraderUnlock)
.Where(x => x.Fulfilled == false)
.Any();
if (hasMissingTraderRequirements)
break;
break;
}

futureStages.Add(lastStage);

// If only want next level requirements, skip the rest
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.14.0")]
[assembly: AssemblyFileVersion("1.5.14.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ There are some settings available in the provided config file described below:

- **_questPrioriry_**, **_hideoutPriority_**, **_wishlistPriority_**, and **_barterPriority_**: These settings will decide which checkmark to give priority to. If the item is needed for a quest, needed for a hideout module, and is on the wishlist, the one with the highest priority will be displayed. These are integers, and the greater the number, the higher the priority.

- **_showLockedModules_**: This setting will decide whether to show a hideout checkmark on an item required for a hideout module that is still locked for construction. This is an option because some modules like the bitcoin farm require a lot of items but are locked for a long time and maybe you just don't want to have hideout checkmark on a bunch of random stuff you won't need for a while.
- **_showModulesMissingArea_**: This setting will decide whether to show a hideout checkmark on an item required for a hideout module that is still locked for construction due to missing an area. This is an option because some modules like the bitcoin farm require a lot of items but are locked for a long time and maybe you just don't want to have hideout checkmark on a bunch of random stuff you won't need for a while.

**_showModulesMissingTraderLoyalty_**: This setting will decide whether to show a hideout checkmark on an item required for a hideout module that is still locked for construction due to missing trader or trader loyalty. This is an option because some modules like the bitcoin farm require a lot of items but are locked for a long time and maybe you just don't want to have hideout checkmark on a bunch of random stuff you won't need for a while.

- **_showFutureModulesLevels_**: This setting will decide whether to show requirements for future hideout module levels instead of only the next one.

Expand Down

0 comments on commit ad6d316

Please sign in to comment.