Compare commits
2 Commits
ed2598b716
...
377f440c46
| Author | SHA1 | Date | |
|---|---|---|---|
| 377f440c46 | |||
| 6ee74a928c |
13
.idea/.idea.psycastDontNeedPsyfocus/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.psycastDontNeedPsyfocus/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# 디폴트 무시된 파일
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider에서 무시된 파일
|
||||||
|
/modules.xml
|
||||||
|
/.idea.psycastDontNeedPsyfocus.iml
|
||||||
|
/contentModel.xml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
# 에디터 기반 HTTP 클라이언트 요청
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
8
.idea/.idea.psycastDontNeedPsyfocus/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.psycastDontNeedPsyfocus/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/.idea.psycastDontNeedPsyfocus/.idea/vcs.xml
generated
Normal file
6
.idea/.idea.psycastDontNeedPsyfocus/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -11,32 +11,66 @@ namespace psycastDontNeedPsyfocus
|
|||||||
static HarmonyPatches()
|
static HarmonyPatches()
|
||||||
{
|
{
|
||||||
var harmony = new Harmony("com.a4plane.psycastDontNeedPsyfocus");
|
var harmony = new Harmony("com.a4plane.psycastDontNeedPsyfocus");
|
||||||
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
//harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||||
|
|
||||||
|
var VPEMod = AccessTools.TypeByName("VanillaPsycastsExpanded.AbilityExtension");
|
||||||
|
if (VPEMod != null)
|
||||||
|
{
|
||||||
|
Log.Message("find VPE");
|
||||||
|
var method = AccessTools.Method(VPEMod, "GetPsyfocusUsedByPawn");
|
||||||
|
if (method != null)
|
||||||
|
{
|
||||||
|
harmony.Patch(method, postfix: new HarmonyMethod(typeof(HarmonyPatches), nameof(Postfix_VPE)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Message("Cant find vpe");
|
||||||
|
}
|
||||||
|
|
||||||
|
MethodBase Vmethod = typeof(AbilityDef).GetProperty(nameof(AbilityDef.PsyfocusCost)).GetGetMethod();
|
||||||
|
Log.Message(Vmethod.ToString());
|
||||||
|
//메서드는 발견한듯?
|
||||||
|
harmony.Patch(Vmethod, postfix: new HarmonyMethod(typeof(HarmonyPatches), nameof(Postfix_V)));
|
||||||
|
if (Vmethod != null)
|
||||||
|
{
|
||||||
|
Log.Message("find v method");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Postfix_VPE(ref float __result)
|
||||||
|
{
|
||||||
|
Log.Message("qweqwwqe");
|
||||||
|
__result = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Postfix_V(ref float __result)
|
||||||
|
{
|
||||||
|
Log.Message("eweqw");
|
||||||
|
__result = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//def에서 초집중 값 읽어오는 부분 패치해서 됨
|
//def에서 초집중 값 읽어오는 부분 패치해서 됨
|
||||||
//todo ui에서 초집중 요소 날리기
|
//todo ui에서 초집중 요소 날리기
|
||||||
[HarmonyPatch]
|
//[HarmonyPatch]
|
||||||
class Patcher
|
//class Patcher
|
||||||
{
|
//{
|
||||||
public static MethodBase TargetMethod()
|
// public static MethodBase TargetMethod()
|
||||||
{
|
// {
|
||||||
return typeof(AbilityDef).GetProperty(nameof(AbilityDef.PsyfocusCost)).GetGetMethod();
|
// return typeof(AbilityDef).GetProperty(nameof(AbilityDef.PsyfocusCost)).GetGetMethod();
|
||||||
}
|
// }
|
||||||
|
// public static void Postfix(ref float __result)
|
||||||
public static void Postfix(ref float __result)
|
// {
|
||||||
{
|
// //Log.Message("qewqwe");
|
||||||
//Log.Message("qewqwe");
|
// __result = 0f;
|
||||||
__result = 0f;
|
// }
|
||||||
}
|
// //public static class ValidateTarget_ValidateTarget_Patch
|
||||||
//public static class ValidateTarget_ValidateTarget_Patch
|
// //{
|
||||||
//{
|
// // static void postfix(ref bool __result/*,ref Ability ability*/)
|
||||||
// static void postfix(ref bool __result/*,ref Ability ability*/)
|
// // {
|
||||||
// {
|
// // Log.Message("aaa");
|
||||||
// Log.Message("aaa");
|
// // __result = true;
|
||||||
// __result = true;
|
// // }
|
||||||
// }
|
// //}
|
||||||
//}
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>..\..\..\1.5\Assemblies\</OutputPath>
|
<OutputPath>..\..\..\Program Files %28x86%29\Steam\steamapps\common\RimWorld\Mods\PsycastDontNeedPsyfocus\1.5\Assemblies\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
|||||||
Reference in New Issue
Block a user