Update naming

This commit is contained in:
2024-09-27 21:15:33 +02:00
parent e5f13841fe
commit 54406c7c8a
5 changed files with 9 additions and 10 deletions

View File

@@ -0,0 +1,6 @@
# CSharp formatting rules:
[*.cs]
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false

View File

@@ -0,0 +1,40 @@
using System.Linq;
using MelonLoader;
namespace ArmsTradeTycoonTanks {
public class ArmsTradeTycoonTanksMelonMod : MelonMod {
public override void OnInitializeMelon() {
LoggerInstance.Msg("Phat Melon mod loaded");
HarmonyLib.Harmony harmony = HarmonyInstance;
harmony.PatchAll();
var originalMethods = harmony.GetPatchedMethods();
var methodBases = originalMethods.ToList();
LoggerInstance.Msg("Patched " + methodBases.Count() + " methods");
foreach (var method in methodBases) {
LoggerInstance.Msg("Patched " + method.Name);
}
}
}
[HarmonyLib.HarmonyPatch]
public class Patches {
// [HarmonyLib.HarmonyPrefix]
// [HarmonyLib.HarmonyPatch(typeof(TavernModel), "ChangeMoney")]
// public static void PrefixMoney(ref int value) {
// if (Main.debug.Value)
// Console.WriteLine($"Money is {value}");
// if (value > 0) {
// value = (int)(value * Main.moneyMultiplier.Value);
// if (Main.debug.Value)
// Console.WriteLine($"Money modified to {value}");
// }
// }
// [HarmonyLib.HarmonyPostfix]
// [HarmonyLib.HarmonyPatch(typeof(TechTreeModel), nameof(TechTreeModel.GetBonusPeoplePerMinute))]
// public static void PostfixPeoplePerMinute(ref float __result) {
// __result *= Main.peoplePerMinuteMultiplier.Value;
// __result += Main.peoplePerMinuteOffset.Value;
// }
}
}

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.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')"/>
<PropertyGroup>
<GAME_DIR>C:/Games/Arms Trade Tycoon Tanks</GAME_DIR>
<GAME_MELON>$(GAME_DIR)/MelonLoader</GAME_MELON>
<GAME_MANAGED>$(GAME_MELON)/Il2CppAssemblies</GAME_MANAGED>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DA9D274E-486F-4F82-84FF-CD9388CB0B09}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ArmsTradeTycoonTanks</RootNamespace>
<AssemblyName>ArmsTradeTycoonTanks</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="ArmsTradeTycoonTanks.cs" />
<Compile Include="Properties\AssemblyInfo.cs"/>
</ItemGroup>
<ItemGroup>
<Reference Include="MelonLoader">
<HintPath>$(GAME_MELON)/net6/MelonLoader.dll</HintPath>
</Reference>
<Reference Include="0Harmony">
<HintPath>$(GAME_MELON)/net6/0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(GAME_MANAGED)/Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(GAME_MANAGED)/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(GAME_MANAGED)/UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
</Project>

View File

@@ -0,0 +1,39 @@
using System.Reflection;
using System.Runtime.InteropServices;
using ArmsTradeTycoonTanks;
using MelonLoader;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: MelonInfo(typeof(ArmsTradeTycoonTanksMelonMod), "Phat Melon Mod", "1.0.0", "Phat Phuck Dave")]
[assembly: MelonGame("Microprose", "Arms Trade Tycoon Tanks")]
[assembly: AssemblyTitle("Phat Melon Mod")]
[assembly: AssemblyProduct("Phat Melon Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("DA9D274E-486F-4F82-84FF-CD9388CB0B09")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]