Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
- Cleaner References
- Cleaner Init
- Cleaner HarmonyPatch
  • Loading branch information
ryuyan-ninja committed Oct 29, 2022
1 parent cf9a866 commit f474d43
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
5 changes: 3 additions & 2 deletions src/Harmony/Init.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using System.Reflection;
using HarmonyLib;

namespace Harmony
namespace StayClear
{
public class StayClear : IModApi
{
public void InitMod(Mod _modInstance)
{
var harmony = new HarmonyLib.Harmony("io.stealthbit.7dtdmods.StayClear");
var harmony = new Harmony("io.stealthbit.7dtdmods.StayClear");
harmony.PatchAll(Assembly.GetExecutingAssembly());
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/Harmony/SleeperVolume_UpdatePlayerTouched.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using HarmonyLib;
using UnityEngine;

namespace StayClear
{
[HarmonyPatch(typeof(SleeperVolume))]
[HarmonyPatch("UpdatePlayerTouched")]
[HarmonyPatch(typeof(SleeperVolume), "UpdatePlayerTouched")]
class SleeperVolume_UpdatePlayerTouched
{
static bool Prefix(ref ulong ___respawnTime, World _world)
Expand Down
2 changes: 1 addition & 1 deletion src/ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Name value="StayClear" />
<Description value="After you clear a POI, it stays cleared" />
<Author value="Ryuyan" />
<Version value="1.3.0" />
<Version value="1.3.1" />
<Website value="https://github.com/ryuyan-ninja/7dtdmod-stayclear" />
</ModInfo>
</xml>
25 changes: 6 additions & 19 deletions src/StayClear.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@
<PropertyGroup>
<TargetFramework>net4.8</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>StayClear</RootNamespace>
<AssemblyName>StayClear</AssemblyName>
<GameDir>G:\Games\SteamLibrary\steamapps\common\7 Days To Die</GameDir>
<RootNamespace>StayClear</RootNamespace>
<AssemblyName>StayClear</AssemblyName>
<GameDir>H:\Games\SteamLibrary\steamapps\common\7 Days To Die</GameDir>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>$(GameDir)\7DaysToDie_Data\Managed\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(GameDir)\7DaysToDie_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="LogLibrary">
<HintPath>$(GameDir)\7DaysToDie_Data\Managed\LogLibrary.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(GameDir)\7DaysToDie_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="$(GameDir)\7DaysToDie_Data\Managed\0Harmony.dll" Private="False" />
<Reference Include="$(GameDir)\7DaysToDie_Data\Managed\Assembly-CSharp.dll" Private="False" />
<Reference Include="$(GameDir)\7DaysToDie_Data\Managed\UnityEngine.dll" Private="False" />
</ItemGroup>
<ItemGroup>
<Content Include="ModInfo.xml" CopyToOutputDirectory="Always" />
Expand Down

0 comments on commit f474d43

Please sign in to comment.