forked from Exiled-Team/EXILED
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'apis-rework' into devscp244
- Loading branch information
Showing
34 changed files
with
693 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="AmmoProcessor.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.API.Features.Scp914Processors | ||
{ | ||
using Exiled.API.Interfaces; | ||
using global::Scp914; | ||
using global::Scp914.Processors; | ||
|
||
/// <summary> | ||
/// A processor for <see cref="ItemCategory.Ammo"/>. | ||
/// </summary> | ||
public class AmmoProcessor : Scp914Processor, IWrapper<AmmoItemProcessor> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AmmoProcessor"/> class. | ||
/// </summary> | ||
/// <param name="scp914ItemProcessor">The <see cref="AmmoItemProcessor"/> instance.</param> | ||
public AmmoProcessor(AmmoItemProcessor scp914ItemProcessor) | ||
: base(scp914ItemProcessor) | ||
{ | ||
Base = scp914ItemProcessor; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public new AmmoItemProcessor Base { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets a new <see cref="ItemType"/> to which item will be upgraded on <see cref="Scp914KnobSetting.Coarse"/> or <see cref="Scp914KnobSetting.Rough"/>. | ||
/// </summary> | ||
public ItemType PreviousAmmo | ||
{ | ||
get => Base._previousAmmo; | ||
set => Base._previousAmmo = value; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a new <see cref="ItemType"/> to which item will be upgraded on <see cref="Scp914KnobSetting.Fine"/>. | ||
/// </summary> | ||
public ItemType OneToOneAmmo | ||
{ | ||
get => Base._oneToOne; | ||
set => Base._oneToOne = value; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a new <see cref="ItemType"/> to which item will be upgraded on <see cref="Scp914KnobSetting.Fine"/> or <see cref="Scp914KnobSetting.VeryFine"/>. | ||
/// </summary> | ||
public ItemType NextAmmo | ||
{ | ||
get => Base._nextAmmo; | ||
set => Base._nextAmmo = value; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public override ItemType GetRandomOutput(Scp914KnobSetting knobSetting, ItemType previousItem) => knobSetting switch | ||
{ | ||
Scp914KnobSetting.Rough or Scp914KnobSetting.Coarse => PreviousAmmo, | ||
Scp914KnobSetting.OneToOne => OneToOneAmmo, | ||
_ => NextAmmo | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="FirearmProcessor.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.API.Features.Scp914Processors | ||
{ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
using Exiled.API.Extensions; | ||
using Exiled.API.Interfaces; | ||
using global::Scp914; | ||
using global::Scp914.Processors; | ||
|
||
/// <summary> | ||
/// A processor for <see cref="ItemCategory.Firearm"/>. | ||
/// </summary> | ||
public class FirearmProcessor : Scp914Processor, IWrapper<FirearmItemProcessor> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="FirearmProcessor"/> class. | ||
/// </summary> | ||
/// <param name="scp914ItemProcessor">The <see cref="FirearmItemProcessor"/> instance.</param> | ||
public FirearmProcessor(FirearmItemProcessor scp914ItemProcessor) | ||
: base(scp914ItemProcessor) | ||
{ | ||
Base = scp914ItemProcessor; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public new FirearmItemProcessor Base { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether or not magazine should be refilled. | ||
/// </summary> | ||
public bool RefillAmmo | ||
{ | ||
get => Base._refillAmmo; | ||
set => Base._refillAmmo = value; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a list of items that replace upgrading item when <see cref="Scp914KnobSetting"/> is <see cref="Scp914KnobSetting.Rough"/>. | ||
/// </summary> | ||
public IEnumerable<FirearmItemProcessor.FirearmOutput> RoughOutputs | ||
{ | ||
get => Base._roughOutputs; | ||
set => Base._roughOutputs = value.ToArray(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a list of items that replace upgrading item when <see cref="Scp914KnobSetting"/> is <see cref="Scp914KnobSetting.Coarse"/>. | ||
/// </summary> | ||
public IEnumerable<FirearmItemProcessor.FirearmOutput> CoarseOutputs | ||
{ | ||
get => Base._coarseOutputs; | ||
set => Base._coarseOutputs = value.ToArray(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a list of items that replace upgrading item when <see cref="Scp914KnobSetting"/> is <see cref="Scp914KnobSetting.OneToOne"/>. | ||
/// </summary> | ||
public IEnumerable<FirearmItemProcessor.FirearmOutput> OneToOneOutputs | ||
{ | ||
get => Base._oneToOneOutputs; | ||
set => Base._oneToOneOutputs = value.ToArray(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a list of items that replace upgrading item when <see cref="Scp914KnobSetting"/> is <see cref="Scp914KnobSetting.Fine"/>. | ||
/// </summary> | ||
public IEnumerable<FirearmItemProcessor.FirearmOutput> FineOutputs | ||
{ | ||
get => Base._fineOutputs; | ||
set => Base._fineOutputs = value.ToArray(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a list of items that replace upgrading item when <see cref="Scp914KnobSetting"/> is <see cref="Scp914KnobSetting.VeryFine"/>. | ||
/// </summary> | ||
public IEnumerable<FirearmItemProcessor.FirearmOutput> VeryFineOutputs | ||
{ | ||
get => Base._veryFineOutputs; | ||
set => Base._veryFineOutputs = value.ToArray(); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public override ItemType GetRandomOutput(Scp914KnobSetting knobSetting, ItemType previousItem) => Base.GetItems(knobSetting, previousItem).Random(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="MicroHidProcessor.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.API.Features.Scp914Processors | ||
{ | ||
using Exiled.API.Interfaces; | ||
using global::Scp914; | ||
using global::Scp914.Processors; | ||
|
||
/// <summary> | ||
/// A processor for <see cref="ItemType.MicroHID"/>. | ||
/// </summary> | ||
public class MicroHidProcessor : Scp914Processor, IWrapper<MicroHidItemProcessor> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="MicroHidProcessor"/> class. | ||
/// </summary> | ||
/// <param name="scp914ItemProcessor">The <see cref="MicroHidItemProcessor"/> instance.</param> | ||
public MicroHidProcessor(MicroHidItemProcessor scp914ItemProcessor) | ||
: base(scp914ItemProcessor) | ||
{ | ||
Base = scp914ItemProcessor; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public new MicroHidItemProcessor Base { get; } | ||
|
||
/// <inheritdoc/> | ||
public override ItemType GetRandomOutput(Scp914KnobSetting knobSetting, ItemType previousItem) => Base.GetOutput(knobSetting); | ||
} | ||
} |
Oops, something went wrong.