Skip to content

Commit

Permalink
Team checking in the most retarded way possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
Music1984 committed Jun 5, 2022
1 parent 9b64cbc commit 8c2a22c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CufferOnlyUncuff/CufferOnlyUncuff/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,17 @@ public class Config : IConfig
/// </summary>
[Description("The message shown to the player on a failed uncuff.")]
public string FailHint { get; set; } = "Only the person who cuffed this person can uncuff them.";

/// <summary>
/// Gets or sets the team to uncuff
/// </summary>
[Description("Same team uncuffing.")]
public bool scientists { get; set; } = true;

/// <summary>
/// Gets or sets the team to uncuff
/// </summary>
[Description("Same team uncuffing.")]
public bool classd { get; set; } = true;
}
}
2 changes: 1 addition & 1 deletion CufferOnlyUncuff/CufferOnlyUncuff/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void OnUncuffing(RemovingHandcuffsEventArgs ev)
{
if (cuffedList.TryGetValue(ev.Target, out Player value))
{
if (ev.Cuffer == value)
if (ev.Cuffer == value || (ev.Cuffer.Role == RoleType.Scientist && ev.Target.Role == RoleType.Scientist && plugin.Config.scientists) || (ev.Cuffer.Role == RoleType.ClassD && ev.Target.Role == RoleType.ClassD && plugin.Config.classd))
{
cuffedList.Remove(ev.Target);
return;
Expand Down

0 comments on commit 8c2a22c

Please sign in to comment.