Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.12 #107

Merged
merged 72 commits into from
Sep 23, 2024
Merged

8.12 #107

Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
7262f06
Merge pull request #23 from ExMod-Team/master
Jesus-QC Aug 1, 2024
c9654ee
uwu (#5)
VALERA771 Aug 1, 2024
6ebeac5
Merge pull request #26 from ExMod-Team/master
louis1706 Aug 2, 2024
5653733
AdminToy.List (#18)
louis1706 Aug 2, 2024
5a519a4
Fix `Jailbird::WearState` (#12)
louis1706 Aug 2, 2024
81c3652
Porting EXILED9 RespawnedTeam event. by.VALERA771 (#27)
YongAn404 Aug 2, 2024
1f2d209
Fix not returning null (#22)
louis1706 Aug 4, 2024
4e50826
RecontainedEventArgs more feature (#20)
louis1706 Aug 6, 2024
3ffe156
InteractingScp330.cs: Reduction of bloat code from original design. (…
Undid-Iridium Aug 6, 2024
e39238e
IScp330Event (#11)
louis1706 Aug 6, 2024
f1cc6f4
PR than i made (#9)
louis1706 Aug 6, 2024
eb046ac
[Events] Fix null reference (#15)
louis1706 Aug 6, 2024
a7354b7
Offline mode support (#19)
x3rt Aug 6, 2024
259cabb
Fix NW bugs (#32)
skyfr0676 Aug 6, 2024
26d1fcc
Useless Event (939 Placed Amnestic Cloud) (#40)
x3rt Aug 7, 2024
03d6bd7
Fix custom role classes giving custom ammo when they are not suppose …
TtroubleTT Aug 7, 2024
06cf2d7
`Item::<T>Get()` and `Pickup::<T>Get()` (#17)
louis1706 Aug 9, 2024
09de18b
FixNpcNoclip (#34)
louis1706 Aug 9, 2024
a1ae554
Implements more patches for RemovingHandcuffs event and adding Remove…
Misaka-ZeroTwo Aug 9, 2024
2c41d7d
Interacting scp330 compile fix (#43)
Undid-Iridium Aug 10, 2024
08a5deb
Trello is no more & more NW Fix & Fix IL Code on dev (#28)
louis1706 Aug 10, 2024
a3595e1
Additions (#29)
Misfiy Aug 11, 2024
fada367
`[EXILED::API]` Pickup::Category (#46)
NotZer0Two Aug 11, 2024
2ee9f46
Fix (#50)
NotZer0Two Aug 11, 2024
0e2bea5
Merge branch 'master' into dev
Misaka-ZeroTwo Aug 11, 2024
ee317e7
`[Exiled::API]` Removing breaking changes (#54)
VALERA771 Aug 12, 2024
e80c81c
Merge branch 'master' into dev
Misaka-ZeroTwo Aug 12, 2024
b66b2fd
`Scp330` sound fix (#55)
IRacle1 Aug 12, 2024
0ab9037
Fix Npc (#58)
Misfiy Aug 12, 2024
f7b28f4
Merge branch 'master' into dev
Misaka-ZeroTwo Aug 13, 2024
119f930
Fix breaking change (#61)
Misaka-ZeroTwo Aug 13, 2024
afdb0b2
Version bump
Misaka-ZeroTwo Aug 13, 2024
904865e
💀💀💀
IRacle1 Aug 14, 2024
bcb78e7
`SendStaffMessage` fix
IRacle1 Aug 15, 2024
53ce718
Added the SCP-079 Recontaining event (#21)
FoxWorn3365 Aug 15, 2024
bc0b179
`[EXILED::API]` Adding SpawnMice (#47)
NotZer0Two Aug 15, 2024
7a6df16
`[EXILED::API]` Adding ScaleNetworkIdentityObject (#49)
NotZer0Two Aug 15, 2024
c819ba5
Merge pull request #67 from ExMod-Team/master
louis1706 Aug 16, 2024
7befb7a
Revert "💀💀💀"
IRacle1 Aug 16, 2024
92016cc
Merge branch 'dev' into fixes
louis1706 Aug 17, 2024
0c9cfff
`[EXILED::API]` Adding SendFakeSceneLoading (#45)
NotZer0Two Aug 20, 2024
f1c58ff
Merge pull request #64 from IRacle1/fixes
IRacle1 Aug 21, 2024
5fc1b14
scp018projectile (#73)
IRacle1 Aug 24, 2024
327801e
😱😎🙂💀😈 (#51)
IRacle1 Aug 27, 2024
880fde0
`KeycardPickup.Permissions` now is not joke (#70)
IRacle1 Aug 27, 2024
acd1b29
`[Exiled::Events]` `Unbanning` and `Unbanned` events (#68)
VALERA771 Aug 27, 2024
5aa8754
`[EXILED::API]` Adding StaminaRegenMultiplier (BodyArmor) (#71)
NotZer0Two Aug 27, 2024
af3da2d
`[EXILED::API]` Adding MoveNetworkIdentityObject (#48)
NotZer0Two Aug 27, 2024
532fdfb
`[EXILED::EVENTS]` Adding PlayingAudioLog 69 PR (#69)
NotZer0Two Aug 27, 2024
96ecc24
`RecontainedWhenNoScps` feature (#16)
louis1706 Aug 28, 2024
83ff82e
`[EXILED::EVENTS]` Fixing bug report n.396 (#59)
NotZer0Two Aug 30, 2024
daecbb9
feat: Added IsDecontaminationEnabled property (#82)
alexomur Aug 30, 2024
cb8fbbe
Multiple change (UwU) (#79)
Misfiy Aug 30, 2024
6f5cd2f
``[Exiled::CustomRoles]`` ``[Exiled::CustomItems]`` QoL in List comma…
SrLicht Sep 1, 2024
d08b002
DroppingScp330 Event Fix. (#83)
Undid-Iridium Sep 2, 2024
96ccf32
``[Exiled::CustomItems]`` ``[Exiled::API]`` ``[Exiled::CustomRoles]``…
SrLicht Sep 2, 2024
c9a1b9a
`[Exiled::API]` Adding new properties for `FpcRole` (#65)
VALERA771 Sep 2, 2024
41a37ce
Update programs.yml
Misaka-ZeroTwo Sep 10, 2024
fb40d83
Scp0492 change apperance fix (#87)
Undid-Iridium Sep 12, 2024
4d5d142
Add plugin website
louis1706 Sep 14, 2024
e1d726f
fix (#95)
VALERA771 Sep 15, 2024
04faf98
Replace with exiled wrapper class (#94)
VALERA771 Sep 23, 2024
2da2c1f
Fix Role NRE (#66)
louis1706 Sep 23, 2024
25fd825
`[Exiled::API]` New way to register parent commands (#74)
VALERA771 Sep 23, 2024
56b4098
Allow `ID_Dedicated`/`null` for `Npc.UserId` Parameter (#75)
NotZer0Two Sep 23, 2024
25cedad
Update Exiled.Loader.csproj (#80)
SrLicht Sep 23, 2024
e533dd6
[Events] Fix crash (#96)
IRacle1 Sep 23, 2024
954387a
Random fixes (#103)
IRacle1 Sep 23, 2024
e5d640e
Adding Turning On All Lights (#105)
Josephfallen Sep 23, 2024
c91a606
`[EXILED::Events]` Introduce `hub install` command (#101)
bladuk Sep 23, 2024
6464c46
version bump
Jesus-QC Sep 23, 2024
2433d14
Merge branch 'master' into dev
Jesus-QC Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Role NRE (#66)
louis1706 authored Sep 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2da2c1f6d46801b567b0e4c10dc384ad7262a753
7 changes: 3 additions & 4 deletions EXILED/Exiled.API/Features/Roles/Role.cs
Original file line number Diff line number Diff line change
@@ -10,19 +10,17 @@ namespace Exiled.API.Features.Roles
using System;

using Enums;

using Exiled.API.Features.Core;
using Exiled.API.Features.Spawn;
using Exiled.API.Interfaces;
using Extensions;

using PlayerRoles;
using PlayerRoles.PlayableScps.Scp049.Zombies;

using UnityEngine;

using FilmmakerGameRole = PlayerRoles.Filmmaker.FilmmakerRole;
using HumanGameRole = PlayerRoles.HumanRole;
using NoneGameRole = PlayerRoles.NoneRole;
using OverwatchGameRole = PlayerRoles.Spectating.OverwatchRole;
using Scp049GameRole = PlayerRoles.PlayableScps.Scp049.Scp049Role;
using Scp079GameRole = PlayerRoles.PlayableScps.Scp079.Scp079Role;
@@ -229,7 +227,8 @@ public virtual void Set(RoleTypeId newRole, SpawnReason reason, RoleSpawnFlags s
SpectatorGameRole spectatorRole => new SpectatorRole(spectatorRole),
HumanGameRole humanRole => new HumanRole(humanRole),
FilmmakerGameRole filmmakerRole => new FilmMakerRole(filmmakerRole),
_ => new NoneRole(role),
NoneGameRole noneRole => new NoneRole(noneRole),
_ => null,
};
}
}
Original file line number Diff line number Diff line change
@@ -43,8 +43,6 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi

Label returnLabel = generator.DefineLabel();
Label continueLabel = generator.DefineLabel();
Label continueLabel1 = generator.DefineLabel();
Label continueLabel2 = generator.DefineLabel();
Label jmp = generator.DefineLabel();

LocalBuilder changingRoleEventArgs = generator.DeclareLocal(typeof(ChangingRoleEventArgs));
@@ -55,15 +53,10 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
new[]
{
// player = Player.Get(this._hub)
//
// if (player == null)
// goto continueLabel;
new CodeInstruction(OpCodes.Ldarg_0),
new(OpCodes.Call, PropertyGetter(typeof(PlayerRoleManager), nameof(PlayerRoleManager.Hub))),
new(OpCodes.Call, Method(typeof(API.Features.Player), nameof(API.Features.Player.Get), new[] { typeof(ReferenceHub) })),
new(OpCodes.Dup),
new(OpCodes.Stloc_S, player.LocalIndex),
new(OpCodes.Brfalse_S, continueLabel),

// if (Player.IsVerified)
// goto jmp
@@ -133,17 +126,10 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
int index = newInstructions.FindIndex(
instruction => instruction.Calls(Method(typeof(GameObjectPools.PoolObject), nameof(GameObjectPools.PoolObject.SetupPoolObject)))) + offset;

newInstructions[index].WithLabels(continueLabel1);

newInstructions.InsertRange(
index,
new[]
{
// if (player == null)
// continue
new CodeInstruction(OpCodes.Ldloc_S, player.LocalIndex),
new(OpCodes.Brfalse_S, continueLabel1),

// player.Role = Role.Create(roleBase);
new CodeInstruction(OpCodes.Ldloc_S, player.LocalIndex),
new(OpCodes.Ldloc_2),
@@ -154,22 +140,10 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
offset = 1;
index = newInstructions.FindIndex(i => i.Calls(Method(typeof(PlayerRoleManager.RoleChanged), nameof(PlayerRoleManager.RoleChanged.Invoke)))) + offset;

newInstructions[index].labels.Add(continueLabel2);

newInstructions.InsertRange(
index,
new[]
new CodeInstruction[]
{
// if (player == null)
// continue
new CodeInstruction(OpCodes.Ldloc_S, player.LocalIndex),
new(OpCodes.Brfalse_S, continueLabel2),

// if (changingRoleEventArgs == null)
// continue
new CodeInstruction(OpCodes.Ldloc_S, changingRoleEventArgs.LocalIndex),
new(OpCodes.Brfalse_S, continueLabel2),

// changingRoleEventArgs
new(OpCodes.Ldloc_S, changingRoleEventArgs.LocalIndex),

@@ -181,11 +155,6 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
newInstructions.Count - 1,
new[]
{
// if (player == null)
// continue
new CodeInstruction(OpCodes.Ldloc_S, player.LocalIndex),
new(OpCodes.Brfalse_S, returnLabel),

// player
new CodeInstruction(OpCodes.Ldloc_S, player.LocalIndex),