Skip to content

Commit

Permalink
v1.5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Slime-Senpai committed Apr 11, 2024
1 parent ee6ba81 commit a8e450d
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 34 deletions.
Binary file added 1.5/Assemblies/EndlessGrowth.dll
Binary file not shown.
1 change: 1 addition & 0 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<url>https://github.com/Slime-Senpai/EndlessGrowth</url>
<supportedVersions>
<li>1.4</li>
<li>1.5</li>
</supportedVersions>
<description>This mod removes the skill cap of 20, making it possible to scale way higher.
Although there is no theoretical limit, my lazyness made me make everything scale up to 100.
Expand Down
14 changes: 14 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 1.5.2.0

## Features

- Updated for Rimworld 1.5
- Added settings to the mod
- You can now decide what the max level is (setting)
- You can now remove notifications for crafts (masterwork/legendary spam)
- You can now select the size of the buffer for genes (in case you need more than +20 for bills)

## Bugfixes

- Fixed problems with Vanilla Traits Expanded
- Locally fixed the issues of prices going to the lowest instead of needing another mod (New setting)
12 changes: 12 additions & 0 deletions Languages/English/Keyed/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>

<EndlessGrowth_pleaseRestart>Please restart to apply modifications!</EndlessGrowth_pleaseRestart>
<EndlessGrowthModSettingsCategoryLabel>Endless Growth</EndlessGrowthModSettingsCategoryLabel>
<EndlessGrowth_maxLevelExplanation>Sets the max level. -1 for infinite.</EndlessGrowth_maxLevelExplanation>
<EndlessGrowth_unlimitedPriceExplanation>Set to true to allow the sell price to be above the buy price (and trust yourself not to abuse it).</EndlessGrowth_unlimitedPriceExplanation>
<EndlessGrowth_gapForMaxBillExplanation>The gap between your highest skill level and the max level possible in bills. Changing this will probably need you to redo the max on your existing bills.</EndlessGrowth_gapForMaxBillExplanation>
<EndlessGrowth_craftNotificationsEnabledExplanation>Are the Masterwork/Legendary craft notifications enabled?</EndlessGrowth_craftNotificationsEnabledExplanation>


</LanguageData>
10 changes: 6 additions & 4 deletions Source/EndlessGrowth/EndlessGrowth.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputPath>..\..\1.4\Assemblies</OutputPath>
<OutputPath>..\..\1.5\Assemblies</OutputPath>
<TargetFramework>net48</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<DebugType>None</DebugType>
<LangVersion>latest</LangVersion>
<FileVersion>1.4.1.6</FileVersion>
<FileVersion>1.5.2.0</FileVersion>
<AssemblyVersion>1.5.2.0</AssemblyVersion>
<VersionPrefix>1.5.2.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref">
<Version>1.4.3557</Version>
<Version>1.5.4061</Version>
<ExcludeAssets>runtime</ExcludeAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
49 changes: 49 additions & 0 deletions Source/EndlessGrowth/EndlessGrowthMod.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
using Verse;
using HarmonyLib;
using System;
using UnityEngine;

namespace SlimeSenpai.EndlessGrowth
{
public class EndlessGrowthMod : Mod
{

public static EndlessGrowthModSettings settings;

public EndlessGrowthMod(ModContentPack content) : base(content)
{
settings = GetSettings<EndlessGrowthModSettings>();

var harmony = new Harmony("fr.slimesenpai.rimworld.endlessgrowth");
harmony.PatchAll();

Expand All @@ -20,6 +26,49 @@ public EndlessGrowthMod(ModContentPack content) : base(content)
postfix: new HarmonyMethod(typeof(RTMadSkills_Patch_SkillRecordInterval_Patch), nameof(RTMadSkills_Patch_SkillRecordInterval_Patch.Postfix)));
}
}))();

// MAGIC Another funny patch for the Perfectionist of VanillaTraitsExpanded
((Action)(() =>
{
if (LoadedModManager.RunningModsListForReading.Any(x => x.Name == "Vanilla Traits Expanded"))
{
harmony.Patch(AccessTools.Method(AccessTools.TypeByName("VanillaTraitsExpanded.GenerateQualityCreatedByPawn_Patch"), "Postfix"),
transpiler: new HarmonyMethod(typeof(VanillaTraitsExpanded_GenerateQualityCreatedByPawn_Patch_Patch),
nameof(VanillaTraitsExpanded_GenerateQualityCreatedByPawn_Patch_Patch.Transpiler)));
}
}))();
}

public override string SettingsCategory() => "EndlessGrowthModSettingsCategoryLabel".Translate();

public override void DoSettingsWindowContents(Rect inRect)
{
Listing_Standard listingStandard = new();
listingStandard.Begin(inRect);

listingStandard.Label("EndlessGrowth_pleaseRestart".Translate());

listingStandard.Gap(24);

listingStandard.TextFieldNumericLabeled("EndlessGrowth_maxLevelExplanation".Translate() + " ", ref settings.maxLevel, ref settings.maxLevelString, -1);

listingStandard.Gap(24);

listingStandard.CheckboxLabeled("EndlessGrowth_unlimitedPriceExplanation".Translate() + " ", ref settings.unlimitedPrice);

listingStandard.Gap(24);

// On a new line because LOOOOOOONG text
listingStandard.Label("EndlessGrowth_gapForMaxBillExplanation".Translate());
listingStandard.TextFieldNumericLabeled("", ref settings.gapForMaxBill, ref settings.gapForMaxBillString, 20);

listingStandard.Gap(24);

listingStandard.CheckboxLabeled("EndlessGrowth_craftNotificationsEnabledExplanation".Translate() + " ", ref settings.craftNotificationsEnabled);

listingStandard.End();

base.DoSettingsWindowContents(inRect);
}
}
}
33 changes: 33 additions & 0 deletions Source/EndlessGrowth/EndlessGrowthModSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace SlimeSenpai.EndlessGrowth
{
public class EndlessGrowthModSettings : ModSettings
{
public int maxLevel = -1;

public string maxLevelString;

public bool unlimitedPrice = false;

public int gapForMaxBill = 20;

public string gapForMaxBillString;

public bool craftNotificationsEnabled = false;

public override void ExposeData()
{
Scribe_Values.Look(ref maxLevel, "maxLevel");
Scribe_Values.Look(ref unlimitedPrice, "unlimitedPrice");
Scribe_Values.Look(ref gapForMaxBill, "gapForMaxBill");
Scribe_Values.Look(ref craftNotificationsEnabled, "craftNotificationsEnabled");
base.ExposeData();
}
}
}
Loading

0 comments on commit a8e450d

Please sign in to comment.