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

Some To Do #6

Merged
merged 1 commit into from
Jan 12, 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
10 changes: 9 additions & 1 deletion CursedMod/Features/Wrappers/Facility/CursedDoor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ namespace CursedMod.Features.Wrappers.Facility;

public class CursedDoor
{
public DoorVariant Base { get; } // todo: constructor
public DoorVariant Base { get; }

public CursedDoor(DoorVariant door)
{
Base = door;
}

public GameObject GameObject => Base.gameObject;

Expand Down Expand Up @@ -46,4 +51,7 @@ public bool IsOpen
public void TriggerState() => Base.NetworkTargetState = !IsOpen;

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

public override string ToString() =>
$"{nameof(CursedDoor)}: Opened: {IsOpen} | Position: {Position} | Rotation: {Rotation} | Scale: {Scale} | Permissions: {RequiredPermissions} | DoorId: {DoorId}";
}
36 changes: 27 additions & 9 deletions CursedMod/Features/Wrappers/Facility/CursedGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ namespace CursedMod.Features.Wrappers.Facility;

public class CursedGenerator
{
public Scp079Generator Base { get; private set; } // todo: constructor
public Scp079Generator Base { get; }

public CursedGenerator(Scp079Generator generator)
{
Base = generator;
}

public bool IsEngaged
{
Expand All @@ -24,12 +29,24 @@ public bool IsActivating
public int RemainingTime => Base.RemainingTime;

public float DropdownSpeed => Base.DropdownSpeed;

public Vector3 Position => Base.transform.position; //todo: setter

public Quaternion Rotation => Base.transform.rotation; // todo: setter

public Vector3 Scale => Base.transform.localScale; // todo: setter

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 KeycardPermissions RequiredPermissions
{
Expand All @@ -38,6 +55,7 @@ public KeycardPermissions RequiredPermissions
}

public NetworkIdentity NetworkIdentity => Base.netIdentity;

public override string ToString() => $"{nameof(CursedGenerator)}: Engaged {IsEngaged} | Activating: {IsActivating} | Remaining Time: {RemainingTime} | DropdownSpeed: {DropdownSpeed} | Position: {Position} | Rotation: {Rotation} | Scale: {Scale} | Permissions: {RequiredPermissions} | NetId: {NetworkIdentity.netId}";

public override string ToString() =>
$"{nameof(CursedGenerator)}: Engaged {IsEngaged} | Activating: {IsActivating} | Remaining Time: {RemainingTime} | DropdownSpeed: {DropdownSpeed} | Position: {Position} | Rotation: {Rotation} | Scale: {Scale} | Permissions: {RequiredPermissions} | NetId: {NetworkIdentity.netId}";
}