-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small code cleanup
- Loading branch information
Showing
6 changed files
with
158 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<!--This is an xml comment. Comments have no impact on compiling.--> | ||
|
||
<PropertyGroup> | ||
<!--This is the .NET version the mod will be compiled with. Don't change it.--> | ||
<TargetFramework>net6.0</TargetFramework> | ||
|
||
<!--This tells the compiler to use the latest C# version.--> | ||
<LangVersion>Latest</LangVersion> | ||
|
||
<!--This adds global usings for a few common System namespaces.--> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
|
||
<!--This enables nullable annotation and analysis. It's good coding form.--> | ||
<Nullable>enable</Nullable> | ||
|
||
<!--This tells the compiler to use assembly attributes instead of generating its own.--> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
|
||
<!--PDB files give line numbers in stack traces (errors). This is useful for debugging. There are 3 options:--> | ||
<!--full has a pdb file created beside the dll.--> | ||
<!--embedded has the pdb data embedded within the dll. This is useful because bug reports will then have line numbers.--> | ||
<!--none skips creation of pdb data.--> | ||
<DebugType>embedded</DebugType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{DAF59C7B-B568-4A66-BECA-0D8B47971845}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>ArrowMod</RootNamespace> | ||
<AssemblyName>ArrowMod</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</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> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</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> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup /> | ||
|
||
<ItemGroup> | ||
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\TheLongDark\MelonLoader\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\..\..\..\SteamLibrary\steamapps\common\TheLongDark\tld_Data\Managed\Assembly-CSharp.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Il2Cppmscorlib, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\TheLongDark\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Il2CppSystem, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> | ||
<Reference Include="MelonLoader, Version=0.4.3.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\TheLongDark\MelonLoader\MelonLoader.dll</HintPath> | ||
</Reference> | ||
<Reference Include="ModSettings, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="UnhollowerBaseLib, Version=0.4.15.4, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\TheLongDark\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnhollowerRuntimeLib, Version=0.4.10.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\TheLongDark\MelonLoader\Managed\UnhollowerRuntimeLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\..\..\..\SteamLibrary\steamapps\common\TheLongDark\tld_Data\Managed\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule"> | ||
<HintPath>..\..\..\..\SteamLibrary\steamapps\common\TheLongDark\tld_Data\Managed\UnityEngine.CoreModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="src\Patches.cs" /> | ||
<Compile Include="src\Settings.cs" /> | ||
<Compile Include="src\ArrowMod.cs" /> | ||
<PackageReference Include="ds5678.Modding.TLD.Il2CppAssemblies.Windows" Version="2.6.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="LICENSE" /> | ||
<None Include="README.md" /> | ||
<Reference Include="ModSettings"> | ||
<HintPath>..\..\..\..\Games\SteamLibrary\steamapps\common\TheLongDark\Mods\ModSettings.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>xcopy /y "$(ProjectDir)bin\Debug\ArrowMod.dll" "D:\Games\SteamLibrary\steamapps\common\TheLongDark\Mods\"</PostBuildEvent> | ||
</PropertyGroup> | ||
|
||
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | ||
<Exec Command="xcopy /y "$(ProjectDir)bin\Debug\net6.0\ArrowMod.dll" "D:\Games\SteamLibrary\steamapps\common\TheLongDark\Mods\"" /> | ||
</Target> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
using MelonLoader; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using BuildInfo = ArrowMod.BuildInfo; | ||
|
||
[assembly: ComVisible(false)] | ||
[assembly: Guid("daf59c7b-b568-4a66-beca-0d8b47971845")] | ||
//This is a C# comment. Comments have no impact on compilation. | ||
|
||
[assembly: AssemblyTitle(BuildInfo.Name)] | ||
[assembly: AssemblyDescription(BuildInfo.Description)] | ||
[assembly: AssemblyCompany(BuildInfo.Company)] | ||
[assembly: AssemblyProduct(BuildInfo.Name)] | ||
[assembly: AssemblyCopyright("Created by " + BuildInfo.Author)] | ||
[assembly: AssemblyTrademark(BuildInfo.Company)] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: AssemblyTitle(ArrowMod.BuildInfo.ModName)] | ||
[assembly: AssemblyCopyright($"Created by {ArrowMod.BuildInfo.ModAuthor}")] | ||
|
||
[assembly: AssemblyVersion(BuildInfo.Version)] | ||
[assembly: AssemblyFileVersion(BuildInfo.Version)] | ||
[assembly: MelonInfo(typeof(ArrowMod.ArrowMod), BuildInfo.Name, BuildInfo.Version, BuildInfo.Author, BuildInfo.DownloadLink)] | ||
[assembly: AssemblyVersion(ArrowMod.BuildInfo.ModVersion)] | ||
[assembly: AssemblyFileVersion(ArrowMod.BuildInfo.ModVersion)] | ||
[assembly: MelonInfo(typeof(ArrowMod.ArrowMod), ArrowMod.BuildInfo.ModName, ArrowMod.BuildInfo.ModVersion, ArrowMod.BuildInfo.ModAuthor)] | ||
|
||
//This tells MelonLoader that the mod is only for The Long Dark. | ||
[assembly: MelonGame("Hinterland", "TheLongDark")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
using MelonLoader; | ||
|
||
using UnityEngine; | ||
|
||
namespace ArrowMod | ||
{ | ||
public static class BuildInfo | ||
{ | ||
public const string Name = "ArrowMod"; // Name of the Mod. (MUST BE SET) | ||
public const string Description = "A mod to make arrow crafting more realistic."; // Description for the Mod. (Set as null if none) | ||
public const string Author = "ttr, ds5678"; // Author of the Mod. (MUST BE SET) | ||
public const string Company = null; // Company that made the Mod. (Set as null if none) | ||
public const string Version = "1.7.1"; // Version of the Mod. (MUST BE SET) | ||
public const string DownloadLink = null; // Download Link for the Mod. (Set as null if none) | ||
} | ||
internal class ArrowMod : MelonMod | ||
{ | ||
public override void OnApplicationStart() | ||
{ | ||
Debug.Log($"[{Info.Name}] Version {Info.Version} loaded!"); | ||
Settings.OnLoad(); | ||
} | ||
} | ||
public static class BuildInfo | ||
{ | ||
internal const string ModName = "ArrowMod"; | ||
internal const string ModAuthor = "ttr"; | ||
internal const string ModVersion = "1.8.0"; | ||
} | ||
internal class ArrowMod : MelonMod | ||
{ | ||
|
||
public override void OnInitializeMelon() | ||
{ | ||
Settings.OnLoad(); | ||
LoggerInstance.Msg($"[{BuildInfo.ModName}] Version {BuildInfo.ModVersion} loaded!"); | ||
} | ||
public static void Log(string msg) | ||
{ | ||
MelonLogger.Msg(msg); | ||
} | ||
} | ||
} |
Oops, something went wrong.