댜ㅐ고ㅓㅐㅅ개ㅗㅑㅡㅐㅑㅎ러ㅗ
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -51,4 +51,5 @@ CodeCoverage/
|
|||||||
# NUnit
|
# NUnit
|
||||||
*.VisualState.xml
|
*.VisualState.xml
|
||||||
TestResult.xml
|
TestResult.xml
|
||||||
nunit-*.xml
|
nunit-*.xml
|
||||||
|
/.vs/psycastDontNeedPsyfocus
|
||||||
|
|||||||
25
psycastDontNeedPsyfocus.sln
Normal file
25
psycastDontNeedPsyfocus.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.13.35931.197 d17.13
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "psycastDontNeedPsyfocus", "psycastDontNeedPsyfocus\psycastDontNeedPsyfocus.csproj", "{7ED822A4-2A57-4129-88D3-A79700A99562}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{7ED822A4-2A57-4129-88D3-A79700A99562}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7ED822A4-2A57-4129-88D3-A79700A99562}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7ED822A4-2A57-4129-88D3-A79700A99562}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7ED822A4-2A57-4129-88D3-A79700A99562}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {5C7FB83D-741D-4960-A6E8-23FD42A09A20}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
File diff suppressed because one or more lines are too long
40
psycastDontNeedPsyfocus/HarmonyPatch.cs
Normal file
40
psycastDontNeedPsyfocus/HarmonyPatch.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using HarmonyLib;
|
||||||
|
using System.Reflection;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace psycastDontNeedPsyfocus
|
||||||
|
{
|
||||||
|
[StaticConstructorOnStartup]
|
||||||
|
public static class HarmonyPatches
|
||||||
|
{
|
||||||
|
static HarmonyPatches()
|
||||||
|
{
|
||||||
|
var harmony = new Harmony("com.a4plane.psycastDontNeedPsyfocus");
|
||||||
|
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//패치안됨 postfix해서 값 긴빠이해서 수정해서 넘기게 해봐야할듯
|
||||||
|
|
||||||
|
//초집중 계산 부분 다른곳에 있는 듯
|
||||||
|
|
||||||
|
//패치할 후보들
|
||||||
|
//abilityDef클래스에서 xml로 부터 값을 얻어서 값을 반환하는 psyfocusCost속성이 있음 코드가 매우 간결해서 인라인 처리됬을수도 아닐수도
|
||||||
|
//FinalPsyfocusCost메서드에서 위의 속성을 참조함 그외에 따로 psyfocusCostfortarget을 참조하는데 이건 위의 저 속성 참조안하고 그냥 0을 반환함(???)
|
||||||
|
//abilityDef클래스에서 위의 속성을 참조하는데 코드보면 퍼센트 표시해서 ui출력으로 쓰는것 같으므로 무시
|
||||||
|
//psycast클래스의 activate메서드에서 위의 속성을 참조해 시전가능한지 체크하고있음 => 이제보니까 제가 찾던 메서드 여기있네요
|
||||||
|
//CanCast속성도 한번 보면 좋을듯?
|
||||||
|
|
||||||
|
//def읽을때 focuscost부분을 0으로 고정시키게 해야겠음 아마 comp쪽에서 읽는듯
|
||||||
|
[HarmonyPatch(typeof(Verb_CastPsycast), nameof(Verb_CastPsycast.ValidateTarget))]
|
||||||
|
public static class ValidateTarget_ValidateTarget_Patch
|
||||||
|
{
|
||||||
|
static void postfix(ref bool __result/*,ref Ability ability*/)
|
||||||
|
{
|
||||||
|
Log.Message("aaa");
|
||||||
|
__result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
33
psycastDontNeedPsyfocus/Properties/AssemblyInfo.cs
Normal file
33
psycastDontNeedPsyfocus/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||||
|
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||||
|
// 이러한 특성 값을 변경하세요.
|
||||||
|
[assembly: AssemblyTitle("psycastDontNeedPsyfocus")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("psycastDontNeedPsyfocus")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||||
|
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||||
|
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||||
|
[assembly: Guid("7ed822a4-2a57-4129-88d3-a79700a99562")]
|
||||||
|
|
||||||
|
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||||
|
//
|
||||||
|
// 주 버전
|
||||||
|
// 부 버전
|
||||||
|
// 빌드 번호
|
||||||
|
// 수정 버전
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
57
psycastDontNeedPsyfocus/psycastDontNeedPsyfocus.csproj
Normal file
57
psycastDontNeedPsyfocus/psycastDontNeedPsyfocus.csproj
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{7ED822A4-2A57-4129-88D3-A79700A99562}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>psycastDontNeedPsyfocus</RootNamespace>
|
||||||
|
<AssemblyName>psycastDontNeedPsyfocus</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>..\..\..\1.5\Assemblies\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="HarmonyPatch.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Krafs.Rimworld.Ref">
|
||||||
|
<Version>1.5.4409</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Lib.Harmony">
|
||||||
|
<Version>2.3.6</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user