Skip to content

Commit

Permalink
halloween!!! (#141)
Browse files Browse the repository at this point in the history
* dev fetching (#113)

* 8.12 (#107)

* uwu (#5)

* AdminToy.List (#18)

* AdminToy.List

* Better AdminToy::Get()

* Update EXILED/Exiled.API/Features/Toys/AdminToy.cs

Co-authored-by: IRacle <[email protected]>

* TODO

* Fix Error

* Fix2

---------

Co-authored-by: IRacle <[email protected]>

* Fix `Jailbird::WearState` (#12)

* Jailbird

* Fix

* Exception

* Fix NW moment

* Porting EXILED9 RespawnedTeam event. by.VALERA771 (#27)

Exiled-Team/EXILED#2386

* Fix not returning null (#22)

* Fix not returning null

* Apply suggestions from code review

Co-authored-by: Jesus QC <[email protected]>

* Little modification

---------

Co-authored-by: Jesus QC <[email protected]>

* RecontainedEventArgs more feature (#20)

* RecontainedEventArgs more feature

* Fix Naming

* grammar

* Update RecontainedEventArgs.cs

---------

Co-authored-by: Misaka-ZeroTwo <[email protected]>

* InteractingScp330.cs: Reduction of bloat code from original design. (#30)

* Should reduce bloat code that was required years ago.

* Should reduce bloat code that was required years ago.

* Added back per Yamato's request

---------

Co-authored-by: Yamato <[email protected]>

* IScp330Event (#11)

Co-authored-by: Misaka-ZeroTwo <[email protected]>

* PR than i made (#9)

* PR made by me

Thanks Ika for the Help on CustomAmmo/CategoryLimit

Co-Authored-By: Ika <[email protected]>

* Build error

* Added support to SCPs for escaping-related events.

* spacing

* LocalReporting Exiled should be call before NWAPI

* Optimising / More documentation on SpawningItem

* ISpawnableScp

* Use of ComponentsEqualityComparer for Dictionary

---------

Co-authored-by: Ika <[email protected]>

* [Events] Fix null reference (#15)

* fix situation when `ply == null`

* lol why

---------

Co-authored-by: IRacle <[email protected]>

* Offline mode support (#19)

* Fix Offline-mode breaking everything

* Add `offline` authentication type and append `@offline` to UserIds during offline mode

* Add offline id support to Player.Get

* Comment transpilers

---------

Co-authored-by: Yamato <[email protected]>

* Fix NW bugs (#32)

* Fix Armor Drop

from https://git.scpslgame.com/northwood-qa/scpsl-bug-reporting/-/issues/230

* add comments

* fix scp173 and adding bug report link to summary class

fix https://git.scpslgame.com/northwood-qa/scpsl-bug-reporting/-/issues/143

* Moved patches and fixed Scp173FirstKillPatch

* Add Slowness Fix

Avoid values more than 100 for effect slowness to fix https://git.scpslgame.com/northwood-qa/scpsl-bug-reporting/-/issues/378

* skill issue

* skill issue (again=

---------

Co-authored-by: Yamato <[email protected]>

* Useless Event (939 Placed Amnestic Cloud) (#40)

* Fix custom role classes giving custom ammo when they are not suppose to (#24)

* Fix custom role classes giving custom ammmo when they are not suppose to

* change to using EnumUtils

* Moved Ammo additions into Inventory call delayed

* `Item::<T>Get()` and `Pickup::<T>Get()` (#17)

* `Item::::<T>Get()` and `Pickup::<T>Get()`

* Revert doc change

* Add `Hazard::Get<T>()`

* doc fix

* `Door::Get<T>()`

* AdminToy.Get<T>()

* More <T> implementation

* WeirdFix

* simplify Scp244Spawning patch and AddedComment & NO IL error

* Remove Log.info

* DroppingItem light modifiication

* Moving Item.Get inside the eventargs instead of transpiller

* FixNpcNoclip (#34)

* FixNpcNoclip

* oups

* .

* virtual / override

* Implements more patches for RemovingHandcuffs event and adding RemovedHandcuffs event (#3)

* Update labeler.yml

* RemovingHandcuffs event

* Update UncuffReason.cs

* New event

* docs

* Interacting scp330 compile fix (#43)

* My scp built with no issues.. no idea why.

* Fixes issue

* Harmony suppresses NON harmony errors.

---------

Co-authored-by: Yamato <[email protected]>

* Trello is no more & more NW Fix & Fix IL Code on dev (#28)

* Trello Is Replaced by gitlab

* also this one

* Fix106RegenerationWithScp244

* Report To NW

* .

* Scp3114FriendlyFireFix

* Fix

* yamatotototo

* Fix

* Fix for building dev + TODO than i just seen

* Fix Undid patch

* fIX

* Fix Client Crash Issue

---------

Co-authored-by: IRacle <[email protected]>

* Additions (#29)

* Add a bunch

* Fix

* Security

* Make changes

* remove unused usings

* Getting inventory

* oops

* Dev commit

* use exiled

---------

Co-authored-by: Yamato <[email protected]>

* `[EXILED::API]` Pickup::Category (#46)

* Item Category on Pickup

* Fixed Build Error

* Fix (#50)

* `[Exiled::API]` Removing breaking changes (#54)

Co-authored-by: Nameless <[email protected]>

* `Scp330` sound fix (#55)

Co-authored-by: Misaka-ZeroTwo <[email protected]>

* Fix Npc (#58)

* Fix breaking change (#61)

Fix a breaking change in #9

* Version bump

* 💀💀💀

* `SendStaffMessage` fix

* Added the SCP-079 Recontaining event (#21)

* added the RecontainingEvent with the patch

* Fixed constructors

* consistency

* fixed logic skill issue

* Removed "useless" constructor

* corrected the typo

* fixed some typo

* final edit for the final request

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: VALERA771 <[email protected]>

---------

Co-authored-by: Yamato <[email protected]>
Co-authored-by: VALERA771 <[email protected]>

* `[EXILED::API]` Adding SpawnMice (#47)

* Mouse Spawner

* Changes to make it public

* Optimization

* Finally can i spawn rats?

* Fix adding throw and changing the error that throws

---------

Co-authored-by: VALERA771 <[email protected]>

* `[EXILED::API]` Adding ScaleNetworkIdentityObject (#49)

* Revert "💀💀💀"

This reverts commit 904865e.

* `[EXILED::API]` Adding SendFakeSceneLoading (#45)

* Added ScenesType and Corrisponding Methods for the Server and Player

* Fixing Building Error

* Applied the Change request

* Changes requested by Yamato made

* Fixed Building Errors

* Fix build

---------

Co-authored-by: VALERA771 <[email protected]>

* scp018projectile (#73)

* 😱😎🙂💀😈 (#51)

* Разрабы дауны😱😎🙂💀😈

* new better `SendFakeSyncVar` method

* ililililililil

* c

* `KeycardPickup.Permissions` now is not joke (#70)

* `[Exiled::Events]` `Unbanning` and `Unbanned` events (#68)

* 🐱‍👤🐱‍👤🐱‍👤

* some fixes

* fix

* ☠️💀💀💀☠️💀

Co-authored-by: IRacle <[email protected]>

---------

Co-authored-by: IRacle <[email protected]>

* `[EXILED::API]` Adding StaminaRegenMultiplier (BodyArmor) (#71)

* First push

* using removed

* Added to the pickup

* Forgot to add to Armor (not pickup)

* Fix Build error

* Simplification

* `[EXILED::API]` Adding MoveNetworkIdentityObject (#48)

* MoveNetworkObject Added

* fix builds

* Fix Builds

---------

Co-authored-by: Yamato <[email protected]>

* `[EXILED::EVENTS]` Adding PlayingAudioLog 69 PR (#69) 

* Audio log event

* Mistakes

* Fix build errors

* Update EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs

Co-authored-by: Yamato <[email protected]>

* Update EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs

Co-authored-by: Yamato <[email protected]>

* Update EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs

Co-authored-by: Yamato <[email protected]>

* Update EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs

Co-authored-by: Yamato <[email protected]>

* Update EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs

Co-authored-by: Yamato <[email protected]>

* 🧠💭😔😞📉😭🤔➡️🧑‍⚕️💬💊📈😌

---------

Co-authored-by: Yamato <[email protected]>

* `RecontainedWhenNoScps` feature (#16)

* `[EXILED::EVENTS]` Fixing bug report n.396 (#59)

* Fix

* Added the Bug report

* feat: Added IsDecontaminationEnabled property (#82)

* Multiple change (UwU) (#79)

Add `Player::AddAmmo(Dictionary<ItemType, ushort> ammo)`
Add `Player::GrantLoadout()`
Add `Player::GrantLoadout(RoleTypeId)`
Add `GetEffect<T>()`
Add `Scp3114Role::UpdateIdentity()`
Fixed `Scp3114Role::DisguiseDuration` not being sync to client

* ``[Exiled::CustomRoles]`` ``[Exiled::CustomItems]`` QoL in List commands. (#78)

* Ye

* I dont need to use ``ci list registered`` only ``ci list``

* You now that ``customroles list abilities`` exist ?  no ?  yeah its because never say it the command

* Its the same for me

* Pi pi po po

* Im silly @louis1706 uwu

---------

Co-authored-by: Yamato <[email protected]>

* DroppingScp330 Event Fix. (#83)

* Probably fixes it.

* Sigh stylecop

---------

Co-authored-by: Yamato <[email protected]>

* ``[Exiled::CustomItems]`` ``[Exiled::API]`` ``[Exiled::CustomRoles]`` Adding news Spawnpoints, Wrapper for Locker and added LockerType (#77)

* QoL

* Added ``RoomSpawnPoint`` for spawning things in a room with a offset property.

* Now Items will be spawned in the MapGenerated event instead of RoundStart avoiding the micro-log for spawning to many pickups in one frame.

* YES YAMATO I USE NULLEABLE

* Shut

* Done

* Created a Wrapper for Locker

* Created LockerSpawnPoint

* I NEED HELP FOR IMPLEMENTING SUPPLYLOCKER I DONT FUCKING KNOW HOW MAKE A TRANSPILER

* I hate you Yamato :D

* Boop

* Why Exiled use MONO.POSIX

* And dont use the nuget for it 💀

* Now it will compile in the page

* Removing Else if (spawnPoint is RoleSpawnPoint roleSpawnPoint) since its not necessary spawnpoint.Position does the same.

* Supressing CS0618  due the obsolet in SpawnLocationType.InsideLocker.
   * Note: SpawnLocationType.InsideLocker its only used in CustomItem.SpawnAll() so it will be fine to deleted this in futures releases.

* Fixing compile action due the warnings

* Adding support for Offset

Almost forget about this :P

* Sorry

I cant resist adding more things

* Adding support for CustomRoles

* Implementing SupplyLocker

* I literally copy the generator transpiler

* Its works i test it.

* Give me my exiled contributor role.

* LockerType enum

* Code part of the code has been taken from MER (https://github.com/Michal78900/MapEditorReborn/blob/dev/MapEditorReborn/API/Extensions/LockerExtensions.cs) - Credits to Michal, i ask him i can use it, not answer yet but if the say no i will use another way.

* SupplyLocker now have a LockerType Property to know what type of Locker is

* LockerSpawnPoint can now chose what locker want to use

* Mimimi warnings

* Re-implementing Locker API

* Re-implementing locker api of Exiled-Team/EXILED#2026

* Update EXILED/Exiled.API/Enums/LockerType.cs

Co-authored-by: Nameless <[email protected]>

* I dont like the name of ExiledLockers but

* Resolving #77 (comment)

* Resolving #77 (comment)

* Cleaning Chambers List.

* Fixing CustomWeapon

* Fixing a Bug with custom items with spawning in old SpawnLocationType.InsideLocker

* Update Map.cs

Removing blank line.

* MORE

* Added GetRandomSpawnPoint() in Chamber

* Added AddItemToSpawn((ItemType itemType, int quantity = 1, bool spawnIfIsOpen = false)) in Chamber

* Added IsOpen in chamber.

* Fixing obsolet use

* Sorry @VALERA771

* Resolve #77 (review)

* Update Exiled.Loader.csproj

* Resolving #77 (comment)

* Update MapHandler.cs

Reduce the delay on spawning items, its not necessary to be to long

* Ups

Ups

---------

Co-authored-by: Nameless <[email protected]>

* `[Exiled::API]` Adding new properties for `FpcRole` (#65)

* 👉👈

* suggestions

* no more bc

---------

Co-authored-by: Vladislav Popovič <[email protected]>

* Update programs.yml

* Scp0492 change apperance fix (#87)

* 0492 appearance change fix.

* Yamato is correct, ZombieRole also inherits StandardRoleBase

* Stylecop, sigh

---------

Co-authored-by: Yamato <[email protected]>

* Add plugin website

* fix (#95)

* Replace with exiled wrapper class (#94)

* Fix Role NRE (#66)

* `[Exiled::API]` New way to register parent commands (#74)

* uwu

* optimising

* Allow `ID_Dedicated`/`null` for `Npc.UserId` Parameter (#75)

* Npc

* Fix Build Error

* Update EXILED/Exiled.API/Features/Npc.cs

Co-authored-by: Alex Rouse <[email protected]>

* Fix for the PR

* Fix Pr

* Fixing  a small issue if the player is choosing something not ID_DEDICATED

* Fix

* forgot

---------

Co-authored-by: Alex Rouse <[email protected]>

* Update Exiled.Loader.csproj (#80)

* It gives me anxiety to use something that can be a nuget.

Co-authored-by: Yamato <[email protected]>

* [Events] Fix crash (#96)

* fix

* oh, already made in #95

* Random fixes (#103)

* fixes

* also

* Adding Turning On All Lights (#105)

* `[EXILED::Events]` Introduce `hub install` command (#101)

* feat: introduce plugin installation command

* fix: fix build errors

wtf was this actually

* version bump

---------

Co-authored-by: VALERA771 <[email protected]>
Co-authored-by: Yamato <[email protected]>
Co-authored-by: IRacle <[email protected]>
Co-authored-by: 永安404 <[email protected]>
Co-authored-by: Misaka-ZeroTwo <[email protected]>
Co-authored-by: X <[email protected]>
Co-authored-by: Ika <[email protected]>
Co-authored-by: IRacle <[email protected]>
Co-authored-by: x3rt <[email protected]>
Co-authored-by: sky <[email protected]>
Co-authored-by: TtroubleTT <[email protected]>
Co-authored-by: Nameless <[email protected]>
Co-authored-by: ZeroTwo <[email protected]>
Co-authored-by: FoxWorn3365 <[email protected]>
Co-authored-by: DrBright <[email protected]>
Co-authored-by: SrLicht <[email protected]>
Co-authored-by: Vladislav Popovič <[email protected]>
Co-authored-by: Alex Rouse <[email protected]>
Co-authored-by: Joseph <[email protected]>
Co-authored-by: Panikorovskii Vladislav <[email protected]>

* Update README.md

* Update push_nuget.yml

* Update push_nuget.yml

---------

Co-authored-by: VALERA771 <[email protected]>
Co-authored-by: Yamato <[email protected]>
Co-authored-by: IRacle <[email protected]>
Co-authored-by: 永安404 <[email protected]>
Co-authored-by: Misaka-ZeroTwo <[email protected]>
Co-authored-by: X <[email protected]>
Co-authored-by: Ika <[email protected]>
Co-authored-by: IRacle <[email protected]>
Co-authored-by: x3rt <[email protected]>
Co-authored-by: sky <[email protected]>
Co-authored-by: TtroubleTT <[email protected]>
Co-authored-by: Nameless <[email protected]>
Co-authored-by: ZeroTwo <[email protected]>
Co-authored-by: FoxWorn3365 <[email protected]>
Co-authored-by: DrBright <[email protected]>
Co-authored-by: SrLicht <[email protected]>
Co-authored-by: Vladislav Popovič <[email protected]>
Co-authored-by: Alex Rouse <[email protected]>
Co-authored-by: Joseph <[email protected]>
Co-authored-by: Panikorovskii Vladislav <[email protected]>

* Fix version

* Fix keycard throw interaction

* Version bump

* `[EXILED::Events]` Fix downloading NWAPI plugins with `hub install` (#117)

* SL version bump

* SL version bump (#139)

* new effects

* docs

* Map.IsHubertSky

HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT HUBERT

* missing doc

* halloween!!!

* NotFinish

* Fix

* New DamageType

* SilentDamageHandler

* ShakeCamera

* MetalPipe and fix health bug

* changes

* docs + metal pipe

* some updates

* *metal pipe sounds*

* rename

* spawn chance for skeletron

---------

Co-authored-by: Yamato <[email protected]>
Co-authored-by: Jesus QC <[email protected]>
Co-authored-by: IRacle <[email protected]>
Co-authored-by: 永安404 <[email protected]>
Co-authored-by: Misaka-ZeroTwo <[email protected]>
Co-authored-by: X <[email protected]>
Co-authored-by: Ika <[email protected]>
Co-authored-by: IRacle <[email protected]>
Co-authored-by: x3rt <[email protected]>
Co-authored-by: sky <[email protected]>
Co-authored-by: TtroubleTT <[email protected]>
Co-authored-by: Nameless <[email protected]>
Co-authored-by: ZeroTwo <[email protected]>
Co-authored-by: FoxWorn3365 <[email protected]>
Co-authored-by: DrBright <[email protected]>
Co-authored-by: SrLicht <[email protected]>
Co-authored-by: Vladislav Popovič <[email protected]>
Co-authored-by: Alex Rouse <[email protected]>
Co-authored-by: Joseph <[email protected]>
Co-authored-by: Panikorovskii Vladislav <[email protected]>
Co-authored-by: louis1706 <[email protected]>
  • Loading branch information
1 parent 3bc97f8 commit 6a8dcf5
Show file tree
Hide file tree
Showing 16 changed files with 303 additions and 7 deletions.
16 changes: 16 additions & 0 deletions EXILED/Exiled.API/Enums/DamageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,21 @@ public enum DamageType
/// Damage caused by the marshmallow man.
/// </summary>
Marshmallow,

/// <summary>
/// Generic damage. No CASSIE message will be sent.
/// </summary>
Silent,

/// <summary>
/// Damage caused by Spicy Flame.
/// </summary>
/// <seealso cref="EffectType.Spicy"/>
SpicyFlame,

/// <summary>
/// Damage caused by Metal Pipe.
/// </summary>
MetalPipe,
}
}
6 changes: 5 additions & 1 deletion EXILED/Exiled.API/Enums/EffectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,13 @@ public enum EffectType
/// <summary>
/// Makes you a marshmallow guy.
/// </summary>
[Obsolete("Not functional in-game")]
Marshmallow,

/// <summary>
/// Makes you metal.
/// </summary>
Metal,

/// <summary>
/// The effect that is given to the player when getting attacked by SCP-3114's Strangle ability.
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions EXILED/Exiled.API/Enums/PrefabType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,11 @@ public enum PrefabType

[Prefab(3721192489, "Scp3114_Ragdoll")]
Scp3114Ragdoll,

[Prefab(1891631329, "PrismaticCloud")]
PrismaticCloud,

[Prefab(2157375951, "TantrumObj (Brown Candy)")]
TantrumBrownCandy
}
}
10 changes: 8 additions & 2 deletions EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class DamageTypeExtensions
{ DeathTranslations.Bleeding.Id, DamageType.Bleeding },
{ DeathTranslations.Crushed.Id, DamageType.Crushed },
{ DeathTranslations.Decontamination.Id, DamageType.Decontamination },
{ DeathTranslations.Explosion.Id, DamageType.Explosion },
{ DeathTranslations.Explosion.Id, DamageType.SpicyFlame },
{ DeathTranslations.Falldown.Id, DamageType.Falldown },
{ DeathTranslations.Poisoned.Id, DamageType.Poison },
{ DeathTranslations.Recontained.Id, DamageType.Recontainment },
Expand All @@ -49,6 +49,7 @@ public static class DamageTypeExtensions
{ DeathTranslations.MicroHID.Id, DamageType.MicroHid },
{ DeathTranslations.Hypothermia.Id, DamageType.Hypothermia },
{ DeathTranslations.MarshmallowMan.Id, DamageType.Marshmallow },
{ DeathTranslations.MetalPipe.Id, DamageType.MetalPipe },
};

private static readonly Dictionary<DeathTranslation, DamageType> TranslationConversionInternal = new()
Expand All @@ -57,7 +58,7 @@ public static class DamageTypeExtensions
{ DeathTranslations.Bleeding, DamageType.Bleeding },
{ DeathTranslations.Crushed, DamageType.Crushed },
{ DeathTranslations.Decontamination, DamageType.Decontamination },
{ DeathTranslations.Explosion, DamageType.Explosion },
{ DeathTranslations.Explosion, DamageType.SpicyFlame },
{ DeathTranslations.Falldown, DamageType.Falldown },
{ DeathTranslations.Poisoned, DamageType.Poison },
{ DeathTranslations.Recontained, DamageType.Recontainment },
Expand All @@ -80,6 +81,7 @@ public static class DamageTypeExtensions
{ DeathTranslations.MicroHID, DamageType.MicroHid },
{ DeathTranslations.Hypothermia, DamageType.Hypothermia },
{ DeathTranslations.MarshmallowMan, DamageType.Marshmallow },
{ DeathTranslations.MetalPipe, DamageType.MetalPipe },
};

private static readonly Dictionary<ItemType, DamageType> ItemConversionInternal = new()
Expand Down Expand Up @@ -162,6 +164,10 @@ public static DamageType GetDamageType(DamageHandlerBase damageHandlerBase)
{
switch (damageHandlerBase)
{
case SilentDamageHandler:
return DamageType.Silent;
case MetalPipeDamageHandler:
return DamageType.MetalPipe;
case CustomReasonDamageHandler:
return DamageType.Custom;
case WarheadDamageHandler:
Expand Down
3 changes: 1 addition & 2 deletions EXILED/Exiled.API/Extensions/EffectTypeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ public static class EffectTypeExtension
{ EffectType.AntiScp207, typeof(AntiScp207) },
{ EffectType.Scanned, typeof(Scanned) },
{ EffectType.SilentWalk, typeof(SilentWalk) },
#pragma warning disable CS0618
{ EffectType.Marshmallow, typeof(MarshmallowEffect) },
#pragma warning restore CS0618
{ EffectType.Strangled, typeof(Strangled) },
{ EffectType.Ghostly, typeof(Ghostly) },
{ EffectType.FogControl, typeof(FogControl) },
{ EffectType.Slowness, typeof(Slowness) },
{ EffectType.Metal, typeof(Metal) },
{ EffectType.OrangeCandy, typeof(OrangeCandy) },
{ EffectType.Prismatic, typeof(Prismatic) },
{ EffectType.SlowMetabolism, typeof(SlowMetabolism) },
Expand Down
19 changes: 18 additions & 1 deletion EXILED/Exiled.API/Features/CustomHealthStat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,29 @@ namespace Exiled.API.Features
/// </summary>
public class CustomHealthStat : HealthStat
{
private float customMaxValue;

/// <inheritdoc/>
public override float MaxValue => CustomMaxValue == default ? base.MaxValue : CustomMaxValue;

/// <summary>
/// Gets or sets the maximum amount of health the player will have.
/// </summary>
public float CustomMaxValue { get; set; }
public float CustomMaxValue
{
get
{
if (Hub.playerStats.TryGetModule(out MaxHealthStat maxHealthStat))
return maxHealthStat.CurValue;
return customMaxValue;
}

set
{
customMaxValue = value;
if (Hub.playerStats.TryGetModule(out MaxHealthStat maxHealthStat))
maxHealthStat.CurValue = value;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public virtual DamageType Type

switch (Base)
{
case SilentDamageHandler:
return DamageType.Silent;
case MetalPipeDamageHandler:
return DamageType.MetalPipe;
case CustomReasonDamageHandler:
return DamageType.Custom;
case WarheadDamageHandler:
Expand Down
10 changes: 10 additions & 0 deletions EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ public GenericDamageHandler(Player player, Player attacker, float damage, Damage

switch (damageType)
{
case DamageType.Silent:
Base = new SilentDamageHandler()
{
Damage = damage,
};
break;
case DamageType.MetalPipe:
Base = new MetalPipeDamageHandler(attacker.ReferenceHub, Damage);
break;
case DamageType.Falldown:
Base = new UniversalDamageHandler(damage, DeathTranslations.Falldown, cassieAnnouncement);
break;
Expand Down Expand Up @@ -113,6 +122,7 @@ public GenericDamageHandler(Player player, Player attacker, float damage, Damage
Base = new MicroHidDamageHandler(microHidOwner, damage);
break;
case DamageType.Explosion:
case DamageType.SpicyFlame:
Base = new ExplosionDamageHandler(attacker.Footprint, UnityEngine.Vector3.zero, damage, 0);
break;
case DamageType.Firearm:
Expand Down
1 change: 1 addition & 0 deletions EXILED/Exiled.API/Features/Hazards/Hazard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public static Hazard Get(EnvironmentalHazard environmentalHazard) =>
TantrumEnvironmentalHazard tantrumEnvironmentalHazard => new TantrumHazard(tantrumEnvironmentalHazard),
Scp939AmnesticCloudInstance scp939AmnesticCloudInstance => new AmnesticCloudHazard(scp939AmnesticCloudInstance),
SinkholeEnvironmentalHazard sinkholeEnvironmentalHazard => new SinkholeHazard(sinkholeEnvironmentalHazard),
PrismaticCloud prismaticCloud => new PrismaticCloudHazard(prismaticCloud),
global::Hazards.TemporaryHazard temporaryHazard => new TemporaryHazard(temporaryHazard),
_ => new Hazard(environmentalHazard)
};
Expand Down
108 changes: 108 additions & 0 deletions EXILED/Exiled.API/Features/Hazards/PrismaticCloudHazard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// -----------------------------------------------------------------------
// <copyright file="PrismaticCloudHazard.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.Hazards
{
using System.Collections.Generic;
using System.Linq;

using Exiled.API.Enums;
using global::Hazards;
using Mirror;
using RelativePositioning;
using UnityEngine;

/// <summary>
/// A wrapper for <see cref="PrismaticCloud"/>.
/// </summary>
public class PrismaticCloudHazard : TemporaryHazard
{
/// <summary>
/// Initializes a new instance of the <see cref="PrismaticCloudHazard"/> class.
/// </summary>
/// <param name="hazard">The <see cref="TantrumEnvironmentalHazard"/> instance.</param>
public PrismaticCloudHazard(PrismaticCloud hazard)
: base(hazard)
{
Base = hazard;
}

/// <summary>
/// Gets the <see cref="PrismaticCloud"/>.
/// </summary>
public new PrismaticCloud Base { get; }

/// <inheritdoc />
public override HazardType Type => HazardType.Tantrum;

/// <summary>
/// Gets the decay speed.
/// </summary>
public float DecaySpeed => Base.DecaySpeed;

/// <summary>
/// Gets distance of explode.
/// </summary>
public float ExplodeDistance => Base._explodeDistance;

/// <summary>
/// Gets or sets the ignored targets.
/// </summary>
public IEnumerable<Player> IgnoredTargets
{
get => Base.IgnoredTargets.Select(Player.Get);
set => Base.IgnoredTargets = value.Select(x => x.ReferenceHub).ToList();
}

/// <summary>
/// Gets or sets the synced position.
/// </summary>
public RelativePosition SynchronisedPosition
{
get => Base.SynchronizedPosition;
set => Base.SynchronizedPosition = value;
}

/// <summary>
/// Gets or sets the correct position of tantrum hazard.
/// </summary>
public Transform CorrectPosition
{
get => Base._correctPosition;
set => Base._correctPosition = value;
}

/// <summary>
/// Places a Prismatic (Halloween's ability) in the indicated position.
/// </summary>
/// <param name="position">The position where you want to spawn the Tantrum.</param>
/// <param name="isActive">Whether or not the tantrum will apply the <see cref="EffectType.Prismatic"/> effect.</param>
/// <remarks>If <paramref name="isActive"/> is <see langword="true"/>, the tantrum is moved slightly up from its original position. Otherwise, the collision will not be detected and the slowness will not work.</remarks>
/// <returns>The <see cref="TantrumHazard"/> instance.</returns>
public static PrismaticCloudHazard PlaceTantrum(Vector3 position, bool isActive = true)
{
PrismaticCloud prismatic = Object.Instantiate(PrefabHelper.GetPrefab<PrismaticCloud>(PrefabType.PrismaticCloud));

if (!isActive)
prismatic.SynchronizedPosition = new(position);
else
prismatic.SynchronizedPosition = new(position + (Vector3.up * 0.25f));

prismatic._destroyed = !isActive;

NetworkServer.Spawn(prismatic.gameObject);

return Get<PrismaticCloudHazard>(prismatic);
}

/// <summary>
/// Enables effects for target.
/// </summary>
/// <param name="player">Target to affect.</param>
public void EnableEffects(Player player) => Base.ServerEnableEffect(player.ReferenceHub);
}
}
6 changes: 6 additions & 0 deletions EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Hazards
using Exiled.API.Enums;
using global::Hazards;
using Mirror;
using PlayerRoles;
using RelativePositioning;
using UnityEngine;

Expand Down Expand Up @@ -61,6 +62,11 @@ public bool PlaySizzle
set => Base.PlaySizzle = value;
}

/// <summary>
/// Gets the teams that will be affected by the tantrum.
/// </summary>
public Team[] TargetedTeams => Base._targetedTeams;

/// <summary>
/// Gets or sets the synced position.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions EXILED/Exiled.API/Features/Items/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ ItemType.KeycardGuard or ItemType.KeycardJanitor or ItemType.KeycardO5 or ItemTy
ItemType.SCP2176 => new Scp2176(owner),
ItemType.SCP1576 => new Scp1576(),
ItemType.Jailbird => new Jailbird(),
ItemType.Marshmallow => new Marshmallow(),
_ => new Item(type),
};

Expand Down
68 changes: 68 additions & 0 deletions EXILED/Exiled.API/Features/Items/Marshmallow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// -----------------------------------------------------------------------
// <copyright file="Marshmallow.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.Items
{
using Exiled.API.Interfaces;
using InventorySystem.Items.MarshmallowMan;

/// <summary>
/// A wrapper for <see cref="MarshmallowItem"/>.
/// </summary>
public class Marshmallow : Item, IWrapper<MarshmallowItem>
{
/// <summary>
/// Initializes a new instance of the <see cref="Marshmallow"/> class.
/// </summary>
/// <param name="itemBase">A <see cref="MarshmallowItem"/> instance.</param>
public Marshmallow(MarshmallowItem itemBase)
: base(itemBase)
{
Base = itemBase;
}

/// <summary>
/// Initializes a new instance of the <see cref="Marshmallow"/> class.
/// </summary>
internal Marshmallow()
: this((MarshmallowItem)Server.Host.Inventory.CreateItemInstance(new(ItemType.Marshmallow, 0), false))
{
}

/// <inheritdoc/>
public new MarshmallowItem Base { get; }

/// <summary>
/// Gets or sets a value indicating whether the evil mode is enabled.
/// </summary>
public bool EvilMode
{
get => Base.EvilMode;
set
{
Base.EvilMode = value;

if (value)
ReleaseEvil();
}
}

/// <summary>
/// Gets or sets the attack cooldown.
/// </summary>
public float AttackCooldown
{
get => Base._attackCooldown;
set => Base._attackCooldown = value;
}

/// <summary>
/// Releases the evil mode.
/// </summary>
public void ReleaseEvil() => Base.ReleaseEvil();
}
}
Loading

0 comments on commit 6a8dcf5

Please sign in to comment.