mirror of
https://github.com/rmroc451/TweaksAndThings.git
synced 2025-12-16 17:29:37 -06:00
renaming main class to have plugin suffix to avoid namespace collision issues.
This commit is contained in:
@@ -4,6 +4,7 @@ using HarmonyLib;
|
|||||||
using KeyValue.Runtime;
|
using KeyValue.Runtime;
|
||||||
using Model.OpsNew;
|
using Model.OpsNew;
|
||||||
using Railloader;
|
using Railloader;
|
||||||
|
using RMROC451.TweaksAndThings;
|
||||||
using RMROC451.TweaksAndThings.Enums;
|
using RMROC451.TweaksAndThings.Enums;
|
||||||
using RMROC451.TweaksAndThings.Extensions;
|
using RMROC451.TweaksAndThings.Extensions;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@@ -33,7 +34,7 @@ public class CarInspector_PopulateCarPanel_Patch
|
|||||||
private static bool Prefix(CarInspector __instance, UIPanelBuilder builder)
|
private static bool Prefix(CarInspector __instance, UIPanelBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
||||||
TweaksAndThings tweaksAndThings = SingletonPluginBase<TweaksAndThings>.Shared;
|
TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase<TweaksAndThingsPlugin>.Shared;
|
||||||
if (!tweaksAndThings.IsEnabled) return true;
|
if (!tweaksAndThings.IsEnabled) return true;
|
||||||
|
|
||||||
var consist = __instance._car.EnumerateCoupled(LogicalEnd.A);
|
var consist = __instance._car.EnumerateCoupled(LogicalEnd.A);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class EngineRosterRow_Refresh_Patch
|
|||||||
{
|
{
|
||||||
public static void Postfix(EngineRosterRow __instance)
|
public static void Postfix(EngineRosterRow __instance)
|
||||||
{
|
{
|
||||||
TweaksAndThings? tweaksAndThings = SingletonPluginBase<TweaksAndThings>.Shared;
|
TweaksAndThingsPlugin? tweaksAndThings = SingletonPluginBase<TweaksAndThingsPlugin>.Shared;
|
||||||
RosterFuelColumnSettings? rosterFuelColumnSettings = tweaksAndThings?.settings?.EngineRosterFuelColumnSettings;
|
RosterFuelColumnSettings? rosterFuelColumnSettings = tweaksAndThings?.settings?.EngineRosterFuelColumnSettings;
|
||||||
|
|
||||||
if (tweaksAndThings == null ||
|
if (tweaksAndThings == null ||
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class ExpandedConsole_Add_Patch
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TweaksAndThings tweaksAndThings = SingletonPluginBase<TweaksAndThings>.Shared;
|
TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase<TweaksAndThingsPlugin>.Shared;
|
||||||
StateManager shared = StateManager.Shared;
|
StateManager shared = StateManager.Shared;
|
||||||
GameStorage gameStorage = shared.Storage;
|
GameStorage gameStorage = shared.Storage;
|
||||||
WebhookSettings settings = tweaksAndThings?.settings?.WebhookSettingsList?.FirstOrDefault(ws => ws.RailroadMark == gameStorage.RailroadMark);
|
WebhookSettings settings = tweaksAndThings?.settings?.WebhookSettingsList?.FirstOrDefault(ws => ws.RailroadMark == gameStorage.RailroadMark);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Model;
|
using Model;
|
||||||
using Model.OpsNew;
|
using Model.OpsNew;
|
||||||
using Railloader;
|
using Railloader;
|
||||||
|
using RMROC451.TweaksAndThings;
|
||||||
using RMROC451.TweaksAndThings.Extensions;
|
using RMROC451.TweaksAndThings.Extensions;
|
||||||
using UI;
|
using UI;
|
||||||
using UI.Tags;
|
using UI.Tags;
|
||||||
@@ -20,7 +21,7 @@ public class TagController_UpdateTag_Patch
|
|||||||
private static void Postfix(Car car, TagCallout tagCallout)
|
private static void Postfix(Car car, TagCallout tagCallout)
|
||||||
{
|
{
|
||||||
TagController tagController = UnityEngine.Object.FindObjectOfType<TagController>();
|
TagController tagController = UnityEngine.Object.FindObjectOfType<TagController>();
|
||||||
TweaksAndThings tweaksAndThings = SingletonPluginBase<TweaksAndThings>.Shared;
|
TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase<TweaksAndThingsPlugin>.Shared;
|
||||||
|
|
||||||
if (!tweaksAndThings.IsEnabled || !tweaksAndThings.settings.HandBrakeAndAirTagModifiers)
|
if (!tweaksAndThings.IsEnabled || !tweaksAndThings.settings.HandBrakeAndAirTagModifiers)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using RMROC451.TweaksAndThings.Enums;
|
|||||||
|
|
||||||
namespace RMROC451.TweaksAndThings;
|
namespace RMROC451.TweaksAndThings;
|
||||||
|
|
||||||
public class TweaksAndThings : SingletonPluginBase<TweaksAndThings>, IUpdateHandler, IModTabHandler
|
public class TweaksAndThingsPlugin : SingletonPluginBase<TweaksAndThingsPlugin>, IUpdateHandler, IModTabHandler
|
||||||
{
|
{
|
||||||
private HttpClient client;
|
private HttpClient client;
|
||||||
internal HttpClient Client
|
internal HttpClient Client
|
||||||
@@ -28,16 +28,16 @@ public class TweaksAndThings : SingletonPluginBase<TweaksAndThings>, IUpdateHand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
internal Settings? settings { get; private set; } = null;
|
internal Settings? settings { get; private set; } = null;
|
||||||
readonly ILogger logger = Log.ForContext<TweaksAndThings>();
|
readonly ILogger logger = Log.ForContext<TweaksAndThingsPlugin>();
|
||||||
IModdingContext moddingContext { get; set; }
|
IModdingContext moddingContext { get; set; }
|
||||||
IModDefinition modDefinition { get; set; }
|
IModDefinition modDefinition { get; set; }
|
||||||
|
|
||||||
static TweaksAndThings()
|
static TweaksAndThingsPlugin()
|
||||||
{
|
{
|
||||||
Log.Information("Hello! Static Constructor was called!");
|
Log.Information("Hello! Static Constructor was called!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public TweaksAndThings(IModdingContext moddingContext, IModDefinition self)
|
public TweaksAndThingsPlugin(IModdingContext moddingContext, IModDefinition self)
|
||||||
{
|
{
|
||||||
this.modDefinition = self;
|
this.modDefinition = self;
|
||||||
|
|
||||||
Reference in New Issue
Block a user