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

Commit

Permalink
Merge pull request #4 from MrAfitol/dev
Browse files Browse the repository at this point in the history
Added CursedDoor.cs, not everything, but the base is ready
  • Loading branch information
Jesus-QC authored Jan 12, 2023
2 parents b609d86 + b5cfce0 commit 449ace5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions CursedMod/CursedMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<Compile Include="Features\Wrappers\Facility\CursedFacility.cs" />
<Compile Include="Features\Wrappers\Facility\CursedGenerator.cs" />
<Compile Include="Features\Wrappers\Facility\CursedWarhead.cs" />
<Compile Include="Features\Wrappers\Facility\CursedDoor.cs" />
<Compile Include="Features\Wrappers\Facility\Props\CursedBreakableWindow.cs" />
<Compile Include="Features\Wrappers\Facility\Rooms\CursedLightningController.cs" />
<Compile Include="Features\Wrappers\Player\CursedPlayer.cs" />
Expand Down
49 changes: 49 additions & 0 deletions CursedMod/Features/Wrappers/Facility/CursedDoor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Interactables.Interobjects.DoorUtils;
using UnityEngine;

namespace CursedMod.Features.Wrappers.Facility.Props;

public class CursedDoor
{
public DoorVariant Base { get; }

public GameObject GameObject => Base.gameObject;

public Transform Transform => Base.transform;

public int DoorId => Base.DoorId;

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 Vector3 Scale
{
get => Base.transform.localScale;
set => Base.transform.localScale = value;
}

public DoorPermissions RequiredPermissions
{
get => Base.RequiredPermissions;
set => Base.RequiredPermissions = value;
}

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

public void TriggerState() => Base.NetworkTargetState = !Base.TargetState;

public void ServerChangeLock(DoorLockReason reason, bool newState) => Base.ServerChangeLock(reason, newState);
}

0 comments on commit 449ace5

Please sign in to comment.