Skip to content

Commit

Permalink
功能Mod化
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanze31 committed Dec 13, 2024
1 parent 9769784 commit 0c01557
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 1 deletion.
96 changes: 96 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
### Windows ###
*.bak
*.swp
*.tmp
*.log
*.user
*.suo
*.DS_Store

### Build ###
bin/
obj/
[Bb]uild/
[Bb]uilds/

# if using Razor
*.generated.cs

# if using ReSharper
_ReSharper*/
*.ReSharper
*.DotSettings.user

# if using Rider
.idea/

# if using npm in the project
node_modules/

# Packages
*.nupkg
*.snupkg
packages/
.nuget/
project.lock.json
project.fragment.lock.json
artifacts/

# IIS Logs
_IISExpress/

# Azure Web Apps
.deploy/
.vs/

# Visual Studio 2019/2022
.vscode/
.vs/
*.vcxproj.user
*.vcxproj.filters

### Other ###
*.sln.docstates
*.class
*.dbmdl
*.jfm
*.ipr
*.iws
*.ilk
*.pdb
*.opendb
*.log
*.tlog
*.vspscc
*.vspxproj.user
*.vspxproj
*.vsixproj.user
*.vsixproj

# Rider settings
.idea/

# Coverage results
*.coverage
*.coveragexml
_Reports/

# Test Results
TestResults/
*.trx
*.testlog

# Local History for JetBrains IDEs
.localhistory/

# User-specific files
*.rsuser
*.DotSettings.user

### OS ###
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

### End ###
69 changes: 69 additions & 0 deletions I_need_ONI_skin.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?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>{BAA3194E-1D03-4012-B3C0-145924AF2A9A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>I_need_ONI_skin</RootNamespace>
<AssemblyName>I_need_ONI_skin</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</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="0Harmony">
<HintPath>..\..\..\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\..\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\..\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PLib">
<HintPath>C:\Users\15389\Documents\Klei\OxygenNotIncluded\mods\PLib.dll</HintPath>
</Reference>
<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" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
22 changes: 22 additions & 0 deletions I_need_ONI_skin.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35514.174 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "I_need_ONI_skin", "I_need_ONI_skin.csproj", "{BAA3194E-1D03-4012-B3C0-145924AF2A9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BAA3194E-1D03-4012-B3C0-145924AF2A9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAA3194E-1D03-4012-B3C0-145924AF2A9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAA3194E-1D03-4012-B3C0-145924AF2A9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAA3194E-1D03-4012-B3C0-145924AF2A9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
21 changes: 21 additions & 0 deletions Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using HarmonyLib;

namespace I_need_ONI_skin
{
public static class Patches
{
[HarmonyPatch(typeof(PermitItems))]
[HarmonyPatch("GetOwnedCount")]
public static class AA__Patch
{
public static void Postfix(ref int __result)
{
if (__result == 0)
{
__result++;
}
}
}
}
}
33 changes: 33 additions & 0 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("I_need_ONI_skin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("I_need_ONI_skin")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("baa3194e-1d03-4012-b3c0-145924af2a9a")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@

目前适用于 **U54-646843** 版本

### 方法1(推荐)
在创意工坊订阅同功能[mod](https://steamcommunity.com/sharedfiles/filedetails/?id=3383541990)

### 方法2
[Releases](https://github.com/yuanze31/I_need_ONI_skin/releases)中下载 Assembly-CSharp.dll,并替换位于 **.\SteamLibrary\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed****Assembly-CSharp.dll**

**注意:**

1. 每次更新/验证游戏完整性后需要重新替换
1. 每次更新/验证游戏完整性后需要重新替换(仅限方法2)
2. 从 U52-622509 版本后,破解规则为将未拥有的更改为 1 个,拥有多个的数量不变,从而方便筛选 ***2+*** 拆解
3. **严禁**随意拆解只拥有一个的皮肤,你可能根本没有这个皮肤,从而导致向科雷服务器发送许多错误信息,目前对科雷账号的影响未知,**如有尝试,后果自负**

Expand Down

0 comments on commit 0c01557

Please sign in to comment.