Add InfectionFreeZone
This commit is contained in:
16
Projects/InfectionFreeZone/InfectionFreeZone.sln
Normal file
16
Projects/InfectionFreeZone/InfectionFreeZone.sln
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InfectionFreeZone", "InfectionFreeZone\InfectionFreeZone.csproj", "{DA9D274E-486F-4F82-84FF-CD9388CB0B09}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@@ -0,0 +1,4 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||||
|
<Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\SupermarketTogether\SupermarketTogether\bin\Release\Assembly-CSharp.dll" />
|
||||||
|
</AssemblyExplorer></s:String></wpf:ResourceDictionary>
|
@@ -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
|
@@ -0,0 +1,93 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using BepInEx;
|
||||||
|
using BepInEx.Configuration;
|
||||||
|
using HarmonyLib;
|
||||||
|
using HarmonyLib.Tools;
|
||||||
|
|
||||||
|
namespace InfectionFreeZone {
|
||||||
|
[BepInPlugin(pluginGuid, pluginName, pluginVersion)]
|
||||||
|
public class Main : BaseUnityPlugin {
|
||||||
|
private const string pluginGuid = "InfectionFreeDave";
|
||||||
|
private const string pluginName = "InfectionFreeDave";
|
||||||
|
private const string pluginVersion = "1.0.0";
|
||||||
|
|
||||||
|
public static ConfigEntry<bool> debug;
|
||||||
|
|
||||||
|
public static ConfigEntry<float> moneyMultiplier;
|
||||||
|
|
||||||
|
public void Awake() {
|
||||||
|
debug = Config.Bind("General", "Debug", false);
|
||||||
|
|
||||||
|
moneyMultiplier = Config.Bind("General", "MoneyMultiplier", 1f);
|
||||||
|
|
||||||
|
Logger.LogInfo("Cyka mod loaded");
|
||||||
|
HarmonyFileLog.Enabled = true;
|
||||||
|
Harmony harmony = new Harmony(pluginGuid);
|
||||||
|
harmony.PatchAll();
|
||||||
|
var originalMethods = harmony.GetPatchedMethods();
|
||||||
|
Logger.LogInfo("Patched " + originalMethods.Count() + " methods");
|
||||||
|
foreach (var method in originalMethods) {
|
||||||
|
Logger.LogInfo("Patched " + method.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// [HarmonyPatch]
|
||||||
|
// public class Patches {
|
||||||
|
// [HarmonyPrefix]
|
||||||
|
// [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}");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [HarmonyPrefix]
|
||||||
|
// [HarmonyPatch(typeof(UiController), "ChangeGameSpeed")]
|
||||||
|
// public static void PrefixSpeed(ref int gameSpeed) {
|
||||||
|
// if (Main.debug.Value)
|
||||||
|
// Console.WriteLine($"Game speed is {gameSpeed}");
|
||||||
|
// if (gameSpeed > 1) {
|
||||||
|
// gameSpeed = Main.fastSpeed.Value;
|
||||||
|
// if (Main.debug.Value)
|
||||||
|
// Console.WriteLine($"Game speed modified to {gameSpeed}");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [HarmonyPrefix]
|
||||||
|
// [HarmonyPatch(typeof(StaffModel), "UpdateXp")]
|
||||||
|
// public static void PrefixXp(ref int id, ref int amount) {
|
||||||
|
// if (Main.debug.Value)
|
||||||
|
// Console.WriteLine($"Staff xp is {amount}");
|
||||||
|
// if (amount > 0) {
|
||||||
|
// amount = (int)(amount * Main.staffXpMultiplier.Value);
|
||||||
|
// if (Main.debug.Value)
|
||||||
|
// Console.WriteLine($"Staff xp modified to {amount}");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [HarmonyPostfix]
|
||||||
|
// [HarmonyPatch(typeof(TechTreeModel), nameof(TechTreeModel.GetBonusPeoplePerMinute))]
|
||||||
|
// public static void PostfixPeoplePerMinute(ref float __result) {
|
||||||
|
// __result *= Main.peoplePerMinuteMultiplier.Value;
|
||||||
|
// __result += Main.peoplePerMinuteOffset.Value;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [HarmonyPostfix]
|
||||||
|
// [HarmonyPatch(typeof(TavernModel), nameof(TavernModel.GetQuality))]
|
||||||
|
// public static void PostfixQuality(ref int __result) {
|
||||||
|
// if (Main.debug.Value)
|
||||||
|
// Console.WriteLine($"Quality is {__result}");
|
||||||
|
// if (__result > 0) {
|
||||||
|
// __result = (int)(__result * Main.prestigeMultiplier.Value);
|
||||||
|
// if (Main.debug.Value)
|
||||||
|
// Console.WriteLine($"Quality modified to {__result}");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
@@ -0,0 +1,62 @@
|
|||||||
|
<?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/Infection.Free.Zone.v0.24.8.21a</GAME_DIR>
|
||||||
|
<GAME_MANAGED>$(GAME_DIR)/Infection Free Zone_Data/Managed</GAME_MANAGED>
|
||||||
|
<GAME_BEPINEX>$(GAME_DIR)/BepInEx</GAME_BEPINEX>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{DA9D274E-486F-4F82-84FF-CD9388CB0B09}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>InfectionFreeZone</RootNamespace>
|
||||||
|
<AssemblyName>InfectionFreeZone</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="InfectionFreeZone.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="0Harmony">
|
||||||
|
<HintPath>$(GAME_BEPINEX)/core/0Harmony.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="BepInEx">
|
||||||
|
<HintPath>$(GAME_BEPINEX)/core/BepInEx.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ConfigurationManager">
|
||||||
|
<HintPath>$(GAME_BEPINEX)/plugins/ConfigurationManager/ConfigurationManager.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>
|
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 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: AssemblyTitle("InfectionFreeZone")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("InfectionFreeZone")]
|
||||||
|
[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")]
|
1
Projects/InfectionFreeZone/InfectionFreeZone/sync
Normal file
1
Projects/InfectionFreeZone/InfectionFreeZone/sync
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bin/Release/TavernDave.dll,"C:\Games\Tavern Master\BepInEx\plugins\TavernDave.dll"
|
Reference in New Issue
Block a user