Skip to content

Commit

Permalink
disable logger
Browse files Browse the repository at this point in the history
  • Loading branch information
OutsiderH committed Sep 8, 2023
1 parent dca2b5c commit 5ff752d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions RoundPreset/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ internal static ISession Session
return _session;
}
}
//internal static ManualLogSource internalLogger;
internal static readonly Dictionary<string, string[]> localizeTable = new()
{
{"en", new[]{"Save round", "Load round", "This magazine is not full", "This magazine is not empty", "No preset found", "preset", "apply", "delete", "ammo not include", "Item Operation failed(local change)", "Item Operation failed(uploading)" } },
{"ch", new[]{"保存弹药预设", "加载弹药预设", "首先填充弹匣", "首先清空弹匣", "没有找到预设", "预设", "应用", "删除", "弹药不足", "物品操作错误(本地)", "物品操作错误(同步时)" } }
};
internal static ManualLogSource internalLogger;
internal static Dictionary<MagazineKey, IList<IReadOnlyList<PresetAmmo>>> savedPresets = new();
private static ISession _session;
private void Awake()
{
internalLogger = Logger;
//internalLogger = Logger;
CustomInteractionsManager.Register(new CustomInteractionsProvider());
}
internal static string GetLocalizedString(ELocalizedStringIndex index)
Expand Down Expand Up @@ -189,25 +189,21 @@ public LoadPresetSubSubInteraction(ItemUiContext uiContext, MagazineClass mag, I
if (willMove)
{
res = ItemManager.Move(ammoWillApply, ptr, controller, true);
internalLogger.LogMessage("Doing Move");
}
else
{
res = ItemManager.SplitExact(ammoWillApply, countWillApply, ptr, controller, controller, true);
internalLogger.LogMessage("Doing Split");
}
}
else
{
if (willMove)
{
res = ItemManager.Merge(ammoWillApply, mag.Cartridges.Last, controller, true);
internalLogger.LogMessage("Doing Merge");
}
else
{
res = ItemManager.TransferExact(ammoWillApply, countWillApply, mag.Cartridges.Last, controller, true);
internalLogger.LogMessage("Doing Transfer");
}
}
if (res.Failed)
Expand Down

0 comments on commit 5ff752d

Please sign in to comment.