mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Move many mods to Deprecated folder, fix spelling
This commit is contained in:
parent
5e822cec8d
commit
0042590aa6
539 changed files with 7475 additions and 3120 deletions
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.Networking.IO.Social;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Systems.ModNetwork;
|
||||
using NAK.Stickers.Utilities;
|
||||
|
@ -47,6 +48,9 @@ public static partial class ModNetwork
|
|||
if (StickerSystem.Instance.IsRestrictedInstance) // ignore messages from users when the world is restricted. This also includes older or modified version of Stickers mod.
|
||||
return false;
|
||||
|
||||
if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(sender, out PuppetMaster _))
|
||||
return false; // ignore messages from players that don't exist
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -108,7 +112,10 @@ public static partial class ModNetwork
|
|||
msg.Read(out Vector3 up);
|
||||
|
||||
if (!StickerSystem.Instance.HasTextureHash(msg.Sender, textureHash))
|
||||
{
|
||||
SendRequestTexture(stickerSlot, textureHash);
|
||||
StickerSystem.Instance.ClearStickersForPlayer(msg.Sender, stickerSlot); // Ensure no exploit
|
||||
}
|
||||
|
||||
StickerSystem.Instance.OnStickerPlaceReceived(msg.Sender, stickerSlot, position, forward, up);
|
||||
}
|
||||
|
@ -158,7 +165,7 @@ public static partial class ModNetwork
|
|||
|
||||
LoggerInbound($"Received StartTexture message from {sender}: Slot: {stickerSlot}, Hash: {textureHash}, Chunks: {chunkCount}, Resolution: {width}x{height}");
|
||||
}
|
||||
|
||||
|
||||
private static void HandleSendTexture(ModNetworkMessage msg)
|
||||
{
|
||||
string sender = msg.Sender;
|
||||
|
|
|
@ -62,7 +62,7 @@ public partial class StickerSystem
|
|||
|
||||
#endregion Player Callbacks
|
||||
|
||||
#region Player Callbacks
|
||||
#region Sticker Callbacks
|
||||
|
||||
public void OnStickerPlaceReceived(string playerId, int stickerSlot, Vector3 position, Vector3 forward, Vector3 up)
|
||||
=> AttemptPlaceSticker(playerId, position, forward, up, alignWithNormal: true, stickerSlot);
|
||||
|
@ -81,5 +81,5 @@ public partial class StickerSystem
|
|||
stickerData.IdentifyTime = Time.time + 3f;
|
||||
}
|
||||
|
||||
#endregion Player Callbacks
|
||||
#endregion Sticker Callbacks
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ public partial class StickerSystem
|
|||
stickerData.Clear();
|
||||
}
|
||||
|
||||
private void ClearStickersForPlayer(string playerId, int stickerSlot)
|
||||
public void ClearStickersForPlayer(string playerId, int stickerSlot)
|
||||
{
|
||||
if (!_playerStickers.TryGetValue(playerId, out StickerData stickerData))
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue