Stickers: added subscription check on outbound mod network calls

This commit is contained in:
NotAKidoS 2024-09-10 20:22:14 -05:00
parent 52315f5d51
commit 958f07ed08
3 changed files with 76 additions and 8 deletions

View file

@ -4,7 +4,6 @@ using ABI_RC.Core.UI;
using ABI_RC.Systems.GameEventSystem;
using NAK.Stickers.Networking;
using NAK.Stickers.Utilities;
using UnityEngine;
namespace NAK.Stickers;
@ -64,6 +63,29 @@ public partial class StickerSystem
#endregion Game Events
#region Data
// private bool _isEnabled = true;
//
// public bool IsEnabled
// {
// get => _isEnabled;
// set
// {
// if (_isEnabled == value)
// return;
//
// _isEnabled = value;
// if (!_isEnabled) ClearAllStickers();
// ModNetwork.IsEnabled = _isEnabled;
// }
// }
private string SelectedStickerName => ModSettings.Hidden_SelectedStickerNames.Value[_selectedStickerSlot];
private const float StickerKillTime = 30f;
private const float StickerCooldown = 0.2f;
private readonly Dictionary<string, StickerData> _playerStickers = new();
internal const string PlayerLocalId = "_PLAYERLOCAL";
private int _selectedStickerSlot;
public int SelectedStickerSlot
@ -97,13 +119,6 @@ public partial class StickerSystem
}
}
}
private string SelectedStickerName => ModSettings.Hidden_SelectedStickerNames.Value[_selectedStickerSlot];
private const float StickerKillTime = 30f;
private const float StickerCooldown = 0.2f;
private readonly Dictionary<string, StickerData> _playerStickers = new();
internal const string PlayerLocalId = "_PLAYERLOCAL";
#endregion Data
}