Skip to content

Commit

Permalink
fixed: "mod adds carepackages, even if you disabled them in your game"
Browse files Browse the repository at this point in the history
Now mod respects this setting on game creation step
  • Loading branch information
madzohan committed Feb 22, 2023
1 parent 465eb87 commit ca48d78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions RePrint/src/RePrintPatches.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Reflection;
using HarmonyLib;
using Klei.CustomSettings;
using KMod;
using UnityEngine;

Expand Down Expand Up @@ -68,6 +69,13 @@ private static void InitializeContainers(ImmigrantScreen imScreen)
var containers = new List<ITelepadDeliverableContainer>();
var numberOfDuplicantOptions = 2; // Todo: make this configurable via PLib integration
var numberOfCarePackageOptions = 2;
if (CustomGameSettings.Instance.GetCurrentQualitySetting(CustomGameSettingConfigs.CarePackages).id !=
"Enabled")
{
numberOfCarePackageOptions = 0;
numberOfDuplicantOptions = 4;
}

for (var index = 0; index < numberOfDuplicantOptions; ++index)
{
var characterContainer = Util.KInstantiateUI<CharacterContainer>(
Expand Down
2 changes: 1 addition & 1 deletion RePrint/src/mod_info.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
supportedContent: ALL
minimumSupportedBuild: 469112
version: 1.4.0
version: 1.4.1
APIVersion: 2

0 comments on commit ca48d78

Please sign in to comment.