Initial commit
This commit is contained in:
commit
085165c5d6
5 changed files with 470 additions and 0 deletions
28
Plugin.cs
Normal file
28
Plugin.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using BepInEx;
|
||||
using HarmonyLib;
|
||||
using TurnTheGameOn.SimpleTrafficSystem;
|
||||
|
||||
namespace NoMoreCars
|
||||
{
|
||||
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
|
||||
public class Plugin : BaseUnityPlugin
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded! Applying patch...");
|
||||
Harmony harmony = new Harmony(PluginInfo.PLUGIN_GUID);
|
||||
harmony.PatchAll();
|
||||
}
|
||||
}
|
||||
public static class CarRemovalPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(AITrafficCar), "RegisterCar")]
|
||||
public static class AITrafficCar_RegisterCar_Patch
|
||||
{
|
||||
public static void Postfix(AITrafficCar __instance)
|
||||
{
|
||||
__instance.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue