first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
using NitroxClient.GameLogic.Spawning.Metadata.Processor.Abstract;
using NitroxModel.DataStructures.GameLogic.Entities.Metadata;
using UnityEngine;
namespace NitroxClient.GameLogic.Spawning.Metadata.Processor;
public class KeypadMetadataProcessor : EntityMetadataProcessor<KeypadMetadata>
{
public override void ProcessMetadata(GameObject gameObject, KeypadMetadata metadata)
{
Log.Debug($"Received keypad metadata change for {gameObject.name} with data of {metadata}");
KeypadDoorConsole keypad = gameObject.GetComponent<KeypadDoorConsole>();
keypad.unlocked = metadata.Unlocked;
if (metadata.Unlocked)
{
if (keypad.root)
{
keypad.root.BroadcastMessage("UnlockDoor");
}
else
{
keypad.BroadcastMessage("UnlockDoor");
}
keypad.UnlockDoor();
}
}
}