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

[Release] 1.0.1 #27

Merged
merged 10 commits into from
Feb 6, 2024
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@

The classic Jail gamemode, ported to Counter-Strike 2.

> [!WARNING]
> This plugin is in active development and may cause server crashes or stability issues.
## Downloads

[![Release](https://img.shields.io/badge/Release-mediumseagreen?style=for-the-badge&logo=onlyoffice
)](https://github.com/edgegamers/Jailbreak/releases/)⠀⠀
[![Stable](https://img.shields.io/badge/Stable-orangered?style=for-the-badge&logo=onlyoffice)](https://nightly.link/edgegamers/Jailbreak/workflows/nightly/main/jailbreak-nightly)⠀⠀
[![Dev](https://img.shields.io/badge/Nightly-slateblue?style=for-the-badge&logo=onlyoffice
)](https://nightly.link/edgegamers/Jailbreak/workflows/nightly/dev/jailbreak-nightly)

**Release** builds are our full releases. We try to keep these high-quality and bug-free, when we can.
Our **Stable** builds run on EdgeGamers' own Jailbreak servers.
Our **Nightly** builds are used exclusively for development and staging, and are likely to have problems.

## Status

Expand Down
39 changes: 18 additions & 21 deletions lang/Jailbreak.English/Generic/GenericCommandNotifications.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CounterStrikeSharp.API.Modules.Utils;

using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Core;
using Jailbreak.Formatting.Logistics;
Expand All @@ -9,26 +10,22 @@ namespace Jailbreak.English.Generic;

public class GenericCommandNotifications : IGenericCommandNotifications, ILanguage<Formatting.Languages.English>
{
public static FormatObject Prefix =
new HiddenFormatObject($" {ChatColors.Darkred}[{ChatColors.LightRed}JB{ChatColors.Darkred}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};
public static FormatObject PREFIX =
new HiddenFormatObject($" {ChatColors.Darkred}[{ChatColors.LightRed}JB{ChatColors.Darkred}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};

public IView PlayerNotFound(string query)
{
return new SimpleView(writer =>
writer
.Line(Prefix, $"Player '{query}' not found!"));
}
public IView PlayerNotFound(string query)
{
return new SimpleView { PREFIX, $"Player '{query}' not found!" };
}

public IView PlayerFoundMultiple(string query)
{
return new SimpleView(writer =>
writer
.Line(Prefix, $"Multiple players found for '{query}'!"));
}
}
public IView PlayerFoundMultiple(string query)
{
return new SimpleView { PREFIX, $"Multiple players found for '{query}'!" };
}
}
34 changes: 34 additions & 0 deletions lang/Jailbreak.English/Logs/LogMessages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Modules.Utils;

using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Core;
using Jailbreak.Formatting.Logistics;
using Jailbreak.Formatting.Objects;
using Jailbreak.Formatting.Views;
using Jailbreak.Public.Extensions;

namespace Jailbreak.English.Logs;

public class LogMessages : ILogMessages, ILanguage<Formatting.Languages.English>
{



public IView BEGIN_JAILBREAK_LOGS => new SimpleView()
{
{ "********************************" }, SimpleView.NEWLINE,
{ "***** BEGIN JAILBREAK LOGS *****" }, SimpleView.NEWLINE,
{ "********************************" }
};

public IView END_JAILBREAK_LOGS => new SimpleView()
{
{ "********************************" }, SimpleView.NEWLINE,
{ "****** END JAILBREAK LOGS ******" }, SimpleView.NEWLINE,
{ "********************************" }
};



}
23 changes: 11 additions & 12 deletions lang/Jailbreak.English/Rebel/RebelNotifications.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CounterStrikeSharp.API.Modules.Utils;

using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Core;
using Jailbreak.Formatting.Logistics;
Expand All @@ -9,16 +10,14 @@ namespace Jailbreak.English.Rebel;

public class RebelNotifications : IRebelNotifications, ILanguage<Formatting.Languages.English>
{
public static FormatObject Prefix =
new HiddenFormatObject($" {ChatColors.Darkred}[{ChatColors.LightRed}Rebel{ChatColors.Darkred}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};
public static FormatObject PREFIX = new HiddenFormatObject($" {ChatColors.Darkred}[{ChatColors.LightRed}Rebel{ChatColors.Darkred}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};

public IView NoLongerRebel => new SimpleView(writer =>
writer
.Line(Prefix, "You are no longer a rebel."));
}
public IView NO_LONGER_REBEL =>
new SimpleView() { PREFIX, "You are no longer a rebel." };
}
84 changes: 41 additions & 43 deletions lang/Jailbreak.English/Teams/RatioNotifications.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CounterStrikeSharp.API.Modules.Utils;

using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Core;
using Jailbreak.Formatting.Logistics;
Expand All @@ -9,46 +10,43 @@ namespace Jailbreak.English.Teams;

public class RatioNotifications : IRatioNotifications, ILanguage<Formatting.Languages.English>
{
public static FormatObject Prefix =
new HiddenFormatObject($" {ChatColors.LightRed}[{ChatColors.Red}JB{ChatColors.LightRed}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};

public IView NotEnoughGuards => new SimpleView(writer =>
writer
.Line(Prefix, "There's not enough guards in the queue!"));

public IView PleaseJoinGuardQueue => new SimpleView(writer =>
writer
.Line(Prefix, "Type !guard to become a guard!"));

public IView JoinedGuardQueue => new SimpleView(writer =>
writer
.Line(Prefix, "You've joined the guard queue!"));

public IView AlreadyAGuard => new SimpleView(writer =>
writer
.Line(Prefix, "You're already a guard!"));

public IView YouWereAutobalancedPrisoner => new SimpleView(writer =>
writer
.Line(Prefix, "You were autobalanced to the prisoner team!"));

public IView AttemptToJoinFromTeamMenu => new SimpleView(writer =>
writer
.Line(Prefix, "You were swapped back to the prisoner team!")
.Line(Prefix, "Please use !guard to join the guard team."));

public IView LeftGuard => new SimpleView(writer =>
writer
.Line(Prefix, "You are no longer a guard.")
.Line(Prefix, "Please use !guard if you want to re-join the guard team."));

public IView YouWereAutobalancedGuard => new SimpleView(writer =>
writer
.Line(Prefix, "You are now a guard!"));
}
public static FormatObject PREFIX = new HiddenFormatObject($" {ChatColors.LightRed}[{ChatColors.Red}JB{ChatColors.LightRed}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};

public IView NOT_ENOUGH_GUARDS =>
new SimpleView { PREFIX, "There's not enough guards in the queue!" };

public IView PLEASE_JOIN_GUARD_QUEUE =>
new SimpleView { PREFIX, "Type !guard to become a guard!" };

public IView JOINED_GUARD_QUEUE =>
new SimpleView { PREFIX, "You've joined the guard queue!" };

public IView ALREADY_A_GUARD =>
new SimpleView { PREFIX, "You're already a guard!" };

public IView YOU_WERE_AUTOBALANCED_PRISONER =>
new SimpleView
{
{ PREFIX, "You were autobalanced to the prisoner team!" }, SimpleView.NEWLINE,
{ PREFIX, "Please use !guard to join the guard team." }
};

public IView ATTEMPT_TO_JOIN_FROM_TEAM_MENU =>
new SimpleView { PREFIX, "You were swapped back to the prisoner team!" };

public IView LEFT_GUARD =>
new SimpleView
{
{ PREFIX, "You are no longer a guard." }, SimpleView.NEWLINE,
{ PREFIX, "Please use !guard if you want to re-join the guard team." }
};

public IView YOU_WERE_AUTOBALANCED_GUARD =>
new SimpleView { PREFIX, "You are now a guard!" };
}
86 changes: 42 additions & 44 deletions lang/Jailbreak.English/Warden/WardenNotifications.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;

using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Core;
using Jailbreak.Formatting.Logistics;
Expand All @@ -10,57 +11,54 @@ namespace Jailbreak.English.Warden;

public class WardenNotifications : IWardenNotifications, ILanguage<Formatting.Languages.English>
{
public static FormatObject Prefix =
new HiddenFormatObject($" {ChatColors.Lime}[{ChatColors.Green}WARDEN{ChatColors.Lime}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};
public static FormatObject PREFIX = new HiddenFormatObject($" {ChatColors.Lime}[{ChatColors.Green}WARDEN{ChatColors.Lime}]")
{
// Hide in panorama and center text
Plain = false,
Panorama = false,
Chat = true
};

public IView PickingShortly => new SimpleView(writer =>
writer
.Line(Prefix, "Picking a warden shortly")
.Line(Prefix, "To enter the warden queue, type !warden in chat."));
public IView PICKING_SHORTLY =>
new SimpleView
{
{ PREFIX, "Picking a warden shortly" }, SimpleView.NEWLINE,
{ PREFIX, "To enter the warden queue, type !warden in chat." }
};

public IView NoWardens => new SimpleView(writer =>
writer
.Line(Prefix, "No wardens in queue! The next player to run !warden will become a warden."));
public IView NO_WARDENS =>
new SimpleView { PREFIX, "No wardens in queue! The next player to run !warden will become a warden." };

public IView WardenLeft => new SimpleView(writer =>
writer.Line(Prefix, "The warden has left the game!"));
public IView WARDEN_LEFT =>
new SimpleView { PREFIX, "The warden has left the game!" };

public IView WardenDied => new SimpleView(writer =>
writer.Line(Prefix, "The warden has died!"));
public IView WARDEN_DIED =>
new SimpleView { PREFIX, "The warden has died!" };

public IView BecomeNextWarden => new SimpleView(writer =>
writer.Line(Prefix, "Type !warden to become the next warden"));
public IView BECOME_NEXT_WARDEN =>
new SimpleView { PREFIX, "Type !warden to become the next warden" };

public IView JoinRaffle => new SimpleView(writer =>
writer.Line(Prefix, "You've joined the warden raffle!"));
public IView JOIN_RAFFLE =>
new SimpleView { PREFIX, "You've joined the warden raffle!" };

public IView LeaveRaffle => new SimpleView(writer =>
writer.Line(Prefix, "You've left the warden raffle!"));
public IView LEAVE_RAFFLE =>
new SimpleView { PREFIX, "You've left the warden raffle!" };

public IView PassWarden(CCSPlayerController player)
{
return new SimpleView(writer =>
writer.Line(Prefix, player, "has resigned from being warden!"));
}
public IView PASS_WARDEN(CCSPlayerController player)
{
return new SimpleView { PREFIX, player, "has resigned from being warden!" };
}

public IView NewWarden(CCSPlayerController player)
{
return new SimpleView(writer =>
writer.Line(Prefix, player, "is now the warden!"));
}
public IView NEW_WARDEN(CCSPlayerController player)
{
return new SimpleView { PREFIX, player, "is now the warden!" };
}

public IView CurrentWarden(CCSPlayerController? player)
{
if (player is not null)
return new SimpleView(writer =>
writer.Line(Prefix, "The current warden is", player));
return new SimpleView(writer =>
writer.Line(Prefix, "There is currently no warden!"));
}
}
public IView CURRENT_WARDEN(CCSPlayerController? player)
{
if (player is not null)
return new SimpleView { PREFIX, "The current warden is", player };
else
return new SimpleView { PREFIX, "There is currently no warden!" };
}
}
Loading