Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Added CursedLocker #10

Merged
merged 3 commits into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CursedMod/CursedMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\SCPSL\Plugins\Dependencies\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\..\..\SCPSL\Plugins\Dependencies\UnityEngine.AudioModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EntryPoint.cs" />
Expand All @@ -66,6 +69,7 @@
<Compile Include="Features\Wrappers\Facility\CursedWarhead.cs" />
<Compile Include="Features\Wrappers\Facility\Props\CursedBreakableWindow.cs" />
<Compile Include="Features\Wrappers\Facility\Props\CursedGenerator.cs" />
<Compile Include="Features\Wrappers\Facility\Props\CursedLocker.cs" />
<Compile Include="Features\Wrappers\Facility\Rooms\Cursed079Camera.cs" />
<Compile Include="Features\Wrappers\Facility\Rooms\CursedDoor.cs" />
<Compile Include="Features\Wrappers\Facility\Rooms\CursedLightningController.cs" />
Expand Down
42 changes: 42 additions & 0 deletions CursedMod/Features/Wrappers/Facility/Props/CursedLocker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using MapGeneration.Distributors;
using UnityEngine;

namespace CursedMod.Features.Wrappers.Facility.Props;

public class CursedLocker
{
public LockerChamber Base { get; }

public CursedLocker(LockerChamber locker)
{
Base = locker;
}

public bool IsOpen
{
get => Base.IsOpen;
set => Base.IsOpen = value;
}

public bool CanInteract => Base.CanInteract;

public Vector3 Position
{
get => Base.transform.position;
set => Base.transform.position = value;
}

public Quaternion Rotation
{
get => Base.transform.rotation;
set => Base.transform.rotation = value;
}

public Transform Transform => Base.transform;

public void SetDoor(bool status, AudioClip clip) => Base.SetDoor(status, clip);

public void PlayDeniedSound(AudioClip clip) => Base.PlayDenied(clip);

public override string ToString() => $"{nameof(CursedLocker)}: Opened: {IsOpen} | CanInteract: {CanInteract} | Position: {Position} | Rotation: {Rotation}";
}
5 changes: 5 additions & 0 deletions CursedMod/Features/Wrappers/Facility/Rooms/CursedRoom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ namespace CursedMod.Features.Wrappers.Facility.Rooms;
public class CursedRoom
{
public RoomIdentifier Room { get; }

public CursedRoom(RoomIdentifier room)
{
Room = room;
}

public Vector3 Position => Room.transform.position;

Expand Down