Skip to content

Commit

Permalink
1.7.1 | Add Ignoring Tut in LastHumanBroadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
Vretu-Dev committed Oct 15, 2024
1 parent ac75aa7 commit bfe417a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions UsefulHints/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public class Config : IConfig
public bool EnableLastHumanBroadcast { get; set; } = true;
public string BroadcastForHuman { get; set; } = "<color=red>You are the last human alive!</color>";
public string BroadcastForScp { get; set; } = "<color=#70EE9C>{0}</color> is the last human alive, playing as {1} in <color=yellow>{2}</color>";
public bool IgnoreTutorialRole { get; set; } = true;

[Description("Jailbird Custom Settings:")]
public bool EnableCustomJailbirdSettings { get; set; } = false;
public EffectType JailbirdEffect { get; set; } = EffectType.Flashed;
Expand Down
2 changes: 1 addition & 1 deletion UsefulHints/EventHandlers/Modules/LastHumanBroadcast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static void OnPlayerDied(DiedEventArgs ev)
}
private static bool IsHuman(Player player)
{
return player.Role.Team == Team.FoundationForces || player.Role.Team == Team.ClassD || player.Role.Team == Team.Scientists || player.Role.Team == Team.ChaosInsurgency;
return (player.Role.Team == Team.FoundationForces || player.Role.Team == Team.ClassD || player.Role.Team == Team.Scientists || player.Role.Team == Team.ChaosInsurgency) && (!UsefulHints.Instance.Config.IgnoreTutorialRole || player.Role.Type != RoleTypeId.Tutorial);
}
private static string GetZoneName(Player player)
{
Expand Down
2 changes: 1 addition & 1 deletion UsefulHints/UsefulHints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class UsefulHints : Plugin<Config>
public override string Name => "Useful Hints";
public override string Author => "Vretu";
public override string Prefix { get; } = "UH";
public override Version Version => new Version(1, 7, 0);
public override Version Version => new Version(1, 7, 1);
public override Version RequiredExiledVersion { get; } = new Version(8, 9, 8);
public override PluginPriority Priority { get; } = PluginPriority.Low;
public static UsefulHints Instance { get; private set; }
Expand Down

0 comments on commit bfe417a

Please sign in to comment.