commit 03e8954c0eac6a8c25205b27fc33bfcea7afafc4
Author: MADxingjin <25790044+MADxingjin@users.noreply.github.com>
Date: Tue Jun 13 13:35:29 2023 +0800
Project Created
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b29134b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+Source/isekaiob.OverPoweredMeditation/obj
+Source/isekaiob.OverPoweredMeditation/.vs
+Source/isekaiob.OverPoweredMeditation/packages
\ No newline at end of file
diff --git a/About/About.xml b/About/About.xml
new file mode 100644
index 0000000..3c3c453
--- /dev/null
+++ b/About/About.xml
@@ -0,0 +1,11 @@
+
+
+
+ [IKOB]Overpowered Meditation
+ isekaiob
+
+ 1.4
+
+ isekaiob.OverPowredMeditation
+ Psycaster recoveres rest when meditating!
+
\ No newline at end of file
diff --git a/Assemblies/Isekaiob.OverPoweredMeditation.dll b/Assemblies/Isekaiob.OverPoweredMeditation.dll
new file mode 100644
index 0000000..4bb27e4
Binary files /dev/null and b/Assemblies/Isekaiob.OverPoweredMeditation.dll differ
diff --git a/Assemblies/Isekaiob.OverPoweredMeditation.pdb b/Assemblies/Isekaiob.OverPoweredMeditation.pdb
new file mode 100644
index 0000000..0c39f37
Binary files /dev/null and b/Assemblies/Isekaiob.OverPoweredMeditation.pdb differ
diff --git a/Source/Isekaiob.OverPoweredMeditation/Isekaiob.OverPoweredMeditation.csproj b/Source/Isekaiob.OverPoweredMeditation/Isekaiob.OverPoweredMeditation.csproj
new file mode 100644
index 0000000..14d0051
--- /dev/null
+++ b/Source/Isekaiob.OverPoweredMeditation/Isekaiob.OverPoweredMeditation.csproj
@@ -0,0 +1,60 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {A0EC4299-4B3E-4FF6-8926-ECEB701A1C33}
+ Library
+ Properties
+ Isekaiob.OverPoweredMeditation
+ Isekaiob.OverPoweredMeditation
+ v4.7.2
+ 512
+ true
+
+
+ true
+ full
+ false
+ ..\..\Assemblies\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ ..\..\Assemblies\
+ TRACE
+ prompt
+ 4
+
+
+
+ packages\Lib.Harmony.2.2.2\lib\net472\0Harmony.dll
+ False
+
+
+ ..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Isekaiob.OverPoweredMeditation/Isekaiob.OverPoweredMeditation.sln b/Source/Isekaiob.OverPoweredMeditation/Isekaiob.OverPoweredMeditation.sln
new file mode 100644
index 0000000..89bdcdb
--- /dev/null
+++ b/Source/Isekaiob.OverPoweredMeditation/Isekaiob.OverPoweredMeditation.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.6.33717.318
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Isekaiob.OverPoweredMeditation", "Isekaiob.OverPoweredMeditation.csproj", "{A0EC4299-4B3E-4FF6-8926-ECEB701A1C33}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A0EC4299-4B3E-4FF6-8926-ECEB701A1C33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A0EC4299-4B3E-4FF6-8926-ECEB701A1C33}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A0EC4299-4B3E-4FF6-8926-ECEB701A1C33}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A0EC4299-4B3E-4FF6-8926-ECEB701A1C33}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {25CC627E-AEA8-4AE8-B286-3486E335CB0B}
+ EndGlobalSection
+EndGlobal
diff --git a/Source/Isekaiob.OverPoweredMeditation/PatchMain.cs b/Source/Isekaiob.OverPoweredMeditation/PatchMain.cs
new file mode 100644
index 0000000..d940ee8
--- /dev/null
+++ b/Source/Isekaiob.OverPoweredMeditation/PatchMain.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using HarmonyLib;
+using RimWorld;
+using Verse;
+
+namespace Isekaiob.OverPoweredMeditation
+{
+ [StaticConstructorOnStartup]
+ public class PatchMain
+ {
+ static PatchMain()
+ {
+ Log.Message("[IKOB] OverPowered Meditation now patching Assemblies using harmony");
+ Harmony hinstance = new Harmony("Isekaiob.OverPoweredMeditation");
+ hinstance.PatchAll(Assembly.GetExecutingAssembly());
+
+#if DEBUG
+ foreach (var VARIABLE in hinstance.GetPatchedMethods())
+ {
+ Verse.Log.Message(string.Format("[IKOB]OPM Patched Method {0}", VARIABLE.Name));
+ }
+#endif
+ }
+ }
+}
diff --git a/Source/Isekaiob.OverPoweredMeditation/Postfix_JobDriver_Meditate.cs b/Source/Isekaiob.OverPoweredMeditation/Postfix_JobDriver_Meditate.cs
new file mode 100644
index 0000000..67c2e4a
--- /dev/null
+++ b/Source/Isekaiob.OverPoweredMeditation/Postfix_JobDriver_Meditate.cs
@@ -0,0 +1,36 @@
+// Isekaiob.OverPoweredMeditation / Isekaiob.OverPoweredMeditation / Postfix_JobDriver_Meditate.cs
+// CREATED AT 2023 / 06 / 13
+
+using HarmonyLib;
+using RimWorld;
+using Verse;
+namespace Isekaiob.OverPoweredMeditation
+{
+ public static class PatchBody
+ {
+ [HarmonyPatch(typeof(RimWorld.JobDriver_Meditate),"MeditationTick")]
+ static class Patch_JobDriver_Meditation
+ {
+ static void Postfix(JobDriver_Meditate __instance)
+ {
+ var p = __instance.pawn;
+ if (!p.HasPsylink)
+ {
+#if DEBUG
+ Log.Message($"{p.NameFullColored}Doesn`t have a psylink.");
+#endif
+ return;
+ }
+
+ if (p.needs.rest != null)
+ {
+ p.needs.rest.TickResting(p.GetStatValue(StatDefOf.PsychicSensitivity));
+#if DEBUG
+ Log.Message($"{p.NameFullColored}Successfully recovered rest need when meditating");
+#endif
+ return;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Isekaiob.OverPoweredMeditation/Properties/AssemblyInfo.cs b/Source/Isekaiob.OverPoweredMeditation/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4c8fa31
--- /dev/null
+++ b/Source/Isekaiob.OverPoweredMeditation/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Isekaiob.OverPoweredMeditation")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Isekaiob.OverPoweredMeditation")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("a0ec4299-4b3e-4ff6-8926-eceb701a1c33")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Source/Isekaiob.OverPoweredMeditation/packages.config b/Source/Isekaiob.OverPoweredMeditation/packages.config
new file mode 100644
index 0000000..c5bef78
--- /dev/null
+++ b/Source/Isekaiob.OverPoweredMeditation/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file