Skip to content

Commit

Permalink
Some Scp914 changes (#2290)
Browse files Browse the repository at this point in the history
  • Loading branch information
VALERA771 authored Dec 11, 2023
1 parent 87f5418 commit e3fbc1f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
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 @@ -88,6 +89,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.")]
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.")]
public Scp914Controller Scp914 => API.Features.Scp914.Scp914Controller;

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

0 comments on commit e3fbc1f

Please sign in to comment.