Skip to content
This repository has been archived by the owner on Jan 19, 2025. It is now read-only.

[API, Events, CreditTags] Bug fixes #2603

Merged
merged 4 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Exiled.API/Features/Room.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public bool AreLightsOff
{
foreach (RoomLightController light in RoomLightControllers)
{
light.NetworkLightsEnabled = value;
light.NetworkLightsEnabled = !value;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions Exiled.CreditTags/CreditTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,20 @@ private CreditTags()
/// <inheritdoc/>
public override void OnEnabled()
{
/*
RefreshHandler();
AttachHandler();
*/

base.OnEnabled();
}

/// <inheritdoc/>
public override void OnDisabled()
{
/*
UnattachHandler();
*/

base.OnDisabled();
}
Expand Down
8 changes: 4 additions & 4 deletions Exiled.Events/Patches/Events/Scp106/ExitStalking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
{
List<CodeInstruction> newInstructions = ListPool<CodeInstruction>.Pool.Get(instructions);

LocalBuilder ev = generator.DeclareLocal(typeof(StalkingEventArgs));
LocalBuilder ev = generator.DeclareLocal(typeof(ExitStalkingEventArgs));

Label continueLabel = generator.DefineLabel();
Label returnLabel = generator.DefineLabel();
Expand All @@ -42,9 +42,9 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
index,
new CodeInstruction[]
{
// if (value is true) continue;
// if (value is false) continue;
new CodeInstruction(OpCodes.Ldarg_1).MoveLabelsFrom(newInstructions[index]),
new(OpCodes.Ldc_I4_1),
new(OpCodes.Ldc_I4_0),
new(OpCodes.Beq_S, continueLabel),

// Player.Get(this.Owner);
Expand All @@ -66,7 +66,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi

// if (!ev.IsAllowed)
// return;
new(OpCodes.Callvirt, PropertyGetter(typeof(StalkingEventArgs), nameof(StalkingEventArgs.IsAllowed))),
new(OpCodes.Callvirt, PropertyGetter(typeof(ExitStalkingEventArgs), nameof(ExitStalkingEventArgs.IsAllowed))),
new(OpCodes.Brfalse_S, returnLabel),
});

Expand Down
Loading