From bacfde44bf14cc14aee63bb2c90485e48b11bb26 Mon Sep 17 00:00:00 2001 From: Yamato <66829532+louis1706@users.noreply.github.com> Date: Fri, 24 May 2024 13:45:23 +0200 Subject: [PATCH] Merge dev Into Master (#2567) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix CI * Added PrimitiveSettings + 3 overloads to Primitive::Create method * Light::Create overload + Signature fix * Ops * Make `Server.RunCommand` return response (#2105) * Make `Server.RunCommand` return response * Make obsolute * Fix * Update Exiled.API/Features/Toys/Light.cs Co-authored-by: Thunder * Update Exiled.API/Features/Toys/Primitive.cs Co-authored-by: Thunder * Update Primitive.cs * Changes for Shooting and Shot events (#2101) * fixed event for buckshot and railgun and added firearm in args * Added firearm * Update Shot.cs * Use .Cast() in Shot.cs * ShotEventArgs extends IFirearmEvent, added Item and changed order of properties * Changed order of CanHurt in ShotEventArgs * Make ShootingEventArgs extends IFirearmEvent instead of IItemEvent * Fix Nao Skill Issue (#2112) Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * AnimationCurve (#2098) * AnimationCurve * Bad documentation * Removing 'Exiled.Updater', * Revert "Removing 'Exiled.Updater'," This reverts commit b8d4e7c4d9307b731bbc15636b9a0919945ec6aa. * Fix dumb door (#2111) Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * SpawningTeamVehicle event addition (#2108) * Ability use hint changes (#2113) * Make these better. * Remove this * Fix dev build errors * Make it non-breaking * Mark obsolete * Smol fucky wucky * yes * Erm, Am I dumb? * Better responses * Exiled Component System Overhaul, DynamicEvents & StateMachine APIs, `Exiled::Updater` rework. (#2085) * `Exiled.Updater` rework * Removed old `Exiled.Updater` * Fix `nuspec` build * Prevent Exiled from being loaded if out to date and no releases are available yet. * Added `StateMachine` API. Added `DynamicEvents` API. Added `EBehaviour` component. Fixed docs in `ManagedObjectTypeAttribute`. Fixed typos in `CustomRoles::API::Extensions`. * Fix typo * Not finish * Some fixes to `Exiled::Updater`. Now it actually runs on a different thread without blocking the normal server exec/startup. * Don't care * Updater's logs are now debugs * Fix typo Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> * Fix Exiled.nuspec * use ternary op Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Fix Yamato's commit * Fixed `StaticActor` structure --------- Co-authored-by: Nao Co-authored-by: louis1706 Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> * Fix Error GetBefore() (#2121) * Fix MessageTranslated (#2122) * Keep dev branch up to date (#2125) * Add ChangeLightsColor and ResetLightsColor (#2126) * ChangeLightsColor and ResetLightsColor addition. * Fix for player being null (skipping this null check causes Npc.Destroy() to throw exceptions) (#2129) * Someone didn't know how unity works. (#2132) * Small change to CustomRole.KeepInventoryOnSpawn (#2130) * Yes * Yamato fix * There * Switches are better * Add RotationTime, DoorOpenTime, DoorCloseTime and MoveTime to Lift.cs (#2117) * Add RotationTime, DoorOpenTime, DoorCloseTime and MoveTime * Update Lift.cs --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Fixed crashing issue caused by changing appearance of a disconnected … (#2139) * Fixed crashing issue caused by changing appearance of a disconnected player * Update MirrorExtensions.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Fix SetAmmo(AmmoType.None) crash (#2138) * Fix SetAmmo(AmmoType.None) crash * 100% sure no error with this * EventList (#2137) * EventList * Update Event.cs * FixPickupPreviousOwner (#2141) * Deprecated the setter of ItemsToDrop (#2144) * EndRoundTranspiler (#2120) * EndRoundTranspiler * not needed * SCPSL-experimental Update (#2152) * experimental * Prevent breakingChange * Error * last fix * Update Doc * Haven't found a better way to make it * FUCK Version * StaminaUsage Patch now use Postfix instead of Transpiler & KickingEvent Transpiler (#2143) * StaminaUsage * Kicking Patch * Fix error * Fix for Experymental * Fix stupidity * Optimise --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Respawn::TimeUntilNextPhase (#2150) * Respawn::TimeUntilNextPhase * . * is or * Update dependencies URL * Unnecessary set accessor * Update dep link * Fix UserId (#2158) * Fix IL ERROR (#2166) * Fix ILError * Fix Skill Issue from someone else - /* */ will need to be removed when the other method will be deleted * Fix round end transpiler (#2167) * Update RoundEnd.cs * Update RoundEnd.cs * Update RoundEnd.cs * Full Fix * Fix UsedItem event not being called (#2163) * UsedItemFixNotCall * In case it's don't work * Update UsedItemFixNotCall.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Fix `Scp0492.ConsumingCorpse` event was called with `Scp049` (#2142) * bruh * better patch method * L bracing --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Fix SpawingEventArgs::HorizontalRotation (#2162) * Fix Crash null string (#2161) * Add Whitelist && update ReservedSlot extensions (#2160) * Make `Server.RunCommand` return response * Make obsolute * Fix * Add WhiteList extension * Add `isPermanent` argument * Update `ReservedSlot` * Update docs * Fixes * Make better * Always true * SendingAdminChatMessageEvent (#2159) * SendingAdminChatMessage * oh 'lol Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> * Update SendingAdminChatMessageEventsArgs.cs --------- Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Fix ClearInventory (#2140) * Fix ClearInventory * Update Exiled.API/Features/Player.cs Co-authored-by: IRacle <79921583+IRacle1@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Thunder --------- Co-authored-by: IRacle <79921583+IRacle1@users.noreply.github.com> Co-authored-by: Thunder Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * We are not going to miss this (Remove Old Exiled.Updater) (#2151) * We are not going to miss this * Update Loader.cs * Fix Yamato's skill issue --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * ModifyToken (#2148) * ModifyToken * PreventException * New * modify * Tickets * Some Scp914 QoL additions (#2149) * Scp914 * Update Exiled.API/Features/Scp914.cs Co-authored-by: Thunder * Update Exiled.API/Features/Scp914.cs Co-authored-by: Thunder * Update Exiled.API/Features/Scp914.cs Co-authored-by: Thunder * Update Scp914.cs * Update Scp914.cs --------- Co-authored-by: Thunder * Update dev.yml workflow (#2170) * Update main.yml (#2169) * GetAmmoLimitFix (#2157) * GetAmmoLimitFix * look nicer * . * Update GetAmmoLimitFix.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Add Player.AdminChatAccess * Revert "Fix UsedItem event not being called (#2163)" (#2173) This reverts commit 58007bc4a737a0c68ec7bef31387b5c7d354dfd3. * `Scp173::BlinkingRequest` event (#2077) * test * у * e --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * NullCheck (#2175) * SCP:SL 13.3 (#2178) Co-authored-by: Thunder * ChaosTargetCounter (#2179) * ChaosTargetCounter * Network_chaosTargetCount --------- Co-authored-by: Thunder * merge Master To Dev (#2203) * Fix CI * Added ChaosTargetCount (#2106) * Added ChaosTargetCount * a * Updated * Fix build errors --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Revert "Added ChaosTargetCount (#2106)" (#2110) This reverts commit c3612c9d59a31be94cf6fba25a136e1155b91946. * Woah more proper English (#2196) Grammar fixes. This includes fixing multiple it's to its, removal of unnecessary commas, and removal of redundancies. --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: Nameless <85962933+Misfiy@users.noreply.github.com> Co-authored-by: Thunder Co-authored-by: Snivy FIlms <120346554+NikkiGardiner1@users.noreply.github.com> * Update RoundEnd.cs (#2193) Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Fix Rpc and WriterExtensions dict (#2198) * Fix Rpc and WriterExtensions dict * stylecop * Intercom.DisplayText fix (#2209) * Update CommentsObjectGraphVisitor.cs (#2210) * EnableEffect should have intensity argument (#2134) * EnableEffect should have intensity argument * Preventing Error + add a new ctor for Effect class * Fix NW * FUCK that so dumb * Fix typos * Fix doc --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Add two item props: IsLightEmitter, IsDisarmer * DecontaminationFeatures (#2145) * DecontaminationFeatures * it's also global when final * Fix * Update DecontaminationState.cs * . * Add Warhead.Kills * same to dev (#2206) * fix `IAcquisitionConfirmationTrigger` logic * final 330 fix * Stupid manual bool fix (#2211) * all candies (#2214) * Add Broadcast.Show check to CustomItems (#2212) * Add Broadcast.Show check to CustomItems * Random optimization * Revert "Random optimization" This reverts commit 6c7f910fa89f874ac8175590610e6d50751bcd46. --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Rework EffectType (#2190) * Rework * Update EffectTypeExtension.cs * Update EffectTypeExtension.cs * Update dev.yml (#2227) * Updating EXILED to 13.3.1 (#2223) * Item fix (#2228) * Fix doc version (#2230) * Simplification * Patch fix (#2229) * Update ChangingGroup.cs (#2232) * Fix transpiler (#2234) * Fix CancelledItemUse::Item always being null (#2174) * Fix Item always being null * . * Is it a flashlight? (#2225) * is it a flashlight? * new logic * edit xml * another xml update * no more breaking changes * huh * get and create methods fix * fuux * New Hurt Event (#2176) Co-authored-by: IRacle <79921583+IRacle1@users.noreply.github.com> * Reworking Scp079Transpiller (#2017) * Scp106ReworkTranspiller (#1984) * Rework Scp049 Event (#1978) * Send staff message (#2172) * SendStaffMessage * Idk if this is needed * . --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Scp079Role method fix (#1983) * Fix Bug than Grenade do not make damage correctly (#2119) * Fix Various Transpiler and Update StatModule (#2171) * Big PickupAPI changes (Breaking) (#2147) * Updated a LOT of summaries. (#2231) * Added proper grammar or some more details P1 (Contains Exiled.API to Exiled.CustomRoles * Up to Exiled Events Patches for working on the summaries * The last of the summary fixes and modifications * Reverted the /// changes * Im not perfect with grammar * Added Thundermaker's suggested changes * Part 2 * Part 3 * Said hasta la pasta to a comment --------- Co-authored-by: Nikki Gardiner Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * stylecop some women * oh good heavens * New effects (#2224) * new effect * same as flashlight? * Revert "same as flashlight?" This reverts commit ffa76c781374e6cbb619def1da81cef23529a0d6. * new effects * typo fix * xml update * fix * forgor * Update Exiled.API/Enums/EffectType.cs Co-authored-by: Thunder * Update Exiled.API/Extensions/EffectTypeExtension.cs Co-authored-by: Thunder * Update Exiled.API/Enums/EffectType.cs Co-authored-by: Thunder * basically what Yamato is saying is * Update Exiled.API/Enums/EffectType.cs * Update Exiled.API/Enums/EffectType.cs * Add using statement --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Thunder Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * stop complaining * the skeleton lives on (#2233) * Add 3114 * Add 3114 * Add 3114 * Squashed commit of the following: commit ef803b03e1fc077d7d91dd34f85909a335a8abb8 Author: VALERA771 <72030575+VALERA771@users.noreply.github.com> Date: Mon Nov 13 05:57:25 2023 +0300 New effects (#2224) * new effect * same as flashlight? * Revert "same as flashlight?" This reverts commit ffa76c781374e6cbb619def1da81cef23529a0d6. * new effects * typo fix * xml update * fix * forgor * Update Exiled.API/Enums/EffectType.cs Co-authored-by: Thunder * Update Exiled.API/Extensions/EffectTypeExtension.cs Co-authored-by: Thunder * Update Exiled.API/Enums/EffectType.cs Co-authored-by: Thunder * basically what Yamato is saying is * Update Exiled.API/Enums/EffectType.cs * Update Exiled.API/Enums/EffectType.cs * Add using statement --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Thunder Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Squashed commit of the following: commit f35fdf96c217ffb75d95c0e7a6e08d6ce197926c Author: Thunder Date: Sun Nov 12 22:00:20 2023 -0500 stop complaining commit ef803b03e1fc077d7d91dd34f85909a335a8abb8 Author: VALERA771 <72030575+VALERA771@users.noreply.github.com> Date: Mon Nov 13 05:57:25 2023 +0300 New effects (#2224) * new effect * same as flashlight? * Revert "same as flashlight?" This reverts commit ffa76c781374e6cbb619def1da81cef23529a0d6. * new effects * typo fix * xml update * fix * forgor * Update Exiled.API/Enums/EffectType.cs Co-authored-by: Thunder * Update Exiled.API/Extensions/EffectTypeExtension.cs Co-authored-by: Thunder * Update Exiled.API/Enums/EffectType.cs Co-authored-by: Thunder * basically what Yamato is saying is * Update Exiled.API/Enums/EffectType.cs * Update Exiled.API/Enums/EffectType.cs * Add using statement --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Thunder Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Fixes * Add 3114 * Fixed Event StartingRecallEventArgs's IsAllowed issue. (#2235) * Fix Ctor (#2240) * Lazy fix (#2146) Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * More Fix (#2244) Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Version bump to 8.4.0 * FastFix (#2251) * Update push_nuget.yml * FixInfiniteSprint (#2255) * Version bump to 8.4.1 * Workflow (#2258) * Create moveFile.ps1 * Update dev.yml * Update dev.yml * Update dev.yml * Update dev.yml * Update dev.yml * Update dev.yml * Update dev.yml * Update moveFile.ps1 * Update dev.yml * Update dev.yml * Update dev.yml * Update dev.yml * Rename moveFile.ps1 to packaging.ps1 * Update dev.yml * Update dev.yml * Revert "Workflow (#2258)" This reverts commit d757764012248bcbe60e4a3fc55c9d346a78205f. * Change default value of flashbang affect thrower * Better workflow (#2259) * Create moveFile.ps1 * Update dev.yml * Update moveFile.ps1 * Update dev.yml * Rename moveFile.ps1 to packaging.ps1 * Update dev.yml * fix (#2262) Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Improved Stamina API (#2237) Co-authored-by: Thunder Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Update DestroyingEventArgs.cs (#2272) * FixRoundEnd (#2278) * Remove Breaking Change from #2237 (#2283) * MaxAmmo Setter && NightVision should also be true when NightVision (#2164) Co-authored-by: Thunder Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Ending round event fix (#2280) Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * CanScp049SenseTutorial Fix bool logic (#2275) Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> * Version bump to 8.4.2 * Fix TogglingFlashlightEventArgs Cast (#2295) Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Fix Player.Get(ServerHostPlayer) (#1863) * Added ItemRemoved Event (#2263) Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * who wrote this? (#2298) * Fix MaxAmmo and CustomItem Weapon (#2302) * Update EXILED.props * Update EXILED.props * SpawningTeamVehicle Transpiler (#2265) * Spawning transpiler (#2241) * Add to DropItem(Item item, bool isThrown) (#2268) * Bump to 8.4.3-rc.2 * Revert "Spawning transpiler (#2241)" (#2306) This reverts commit caaa732385a2252283680e1084e8f9ee186c3308. * EffectType.None + More TryGet method for EffectType extension (#2292) * Rework and Fix Shooting Transpiler (#2309) * is that a new ev of 87? (#2308) * Inroducing... "Async" events (#2303) * huh? * oops * another one * Revert "another one" This reverts commit 0bae3adbdf03e3d941aef9a8f005f1b05897261b. * y've never seen last commit * Update Exiled.Events/Features/Event{T}.cs * fux --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * ValidatingVisibility Event (#2299) * ValidatingVisibility Event * text * fix again * build error fixes * docs fix * Update Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Update Exiled.Events/Handlers/Scp939.cs * Update Exiled.Events/Handlers/Scp939.cs * Update Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs * Update Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Patch Rework DoorList (#2270) * Patch Rework * Update Exiled.Events/Patches/Generic/DoorList.cs * uhmmmm * Add voicelines SCP-3114 (#2269) * Add Door EVent * Add to DropItem isThrown * Door * Add voicelines SCP-3114 * Update Player.cs * Oops * Oops v3 * Convert bool Prefix to Transpiler * Update Exiled.Events/Handlers/Scp3114.cs * Update Exiled.Events/Handlers/Scp3114.cs --------- Co-authored-by: BoltonII Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Add ```ChangeItemOwner``` (#2249) * Add files via upload Added a public method for change item's owner. By encapsulating ChangeOwner method. * Fixed issue about extra tab * Fixed reference issue. * Update Exiled.API/Features/Items/Item.cs --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Fixing up spelling errors and XML formatting. (#2317) * v8.4.3 (#2305) * Fixed SCP-3114 spelling errors and stylecop XML formatting. --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: Nao * rawr (#2322) * Fixed Room.Blackout not turning off lights (#2319) Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Some Scp914 changes (#2290) * Documentation about async events (#2332) * Update Events.md * Update Events.md * Update docs/docs/Plugins/Events.md Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Update docs/docs/Plugins/Events.md Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Scp244MoreAPI (#2323) * Scp244MoreAPI * Apply suggestions from code review Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> * Fix UsingBreakneckSpeeds not being call (#2318) * Round.IgnoredPlayers fix (#2307) * Round.IgnoredPlayers fix * Update Exiled.Events/Patches/Events/Server/RoundEnd.cs * Update Exiled.Events/Patches/Events/Server/RoundEnd.cs * Update Exiled.Events/Patches/Events/Server/RoundEnd.cs * Update Exiled.Events/Patches/Events/Server/RoundEnd.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * SelectingRespawnTeamEventArgs (#2315) * SelectingRespawnTeamEventArgs * Apply suggestions from code review Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Update Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Landing Fix + few doc change (#2314) * Update Documentation (#2336) * Update Documentation * Spacing * Scp3114 Transpiler (#2266) * TryUseBody Transpiler + fix * Disguising Transpiler * Revealing + RevealingKey Transpiler * Fix * Edit doc --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Fix Transmitting event (#2273) * Fix TransmittingEvent * :) * Prevent breaking plugin * :) * Remove warning * I'm dumb * Fixing up XML Formatting --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Scp173BeingLooked Transpiler (#2276) * Scp173BeingLooked Transpiler * Fix --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * Scp3114AttackAhpFix (#2320) * Scp3114AttackAhpFix * Update Scp3114AttackAhpFix.cs * Update Scp3114AttackAhpFix.cs * Adding event TogglingRadio(Player, RadioItem, bool, bool) (#2329) * Add Door EVent * Add Door Event * Add Door Event * Fix * Oops * Oops v2 * Oops * Delete Door Event * Create DamagingDoorEventArgs.cs * Create DamagingDoor.cs * Adding event Toggling Radio * Delete DamagingDoorEventArgs.cs * Create DamagingDoorEventArgs.cs * Convert prefix to transpiler + fix docs * Update TogglingRadio.cs * Update TogglingRadioEventArgs.cs * Update Exiled.Events/Patches/Events/Player/TogglingRadio.cs Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: BoltonDev Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> * Fix Gate IsFullyOpen and IsFullyClosed (#2337) * Update Player.cs (#2347) * Update for PostXMAS (#2383) * Update for PostXMAS * WeaponFixFromXMAS * remove var * Fix RegisteringEvent * more var remove * 8.7.0 * 8.7.1 * Fix build errors * Update doc and SL version * Fix spawning ragdoll event args (#2396) * Update for PostXMAS (#2383) * Update for PostXMAS * WeaponFixFromXMAS * remove var * Fix RegisteringEvent * more var remove * 8.7.0 * Fix SpawningRagdoll - not tested * Not needed Change * Revert useless change * Fixed a bug with `SearchingPickup` event caused by NWAPI (#2311) * . * Last * Fully modify transpiler * miss retLabel * MoreInfo * . * Update for PostXMAS (#2383) * Update for PostXMAS * WeaponFixFromXMAS * remove var * Fix RegisteringEvent * more var remove * 8.7.0 * Fix * Dumb * Update SearchingPickupEvent.cs * Update SearchingPickupEvent.cs * 8.7.3 * Fix SpawningRagdoll Transpiler * Add `respawn_target_multiplier` field to base game configs. (#2421) * AddRespawnTargetMultiplierConfig * Fix * Fixed open doors getting easily broke by Scp096. (#2422) * NWFixScp096BreakingDoor * Update Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Fixed `team_respawn_queue` field config not behaving as expected. (#2423) * NW FIX team_respawn_queue * Better ChaosRoleType * Fix Scp049RespawningOverwatch (#2424) * FixPrimitive (#2426) * [NW Bug] Sync lights after player rejoin (#2413) * Defined new API structure. * Changed `CustomRoles` to `CustomModules`. * A few more adjustments * Implemented `Additive Properties`. * Docs * Docs and typos * Added generic `CustomEscape` and `CustomRole` * Added `CustomTeam` and `CollectionExtensions`. Made some methods obsolete on `CommonExtensions`. * Fixed build errors * Removed parsers, added namespaces. Added `ITypeCast` interface. Added `NullableObject` class. Added `TypeCastMono` component. Removed all custom `implicit operator bool` implementations in favor of using `NullableObject`. Made some adjustments to `CustomRoles`. * Changes to `Exiled::API::Features::Core`. Added `GameEntity`. Removed `EBehaviour`. Made some changes and additions to custom APIs. Added a new `CustomAbility` API draft. Made some optimizations. * Add doc, Fix bug, code simplification (#2335) * Add doc, Fix bug, code simplification * TypeCastObject & TypeCastMono rewrite Cast * `GameEntity` is dominating * Update APIs to latest SL version (#2353) * Update halloween.yml * Rename halloween.yml to xmas.yml * Xmas update (#2339) * Update RoundEnd.cs (#2341) * Lots of new API (#2342) * lots of new new effects 956 559 * final * fix * idk * Scp956Target * Snowed * doc --------- Co-authored-by: Yamato * DamageHandler and Flamingo (#2343) * DamageHandler and Flamingo * Update ItemExtension * Missing Scp1507Damage * Missing Item API * Snow pile (#2346) * snow pile * list fix --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * SCP-1507 (#2340) * scp-1507 * minor changes * added role * new * IHumeShieldRole * . --------- Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * CustomWeaponFix (#2349) * CustomWeaponFix * Fix * More features and events for SCP-1507 (#2348) * scp-1507 * minor changes * added role * new * IHumeShieldRole * . * lots of new * still something new * Update Scp1507Role.cs * Update Scp1507Role.cs --------- Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * SCP-2536 (#2344) * base 2536 * ev * trying fix * fix + new ev * WhitelistedTeams * doc change --------- Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * 8.4.4-beta.1 * Fix nuget deps * ooops (#2351) * Fix CustomItem * Fixing scp that can attack each other (#2352) * Fixing scp that can attack each other * Update IndividualFriendlyFire.cs * bump --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> Co-authored-by: Nao * Updated to latest SL version. Added `CustomAbility`, `CustomPlayerAbility`, `CustomItemAbility` and `CustomPickupAbility` API. Fixed namespaces. Fixed `CustomAbility` not able to find any abilities due to faulty type check. Various changes to docs, mainly fixed and improvements. * Docs fixes * `using` statements cleanup * Removed unused files and configs * Fetch upstream (#2357) * Update halloween.yml * Rename halloween.yml to xmas.yml * Xmas update (#2339) * Update RoundEnd.cs (#2341) * Lots of new API (#2342) * lots of new new effects 956 559 * final * fix * idk * Scp956Target * Snowed * doc --------- Co-authored-by: Yamato * DamageHandler and Flamingo (#2343) * DamageHandler and Flamingo * Update ItemExtension * Missing Scp1507Damage * Missing Item API * Snow pile (#2346) * snow pile * list fix --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * SCP-1507 (#2340) * scp-1507 * minor changes * added role * new * IHumeShieldRole * . --------- Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * CustomWeaponFix (#2349) * CustomWeaponFix * Fix * More features and events for SCP-1507 (#2348) * scp-1507 * minor changes * added role * new * IHumeShieldRole * . * lots of new * still something new * Update Scp1507Role.cs * Update Scp1507Role.cs --------- Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * SCP-2536 (#2344) * base 2536 * ev * trying fix * fix + new ev * WhitelistedTeams * doc change --------- Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * 8.4.4-beta.1 * Fix nuget deps * ooops (#2351) * Fix CustomItem * Fixing scp that can attack each other (#2352) * Fixing scp that can attack each other * Update IndividualFriendlyFire.cs * bump * SpawnReason::ItemUsage * Fix CustomItem::OnReloading(ev) * - (#2354) Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * SpawnReasons::Vocalize (#2355) * Update SpawnReason.cs Added new SpawnReason for SCP-1507 * Update SpawnReason.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Removed SpawnReason::Vocalize (#2356) They pointed out to me that nw doesn't use "Vocalize" but uses "Revived" --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> Co-authored-by: Nao Co-authored-by: INZI <98975836+InziDeveloperMode@users.noreply.github.com> * Re-organized namespaces. Updated to latest xmas-2023 version. Fixed `Disguising` patch. Added `AbilityBehaviourBase`, `LevelAbilityBehaviour` and `UnlockableAbilityBehaviour`. * Fixed design issues. * fix typo * Finalized `CustomModules.API.Features.CustomAbilities`. Finalized `CustomModules.API.Features.PlayerAbilities`. * Useless multicasts * quicc fix * Design changes. Added `ActiveAbility` and `PassiveAbility`. * Made some changes to naming style * Added `OnReady` method. Made some minor changes to logs. * Added a draft for item abilities. Pickup abilities WIP. Added a few more `GetComponent` methods to `IEntity`. Made some docs fixes. * Added two more overloads to `CollectionExtensions::AddRange` methods. Added two more overloads to `IEntity::AddComponent` methods. Added `IEntity::AddComponents` method and 4 more overloads. Renamed `ItemTrackerActor` to `ItemTracker` and moved it to `CustomModules::Features` namespace. Finalized custom item and pickup abilities. * Added some `ItemTracker` events and re-organized the already existing ones. * Custom item draft, small change (#2366) Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Added `CustomItem` API draft. Made some docs fixes and changes. Made some critical fixes. * Made `UUEscapeScenarioType` unique. * Added `Updates.md` * Added `Pawn::TryGetCustomRole`. Added `Pawn::TryGetCustomItem`. Added `Pawn::TryGetCustomAbility`. Added `CustomAbility::Equals` and relative compare operators. Minor docs fixes. * Moved all `object` params to `uint` for `Get` and `TryGet` methods for all custom modules. Added `CustomTeamAttribute(uint, params Type[])`. Various docs fixes. * Fixed critical bugs on `CustomRole` API. Added fast iteration and cached values to speed up the process of retrieving custom roles from those values. * Added fast iteration and cached values to speed up the process of retrieving custom escapes from those values. Added `CollectionExtensions::TryAdd` method with two overloads. * - Added `EObject::IsDestroying`. - Added all references on behaviours classes to their main custom module class. - Implemented fast iteration and cached values to optimize the process of retrieving custom abilities and teams from those values. - Introduced `CustomEscape::Attach` and `CustomEscape::Detach` static methods with four overloads each, relying on instance methods. - Redesigned the behavior of `OnEndPlay` when a behavior gets destroyed, without exposing any fields from their main class. * - Introduced the `ICustomAbility` interface. - Added the `RoleBehaviour::CustomTeam` property. - Implemented custom ability events (`Adding`, `Added`, `Removing`, and `Removed`) in the `CustomAbility` class. - Redesigned and optimized the `Pawn::CustomAbilities` and `Pawn::AbilityBehaviours`. - Transformed `EscapingEventArgs` into interfaces, specifically `IPlayerEvent` and `IDeniableEvent`. - Optimized and enhanced the `IEntity::GetComponents` methods. * Some fixes and fast iteration on `CustomItem`. * Made some fixes to configs and pipes. * ## Added - `TextDisplay` class. - `CustomItem` class. - `ItemBehaviour` class. - `ItemSettings` class. - `ItemTracker` class. - `FirearmBehaviour` class. - `FirearmSettings` class. - `SemiAutomaticFirearmBehaviour` class. - `RepNotify` class. - `ReplicatedRef` class. - `ReplicatedProperty` class. - `TrackerBase` class. - `ITrackableInterface` interface. - `IRepNotify` interface. - `IItemBehaviour` interface. - `TextChannelType` enum. - `FiringMode` enum. - `ICustomItemEvent` interface. - `ICustomPickupEvent` interface. - `Pawn::HasCustomItem` method. - `Pawn::HasCustomAbility` method. - `Pawn::CurrentCustomItem` property. - `ReplicatingReferenceEventArgs` event. - A bool parameter to `Log::Debug` named "traceMethod" to log the method from which it has been called. - Some custom item events. - A transpiler to support `PlayerInventoryCommand` using custom items. ## Fixed - Some bugs from the old `CustomItem` API. ## Removed - Setter for `Firearm::FireRate` property. - Old `CustomItem` API. * Re-added ` EObject::CreateDefaultSubobject(Type, GameObject, string)` * Fixed `ReplicatingReferenceDispatcher` being null. * MInor spelling mistake * Re-worked `KeypressActivator`. Removed `KeypressActivator`. Added `ProcessingActionEventArgs` event. Added `InputBinding` class. Added `KeypressInputComponent` class. Moved it to `Exiled::API`. * Style * Renamed `KeypressInputComponent` to `InputActionComponent`. Added `KeypressInputComponent` class. Made some changes to accessors on `InputActionComponent`'s members. Added an implicit conversion from `Action` to `DynamicDelegate`. Changed `DynamicDelegate InputBinding::Action` to `Action InputBinding::Action`. * Added custom armors and grenades. Renamed `CollisionHandler` to `EffectGrenadeCollision`. * Added custom pickups. Added custom ammos. Added custom grenades. Added custom ammos. Added custom armors. Added `Settings` class. Added `PickupTracker` class. Added `Pawn::AddAmmo(uint, ushort)` method. * Added support for `ItemType` and custom ammo behaviours for custom firearms. Added `Player::RemoveItem(ItemType, bool, bool)` overload. Added `Player::RemoveAmmo(AmmoType, ushort)` method. Added `Pawn::GetAmmo(uint)` method. Added `Pawn::RemoveAmmo(uint, ushort)` method. Added `Pawn::SetAmmo(uint, ushort)` method. * Added `AddingItem` and `RemovingItem` events. * Docs fix * Added `AbilityInputComponent`. Converted all hints and broadcasts to `TextDisplay`. Made some changes and fixes to `CustomAbility` API. Changed some namespaces. Split `AbilitySettings` into four (4) different configs: `AbilitySetting`, `ActiveAbilitySettings`, `LevelAbilitySettings`, `UnlockableAbilitySettings`. Added `ISelectableAbility` interface. `ISelectableAbility` has been implemented on all player abilities. It adds two methods: `Select` and `Unselect`, allowing the `Pawn` to mark and store a selected ability using `Pawn::SelectedAbilityBehaviour` added property. It also adds two properties: `IsSelectable` and `IsSelected`. Where `IsSelected` is `only-get`, `IsSelectable` is `get-set` instead, and it can define whether the ability should be treated as an ability handled by `AbilityInputComponent`, if present. * Custom configs and moved serialization to API * Added `VirtualAssemblies`. Renamed `Exiled::API::Features::Config` to ``Exiled::API::Features::EConfig`. Added three (3) events for `Virtual Plugins`: `Disabling`, `Enabling`, `Reloading`. * Revert "Fetch upstream (#2357)" This reverts commit 33edca94155598e1e64d8b25af0577fb562c4711. * Push Revert XMAS * Made some additions, changes, fixed and adjustments to custom firearms. Added `FirearmSettings::` `OverrideReload`, `MaxAmmo` and `ChamberSize` properties. Added `ChangingAttachment` event handler to `FirearmBehaviour`. Added `FirearmBehaviour::ReplicatedClip` replicated property. Added `FirearmBehaviour::ReplicatedMaxAmmo` replicated property. Fixed a `Reloading` bug which doesn't allow to reload in case of non-custom ammo types. `OverrideReload` will now state whether the firearm should use a custom logic to reload, including shooting and how it behaves in case of other events such as `ChangingAttachments` or `UnloadingWeapon`. `OverrideReload` may be an `unsafe` option which does allow to have full control over the firearm's behaviour, leading to some issues if not used correctly. * Added `OnUnloading` and `OnChangingAttachments` exposed events to `FirearmBehaviour`. * Typo * Fixed `GrenadeBehaviour` build errors. Added support for `Pawn` class as base `Player` class. * `[Exiled::API]` (Addition) New `Firearm` properties: `BaseDamage`, `MaxRange`, `Stats`. Added `Firearm::GetDamageAtDistance(float distance)` method. (#2385) * new firearm features * Update Exiled.API/Features/Items/Firearm.cs * Update Exiled.API/Features/Items/Firearm.cs * Update Exiled.API/Features/Items/Firearm.cs * Update Exiled.API/Features/Items/Firearm.cs * Update Exiled.API/Features/Items/Firearm.cs * Update Exiled.API/Features/Items/Firearm.cs * Update Exiled.API/Features/Items/Firearm.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * feat(events): implement EventExceptionLogger to capture event exceptions (#2207) Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> * NPCs fixes by Joker * Added `Strangling` event by Joker * Added `ItemExtensions::GetPickupBase(ItemType)` method by Joker * Removed `MirrorExtensions::SetRoomLightIntensityForTargetOnly` method * No more `var` * Fixed `Generator::set_IsOpen` by Joker * Fixed `Scp244` by Joker * Typo and NPCs fixes by Joker * Fixed `Pickup::IsSpawned` and some `Player` methods. * Re-added `Scp3114Ragdoll` and fixed `Ragdoll` by Joker * Design choices I guess? * `Verified` patch to transpiler by Joker * Fixed `DroppingCandy` event * Fixed `Pickup::IsSpawned` * `[Exiled::Events]` Added `Server::RespawnedTeam` event (#2386) * new ev * Update Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs * Update Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs * Update Exiled.Events/Handlers/Server.cs * Update Exiled.Events/Handlers/Server.cs --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Added `CustomGameModes` draft. Added `GameState` and `PlayerState` classes. Added `IAdditiveBehaviours` interface. Added `CustomModule`, now all custom modules inherit from `CustomModule`. Some docs fixes. * Added `World` `StaticActor`. Added `GameState` and `PlayerState` drafts. `Round::IgnoredPlayers` is now a `HashSet`. Removed obsolete method `Server::RunCommand(string, CommandSender)`. * [Exiled.API] (Change) Modify Door.DoorLockType setter (#2392) * i hate this method * DoorLockType * Added `DefaultPlayerClassAttribute`. Now `Player` derived classes will be automatically used as base `Player` class if marked with `DefaultPlayerClassAttribute` enforcing the type authority, or just by inheriting from `Player` class. * Fix Doc (#2271) * Revert "API Enhancements and Refinements: `Exiled.CustomModules`" (#2405) * Merge master to dev? (#2408) * v8.4.3 (#2305) * TR Localization (#2388) Added Turkish Support for README Localizations * forgor to translate MEC (#2391) yes * Update README.md * Update README-Русский.md * Update README-中文.md * Update README-ES.md * Update README-PL.md * Update README-BR.md * Update README-IT.md * Update README-CS.md * Update README-DK.md * Update README-TR.md * better turkish (#2393) updated --------- Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: 1EnesBaturKaza <156574288+1EnesBaturKaza@users.noreply.github.com> Co-authored-by: Dogy <157377508+RealDogy@users.noreply.github.com> * Revert "Merge master to dev?" (#2411) * Update with SL 13.3 * 8.7.1 * [NW Bug] Sync lights after player rejoin * Update Round.cs --------- Co-authored-by: Nao Co-authored-by: Valentin Arthur Thomas <64769541+warquys@users.noreply.github.com> Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> Co-authored-by: Yamato Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> Co-authored-by: INZI <98975836+InziDeveloperMode@users.noreply.github.com> Co-authored-by: Leonard Timofeev Co-authored-by: Nameless <85962933+Misfiy@users.noreply.github.com> Co-authored-by: Naounderscore Co-authored-by: 1EnesBaturKaza <156574288+1EnesBaturKaza@users.noreply.github.com> Co-authored-by: Dogy <157377508+RealDogy@users.noreply.github.com> * Player::GetProcessed (#2382) * ye * docs * remove this * index param change * 2nd method * Update Exiled.API/Features/Player.cs Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Update Exiled.API/Features/Player.cs Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * fix that --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> * Update Doc File && RequiredSCPSLVersion * 8.8.0 * [Exiled.Events & Exiled.API] Role Spawn Fix (#2474) - Fix spawning in wrong location - Add TryGetRoleBase by Yamato * EventNotCorrectlyRegister (#2455) * `[Exiled::Events]` (`Bug fix`) Scp173Gate can't be closed when using InteractingDoor event `[Exiled::API]` (`Bug fix`) Fix Scp173Gate IsFullyOpen always return false (#2492) * fix: InteractingDoorPatch * fix: IsFullyOpen 173Gate * fix * Fix Hurting And Separated Recontain Event (#2476) * ChangeAppearance Fix (#2486) * Fix Map Explode (#2482) * 8.8.1 * FixStupid * Fix Player::Inventory & Fix a NW Bug where OnAdded get call after OnRemoved (#2458) * Fix * Fix 2 * Fix 3 * Revert "Fix Player::Inventory & Fix a NW Bug where OnAdded get call after OnR…" (#2505) This reverts commit c189dfc8257892cd66c6466ceabfd5c746c7230b. * Fix (#2504) * Reapply "Fix Player::Inventory & Fix a NW Bug where OnAdded get call after OnR…" (#2505) This reverts commit 9f4069252dbb37529b339fba526fc5e88fbcdb37. * Fix Map.Explode * 8.8.2 * Fix FlashBang Showing hitmarker with flash when it's should not (#2526) * Fix * Fix index * doc * fix: crash on blinking request event (#2522) * 13.5.0 * Oups * Oups2 * Documentation & SCP:SL version file * Adding NetworkPrimitiveFlags support * 8.9.0 * FogControl * SetFog * Fix IL ERROR * FollowNWNaming * 8.9.1 * Fix NW moment * 8.9.2 --------- Co-authored-by: Nao <60253860+NaoUnderscore@users.noreply.github.com> Co-authored-by: SmusiJarviss <84509587+SmusiJarviss@users.noreply.github.com> Co-authored-by: Artem Košilinskis <46756889+ITeMbI4@users.noreply.github.com> Co-authored-by: Thunder Co-authored-by: Ika <36999341+SiphoxR@users.noreply.github.com> Co-authored-by: warden161 <118567564+warden161@users.noreply.github.com> Co-authored-by: joker-119 Co-authored-by: Nao Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> Co-authored-by: Bolton <48883340+BoltonDev@users.noreply.github.com> Co-authored-by: Claudio <72409092+ClaudioPanConQueso@users.noreply.github.com> Co-authored-by: TtroubleTT <121741230+TtroubleTT@users.noreply.github.com> Co-authored-by: Misaka-ZeroTwo <45165615+Misaka-ZeroTwo@users.noreply.github.com> Co-authored-by: IRacle <79921583+IRacle1@users.noreply.github.com> Co-authored-by: Nameless <85962933+Misfiy@users.noreply.github.com> Co-authored-by: Snivy FIlms <120346554+NikkiGardiner1@users.noreply.github.com> Co-authored-by: sanyae2439 <30918724+sanyae2439@users.noreply.github.com> Co-authored-by: FUTURE <69786695+FUTURE-SL@users.noreply.github.com> Co-authored-by: Rue <135553058+Ruemena@users.noreply.github.com> Co-authored-by: NotIntense Co-authored-by: Nikki Gardiner Co-authored-by: 白泽 <96401952+XKaguya@users.noreply.github.com> Co-authored-by: BoltonII Co-authored-by: Artyomus1337 <92204916+Artyomus1337@users.noreply.github.com> Co-authored-by: Rysik5318 <72207886+Rysik5318@users.noreply.github.com> Co-authored-by: 白泽 Co-authored-by: Miki_hero <100715076+Mikihero@users.noreply.github.com> Co-authored-by: NaoUnderscore Co-authored-by: Nao Co-authored-by: Valentin Arthur Thomas <64769541+warquys@users.noreply.github.com> Co-authored-by: INZI <98975836+InziDeveloperMode@users.noreply.github.com> Co-authored-by: Leonard Timofeev Co-authored-by: Naounderscore Co-authored-by: 1EnesBaturKaza <156574288+1EnesBaturKaza@users.noreply.github.com> Co-authored-by: Dogy <157377508+RealDogy@users.noreply.github.com> Co-authored-by: Vladislav-CS Co-authored-by: VALERA771 --- EXILED.props | 2 +- Exiled.API/Enums/EffectType.cs | 6 + Exiled.API/Extensions/EffectTypeExtension.cs | 9 + Exiled.API/Extensions/MirrorExtensions.cs | 3 +- Exiled.API/Extensions/RoleExtensions.cs | 14 +- Exiled.API/Features/Doors/Door.cs | 2 +- Exiled.API/Features/Doors/Gate.cs | 2 +- Exiled.API/Features/Map.cs | 14 +- Exiled.API/Features/Player.cs | 23 ++- Exiled.API/Features/Roles/Scp106Role.cs | 14 +- Exiled.API/Features/Toys/Primitive.cs | 80 ++++++--- Exiled.API/Structs/PrimitiveSettings.cs | 42 ++++- .../Map/ExplodingGrenadeEventArgs.cs | 7 +- .../Player/SearchingPickupEventArgs.cs | 3 +- .../Player/SpawningRagdollEventArgs.cs | 12 +- .../Scp049/FinishingRecallEventArgs.cs | 2 +- .../Scp173/BlinkingRequestEventArgs.cs | 10 +- Exiled.Events/Events.cs | 1 + .../Handlers/Internal/MapGenerated.cs | 5 + Exiled.Events/Handlers/Internal/Round.cs | 11 +- Exiled.Events/Handlers/Player.cs | 20 ++- .../Patches/Events/Map/BreakingScp2176.cs | 9 +- .../Events/Map/ExplodingFlashGrenade.cs | 59 +++--- .../Patches/Events/Player/Hurting.cs | 40 +---- .../Patches/Events/Player/InteractingDoor.cs | 9 - .../Events/Player/SearchingPickupEvent.cs | 40 ++--- .../Patches/Events/Player/Spawning.cs | 47 +++-- .../Patches/Events/Player/SpawningRagdoll.cs | 25 +-- .../Patches/Events/Scp049/FinishingRecall.cs | 5 +- .../Patches/Events/Scp079/Recontain.cs | 62 +++++++ .../Patches/Events/Scp106/Attacking.cs | 14 +- .../Patches/Events/Scp914/UpgradingPlayer.cs | 3 +- .../FixOnAddedBeingCallAfterOnRemoved.cs | 65 +++++++ .../Patches/Fixes/FixPickupPreviousOwner.cs | 1 - .../Patches/Fixes/NWFixScp096BreakingDoor.cs | 55 ++++++ .../OptimiseNWPocketDimensionGenerator.cs | 46 +++++ .../AddRespawnTargetMultiplierConfig.cs | 54 ++++++ .../Patches/Generic/InventoryControlPatch.cs | 168 ------------------ .../Patches/Generic/Scp106API/CustomAttack.cs | 27 +-- Exiled.Events/Patches/Generic/TeleportList.cs | 11 +- Exiled.Loader/AutoUpdateFiles.cs | 2 +- docs/docs/Resources/Intro.md | 34 ++-- 42 files changed, 621 insertions(+), 437 deletions(-) create mode 100644 Exiled.Events/Patches/Events/Scp079/Recontain.cs create mode 100644 Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs create mode 100644 Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs create mode 100644 Exiled.Events/Patches/Fixes/OptimiseNWPocketDimensionGenerator.cs create mode 100644 Exiled.Events/Patches/Generic/AddRespawnTargetMultiplierConfig.cs delete mode 100644 Exiled.Events/Patches/Generic/InventoryControlPatch.cs diff --git a/EXILED.props b/EXILED.props index b33a703792..b4f4f124d4 100644 --- a/EXILED.props +++ b/EXILED.props @@ -15,7 +15,7 @@ - 8.7.1 + 8.9.2 false diff --git a/Exiled.API/Enums/EffectType.cs b/Exiled.API/Enums/EffectType.cs index 665f481632..acbc14bb3e 100644 --- a/Exiled.API/Enums/EffectType.cs +++ b/Exiled.API/Enums/EffectType.cs @@ -228,5 +228,11 @@ public enum EffectType /// Makes the player nearly invisible, and allows them to pass through doors. /// Ghostly, + + /// + /// Manipulate wish Fog player will have. + /// You can choose fog with and putting it on intensity. + /// + FogControl, } } diff --git a/Exiled.API/Extensions/EffectTypeExtension.cs b/Exiled.API/Extensions/EffectTypeExtension.cs index 6edd5542d5..2f336440dc 100644 --- a/Exiled.API/Extensions/EffectTypeExtension.cs +++ b/Exiled.API/Extensions/EffectTypeExtension.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Extensions using System.Linq; using CustomPlayerEffects; + using CustomRendering; using Enums; using InventorySystem.Items.MarshmallowMan; using InventorySystem.Items.Usables.Scp244.Hypothermia; @@ -70,6 +71,7 @@ public static class EffectTypeExtension #pragma warning restore CS0618 { EffectType.Strangled, typeof(Strangled) }, { EffectType.Ghostly, typeof(Ghostly) }, + { EffectType.FogControl, typeof(FogControl) }, }; /// @@ -119,6 +121,13 @@ public static bool TryGetEffectType(this StatusEffectBase statusEffectBase, out return true; } + /// + /// Sets the of the specified . + /// + /// The effect. + /// The applied. + public static void SetFogType(this FogControl fogControl, FogType fogType) => fogControl.Intensity = (byte)(fogType + 1); + /// /// Returns whether or not the provided drains health over time. /// diff --git a/Exiled.API/Extensions/MirrorExtensions.cs b/Exiled.API/Extensions/MirrorExtensions.cs index c35cdbb505..2a2ec0c303 100644 --- a/Exiled.API/Extensions/MirrorExtensions.cs +++ b/Exiled.API/Extensions/MirrorExtensions.cs @@ -260,7 +260,8 @@ public static void ChangeAppearance(this Player player, RoleTypeId type, IEnumer else fpc = playerfpc; - fpc.FpcModule.MouseLook.GetSyncValues(0, out ushort value, out ushort _); + ushort value = 0; + fpc?.FpcModule.MouseLook.GetSyncValues(0, out value, out ushort _); writer.WriteRelativePosition(player.RelativePosition); writer.WriteUShort(value); } diff --git a/Exiled.API/Extensions/RoleExtensions.cs b/Exiled.API/Extensions/RoleExtensions.cs index 76be3ff7f6..fd160c9ee1 100644 --- a/Exiled.API/Extensions/RoleExtensions.cs +++ b/Exiled.API/Extensions/RoleExtensions.cs @@ -93,6 +93,16 @@ public static class RoleExtensions /// The . public static bool TryGetRoleBase(this RoleTypeId roleType, out PlayerRoleBase roleBase) => PlayerRoleLoader.TryGetRoleTemplate(roleType, out roleBase); + /// + /// Tries to get the base of the given . + /// + /// The . + /// The to return. + /// The type to cast the to. + /// The . + public static bool TryGetRoleBase(this RoleTypeId roleType, out T roleBase) + where T : PlayerRoleBase => PlayerRoleLoader.TryGetRoleTemplate(roleType, out roleBase); + /// /// Gets the . /// @@ -120,11 +130,11 @@ public static class RoleExtensions /// Returns a representing the spawn, or if no spawns were found. public static SpawnLocation GetRandomSpawnLocation(this RoleTypeId roleType) { - if (roleType.GetRoleBase() is IFpcRole fpcRole && + if (roleType.TryGetRoleBase(out FpcStandardRoleBase fpcRole) && fpcRole.SpawnpointHandler != null && fpcRole.SpawnpointHandler.TryGetSpawnpoint(out Vector3 position, out float horizontalRotation)) { - return new SpawnLocation(roleType, position, horizontalRotation); + return new(roleType, position, horizontalRotation); } return null; diff --git a/Exiled.API/Features/Doors/Door.cs b/Exiled.API/Features/Doors/Door.cs index 00501e9c10..35037d3672 100644 --- a/Exiled.API/Features/Doors/Door.cs +++ b/Exiled.API/Features/Doors/Door.cs @@ -111,7 +111,7 @@ internal Door(DoorVariant door, List rooms) /// /// Gets a value indicating whether or not the door is currently moving. /// - public virtual bool IsMoving => ExactState is not(0 or 1); + public virtual bool IsMoving => !(IsFullyOpen || IsFullyClosed); /// /// Gets a value indicating the precise state of the door, from 0-1. A value of 0 indicates the door is fully closed, while a value of 1 indicates the door is fully open. Values in-between represent the door's animation progress. diff --git a/Exiled.API/Features/Doors/Gate.cs b/Exiled.API/Features/Doors/Gate.cs index 43d42e03d8..20679cf582 100644 --- a/Exiled.API/Features/Doors/Gate.cs +++ b/Exiled.API/Features/Doors/Gate.cs @@ -48,7 +48,7 @@ public Gate(PryableDoor door, List room) /// /// Gets a value indicating whether the door is fully open. /// - public override bool IsFullyOpen => base.IsFullyOpen; + public override bool IsFullyOpen => base.IsFullyOpen || (Base is Timed173PryableDoor && ExactState is 0.5845918f); /// /// Gets a value indicating whether or not the door is currently moving. diff --git a/Exiled.API/Features/Map.cs b/Exiled.API/Features/Map.cs index c2c512a983..42ff66f09f 100644 --- a/Exiled.API/Features/Map.cs +++ b/Exiled.API/Features/Map.cs @@ -369,10 +369,18 @@ public static void Explode(Vector3 position, ProjectileType projectileType, Play attacker ??= Server.Host; if (!InventoryItemLoader.TryGetItem(item, out ThrowableItem throwableItem)) return; - ExplosionUtils.ServerSpawnEffect(position, item); - if (throwableItem.Projectile is ExplosionGrenade explosionGrenade) - ExplosionGrenade.Explode(attacker.Footprint, position, explosionGrenade); + if (Object.Instantiate(throwableItem.Projectile) is not TimeGrenade timedGrenadePickup) + return; + + if (timedGrenadePickup is Scp018Projectile scp018Projectile) + scp018Projectile.SetupModule(); + else + ExplodeEffect(position, projectileType); + + timedGrenadePickup.Position = position; + timedGrenadePickup.PreviousOwner = (attacker ?? Server.Host).Footprint; + timedGrenadePickup.ServerFuseEnd(); } /// diff --git a/Exiled.API/Features/Player.cs b/Exiled.API/Features/Player.cs index 39926ee2db..bebe8e131a 100644 --- a/Exiled.API/Features/Player.cs +++ b/Exiled.API/Features/Player.cs @@ -1425,6 +1425,24 @@ public static Player Get(string args) /// A boolean indicating whether or not a player was found. public static bool TryGet(Collider collider, out Player player) => (player = Get(collider)) is not null; + /// + /// Gets an containing all players processed based on the arguments specified. + /// + /// The array segment of strings representing the input arguments to be processed. + /// The starting index within the array segment. + /// Contains the updated arguments after processing. + /// Determines whether empty entries should be kept in the result. + /// An representing the processed players. + public static IEnumerable GetProcessedData(ArraySegment args, int startIndex, out string[] newargs, bool keepEmptyEntries = false) => RAUtils.ProcessPlayerIdOrNamesList(args, startIndex, out newargs, keepEmptyEntries).Select(hub => Get(hub)); + + /// + /// Gets an containing all players processed based on the arguments specified. + /// + /// The array segment of strings representing the input arguments to be processed. + /// The starting index within the array segment. + /// An representing the processed players. + public static IEnumerable GetProcessedData(ArraySegment args, int startIndex = 0) => GetProcessedData(args, startIndex, out string[] _); + /// /// Adds a player's UserId to the list of reserved slots. /// @@ -1947,7 +1965,8 @@ public bool RemoveItem(Item item, bool destroy = true) Inventory.NetworkCurItem = ItemIdentifier.None; Inventory.UserInventory.Items.Remove(item.Serial); - ItemsValue.Remove(item); + typeof(InventoryExtensions).InvokeStaticEvent(nameof(InventoryExtensions.OnItemRemoved), new object[] { ReferenceHub, item.Base, null }); + Inventory.SendItemsNextFrame = true; } @@ -2572,8 +2591,6 @@ public Item AddItem(ItemBase itemBase, Item item = null) typeof(InventoryExtensions).InvokeStaticEvent(nameof(InventoryExtensions.OnItemAdded), new object[] { ReferenceHub, itemBase, null }); - ItemsValue.Add(item); - Inventory.SendItemsNextFrame = true; return item; } diff --git a/Exiled.API/Features/Roles/Scp106Role.cs b/Exiled.API/Features/Roles/Scp106Role.cs index 4937782e9f..826e756a50 100644 --- a/Exiled.API/Features/Roles/Scp106Role.cs +++ b/Exiled.API/Features/Roles/Scp106Role.cs @@ -200,11 +200,6 @@ public bool SinkholeState /// internal float VigorRegeneration { get; } = Scp106StalkAbility.VigorRegeneration; - /// - /// Gets or sets how mush damage Scp106 will dealt when attacking a player. - /// - internal float AttackDamage { get; } = Scp106Attack.AttackDamage; - /// /// Gets or sets the duration of Corroding effect. /// @@ -231,6 +226,15 @@ public bool SinkholeState internal float HuntersAtlasCostPerMeter { get; } = Scp106HuntersAtlasAbility.CostPerMeter; #pragma warning restore SA1623 // Property summary documentation should match accessors + /// + /// Gets or sets how mush damage Scp106 will dealt when attacking a player. + /// + public int AttackDamage + { + get => Attack._damage; + set => Attack._damage = value; + } + /// /// Gets or sets the amount of time in between player captures. /// diff --git a/Exiled.API/Features/Toys/Primitive.cs b/Exiled.API/Features/Toys/Primitive.cs index b27db955da..aeed4c2ba8 100644 --- a/Exiled.API/Features/Toys/Primitive.cs +++ b/Exiled.API/Features/Toys/Primitive.cs @@ -24,20 +24,12 @@ namespace Exiled.API.Features.Toys /// public class Primitive : AdminToy, IWrapper { - private bool collidable = true; - /// /// Initializes a new instance of the class. /// /// The of the toy. internal Primitive(PrimitiveObjectToy toyAdminToyBase) - : base(toyAdminToyBase, AdminToyType.PrimitiveObject) - { - Base = toyAdminToyBase; - - Vector3 scale = Base.transform.localScale; - collidable = scale.x > 0f || scale.y > 0f || scale.z > 0f; - } + : base(toyAdminToyBase, AdminToyType.PrimitiveObject) => Base = toyAdminToyBase; /// /// Gets the base . @@ -67,13 +59,27 @@ public Color Color /// public bool Collidable { - get => collidable; - set - { - collidable = value; - RefreshCollidable(); - } - } + get => Flags.HasFlag(PrimitiveFlags.Collidable); + set => Flags = value ? (Flags | PrimitiveFlags.Collidable) : (Flags & ~PrimitiveFlags.Collidable); + } + + /// + /// Gets or sets a value indicating whether the primitive is visible. + /// + public bool Visible + { + get => Flags.HasFlag(PrimitiveFlags.Visible); + set => Flags = value ? (Flags | PrimitiveFlags.Visible) : (Flags & ~PrimitiveFlags.Visible); + } + + /// + /// Gets or sets the primitive flags. + /// + public PrimitiveFlags Flags + { + get => Base.NetworkPrimitiveFlags; + set => Base.NetworkPrimitiveFlags = value; + } /// /// Creates a new . @@ -149,6 +155,36 @@ public static Primitive Create(PrimitiveType primitiveType /*= PrimitiveType.Sph primitive.Base.NetworkPrimitiveType = primitiveType; primitive.Color = color ?? Color.gray; + return primitive; + } + + /// + /// Creates a new . + /// + /// The type of primitive to spawn. + /// The primitive flags. + /// The position of the . + /// The rotation of the . + /// The scale of the . + /// Whether or not the should be initially spawned. + /// The color of the . + /// The new . + public static Primitive Create(PrimitiveType primitiveType /*= PrimitiveType.Sphere*/, PrimitiveFlags flags, Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/) + { + Primitive primitive = new(Object.Instantiate(ToysHelper.PrimitiveBaseObject)); + + primitive.AdminToyBase.transform.position = position ?? Vector3.zero; + primitive.AdminToyBase.transform.eulerAngles = rotation ?? Vector3.zero; + primitive.AdminToyBase.transform.localScale = scale ?? Vector3.one; + primitive.Flags = flags; + + if (spawn) + primitive.Spawn(); + + primitive.AdminToyBase.NetworkScale = primitive.AdminToyBase.transform.localScale; + primitive.Base.NetworkPrimitiveType = primitiveType; + primitive.Color = color ?? Color.gray; + return primitive; } @@ -164,6 +200,7 @@ public static Primitive Create(PrimitiveSettings primitiveSettings) primitive.AdminToyBase.transform.position = primitiveSettings.Position; primitive.AdminToyBase.transform.eulerAngles = primitiveSettings.Rotation; primitive.AdminToyBase.transform.localScale = primitiveSettings.Scale; + primitive.Flags = primitiveSettings.Flags; if (primitiveSettings.Spawn) primitive.Spawn(); @@ -171,6 +208,7 @@ public static Primitive Create(PrimitiveSettings primitiveSettings) primitive.AdminToyBase.NetworkScale = primitive.AdminToyBase.transform.localScale; primitive.Base.NetworkPrimitiveType = primitiveSettings.PrimitiveType; primitive.Color = primitiveSettings.Color; + primitive.IsStatic = primitiveSettings.IsStatic; return primitive; } @@ -185,15 +223,5 @@ public static Primitive Get(PrimitiveObjectToy primitiveObjectToy) AdminToy adminToy = Map.Toys.FirstOrDefault(x => x.AdminToyBase == primitiveObjectToy); return adminToy is not null ? adminToy as Primitive : new Primitive(primitiveObjectToy); } - - private void RefreshCollidable() - { - UnSpawn(); - - Vector3 scale = Scale; - Base.transform.localScale = Collidable ? new Vector3(Math.Abs(scale.x), Math.Abs(scale.y), Math.Abs(scale.z)) : new Vector3(-Math.Abs(scale.x), -Math.Abs(scale.y), -Math.Abs(scale.z)); - - Spawn(); - } } } diff --git a/Exiled.API/Structs/PrimitiveSettings.cs b/Exiled.API/Structs/PrimitiveSettings.cs index 933b0c81d6..ec5b4dcbf7 100644 --- a/Exiled.API/Structs/PrimitiveSettings.cs +++ b/Exiled.API/Structs/PrimitiveSettings.cs @@ -6,7 +6,8 @@ // ----------------------------------------------------------------------- namespace Exiled.API.Structs -{ +{ + using AdminToys; using UnityEngine; /// @@ -26,7 +27,8 @@ public struct PrimitiveSettings /// Whether or not the primitive should be static. public PrimitiveSettings(PrimitiveType primitiveType, Color color, Vector3 position, Vector3 rotation, Vector3 scale, bool spawn, bool isStatic) { - PrimitiveType = primitiveType; + PrimitiveType = primitiveType; + Flags = PrimitiveFlags.Collidable | PrimitiveFlags.Visible; Color = color; Position = position; Rotation = rotation; @@ -46,19 +48,47 @@ public PrimitiveSettings(PrimitiveType primitiveType, Color color, Vector3 posit /// Whether or not the primitive should be spawned. public PrimitiveSettings(PrimitiveType primitiveType, Color color, Vector3 position, Vector3 rotation, Vector3 scale, bool spawn) { - PrimitiveType = primitiveType; + PrimitiveType = primitiveType; + Flags = PrimitiveFlags.Collidable | PrimitiveFlags.Visible; Color = color; Position = position; Rotation = rotation; Scale = scale; - Spawn = spawn; + Spawn = spawn; IsStatic = false; - } + } + + /// + /// Initializes a new instance of the struct. + /// + /// The type of the primitive. + /// The flags of the primitive. + /// The color of the primitive. + /// The position of the primitive. + /// The rotation of the primitive. + /// The scale of the primitive. + /// Whether or not the primitive should be spawned. + public PrimitiveSettings(PrimitiveType primitiveType, PrimitiveFlags primitiveFlags, Color color, Vector3 position, Vector3 rotation, Vector3 scale, bool spawn) + { + PrimitiveType = primitiveType; + Flags = primitiveFlags; + Color = color; + Position = position; + Rotation = rotation; + Scale = scale; + Spawn = spawn; + IsStatic = false; + } /// /// Gets the primitive type. /// - public PrimitiveType PrimitiveType { get; } + public PrimitiveType PrimitiveType { get; } + + /// + /// Gets the primitive flags. + /// + public PrimitiveFlags Flags { get; } /// /// Gets the primitive color. diff --git a/Exiled.Events/EventArgs/Map/ExplodingGrenadeEventArgs.cs b/Exiled.Events/EventArgs/Map/ExplodingGrenadeEventArgs.cs index b8e1fec768..28b7b30f0d 100644 --- a/Exiled.Events/EventArgs/Map/ExplodingGrenadeEventArgs.cs +++ b/Exiled.Events/EventArgs/Map/ExplodingGrenadeEventArgs.cs @@ -88,15 +88,18 @@ public ExplodingGrenadeEventArgs(Footprint thrower, Vector3 position, ExplosionG /// /// /// + /// + /// + /// /// /// /// - public ExplodingGrenadeEventArgs(Player thrower, EffectGrenade grenade, bool isAllowed = true) + public ExplodingGrenadeEventArgs(Player thrower, EffectGrenade grenade, List targetsToAffect, bool isAllowed = true) { Player = thrower ?? Server.Host; Projectile = (EffectGrenadeProjectile)Pickup.Get(grenade); Position = Projectile.Position; - TargetsToAffect = ListPool.Pool.Get(Player.List); + TargetsToAffect = ListPool.Pool.Get(targetsToAffect ?? new()); IsAllowed = isAllowed; } diff --git a/Exiled.Events/EventArgs/Player/SearchingPickupEventArgs.cs b/Exiled.Events/EventArgs/Player/SearchingPickupEventArgs.cs index 6d2366364d..58e9f47628 100644 --- a/Exiled.Events/EventArgs/Player/SearchingPickupEventArgs.cs +++ b/Exiled.Events/EventArgs/Player/SearchingPickupEventArgs.cs @@ -44,7 +44,6 @@ public SearchingPickupEventArgs(Player player, ItemPickupBase pickup, SearchSess SearchSession = searchSession; SearchCompletor = searchCompletor; SearchTime = searchTime; - IsAllowed = searchCompletor.ValidateStart(); } /// @@ -65,7 +64,7 @@ public SearchingPickupEventArgs(Player player, ItemPickupBase pickup, SearchSess /// /// Gets or sets a value indicating whether the Pickup can be searched. /// - public bool IsAllowed { get; set; } + public bool IsAllowed { get; set; } = true; /// /// Gets the Pickup that is being searched. diff --git a/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs b/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs index 13e7f25bcf..b486a892f5 100644 --- a/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs +++ b/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs @@ -28,16 +28,12 @@ public class SpawningRagdollEventArgs : IPlayerEvent, IDeniableEvent /// /// /// - /// - /// - /// /// /// /// - public SpawningRagdollEventArgs(RagdollData info, DamageHandlerBase damageHandlerBase, bool isAllowed = true) + public SpawningRagdollEventArgs(RagdollData info, bool isAllowed = true) { Info = info; - DamageHandlerBase = damageHandlerBase; Player = Player.Get(info.OwnerHub); Scale = Player.Scale; IsAllowed = isAllowed; @@ -97,7 +93,11 @@ public string Nickname /// /// Gets or sets the ragdoll's . /// - public DamageHandlerBase DamageHandlerBase { get; set; } + public DamageHandlerBase DamageHandlerBase + { + get => Info.Handler; + set => Info = new RagdollData(Player.ReferenceHub, value, Role, Position, Rotation, Nickname, CreationTime); + } /// /// Gets or sets a value indicating whether or not the ragdoll can be spawned. diff --git a/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs b/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs index e897dbb04a..e2c2c0728c 100644 --- a/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs +++ b/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs @@ -38,7 +38,7 @@ public FinishingRecallEventArgs(Player target, Player scp049, BasicRagdoll ragdo Scp049 = Player.Role.As(); Target = target; Ragdoll = Ragdoll.Get(ragdoll); - IsAllowed = isAllowed; + IsAllowed = isAllowed && Target.Role is SpectatorRole spectatorRole && spectatorRole.IsReadyToRespawn; } /// diff --git a/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs b/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs index 3f9df17171..cf05b21dd5 100644 --- a/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs +++ b/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs @@ -8,15 +8,11 @@ namespace Exiled.Events.EventArgs.Scp173 { using System.Collections.Generic; + using System.Linq; using API.Features; - using Interfaces; - using PlayerRoles.PlayableScps.Scp173; - - using UnityEngine; - using Scp173Role = API.Features.Roles.Scp173Role; /// @@ -33,11 +29,11 @@ public class BlinkingRequestEventArgs : IScp173Event, IDeniableEvent /// /// /// - public BlinkingRequestEventArgs(Player player, HashSet targets) + public BlinkingRequestEventArgs(Player player, HashSet targets) { Player = player; Scp173 = player.Role.As(); - Targets = targets; + Targets = targets.Select(target => Player.Get(target)).ToList(); } /// diff --git a/Exiled.Events/Events.cs b/Exiled.Events/Events.cs index fee31f0c9d..178071bb73 100644 --- a/Exiled.Events/Events.cs +++ b/Exiled.Events/Events.cs @@ -104,6 +104,7 @@ public override void OnDisabled() CharacterClassManager.OnRoundStarted -= Handlers.Server.OnRoundStarted; InventorySystem.InventoryExtensions.OnItemAdded -= Handlers.Player.OnItemAdded; + InventorySystem.InventoryExtensions.OnItemRemoved -= Handlers.Player.OnItemRemoved; RagdollManager.OnRagdollSpawned -= Handlers.Internal.RagdollList.OnSpawnedRagdoll; RagdollManager.OnRagdollRemoved -= Handlers.Internal.RagdollList.OnRemovedRagdoll; diff --git a/Exiled.Events/Handlers/Internal/MapGenerated.cs b/Exiled.Events/Handlers/Internal/MapGenerated.cs index d4bd8d037a..2c9fc1ba45 100644 --- a/Exiled.Events/Handlers/Internal/MapGenerated.cs +++ b/Exiled.Events/Handlers/Internal/MapGenerated.cs @@ -47,6 +47,11 @@ public static void OnMapGenerated() { Map.ClearCache(); + // TODO: Fix For (https://trello.com/c/cUwpZDLs/5003-config-teamrespawnqueue-in-configgameplay-is-not-working-as-expected) + PlayerRoles.RoleAssign.HumanSpawner.Handlers[PlayerRoles.Team.ChaosInsurgency] = new PlayerRoles.RoleAssign.OneRoleHumanSpawner(PlayerRoles.RoleTypeId.ChaosConscript); + PlayerRoles.RoleAssign.HumanSpawner.Handlers[PlayerRoles.Team.OtherAlive] = new PlayerRoles.RoleAssign.OneRoleHumanSpawner(PlayerRoles.RoleTypeId.Tutorial); + PlayerRoles.RoleAssign.HumanSpawner.Handlers[PlayerRoles.Team.Dead] = new PlayerRoles.RoleAssign.OneRoleHumanSpawner(PlayerRoles.RoleTypeId.Spectator); + GenerateAttachments(); Timing.CallDelayed(1, GenerateCache); } diff --git a/Exiled.Events/Handlers/Internal/Round.cs b/Exiled.Events/Handlers/Internal/Round.cs index 5409fa67c9..400eb044c8 100644 --- a/Exiled.Events/Handlers/Internal/Round.cs +++ b/Exiled.Events/Handlers/Internal/Round.cs @@ -7,14 +7,16 @@ namespace Exiled.Events.Handlers.Internal { + using System.Linq; + using CentralAuth; + using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Player; using Exiled.Events.EventArgs.Scp049; using Exiled.Loader; using Exiled.Loader.Features; - using InventorySystem; using InventorySystem.Items.Usables; using PlayerRoles; @@ -83,6 +85,13 @@ public static void OnActivatingSense(ActivatingSenseEventArgs ev) public static void OnVerified(VerifiedEventArgs ev) { RoleAssigner.CheckLateJoin(ev.Player.ReferenceHub, ClientInstanceMode.ReadyClient); + + // TODO: Remove if this has been fixed for https://trello.com/c/CzPD304L/5983-networking-blackout-is-not-synchronized-for-the-new-players + foreach (Room room in Room.List.Where(current => current.AreLightsOff)) + { + ev.Player.SendFakeSyncVar(room.RoomLightControllerNetIdentity, typeof(RoomLightController), nameof(RoomLightController.NetworkLightsEnabled), true); + ev.Player.SendFakeSyncVar(room.RoomLightControllerNetIdentity, typeof(RoomLightController), nameof(RoomLightController.NetworkLightsEnabled), false); + } } } } diff --git a/Exiled.Events/Handlers/Player.cs b/Exiled.Events/Handlers/Player.cs index 2bf468a020..8f45023d7b 100644 --- a/Exiled.Events/Handlers/Player.cs +++ b/Exiled.Events/Handlers/Player.cs @@ -7,6 +7,7 @@ namespace Exiled.Events.Handlers { + using Exiled.API.Features.Pickups; #pragma warning disable IDE0079 #pragma warning disable IDE0060 #pragma warning disable SA1623 // Property summary documentation should match accessors @@ -941,7 +942,15 @@ public class Player /// The added . /// The the originated from, or if the item was not picked up. public static void OnItemAdded(ReferenceHub referenceHub, InventorySystem.Items.ItemBase itemBase, InventorySystem.Items.Pickups.ItemPickupBase pickupBase) - => ItemAdded.InvokeSafely(new ItemAddedEventArgs(referenceHub, itemBase, pickupBase)); + { + ItemAddedEventArgs ev = new(referenceHub, itemBase, pickupBase); + + ev.Item.ReadPickupInfo(ev.Pickup); + + ev.Player.ItemsValue.Add(ev.Item); + + ItemAdded.InvokeSafely(ev); + } /// /// Called after a has an item removed from their inventory. @@ -950,7 +959,14 @@ public static void OnItemAdded(ReferenceHub referenceHub, InventorySystem.Items. /// The removed . /// The the originated from, or if the item was not picked up. public static void OnItemRemoved(ReferenceHub referenceHub, InventorySystem.Items.ItemBase itemBase, InventorySystem.Items.Pickups.ItemPickupBase pickupBase) - => ItemRemoved.InvokeSafely(new ItemRemovedEventArgs(referenceHub, itemBase, pickupBase)); + { + ItemRemovedEventArgs ev = new(referenceHub, itemBase, pickupBase); + ItemRemoved.InvokeSafely(ev); + + ev.Player.ItemsValue.Remove(ev.Item); + + API.Features.Items.Item.BaseToItem.Remove(itemBase); + } /// /// Called before a enters in an environmental hazard. diff --git a/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs b/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs index 9b0c2cb5c5..53f8f97e43 100644 --- a/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs +++ b/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs @@ -50,11 +50,14 @@ private static IEnumerable Transpiler(IEnumerable, bool) + new(OpCodes.Newobj, DeclaredConstructor(typeof(ExplodingGrenadeEventArgs), new[] { typeof(Player), typeof(EffectGrenade), typeof(List), typeof(bool) })), new(OpCodes.Dup), // Handlers.Map.OnExplodingGrenade(ev); diff --git a/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs b/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs index 7320ef208b..236939b22a 100644 --- a/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs +++ b/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs @@ -7,6 +7,7 @@ namespace Exiled.Events.Patches.Events.Map { + using System; using System.Collections.Generic; using System.Linq; using System.Reflection.Emit; @@ -35,27 +36,25 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); - // Immediately return - Label returnLabel = generator.DefineLabel(); + Label ignoreLabel = generator.DefineLabel(); - int offset = 4; - int index = newInstructions.FindLastIndex(instruction => instruction.Calls(PropertyGetter(typeof(Keyframe), nameof(Keyframe.time)))) + offset; + int offset = 1; + int index = newInstructions.FindLastIndex(instruction => instruction.StoresField(Field(typeof(FlashbangGrenade), nameof(FlashbangGrenade._hitPlayerCount)))) + offset; newInstructions.InsertRange( index, new[] { - // FlashbangGrenade + // ExplodingFlashGrenade.ProcessEvent(this, num) new CodeInstruction(OpCodes.Ldarg_0), - new CodeInstruction(OpCodes.Ldarg_0), - - // Processes ExplodingGrenadeEventArgs and stores flashed players count + new CodeInstruction(OpCodes.Ldloc_0), new(OpCodes.Call, Method(typeof(ExplodingFlashGrenade), nameof(ProcessEvent))), - new(OpCodes.Stfld, Field(typeof(FlashbangGrenade), nameof(FlashbangGrenade._hitPlayerCount))), - new(OpCodes.Br_S, returnLabel), + + // ignore the foreach since exiled overwrite it + new(OpCodes.Br_S, ignoreLabel), }); - newInstructions[newInstructions.FindLastIndex(i => i.opcode == OpCodes.Ble_S) - 3].WithLabels(returnLabel); + newInstructions[newInstructions.FindLastIndex(i => i.opcode == OpCodes.Ble_S) - 3].WithLabels(ignoreLabel); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; @@ -63,31 +62,37 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } - private static int ProcessEvent(FlashbangGrenade instance) + private static void ProcessEvent(FlashbangGrenade instance, float distance) { - ExplodingGrenadeEventArgs explodingGrenadeEvent = new ExplodingGrenadeEventArgs(Player.Get(instance.PreviousOwner.Hub), instance); + List targetToAffect = ListPool.Pool.Get(); + foreach (ReferenceHub referenceHub in ReferenceHub.AllHubs) + { + Player player = Player.Get(referenceHub); + if ((instance.transform.position - referenceHub.transform.position).sqrMagnitude <= distance) + continue; + if (!ExiledEvents.Instance.Config.CanFlashbangsAffectThrower && instance.PreviousOwner.SameLife(new(referenceHub))) + continue; + if (!IndividualFriendlyFire.CheckFriendlyFirePlayer(instance.PreviousOwner, player.ReferenceHub)) + continue; + if (!Physics.Linecast(instance.transform.position, player.Position, instance._blindingMask)) + continue; + + targetToAffect.Add(Player.Get(referenceHub)); + } + + ExplodingGrenadeEventArgs explodingGrenadeEvent = new(Player.Get(instance.PreviousOwner.Hub), instance, targetToAffect); + + ListPool.Pool.Return(targetToAffect); Handlers.Map.OnExplodingGrenade(explodingGrenadeEvent); if (!explodingGrenadeEvent.IsAllowed) - return 0; + return; - int size = 0; foreach (Player player in explodingGrenadeEvent.TargetsToAffect) { - if (!ExiledEvents.Instance.Config.CanFlashbangsAffectThrower && explodingGrenadeEvent.Player == player) - continue; - - if (IndividualFriendlyFire.CheckFriendlyFirePlayer(instance.PreviousOwner, player.ReferenceHub)) - { - instance.ProcessPlayer(player.ReferenceHub); - size++; - } + instance.ProcessPlayer(player.ReferenceHub); } - - return size; } - - private static List ConvertHubs(List hubs) => hubs.Select(Player.Get).ToList(); } } \ No newline at end of file diff --git a/Exiled.Events/Patches/Events/Player/Hurting.cs b/Exiled.Events/Patches/Events/Player/Hurting.cs index 73e8ea4a45..4a5798a0c4 100644 --- a/Exiled.Events/Patches/Events/Player/Hurting.cs +++ b/Exiled.Events/Patches/Events/Player/Hurting.cs @@ -39,11 +39,8 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); LocalBuilder player = generator.DeclareLocal(typeof(Player)); - LocalBuilder ev = generator.DeclareLocal(typeof(HurtingEventArgs)); - - Label notRecontainment = generator.DefineLabel(); - Label ret = generator.DefineLabel(); + Label jump = generator.DefineLabel(); int offset = 1; int index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Ret) + offset; @@ -57,44 +54,22 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } - - private static bool CanStateChange(DoorVariant variant) - { - return !(variant.GetExactState() > 0f && variant.GetExactState() < 1f); - } } } \ No newline at end of file diff --git a/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs b/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs index 9973366af4..70416681ca 100644 --- a/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs +++ b/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs @@ -34,22 +34,24 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); - Label allowLabel = generator.DefineLabel(); + Label retLabel = generator.DefineLabel(); LocalBuilder ev = generator.DeclareLocal(typeof(SearchingPickupEventArgs)); int offset = 1; - int index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Stind_Ref) + offset; + int index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Brtrue_S) + offset; - // remove base-game check and `SearchSession body` setter - newInstructions.RemoveRange(index, 14); + newInstructions[index].labels.Add(retLabel); + + offset = 1; + index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Ret) + offset; newInstructions.InsertRange( index, new[] { // Player.Get(Hub) - new(OpCodes.Ldarg_0), + new CodeInstruction(OpCodes.Ldarg_0).MoveLabelsFrom(newInstructions[index]), new(OpCodes.Callvirt, PropertyGetter(typeof(SearchCoordinator), nameof(SearchCoordinator.Hub))), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), @@ -82,27 +84,16 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable i.opcode == OpCodes.Stloc_S && i.operand is LocalBuilder { LocalIndex: 4 }) + offset; + // replace "request.Target.SearchTimeForPlayer(this.Hub);" with ev.SearchTime // remove base-game SearchTime setter newInstructions.RemoveRange(index, 5); @@ -134,4 +126,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/Exiled.Events/Patches/Events/Player/Spawning.cs b/Exiled.Events/Patches/Events/Player/Spawning.cs index 11fe075535..527959002b 100644 --- a/Exiled.Events/Patches/Events/Player/Spawning.cs +++ b/Exiled.Events/Patches/Events/Player/Spawning.cs @@ -10,14 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using API.Features; - using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; using PlayerRoles; using PlayerRoles.FirstPersonControl; - using PlayerRoles.FirstPersonControl.NetworkMessages; using PlayerRoles.FirstPersonControl.Spawnpoints; using UnityEngine; @@ -27,8 +25,8 @@ namespace Exiled.Events.Patches.Events.Player /// /// Patches delegate. /// Adds the event. + /// Fix for spawning in void. /// - [EventPatch(typeof(Handlers.Player), nameof(Handlers.Player.Spawning))] [HarmonyPatch] internal static class Spawning { @@ -39,36 +37,33 @@ private static MethodInfo TargetMethod() private static bool Prefix(ReferenceHub hub, PlayerRoleBase prevRole, PlayerRoleBase newRole) { - if (newRole.ServerSpawnReason != RoleChangeReason.Destroyed && Player.TryGet(hub, out Player player)) - { - Vector3 oldPosition = hub.transform.position; - float oldRotation = (prevRole as IFpcRole)?.FpcModule.MouseLook.CurrentVertical ?? 0; - - if (newRole is IFpcRole fpcRole) - { - if (newRole.ServerSpawnFlags.HasFlag(RoleSpawnFlags.UseSpawnpoint) && fpcRole.SpawnpointHandler != null && fpcRole.SpawnpointHandler.TryGetSpawnpoint(out Vector3 position, out float horizontalRot)) - { - oldPosition = position; - oldRotation = horizontalRot; - } + if (newRole.ServerSpawnReason == RoleChangeReason.Destroyed || !Player.TryGet(hub, out Player player)) + return true; - SpawningEventArgs ev = new(player, oldPosition, oldRotation, prevRole); + Vector3 oldPosition = hub.transform.position; + float oldRotation = (prevRole as IFpcRole)?.FpcModule.MouseLook.CurrentVertical ?? 0; - Handlers.Player.OnSpawning(ev); - - hub.transform.position = ev.Position; - fpcRole.FpcModule.MouseLook.CurrentHorizontal = ev.HorizontalRotation; - hub.connectionToClient.Send(new FpcOverrideMessage(ev.Position, ev.HorizontalRotation), 0); - } - else + if (newRole is IFpcRole fpcRole) + { + if (newRole.ServerSpawnFlags.HasFlag(RoleSpawnFlags.UseSpawnpoint) && fpcRole.SpawnpointHandler != null && fpcRole.SpawnpointHandler.TryGetSpawnpoint(out Vector3 position, out float horizontalRot)) { - Handlers.Player.OnSpawning(new(player, oldPosition, oldRotation, prevRole)); + oldPosition = position; + oldRotation = horizontalRot; } - return false; + SpawningEventArgs ev = new(player, oldPosition, oldRotation, prevRole); + + Handlers.Player.OnSpawning(ev); + + player.Position = ev.Position; + fpcRole.FpcModule.MouseLook.CurrentHorizontal = ev.HorizontalRotation; + } + else + { + Handlers.Player.OnSpawning(new(player, oldPosition, oldRotation, prevRole)); } - return true; + return false; } } } \ No newline at end of file diff --git a/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs b/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs index 39f5179cef..08f0d34aa7 100644 --- a/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs +++ b/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs @@ -47,16 +47,17 @@ private static IEnumerable Transpiler(IEnumerable instruction.opcode == OpCodes.Ldloc_1) + offset; - newInstructions.RemoveRange(index, 7); - - index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Ldloc_1); + // remove + // "basicRagdoll.NetworkInfo = new RagdollData(owner, handler, transform.localPosition, transform.localRotation);" + newInstructions.RemoveRange(index, 9); + // replace with newInstructions.InsertRange(index, new[] { - // hub + // hub new CodeInstruction(OpCodes.Ldarg_0), // handler @@ -73,9 +74,6 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instruction.Calls(PropertySetter(typeof(BasicRagdoll), nameof(BasicRagdoll.NetworkInfo)))) + offset; - - newInstructions.InsertRange(index, new CodeInstruction[] - { - // ev.Info + // basicRagdoll.NetworkInfo = ev.Info + new(OpCodes.Ldloc_1), new(OpCodes.Ldloc_S, ev.LocalIndex), new(OpCodes.Callvirt, PropertyGetter(typeof(SpawningRagdollEventArgs), nameof(SpawningRagdollEventArgs.Info))), + new(OpCodes.Call, PropertySetter(typeof(BasicRagdoll), nameof(BasicRagdoll.NetworkInfo))), // new Vector3() new(OpCodes.Ldloca_S, targetScale.LocalIndex), diff --git a/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs b/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs index 2eab40acc5..d1458e0fd2 100644 --- a/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs +++ b/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs @@ -25,8 +25,11 @@ namespace Exiled.Events.Patches.Events.Scp049 /// /// Patches . /// Adds the event. + /// Fix bug than Overwatch can get force respawn by Scp049 + /// Bug reported to NW https://trello.com/c/V0uHP2eV/5745-overwatch-overwatch-can-get-respawned-by-scp-049. + /// The fix is directly inside the . /// - [EventPatch(typeof(Handlers.Scp049), nameof(Handlers.Scp049.FinishingRecall))] + // [EventPatch(typeof(Handlers.Scp049), nameof(Handlers.Scp049.FinishingRecall))] [HarmonyPatch(typeof(Scp049ResurrectAbility), nameof(Scp049ResurrectAbility.ServerComplete))] internal static class FinishingRecall { diff --git a/Exiled.Events/Patches/Events/Scp079/Recontain.cs b/Exiled.Events/Patches/Events/Scp079/Recontain.cs new file mode 100644 index 0000000000..991ffc47e9 --- /dev/null +++ b/Exiled.Events/Patches/Events/Scp079/Recontain.cs @@ -0,0 +1,62 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Exiled Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.Events.Patches.Events.Player +{ + using System.Collections.Generic; + using System.Reflection.Emit; + + using API.Features.Pools; + using Exiled.Events.Attributes; + using Exiled.Events.EventArgs.Scp079; + using Exiled.Events.Handlers; + + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp079; + using PlayerStatsSystem; + + using static HarmonyLib.AccessTools; + + using Player = API.Features.Player; + + /// + /// Patches . + /// Adds the event. + /// + [EventPatch(typeof(Scp079), nameof(Scp079.Recontained))] + [HarmonyPatch(typeof(Scp079Recontainer), nameof(Scp079Recontainer.TryKill079))] + internal static class Recontain + { + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + { + List newInstructions = ListPool.Pool.Get(instructions); + + CodeInstruction[] recontainedEvent = new CodeInstruction[] + { + // Handlers.Scp079.OnRecontained(new RecontainedEventArgs(Player.Get(referenceHub2))); + new(OpCodes.Ldloc, 5), + new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), + new(OpCodes.Newobj, GetDeclaredConstructors(typeof(RecontainedEventArgs))[0]), + new(OpCodes.Call, Method(typeof(Scp079), nameof(Scp079.OnRecontained))), + }; + + int offset = 1; + int index = newInstructions.FindIndex(x => x.operand == (object)Method(typeof(PlayerStats), nameof(PlayerStats.DealDamage))) + offset; + + newInstructions.InsertRange(index, recontainedEvent); + + index = newInstructions.FindLastIndex(x => x.operand == (object)Method(typeof(PlayerStats), nameof(PlayerStats.DealDamage))) + offset; + + newInstructions.InsertRange(index, recontainedEvent); + + for (int z = 0; z < newInstructions.Count; z++) + yield return newInstructions[z]; + + ListPool.Pool.Return(newInstructions); + } + } +} \ No newline at end of file diff --git a/Exiled.Events/Patches/Events/Scp106/Attacking.cs b/Exiled.Events/Patches/Events/Scp106/Attacking.cs index 244d6447e4..4f6ffa1185 100644 --- a/Exiled.Events/Patches/Events/Scp106/Attacking.cs +++ b/Exiled.Events/Patches/Events/Scp106/Attacking.cs @@ -32,9 +32,9 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); - int offset = 2; - int index = newInstructions.FindIndex(x => x.Calls(Method(typeof(Scp106Attack), nameof(Scp106Attack.SendCooldown)))) + offset; - Label continueLabel = generator.DefineLabel(); + int offset = 3; + int index = newInstructions.FindIndex(x => x.Calls(Method(typeof(Scp106Attack), nameof(Scp106Attack.VerifyShot)))) + offset; + Label ret = generator.DefineLabel(); newInstructions.InsertRange( index, @@ -63,13 +63,9 @@ private static IEnumerable Transpiler(IEnumerable /// Patches - /// to add the event. + /// to add the and event. /// [EventPatch(typeof(Scp914), nameof(Scp914.UpgradingPlayer))] + [EventPatch(typeof(Scp914), nameof(Scp914.UpgradingInventoryItem))] [HarmonyPatch(typeof(Scp914Upgrader), nameof(Scp914Upgrader.ProcessPlayer))] internal static class UpgradingPlayer { diff --git a/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs b/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs new file mode 100644 index 0000000000..942abf4f7d --- /dev/null +++ b/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs @@ -0,0 +1,65 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Exiled Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.Events.Patches.Fixes +{ + using System; + using System.Collections.Generic; + using System.Reflection.Emit; + + using API.Features.Pools; + using Exiled.API.Features; + using HarmonyLib; + using InventorySystem; + using InventorySystem.Items; + using InventorySystem.Items.Pickups; + + using static HarmonyLib.AccessTools; + + /// + /// Patches . + /// Fix than NW call before for AmmoItem. + /// + [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerAddItem))] + internal class FixOnAddedBeingCallAfterOnRemoved + { + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + { + List newInstructions = ListPool.Pool.Get(instructions); + /* + // Modify this + itemBase2.OnAdded(pickup); + Action onItemAdded = InventoryExtensions.OnItemAdded; + if (onItemAdded != null) + { + onItemAdded(inv._hub, itemBase2, pickup); + } + // To this + Action onItemAdded = InventoryExtensions.OnItemAdded; + if (onItemAdded != null) + { + onItemAdded(inv._hub, itemBase2, pickup); + } + itemBase2.OnAdded(pickup); + */ + int opCodesToMove = 3; + int offset = -2; + int indexOnAdded = newInstructions.FindIndex(instruction => instruction.Calls(Method(typeof(ItemBase), nameof(ItemBase.OnAdded)))) + offset; + + offset = 1; + int indexInvoke = newInstructions.FindIndex(instruction => instruction.Calls(Method(typeof(Action), nameof(Action.Invoke)))) + offset; + + newInstructions.InsertRange(indexInvoke, newInstructions.GetRange(indexOnAdded, opCodesToMove)); + newInstructions[indexInvoke].MoveLabelsFrom(newInstructions[indexInvoke + opCodesToMove]); + newInstructions.RemoveRange(indexOnAdded, opCodesToMove); + + for (int z = 0; z < newInstructions.Count; z++) + yield return newInstructions[z]; + ListPool.Pool.Return(newInstructions); + } + } +} diff --git a/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs b/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs index 304fc41243..22f5a2db78 100644 --- a/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs +++ b/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs @@ -16,7 +16,6 @@ namespace Exiled.Events.Patches.Fixes using InventorySystem; using InventorySystem.Items.Firearms.Ammo; using InventorySystem.Items.Pickups; - using VoiceChat; using static HarmonyLib.AccessTools; diff --git a/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs b/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs new file mode 100644 index 0000000000..4b294f9535 --- /dev/null +++ b/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs @@ -0,0 +1,55 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Exiled Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.Events.Patches.Fixes +{ + using System.Collections.Generic; + using System.Reflection.Emit; + + using API.Features.Pools; + using HarmonyLib; + using Interactables.Interobjects; + using Interactables.Interobjects.DoorUtils; + using PlayerRoles.PlayableScps.Scp096; + using UnityEngine; + + using static HarmonyLib.AccessTools; + + /// + /// Patches the delegate. + /// Fixes open doors getting easily broke. + /// Bug reported to NW (https://trello.com/c/6Nz7Isjm/4637-scp096-easily-breaking-opened-doors). + /// + [HarmonyPatch(typeof(Scp096HitHandler), nameof(Scp096HitHandler.CheckDoorHit))] + internal class NWFixScp096BreakingDoor + { + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + { + List newInstructions = ListPool.Pool.Get(instructions); + + Label ret = generator.DefineLabel(); + int offset = -4; + int index = newInstructions.FindIndex(x => x.operand == (object)Method(typeof(IDamageableDoor), nameof(IDamageableDoor.ServerDamage))) + offset; + + newInstructions.InsertRange(index, new[] + { + new CodeInstruction(OpCodes.Ldloc_0).MoveLabelsFrom(newInstructions[index]), + new(OpCodes.Call, Method(typeof(NWFixScp096BreakingDoor), nameof(IsFullyOpen))), + new(OpCodes.Brtrue_S, ret), + }); + + newInstructions[newInstructions.Count - 1].labels.Add(ret); + + for (int z = 0; z < newInstructions.Count; z++) + yield return newInstructions[z]; + + ListPool.Pool.Return(newInstructions); + } + + private static bool IsFullyOpen(IDamageableDoor damageableDoor) => damageableDoor is BreakableDoor breakableDoor && breakableDoor.GetExactState() is 1; + } +} diff --git a/Exiled.Events/Patches/Fixes/OptimiseNWPocketDimensionGenerator.cs b/Exiled.Events/Patches/Fixes/OptimiseNWPocketDimensionGenerator.cs new file mode 100644 index 0000000000..9bbde015b5 --- /dev/null +++ b/Exiled.Events/Patches/Fixes/OptimiseNWPocketDimensionGenerator.cs @@ -0,0 +1,46 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Exiled Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.Events.Patches.Fixes +{ + using System.Collections.Generic; + using System.Linq; + using System.Reflection.Emit; + + using API.Features; + using Exiled.API.Features.Pools; + using HarmonyLib; + + using static HarmonyLib.AccessTools; + + /// + /// Patches . + /// + [HarmonyPatch(typeof(PocketDimensionGenerator), nameof(PocketDimensionGenerator.PrepTeleports))] + internal class OptimiseNWPocketDimensionGenerator + { + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + { + List newInstructions = ListPool.Pool.Get(instructions); + + // replace "PocketDimensionTeleport[] array = UnityEngine.Object.FindObjectsOfType();" + // with + // replace "PocketDimensionTeleport[] array = Exiled.API.Features.Map.TeleportsValue.ToArray()" + newInstructions.RemoveAt(0); + newInstructions.InsertRange(0, new CodeInstruction[] + { + new(OpCodes.Call, PropertyGetter(typeof(Map), nameof(Map.PocketDimensionTeleports))), + new(OpCodes.Call, Method(typeof(Enumerable), nameof(Enumerable.ToArray)).MakeGenericMethod(typeof(PocketDimensionTeleport))), + }); + + for (int z = 0; z < newInstructions.Count; z++) + yield return newInstructions[z]; + + ListPool.Pool.Return(newInstructions); + } + } +} \ No newline at end of file diff --git a/Exiled.Events/Patches/Generic/AddRespawnTargetMultiplierConfig.cs b/Exiled.Events/Patches/Generic/AddRespawnTargetMultiplierConfig.cs new file mode 100644 index 0000000000..79c7bf6382 --- /dev/null +++ b/Exiled.Events/Patches/Generic/AddRespawnTargetMultiplierConfig.cs @@ -0,0 +1,54 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Exiled Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.Events.Patches.Generic.Scp079API +{ + using System.Collections.Generic; + using System.Reflection.Emit; + + using API.Features.Pools; + using HarmonyLib; + + using static HarmonyLib.AccessTools; + + using Scp049Role = API.Features.Roles.Scp049Role; + + /// + /// Patches . + /// Adds the as NW config. + /// + [HarmonyPatch(typeof(RoundSummary), nameof(RoundSummary.ServerOnRespawned))] + internal class AddRespawnTargetMultiplierConfig + { + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + { + List newInstructions = ListPool.Pool.Get(instructions); + + // replace "this.ChaosTargetCount += (int)((double)respawnedPlayers.Count * 0.75);" + // with " this.ChaosTargetCount += (int)((double)respawnedPlayers.Count * ConfigFile.ServerConfig.GetDouble("respawn_target_multiplier", 0.75);" + int offset = 0; + int index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Ldc_R8) + offset; + newInstructions.RemoveAt(index); + + newInstructions.InsertRange( + index, + new CodeInstruction[] + { + // ConfigFile.ServerConfig.GetDouble("respawn_target_multiplier", 0.75); + new(OpCodes.Ldsfld, Field(typeof(GameCore.ConfigFile), nameof(GameCore.ConfigFile.ServerConfig))), + new(OpCodes.Ldstr, "respawn_target_multiplier"), + new(OpCodes.Ldc_R8, RoundSummary.RespawnTargetMultiplier), + new(OpCodes.Call, Method(typeof(YamlConfig), nameof(YamlConfig.GetDouble))), + }); + + for (int z = 0; z < newInstructions.Count; z++) + yield return newInstructions[z]; + + ListPool.Pool.Return(newInstructions); + } + } +} \ No newline at end of file diff --git a/Exiled.Events/Patches/Generic/InventoryControlPatch.cs b/Exiled.Events/Patches/Generic/InventoryControlPatch.cs deleted file mode 100644 index 6651d46dd4..0000000000 --- a/Exiled.Events/Patches/Generic/InventoryControlPatch.cs +++ /dev/null @@ -1,168 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) Exiled Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.Events.Patches.Generic -{ -#pragma warning disable SA1402 -#pragma warning disable SA1649 - using System.Collections.Generic; - using System.Reflection; - using System.Reflection.Emit; - - using API.Features; - using API.Features.Items; - using API.Features.Pools; - using Exiled.API.Features.Pickups; - using HarmonyLib; - - using InventorySystem; - using InventorySystem.Items; - using InventorySystem.Items.Pickups; - - using MEC; - - using static HarmonyLib.AccessTools; - - using Inventory = InventorySystem.Inventory; - - /// - /// Patches to help manage . - /// - [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerAddItem))] - internal static class InventoryControlAddPatch - { - private static IEnumerable Transpiler( - IEnumerable instructions, - ILGenerator generator) - { - List newInstructions = ListPool.Pool.Get(instructions); - - const int offset = -2; - int index = newInstructions.FindIndex( - i => - (i.opcode == OpCodes.Callvirt) && - ((MethodInfo)i.operand == Method(typeof(ItemBase), nameof(ItemBase.OnAdded)))) + offset; - - // AddItem(Player.Get(inv._hub), itemInstance) - newInstructions.InsertRange( - index, - new CodeInstruction[] - { - // Player.Get(inv._hub) - new(OpCodes.Ldarg_0), - new(OpCodes.Ldfld, Field(typeof(Inventory), nameof(Inventory._hub))), - new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), - - // itemInstance - new(OpCodes.Ldloc_1), - - // pickup - new(OpCodes.Ldarg_3), - - // AddItem(player, itemInstance, pickup) - new(OpCodes.Call, Method(typeof(InventoryControlAddPatch), nameof(AddItem))), - }); - - for (int z = 0; z < newInstructions.Count; z++) - yield return newInstructions[z]; - - ListPool.Pool.Return(newInstructions); - } - - private static void AddItem(Player player, ItemBase itemBase, ItemPickupBase itemPickupBase) - { - Item item = Item.Get(itemBase); - Pickup pickup = Pickup.Get(itemPickupBase); - - item.ReadPickupInfo(pickup); - - player?.ItemsValue.Add(item); - } - } - - /// - /// Patches to help manage . - /// - [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerRemoveItem))] - internal static class InventoryControlRemovePatch - { - private static IEnumerable Transpiler( - IEnumerable instructions, - ILGenerator generator) - { - List newInstructions = ListPool.Pool.Get(instructions); - const int offset = 1; - int index = newInstructions.FindIndex(i => i.opcode == OpCodes.Throw) + offset; - - // RemoveItem(Player.Get(inv._hub), itemSerial) - newInstructions.InsertRange( - index, - new[] - { - // Player.Get(inv._hub) - new CodeInstruction(OpCodes.Ldarg_0).MoveLabelsFrom(newInstructions[index]), - new(OpCodes.Ldfld, Field(typeof(Inventory), nameof(Inventory._hub))), - new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), - - // itemSerial - new(OpCodes.Ldarg_1), - - // RemoveItem(Player.Get(inv._hub), itemSerial) - new(OpCodes.Call, Method(typeof(InventoryControlRemovePatch), nameof(RemoveItem))), - }); - - for (int z = 0; z < newInstructions.Count; z++) - yield return newInstructions[z]; - - ListPool.Pool.Return(newInstructions); - } - - private static void RemoveItem(Player player, ushort serial) - { -#if DEBUG - Log.Debug($"Removing item ({serial}) from a player (before null check)"); -#endif - if (player is null) - { -#if DEBUG - Log.Debug("Attempted to remove item from null player, returning."); -#endif - return; - } - - if (!player.Inventory.UserInventory.Items.ContainsKey(serial)) - { -#if DEBUG - Log.Debug("Attempted to remove an item the player doesn't own, returning."); -#endif - return; - } -#if DEBUG - Log.Debug( - $"Inventory Info (before): {player.Nickname} - {player.Items.Count} ({player.Inventory.UserInventory.Items.Count})"); - foreach (Item item in player.Items) - Log.Debug($"{item})"); -#endif - ItemBase itemBase = player.Inventory.UserInventory.Items[serial]; - - player.ItemsValue.Remove(Item.Get(itemBase)); - - Item.BaseToItem.Remove(itemBase); - - Timing.CallDelayed(0.15f, () => - { -#if DEBUG - Log.Debug($"Item ({serial}) removed from {player.Nickname}"); - Log.Debug($"Inventory Info (after): {player.Nickname} - {player.Items.Count} ({player.Inventory.UserInventory.Items.Count})"); - - foreach (Item item in player.Items) - Log.Debug($"{item})"); -#endif - }); - } - } -} \ No newline at end of file diff --git a/Exiled.Events/Patches/Generic/Scp106API/CustomAttack.cs b/Exiled.Events/Patches/Generic/Scp106API/CustomAttack.cs index 5bf4649584..f6469919ad 100644 --- a/Exiled.Events/Patches/Generic/Scp106API/CustomAttack.cs +++ b/Exiled.Events/Patches/Generic/Scp106API/CustomAttack.cs @@ -34,35 +34,12 @@ private static IEnumerable Transpiler(IEnumerable() - // "new ScpDamageHandler(base.Owner, scp106Role.AttackDamage, DeathTranslations.PocketDecay);" - int offset = 0; - int index = newInstructions.FindIndex(instruction => instruction.operand == (object)Scp106Attack.AttackDamage) + offset; - newInstructions.RemoveAt(index); - - newInstructions.InsertRange( - index, - new CodeInstruction[] - { - // Player.Get(base.Owner).Role - new(OpCodes.Ldarg_0), - new(OpCodes.Call, PropertyGetter(typeof(StandardSubroutine), nameof(StandardSubroutine.Owner))), - new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), - new(OpCodes.Callvirt, PropertyGetter(typeof(Player), nameof(Player.Role))), - - // (Player.Get(base.Owner).Role as Scp106Role).AttackDamage - new(OpCodes.Isinst, typeof(Scp106Role)), - new(OpCodes.Callvirt, PropertyGetter(typeof(Scp106Role), nameof(Scp106Role.AttackDamage))), - }); - // replace "base.Vigor.VigorAmount += 0.3f;" // with // Scp106Role scp106Role = Player.Get(this.Owner).Role.As() // "base.Vigor.VigorAmount += scp106Role.VigorCaptureReward;" - offset = 0; - index = newInstructions.FindIndex(instruction => instruction.operand == (object)Scp106Attack.VigorCaptureReward) + offset; + int offset = 0; + int index = newInstructions.FindIndex(instruction => instruction.operand == (object)Scp106Attack.VigorCaptureReward) + offset; newInstructions.RemoveAt(index); newInstructions.InsertRange( diff --git a/Exiled.Events/Patches/Generic/TeleportList.cs b/Exiled.Events/Patches/Generic/TeleportList.cs index 3b1627f1cf..d15d9d2673 100644 --- a/Exiled.Events/Patches/Generic/TeleportList.cs +++ b/Exiled.Events/Patches/Generic/TeleportList.cs @@ -7,21 +7,20 @@ namespace Exiled.Events.Patches.Generic { -#pragma warning disable SA1313 using API.Features; - using HarmonyLib; + using MapGeneration; /// - /// Patches . + /// Patches . /// - [HarmonyPatch(typeof(PocketDimensionGenerator), nameof(PocketDimensionGenerator.PrepTeleports))] + [HarmonyPatch(typeof(ImageGenerator), nameof(ImageGenerator.GenerateMap))] internal class TeleportList { - private static void Postfix(ref PocketDimensionTeleport[] __result) + private static void Prefix() { Map.TeleportsValue.Clear(); - Map.TeleportsValue.AddRange(__result); + Map.TeleportsValue.AddRange(UnityEngine.Object.FindObjectsOfType()); } } } \ No newline at end of file diff --git a/Exiled.Loader/AutoUpdateFiles.cs b/Exiled.Loader/AutoUpdateFiles.cs index c805536603..4cc37cffb4 100644 --- a/Exiled.Loader/AutoUpdateFiles.cs +++ b/Exiled.Loader/AutoUpdateFiles.cs @@ -17,6 +17,6 @@ public static class AutoUpdateFiles /// /// Gets which SCP: SL version generated Exiled. /// - public static readonly Version RequiredSCPSLVersion = new(13, 3, 0, 1); + public static readonly Version RequiredSCPSLVersion = new(13, 5, 0, 0); } } \ No newline at end of file diff --git a/docs/docs/Resources/Intro.md b/docs/docs/Resources/Intro.md index c502cc02a6..ce1dff0673 100644 --- a/docs/docs/Resources/Intro.md +++ b/docs/docs/Resources/Intro.md @@ -34,7 +34,7 @@ sidebar_position: 1
Roles -```md title="Latest Updated: 13.3.0.1" +```md title="Latest Updated: 13.5.0.0" | Id | RoleTypeId | Team | Side | LeadingTeam | |-----|----------------|------------------|------------------|-----------------| | -1 | None | Dead | None | Draw | @@ -70,7 +70,7 @@ sidebar_position: 1
Items -```md title="Latest Updated: 13.3.0.1" +```md title="Latest Updated: 13.5.0.0" [-1] None [0] KeycardJanitor [1] KeycardScientist @@ -136,7 +136,7 @@ sidebar_position: 1
Ammo -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] None [1] Nato556 [2] Nato762 @@ -151,7 +151,7 @@ sidebar_position: 1
Doors -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] UnknownDoor [1] Scp914Door [2] GR18Inner @@ -220,7 +220,7 @@ sidebar_position: 1
Rooms -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] Unknown [1] LczArmory [2] LczCurve @@ -283,7 +283,7 @@ sidebar_position: 1
Elevators -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] Unknown [1] GateA [2] GateB @@ -299,7 +299,7 @@ sidebar_position: 1
DamageType -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] Unknown [1] Falldown [2] Warhead @@ -381,7 +381,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Effects -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [-1] None [0] AmnesiaItems [1] AmnesiaVision @@ -432,7 +432,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Keycard Perms -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] None [1] Checkpoints [2] ExitGates @@ -453,7 +453,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Lock Type -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] None [1] Regular079 [2] Lockdown079 @@ -473,7 +473,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Structures -```md title="Latest Updated: 13.3.0.1" +```md title="Latest Updated: 13.5.0.0" [0] StandardLocker [1] LargeGunLocker [2] ScpPedestal @@ -488,7 +488,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Blood -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] Default [1] Scp106 [2] Spreaded @@ -501,7 +501,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
GeneratorState -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [1] None [2] Unlocked [4] Open @@ -515,7 +515,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Intercom States -```md title="Latest Updated: 13.3.0.1" +```md title="Latest Updated: 13.5.0.0" [0] Ready [1] Starting [2] InUse @@ -529,7 +529,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
BroadcastFlags -```md title="Latest Updated: 13.3.0.1" +```md title="Latest Updated: 13.5.0.0" [0] Normal [1] Truncated [2] AdminChat @@ -543,7 +543,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Attachment Names -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] None [1] IronSights [2] DotSight @@ -598,7 +598,7 @@ PlayerStatsSystem::Scp018DamageHandler : AttackerDamageHandler
Spawn Reasons -```md title="Latest Updated: 8.7.0.0" +```md title="Latest Updated: 8.9.0.0" [0] None [1] RoundStart [2] LateJoin