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

Merge dev to master #2416

Merged
merged 168 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
69f365d
Fix CI
NaoUnderscore Sep 10, 2023
ccff5a9
Added PrimitiveSettings + 3 overloads to Primitive::Create method
SmusiJarviss Sep 11, 2023
7fc50c1
Light::Create overload + Signature fix
SmusiJarviss Sep 12, 2023
3cc586f
Ops
SmusiJarviss Sep 12, 2023
b71e209
Make `Server.RunCommand` return response (#2105)
ITeMbI4 Sep 14, 2023
20a4378
Merge branch 'dev' into dev
Thundermaker300 Sep 14, 2023
c21c39c
Update Exiled.API/Features/Toys/Light.cs
NaoUnderscore Sep 15, 2023
493318b
Update Exiled.API/Features/Toys/Primitive.cs
NaoUnderscore Sep 15, 2023
3d67e02
Update Primitive.cs
NaoUnderscore Sep 15, 2023
e8c773f
Added PrimitiveSettings + 3 overloads to Primitive::Create method (#2…
NaoUnderscore Sep 15, 2023
53856c7
Changes for Shooting and Shot events (#2101)
IkaOverride Sep 15, 2023
29459b0
Fix Nao Skill Issue (#2112)
louis1706 Sep 16, 2023
34a6b73
AnimationCurve (#2098)
louis1706 Sep 16, 2023
de37999
Fix dumb door (#2111)
louis1706 Sep 17, 2023
17035c4
SpawningTeamVehicle event addition (#2108)
warden161 Sep 19, 2023
1e53357
Ability use hint changes (#2113)
joker-119 Sep 23, 2023
3a65ada
Exiled Component System Overhaul, DynamicEvents & StateMachine APIs, …
NaoUnderscore Sep 26, 2023
b11da3a
Fix Error GetBefore() (#2121)
louis1706 Sep 30, 2023
d7870fa
Fix MessageTranslated (#2122)
BoltonDev Oct 1, 2023
4152228
Keep dev branch up to date (#2125)
louis1706 Oct 1, 2023
2eb0cbd
Add ChangeLightsColor and ResetLightsColor (#2126)
ClaudioPanConQueso Oct 3, 2023
4f73227
Fix for player being null (skipping this null check causes Npc.Destro…
joker-119 Oct 3, 2023
1f79daf
Someone didn't know how unity works. (#2132)
joker-119 Oct 5, 2023
2f1ddc0
Small change to CustomRole.KeepInventoryOnSpawn (#2130)
joker-119 Oct 7, 2023
75b0def
Add RotationTime, DoorOpenTime, DoorCloseTime and MoveTime to Lift.cs…
IkaOverride Oct 7, 2023
b4f00dd
Fixed crashing issue caused by changing appearance of a disconnected …
TtroubleTT Oct 10, 2023
12c3ae2
Fix SetAmmo(AmmoType.None) crash (#2138)
louis1706 Oct 10, 2023
13d0e4f
EventList (#2137)
louis1706 Oct 10, 2023
c7a48fd
FixPickupPreviousOwner (#2141)
louis1706 Oct 13, 2023
2b74d82
Deprecated the setter of ItemsToDrop (#2144)
louis1706 Oct 13, 2023
b378194
EndRoundTranspiler (#2120)
louis1706 Oct 19, 2023
7028a8b
SCPSL-experimental Update (#2152)
louis1706 Oct 19, 2023
1ba25f5
StaminaUsage Patch now use Postfix instead of Transpiler & KickingEve…
louis1706 Oct 19, 2023
68e2be3
Respawn::TimeUntilNextPhase (#2150)
louis1706 Oct 19, 2023
02c191e
Update dependencies URL
Thundermaker300 Oct 19, 2023
b4bbdbb
Unnecessary set accessor
Thundermaker300 Oct 19, 2023
c935e5f
Update dep link
Thundermaker300 Oct 19, 2023
7e3da46
Fix UserId (#2158)
louis1706 Oct 19, 2023
1407b75
Fix IL ERROR (#2166)
louis1706 Oct 24, 2023
a214f57
Fix round end transpiler (#2167)
louis1706 Oct 24, 2023
58007bc
Fix UsedItem event not being called (#2163)
louis1706 Oct 24, 2023
43df072
Fix `Scp0492.ConsumingCorpse` event was called with `Scp049` (#2142)
IRacle1 Oct 24, 2023
5fc51ec
Fix SpawingEventArgs::HorizontalRotation (#2162)
louis1706 Oct 24, 2023
b4d5321
Fix Crash null string (#2161)
louis1706 Oct 24, 2023
3178bac
Add Whitelist && update ReservedSlot extensions (#2160)
ITeMbI4 Oct 24, 2023
42e3092
SendingAdminChatMessageEvent (#2159)
louis1706 Oct 24, 2023
3c3a9fa
Fix ClearInventory (#2140)
louis1706 Oct 24, 2023
472df3c
We are not going to miss this (Remove Old Exiled.Updater) (#2151)
louis1706 Oct 24, 2023
d863543
ModifyToken (#2148)
louis1706 Oct 24, 2023
2025c70
Some Scp914 QoL additions (#2149)
louis1706 Oct 24, 2023
26f0ef9
Update dev.yml workflow (#2170)
NaoUnderscore Oct 24, 2023
2f0ddeb
Update main.yml (#2169)
NaoUnderscore Oct 24, 2023
e6cb09b
GetAmmoLimitFix (#2157)
louis1706 Oct 24, 2023
4943ba1
Add Player.AdminChatAccess
Thundermaker300 Oct 24, 2023
c3b2bdc
Revert "Fix UsedItem event not being called (#2163)" (#2173)
louis1706 Oct 25, 2023
0323906
`Scp173::BlinkingRequest` event (#2077)
IRacle1 Oct 25, 2023
93a790d
NullCheck (#2175)
louis1706 Oct 27, 2023
47eb758
SCP:SL 13.3 (#2178)
louis1706 Oct 28, 2023
a3afed0
ChaosTargetCounter (#2179)
Misfiy Oct 28, 2023
39b83d2
merge Master To Dev (#2203)
louis1706 Nov 2, 2023
25c15be
Update RoundEnd.cs (#2193)
Misaka-ZeroTwo Nov 5, 2023
43c7aba
Fix Rpc and WriterExtensions dict (#2198)
sanyae2439 Nov 5, 2023
723afa1
Intercom.DisplayText fix (#2209)
FUTURE-SL Nov 5, 2023
5e06962
Update CommentsObjectGraphVisitor.cs (#2210)
LolaLollipop Nov 6, 2023
db1d633
EnableEffect should have intensity argument (#2134)
louis1706 Nov 6, 2023
aaf5fad
Add two item props: IsLightEmitter, IsDisarmer
Thundermaker300 Nov 6, 2023
5ae865c
DecontaminationFeatures (#2145)
louis1706 Nov 6, 2023
9d85095
Add Warhead.Kills
Thundermaker300 Nov 7, 2023
ed82713
same to dev (#2206)
IRacle1 Nov 8, 2023
9d8ff5a
Stupid manual bool fix (#2211)
NotIntense Nov 8, 2023
6c3d9f8
all candies (#2214)
VALERA771 Nov 9, 2023
bb30e52
Add Broadcast.Show check to CustomItems (#2212)
FUTURE-SL Nov 9, 2023
f30f966
Rework EffectType (#2190)
louis1706 Nov 10, 2023
cc6b9c9
Update dev.yml (#2227)
Misaka-ZeroTwo Nov 11, 2023
99662cb
Updating EXILED to 13.3.1 (#2223)
Misaka-ZeroTwo Nov 11, 2023
8eb66b4
Item fix (#2228)
VALERA771 Nov 11, 2023
5ecab1c
Fix doc version (#2230)
louis1706 Nov 11, 2023
269a63c
Simplification
Thundermaker300 Nov 12, 2023
1cac8bb
Patch fix (#2229)
VALERA771 Nov 12, 2023
42d9aed
Update ChangingGroup.cs (#2232)
Misaka-ZeroTwo Nov 12, 2023
69089c4
Fix transpiler (#2234)
Misaka-ZeroTwo Nov 12, 2023
c10d8cd
Fix CancelledItemUse::Item always being null (#2174)
louis1706 Nov 12, 2023
d32e7e9
Is it a flashlight? (#2225)
VALERA771 Nov 12, 2023
df21098
New Hurt Event (#2176)
louis1706 Nov 12, 2023
9524285
Reworking Scp079Transpiller (#2017)
louis1706 Nov 12, 2023
21a1e82
Scp106ReworkTranspiller (#1984)
louis1706 Nov 12, 2023
6ae3d48
Rework Scp049 Event (#1978)
louis1706 Nov 12, 2023
4bedf78
Send staff message (#2172)
louis1706 Nov 12, 2023
68ad04a
Scp079Role method fix (#1983)
louis1706 Nov 12, 2023
60d186d
Fix Bug than Grenade do not make damage correctly (#2119)
louis1706 Nov 13, 2023
ecfa3d5
Fix Various Transpiler and Update StatModule (#2171)
louis1706 Nov 13, 2023
5ec988d
Big PickupAPI changes (Breaking) (#2147)
IRacle1 Nov 13, 2023
d1e71ea
Updated a LOT of summaries. (#2231)
SnivyFilms Nov 13, 2023
37d064d
stylecop some women
Thundermaker300 Nov 13, 2023
dfc7648
oh good heavens
Thundermaker300 Nov 13, 2023
ef803b0
New effects (#2224)
VALERA771 Nov 13, 2023
f35fdf9
stop complaining
Thundermaker300 Nov 13, 2023
ff41d64
the skeleton lives on (#2233)
Thundermaker300 Nov 13, 2023
fc98c88
Fixed Event StartingRecallEventArgs's IsAllowed issue. (#2235)
XKaguya Nov 13, 2023
abb2a61
Fix Ctor (#2240)
louis1706 Nov 13, 2023
b62bf0c
Lazy fix (#2146)
louis1706 Nov 14, 2023
a0be83e
More Fix (#2244)
louis1706 Nov 14, 2023
868021b
Version bump to 8.4.0
Misaka-ZeroTwo Nov 14, 2023
769a99b
Merge branch 'master' into dev
Misaka-ZeroTwo Nov 14, 2023
26612a5
FastFix (#2251)
louis1706 Nov 14, 2023
2b68bd5
Merge branch 'master' into dev
Misaka-ZeroTwo Nov 14, 2023
c47c737
Merge branch 'master' into dev
Misaka-ZeroTwo Nov 14, 2023
bafc2f4
Update push_nuget.yml
Misaka-ZeroTwo Nov 14, 2023
69bee35
FixInfiniteSprint (#2255)
louis1706 Nov 14, 2023
8350aad
Version bump to 8.4.1
Misaka-ZeroTwo Nov 14, 2023
d757764
Workflow (#2258)
Misaka-ZeroTwo Nov 15, 2023
fe3cf8e
Revert "Workflow (#2258)"
Misaka-ZeroTwo Nov 15, 2023
9ad9f76
Change default value of flashbang affect thrower
BoltonDev Nov 14, 2023
18f5b02
Better workflow (#2259)
Misaka-ZeroTwo Nov 15, 2023
a210fd6
fix (#2262)
IRacle1 Nov 15, 2023
e593739
Improved Stamina API (#2237)
FUTURE-SL Nov 16, 2023
f3429a4
Update DestroyingEventArgs.cs (#2272)
Artyomus1337 Nov 17, 2023
36bab4b
FixRoundEnd (#2278)
louis1706 Nov 19, 2023
0a782ed
Remove Breaking Change from #2237 (#2283)
louis1706 Nov 19, 2023
cdc5e51
MaxAmmo Setter && NightVision should also be true when NightVision (#…
louis1706 Nov 19, 2023
d17e1d4
Ending round event fix (#2280)
Misaka-ZeroTwo Nov 20, 2023
d65e9d8
CanScp049SenseTutorial Fix bool logic (#2275)
louis1706 Nov 20, 2023
e6c5b74
Version bump to 8.4.2
Misaka-ZeroTwo Nov 20, 2023
abdfc56
Merge branch 'master' into dev
louis1706 Nov 20, 2023
dd22917
Fix TogglingFlashlightEventArgs Cast (#2295)
louis1706 Nov 24, 2023
2ca1c11
Fix Player.Get(ServerHostPlayer) (#1863)
louis1706 Nov 29, 2023
84e0bd8
Added ItemRemoved Event (#2263)
louis1706 Nov 29, 2023
0c7a9cb
who wrote this? (#2298)
Artyomus1337 Nov 29, 2023
0e5842e
Fix MaxAmmo and CustomItem Weapon (#2302)
louis1706 Nov 29, 2023
6dd643c
Update EXILED.props
Misaka-ZeroTwo Nov 29, 2023
0953d7c
Update EXILED.props
Misaka-ZeroTwo Nov 29, 2023
96eb33b
SpawningTeamVehicle Transpiler (#2265)
BoltonDev Nov 29, 2023
caaa732
Spawning transpiler (#2241)
VALERA771 Nov 29, 2023
f010ec9
Add to DropItem(Item item, bool isThrown) (#2268)
Rysik5318 Nov 29, 2023
b9d596b
Bump to 8.4.3-rc.2
Misaka-ZeroTwo Nov 30, 2023
27bf7b5
Merge branch 'master' into dev
Misaka-ZeroTwo Nov 30, 2023
1f68aca
Revert "Spawning transpiler (#2241)" (#2306)
Misaka-ZeroTwo Nov 30, 2023
7199079
EffectType.None + More TryGet method for EffectType extension (#2292)
louis1706 Dec 3, 2023
911b000
Rework and Fix Shooting Transpiler (#2309)
louis1706 Dec 5, 2023
3573f9e
is that a new ev of 87? (#2308)
VALERA771 Dec 5, 2023
f9227fd
Inroducing... "Async" events (#2303)
VALERA771 Dec 5, 2023
d6e0921
ValidatingVisibility Event (#2299)
Misfiy Dec 5, 2023
304d8da
Patch Rework DoorList (#2270)
louis1706 Dec 5, 2023
b0058ea
Add voicelines SCP-3114 (#2269)
Rysik5318 Dec 5, 2023
9e5f533
Add ```ChangeItemOwner``` (#2249)
XKaguya Dec 5, 2023
879a1f5
Fixing up spelling errors and XML formatting. (#2317)
NaoUnderscore Dec 6, 2023
048dc8b
rawr (#2322)
VALERA771 Dec 11, 2023
87f5418
Fixed Room.Blackout not turning off lights (#2319)
Mikihero Dec 11, 2023
e3fbc1f
Some Scp914 changes (#2290)
VALERA771 Dec 11, 2023
afe6c29
Documentation about async events (#2332)
VALERA771 Dec 16, 2023
91093d6
Scp244MoreAPI (#2323)
louis1706 Dec 16, 2023
2804cf7
Fix UsingBreakneckSpeeds not being call (#2318)
louis1706 Dec 16, 2023
a3bfd4c
Round.IgnoredPlayers fix (#2307)
louis1706 Dec 16, 2023
c04ebdf
SelectingRespawnTeamEventArgs (#2315)
louis1706 Dec 16, 2023
f24335b
Landing Fix + few doc change (#2314)
louis1706 Dec 16, 2023
f179203
Update Documentation (#2336)
louis1706 Dec 17, 2023
a8f7cea
Scp3114 Transpiler (#2266)
BoltonDev Dec 18, 2023
56d014c
Fix Transmitting event (#2273)
BoltonDev Dec 18, 2023
ffb53db
Scp173BeingLooked Transpiler (#2276)
BoltonDev Dec 18, 2023
e7c3a3e
Scp3114AttackAhpFix (#2320)
louis1706 Dec 18, 2023
03e2a54
Adding event TogglingRadio(Player, RadioItem, bool, bool) (#2329)
Rysik5318 Dec 18, 2023
e9ada34
Fix Gate IsFullyOpen and IsFullyClosed (#2337)
louis1706 Dec 18, 2023
c6945d8
Update Player.cs (#2347)
VALERA771 Dec 23, 2023
bc32117
Update for PostXMAS (#2383)
louis1706 Jan 13, 2024
43a10a0
8.7.0
louis1706 Jan 13, 2024
de43664
8.7.1
louis1706 Jan 31, 2024
ee0c0ca
Merge branch 'master' into dev
NaoUnderscore Jan 31, 2024
f15f6fe
Fix build errors
NaoUnderscore Jan 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
567 changes: 5 additions & 562 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion EXILED.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<PropertyGroup>
<!-- This is the global version and is used for all projects that don't have a version -->
<Version Condition="$(Version) == ''">8.4.3</Version>
<Version Condition="$(Version) == ''">8.7.1</Version>
<!-- Enables public beta warning via the PUBLIC_BETA constant -->
<PublicBeta>false</PublicBeta>

Expand Down
8 changes: 7 additions & 1 deletion Exiled.API/Enums/EffectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ namespace Exiled.API.Enums
/// <summary>
/// Status effects as enum.
/// </summary>
/// <seealso cref="EffectTypeExtension.Type(EffectType)"/>
/// <seealso cref="EffectTypeExtension.TryGetEffectType(CustomPlayerEffects.StatusEffectBase, out EffectType)"/>
/// <seealso cref="EffectTypeExtension.TryGetType(EffectType, out Type)"/>
public enum EffectType
{
/// <summary>
/// This EffectType do not exist it's only use when not found or error.
/// </summary>
None = -1, // TODO: remove = -1

/// <summary>
/// The player isn't able to open their inventory or reload a weapon.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Exiled.API/Enums/Side.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum Side
/// <summary>
/// SCP team. Same as <see cref="Team.SCPs"/>.
/// Contains all SCP-related roles: <see cref="RoleTypeId.Scp049"/>, <see cref="RoleTypeId.Scp0492"/>, <see cref="RoleTypeId.Scp079"/>, <see cref="RoleTypeId.Scp096"/>,
/// <see cref="RoleTypeId.Scp106"/>, <see cref="RoleTypeId.Scp173"/>, and <see cref="RoleTypeId.Scp939"/>.
/// <see cref="RoleTypeId.Scp106"/>, <see cref="RoleTypeId.Scp173"/>, <see cref="RoleTypeId.Scp939"/>, and <see cref="RoleTypeId.Scp3114"/>.
/// </summary>
Scp,

Expand Down
4 changes: 2 additions & 2 deletions Exiled.API/Extensions/CommonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static class CommonExtensions
/// <returns>The new modfied curve.</returns>
public static AnimationCurve Multiply(this AnimationCurve curve, float amount)
{
for (var i = 0; i < curve.length; i++)
for (int i = 0; i < curve.length; i++)
curve.keys[i].value *= amount;

return curve;
Expand All @@ -56,7 +56,7 @@ public static AnimationCurve Multiply(this AnimationCurve curve, float amount)
/// <returns>The new modfied curve.</returns>
public static AnimationCurve Add(this AnimationCurve curve, float amount)
{
for (var i = 0; i < curve.length; i++)
for (int i = 0; i < curve.length; i++)
curve.keys[i].value += amount;

return curve;
Expand Down
32 changes: 29 additions & 3 deletions Exiled.API/Extensions/EffectTypeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ public static class EffectTypeExtension
public static Type Type(this EffectType effect)
=> EffectTypeToType.TryGetValue(effect, out Type type) ? type : throw new InvalidOperationException("Invalid effect enum provided");

/// <summary>
/// Gets an instance of <see cref="System.Type"/> points to an effect.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/> enum.</param>
/// <param name="type">The type found with the corresponding EffecType.</param>
/// <returns>Whether or not the effectType has been found.</returns>
public static bool TryGetType(this EffectType effect, out Type type)
=> EffectTypeToType.TryGetValue(effect, out type);

/// <summary>
/// Gets the <see cref="EffectType"/> of the specified <see cref="StatusEffectBase"/>.
/// </summary>
Expand All @@ -93,6 +102,23 @@ public static Type Type(this EffectType effect)
public static EffectType GetEffectType(this StatusEffectBase statusEffectBase)
=> TypeToEffectType.TryGetValue(statusEffectBase.GetType(), out EffectType effect) ? effect : throw new InvalidOperationException("Invalid effect status base provided");

/// <summary>
/// Gets the <see cref="EffectType"/> of the specified <see cref="StatusEffectBase"/>.
/// </summary>
/// <param name="statusEffectBase">The <see cref="StatusEffectBase"/> enum.</param>
/// <param name="effect">The effect found.</param>
/// <returns>Whether or not the effect has been found.</returns>
public static bool TryGetEffectType(this StatusEffectBase statusEffectBase, out EffectType effect)
{
if (statusEffectBase == null || !TypeToEffectType.TryGetValue(statusEffectBase.GetType(), out effect))
{
effect = EffectType.None;
return false;
}

return true;
}

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> drains health over time.
/// </summary>
Expand All @@ -109,7 +135,7 @@ or EffectType.Corroding or EffectType.Decontaminating or EffectType.Hemorrhage o
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect heals.</returns>
/// <seealso cref="IsHarmful(EffectType)"/>
public static bool IsHealing(this EffectType effect) => typeof(IHealablePlayerEffect).IsAssignableFrom(effect.Type());
public static bool IsHealing(this EffectType effect) => effect.TryGetType(out Type type) && typeof(IHealablePlayerEffect).IsAssignableFrom(type);

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> is a negative effect.
Expand Down Expand Up @@ -137,14 +163,14 @@ or EffectType.Invigorated or EffectType.Invisible or EffectType.MovementBoost or
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect modifies the player's movement speed.</returns>
public static bool IsMovement(this EffectType effect) => typeof(IMovementSpeedModifier).IsAssignableFrom(effect.Type());
public static bool IsMovement(this EffectType effect) => effect.TryGetType(out Type type) && typeof(IMovementSpeedModifier).IsAssignableFrom(type);

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> is displayed to spectators as text.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect is displayed to spectators as text.</returns>
public static bool IsDisplayed(this EffectType effect) => typeof(ISpectatorDataPlayerEffect).IsAssignableFrom(effect.Type());
public static bool IsDisplayed(this EffectType effect) => effect.TryGetType(out Type type) && typeof(ISpectatorDataPlayerEffect).IsAssignableFrom(type);

/// <summary>
/// Returns the <see cref="EffectCategory"/> of the given <paramref name="effect"/>.
Expand Down
9 changes: 8 additions & 1 deletion Exiled.API/Extensions/ItemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Exiled.API.Extensions
using InventorySystem;
using InventorySystem.Items;
using InventorySystem.Items.Firearms.Attachments;

using InventorySystem.Items.Pickups;
using Structs;

/// <summary>
Expand Down Expand Up @@ -96,6 +96,13 @@ public static ItemBase GetItemBase(this ItemType type)
return itemBase;
}

/// <summary>
/// Given an <see cref="ItemType"/>, returns the matching <see cref="ItemPickupBase"/>.
/// </summary>
/// <param name="type">The <see cref="ItemType"/>.</param>
/// <returns>The <see cref="ItemPickupBase"/>, or <see langword="null"/> if not found.</returns>
public static ItemPickupBase GetPickupBase(this ItemType type) => GetItemBase(type)?.PickupDropModel;

/// <summary>
/// Given an <see cref="ItemType"/>, returns the matching <see cref="ItemBase"/>, casted to <typeparamref name="T"/>.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Exiled.API/Extensions/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public static void InvokeStaticMethod(this Type type, string methodName, object[
/// <param name="param">The event arguments.</param>
public static void InvokeStaticEvent(this Type type, string eventName, object[] param)
{
var eventDelegate = (MulticastDelegate)type.GetField(eventName, AccessTools.all).GetValue(null);
MulticastDelegate eventDelegate = (MulticastDelegate)type.GetField(eventName, AccessTools.all).GetValue(null);
if (eventDelegate != null)
{
foreach (var handler in eventDelegate.GetInvocationList())
foreach (Delegate handler in eventDelegate.GetInvocationList())
{
handler.Method.Invoke(handler.Target, param);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public override void ProcessDamage(Player player)

if ((player != Attacker) && !ForceFullFriendlyFire)
{
if (HitboxIdentity.CheckFriendlyFire(AttackerFootprint.Role, player.Role, true))
if (HitboxIdentity.IsEnemy(AttackerFootprint.Role, player.Role))
return;

Damage *= PlayerStatsSystem.AttackerDamageHandler._ffMultiplier;
Expand Down
6 changes: 3 additions & 3 deletions Exiled.API/Features/Doors/CheckpointDoor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public float Health
{
float health = value / Subdoors.Count;

foreach (var door in Subdoors)
foreach (BreakableDoor door in Subdoors)
{
door.Health = health;
}
Expand All @@ -108,7 +108,7 @@ public float MaxHealth
{
float health = value / Subdoors.Count;

foreach (var door in Subdoors)
foreach (BreakableDoor door in Subdoors)
{
door.MaxHealth = health;
}
Expand All @@ -121,7 +121,7 @@ public DoorDamageType IgnoredDamage
get => Subdoors.Aggregate(DoorDamageType.None, (current, door) => current | door.IgnoredDamage);
set
{
foreach (var door in Subdoors)
foreach (BreakableDoor door in Subdoors)
{
door.IgnoredDamage = value;
}
Expand Down
6 changes: 3 additions & 3 deletions Exiled.API/Features/Doors/Gate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ public Gate(PryableDoor door, List<Room> room)
/// <summary>
/// Gets a value indicating whether or not the door is fully closed.
/// </summary>
public override bool IsFullyClosed => base.IsFullyClosed && RemainingPryCooldown > 0;
public override bool IsFullyClosed => base.IsFullyClosed && RemainingPryCooldown <= 0;

/// <summary>
/// Gets a value indicating whether the door is fully open.
/// </summary>
public override bool IsFullyOpen => base.IsFullyOpen && RemainingPryCooldown <= 0;
public override bool IsFullyOpen => base.IsFullyOpen;

/// <summary>
/// Gets a value indicating whether or not the door is currently moving.
/// </summary>
public override bool IsMoving => base.IsMoving && RemainingPryCooldown > 0;
public override bool IsMoving => base.IsMoving || RemainingPryCooldown > 0;

/// <summary>
/// Gets or sets remaining cooldown for prying.
Expand Down
4 changes: 3 additions & 1 deletion Exiled.API/Features/Effect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public Effect()
/// <param name="statusEffectBase">Get all the information of the effect>.</param>
public Effect(StatusEffectBase statusEffectBase)
{
Type = statusEffectBase.GetEffectType();
if (!statusEffectBase.TryGetEffectType(out EffectType effect))
Log.Error($"EffectType not found please report to Exiled BugReport : {statusEffectBase}");
Type = effect;
Duration = statusEffectBase.Duration;
Intensity = statusEffectBase.Intensity;
IsEnabled = statusEffectBase.IsEnabled;
Expand Down
2 changes: 1 addition & 1 deletion Exiled.API/Features/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public bool IsActivating
public bool IsOpen
{
get => Base.HasFlag(Base.Network_flags, Scp079Generator.GeneratorFlags.Open);
set => Base.ServerSetFlag(Scp079Generator.GeneratorFlags.Unlocked, value);
set => Base.ServerSetFlag(Scp079Generator.GeneratorFlags.Open, value);
}

/// <summary>
Expand Down
13 changes: 13 additions & 0 deletions Exiled.API/Features/Items/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,19 @@ public virtual Pickup CreatePickup(Vector3 position, Quaternion rotation = defau
/// <returns>A string containing Item-related data.</returns>
public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* ={Owner}=";

/// <summary>
/// Changes the owner of the <see cref="Item"/>.
/// </summary>
/// <param name="oldOwner">Old <see cref="Item"/> owner.</param>
/// <param name="newOwner">New <see cref="Item"/> owner.</param>
public void ChangeItemOwner(Player oldOwner, Player newOwner)
{
if (oldOwner != null && newOwner != null)
{
ChangeOwner(oldOwner, newOwner);
}
}

/// <summary>
/// Change the owner of the <see cref="Item"/>.
/// </summary>
Expand Down
36 changes: 36 additions & 0 deletions Exiled.API/Features/Items/Scp244.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.API.Features.Items
{
using Exiled.API.Extensions;
using Exiled.API.Features.Pickups;
using Exiled.API.Interfaces;

Expand All @@ -29,6 +30,10 @@ public Scp244(Scp244Item itemBase)
: base(itemBase)
{
Base = itemBase;
Scp244DeployablePickup scp244Pickup = (Scp244DeployablePickup)Type.GetPickupBase();
Health = scp244Pickup._health;
ActivationDot = scp244Pickup._activationDot;
MaxDiameter = scp244Pickup.MaxDiameter;
}

/// <summary>
Expand All @@ -54,6 +59,22 @@ public bool Primed
set => Base._primed = value;
}

/// <summary>
/// Gets or sets the Scp244's remaining health.
/// </summary>
public float Health { get; set; }

/// <summary>
/// Gets or sets the activation angle, where 1 is the minimum and -1 is the maximum activation angle.
/// </summary>
public float ActivationDot { get; set; }

/// <summary>
/// Gets or sets the maximum diameter within which SCP-244's hypothermia effect is dealt.
/// </summary>
/// <remarks>This does not prevent visual effects.</remarks>
public float MaxDiameter { get; set; }

/// <summary>
/// Creates the <see cref="Pickup"/> that based on this <see cref="Item"/>.
/// </summary>
Expand Down Expand Up @@ -86,12 +107,27 @@ public override Pickup CreatePickup(Vector3 position, Quaternion rotation = defa
public override Item Clone() => new Scp244(Type)
{
Primed = Primed,
MaxDiameter = MaxDiameter,
Health = Health,
ActivationDot = ActivationDot,
};

/// <summary>
/// Returns the SCP-244 in a human readable format.
/// </summary>
/// <returns>A string containing SCP-244 related data.</returns>
public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* -{Primed}-";

/// <inheritdoc/>
internal override void ReadPickupInfo(Pickup pickup)
{
base.ReadPickupInfo(pickup);
if (pickup is Scp244Pickup scp244)
{
Health = scp244.Health;
ActivationDot = scp244.ActivationDot;
MaxDiameter = scp244.MaxDiameter;
}
}
}
}
4 changes: 2 additions & 2 deletions Exiled.API/Features/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ public static void Send(string message, Discord.LogLevel level, ConsoleColor col
/// Sends an <see cref="Error(object)"/> with the provided message if the condition is false and stops the execution.
/// <example> For example:
/// <code>
/// Player ply = Player.Get(2);
/// Log.Assert(ply is not null, "The player with the id 2 is null");
/// Player ply = Player.Get(2);
/// Log.Assert(ply is not null, "The player with the id 2 is null");
/// </code>
/// results in it logging an error if the player is null and not continuing.
/// </example>
Expand Down
25 changes: 24 additions & 1 deletion Exiled.API/Features/Pickups/Scp244Pickup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ namespace Exiled.API.Features.Pickups
using System;

using Exiled.API.Features.DamageHandlers;
using Exiled.API.Features.Items;
using Exiled.API.Interfaces;

using InventorySystem.Items;
using InventorySystem.Items.Usables.Scp244;

using UnityEngine;
Expand Down Expand Up @@ -75,6 +76,16 @@ public float CurrentSizePercent
set => Base.CurrentSizePercent = value;
}

/// <summary>
/// Gets or sets the maximum diameter within which SCP-244's hypothermia effect is dealt.
/// </summary>
/// <remarks>This does not prevent visual effects.</remarks>
public float MaxDiameter
{
get => Base.MaxDiameter;
set => Base.MaxDiameter = value;
}

/// <summary>
/// Gets or sets the Scp244's remaining health.
/// </summary>
Expand Down Expand Up @@ -124,5 +135,17 @@ public float ActivationDot
/// </summary>
/// <returns>A string containing Scp244Pickup related data.</returns>
public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Health}| -{State}- ={CurrentSizePercent}=";

/// <inheritdoc/>
internal override void ReadItemInfo(Item item)
{
base.ReadItemInfo(item);
if (item is Scp244 scp244)
{
ActivationDot = scp244.ActivationDot;
MaxDiameter = scp244.MaxDiameter;
Health = scp244.Health;
}
}
}
}
Loading
Loading