Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Scp914 changes #2290

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions Exiled.API/Features/Scp914.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Exiled.API.Features
using System.Collections.Generic;
using System.Linq;

using Exiled.API.Features.Doors;
using Exiled.API.Features.Pickups;
using Exiled.API.Features.Pools;
using global::Scp914;
Expand Down Expand Up @@ -83,6 +84,11 @@ public static Scp914Mode ConfigMode
/// </summary>
public static Transform OutputBooth => Scp914Controller.OutputChamber;

/// <summary>
/// Gets the list with <see cref="Door"/> which SCP-914 has.
/// </summary>
public static IReadOnlyCollection<Door> Doors => Scp914Controller._doors.Select(Door.Get).ToList();

/// <summary>
/// Filters all GameObjects inside SCP-914's intake chamber into players and items.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@

namespace Exiled.Events.EventArgs.Scp914
{
using System;

using API.Features;
using API.Features.Items;

using global::Scp914;

using Interfaces;

using InventorySystem.Items;

/// <summary>
Expand All @@ -38,7 +37,6 @@ public class UpgradingInventoryItemEventArgs : IPlayerEvent, IItemEvent, IDeniab
/// </param>
public UpgradingInventoryItemEventArgs(Player player, ItemBase item, Scp914KnobSetting knobSetting, bool isAllowed = true)
{
Scp914 = API.Features.Scp914.Scp914Controller;
Player = player;
Item = Item.Get(item);
KnobSetting = knobSetting;
Expand All @@ -48,7 +46,8 @@ public UpgradingInventoryItemEventArgs(Player player, ItemBase item, Scp914KnobS
/// <summary>
/// Gets the <see cref="Scp914Controller" /> instance.
/// </summary>
public Scp914Controller Scp914 { get; }
[Obsolete("Use Scp914::Scp914Controller instead.")]
VALERA771 marked this conversation as resolved.
Show resolved Hide resolved
public Scp914Controller Scp914 => API.Features.Scp914.Scp914Controller;

/// <summary>
/// Gets or sets SCP-914 working knob setting.
Expand Down
9 changes: 4 additions & 5 deletions Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@

namespace Exiled.Events.EventArgs.Scp914
{
using System;

using Exiled.API.Features.Pickups;
using Exiled.Events.EventArgs.Interfaces;

using global::Scp914;

using InventorySystem.Items.Pickups;

using UnityEngine;

/// <summary>
Expand All @@ -35,7 +34,6 @@ public class UpgradingPickupEventArgs : IPickupEvent, IDeniableEvent
/// </param>
public UpgradingPickupEventArgs(ItemPickupBase item, Vector3 newPos, Scp914KnobSetting knobSetting)
{
Scp914 = API.Features.Scp914.Scp914Controller;
Pickup = Pickup.Get(item);
OutputPosition = newPos;
KnobSetting = knobSetting;
Expand All @@ -49,7 +47,8 @@ public UpgradingPickupEventArgs(ItemPickupBase item, Vector3 newPos, Scp914KnobS
/// <summary>
/// Gets the <see cref="Scp914Controller" /> instance.
/// </summary>
public Scp914Controller Scp914 { get; }
[Obsolete("Use Scp914::Scp914Controller instead.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same than above

public Scp914Controller Scp914 => API.Features.Scp914.Scp914Controller;

/// <summary>
/// Gets or sets the position the item will be output to.
Expand Down
Loading