Skip to content

Commit

Permalink
And then everything changed when the renamers attacked
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Aug 3, 2024
1 parent b4342af commit 65b0b6a
Show file tree
Hide file tree
Showing 90 changed files with 709 additions and 544 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Jailbreak.English.Generic;

public class GenericCommandNotifications : IGenericCommandNotifications,
public class GenericCmdLocale : IGenericCmdLocale,
ILanguage<Formatting.Languages.English> {
private static readonly FormatObject PREFIX =
new HiddenFormatObject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

namespace Jailbreak.English.LastGuard;

public class LastGuardNotifications : ILastGuardNotifications,
ILanguage<Formatting.Languages.English> {
public class IlgLocale : ILGLocale, ILanguage<Formatting.Languages.English> {
private static readonly FormatObject PREFIX =
new HiddenFormatObject(
$" {ChatColors.DarkRed}[{ChatColors.LightRed}Last Guard{ChatColors.DarkRed}]") {
Expand Down
17 changes: 17 additions & 0 deletions lang/Jailbreak.English/LastRequest/B4BLocale.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using CounterStrikeSharp.API.Core;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views.LastRequest;

namespace Jailbreak.English.LastRequest;

public class B4BLocale : LastRequestLocale, ILRB4BLocale {
public IView PlayerGoesFirst(CCSPlayerController player) {
return new SimpleView {
PREFIX, "Randomly selected ", player.PlayerName, "to go first."
};
}

public IView WeaponSelected(CCSPlayerController player, string weapon) {
return new SimpleView { PREFIX, player, "picked", weapon };
}
}
40 changes: 40 additions & 0 deletions lang/Jailbreak.English/LastRequest/CoinflipLocale.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views.LastRequest;

namespace Jailbreak.English.LastRequest;

public class CoinflipLocale : LastRequestLocale, ILRCFLocale {
public IView FailedToChooseInTime(bool choice) {
return new SimpleView {
PREFIX,
"You failed to choose in time, defaulting to " + ChatColors.Green,
choice ? "Heads" : "Tails"
};
}

public IView GuardChose(CCSPlayerController guard, bool choice) {
return new SimpleView {
PREFIX,
guard,
" chose " + ChatColors.Green,
choice ? "Heads" : "Tails",
", flipping..."
};
}

public IView CoinLandsOn(bool heads) {
return new SimpleView {
PREFIX, "The coin lands on " + ChatColors.Green, heads ? "Heads" : "Tails"
};
}

public IView FailedToChooseInTime(string choice) {
return new SimpleView {
PREFIX,
"You failed to choose in time, defaulting to " + ChatColors.Green,
choice
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Jailbreak.English.LastRequest;

public class LastRequestMessages : ILastRequestMessages,
public class LastRequestLocale : ILRLocale,
ILanguage<Formatting.Languages.English> {
public static readonly FormatObject PREFIX =
new HiddenFormatObject(
Expand Down Expand Up @@ -48,16 +48,6 @@ public IView InvalidLastRequest(string query) {
return new SimpleView { PREFIX, "Invalid Last Request: ", query };
}

public IView InvalidPlayerChoice(CCSPlayerController player, string reason) {
return new SimpleView {
PREFIX,
"Invalid player choice: ",
player,
" Reason: ",
reason
};
}

public IView InformLastRequest(AbstractLastRequest lr) {
return new SimpleView {
PREFIX,
Expand Down Expand Up @@ -132,11 +122,41 @@ public IView CannotLR(CCSPlayerController player, string reason) {
};
}

public IView LastRequestCountdown(int seconds) {
return new SimpleView { PREFIX, "Starting in", seconds, "..." };
}

public IView WinByDefault(CCSPlayerController player) {
return new SimpleView { PREFIX, player, "won by default." };
}

public IView WinByHealth(CCSPlayerController player) {
return new SimpleView { PREFIX, player, "won by health." };
}

public IView WinByReason(CCSPlayerController player, string reason) {
return new SimpleView { PREFIX, player, "won by", reason + "." };
}

public IView Win(CCSPlayerController player) {
return new SimpleView { PREFIX, player, "won." };
}

public IView DamageBlockedInsideLastRequest
=> new SimpleView { PREFIX, "You or they are in LR, damage blocked." };

public IView DamageBlockedNotInSameLR
=> new SimpleView {
PREFIX, "You are not in the same LR as them, damage blocked."
};

public IView InvalidPlayerChoice(CCSPlayerController player, string reason) {
return new SimpleView {
PREFIX,
"Invalid player choice: ",
player,
" Reason: ",
reason
};
}
}
45 changes: 45 additions & 0 deletions lang/Jailbreak.English/LastRequest/RPSLocale.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using CounterStrikeSharp.API.Core;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views.LastRequest;

namespace Jailbreak.English.LastRequest;

public class RPSLocale : LastRequestLocale, ILRRPSLocale {
public IView PlayerMadeChoice(CCSPlayerController player) {
return new SimpleView { PREFIX, player, "made their choice." };
}

public IView BothPlayersMadeChoice() {
return new SimpleView {
PREFIX, "Both players have rocked, papered, and scissored! (ew)"
};
}

public IView Tie() {
return new SimpleView { PREFIX, "It's a tie! Let's go again!" };
}

public IView Results(CCSPlayerController guard, CCSPlayerController prisoner,
int guardPick, int prisonerPick) {
return new SimpleView {
PREFIX,
"Results: ",
guard,
" picked ",
toRPS(guardPick),
" and ",
prisoner,
" picked ",
toRPS(prisonerPick)
};
}

private string toRPS(int pick) {
return pick switch {
0 => "Rock",
1 => "Paper",
2 => "Scissors",
_ => "Unknown"
};
}
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Logistics;
using Jailbreak.Formatting.Views;
using Jailbreak.Formatting.Views.LastRequest;

namespace Jailbreak.English.LastRequest;

// ReSharper disable ClassNeverInstantiated.Global
public class RaceLRMessages : IRaceLRMessages,
ILanguage<Formatting.Languages.English> {
public class RaceLocale : LastRequestLocale, ILRRaceLocale {
public IView EndRaceInstruction
=> new SimpleView {
{
LastRequestMessages.PREFIX,
PREFIX,
$"Type ${ChatColors.Blue}!endrace${ChatColors.White} to set the end point!"
},
SimpleView.NEWLINE, {
LastRequestMessages.PREFIX,
PREFIX,
$"Type ${ChatColors.Blue}!endrace${ChatColors.White} to set the end point!"
},
SimpleView.NEWLINE, {
LastRequestMessages.PREFIX,
PREFIX,
$"Type ${ChatColors.Blue}!endrace${ChatColors.White} to set the end point!"
},
SimpleView.NEWLINE
Expand All @@ -29,7 +27,7 @@ public IView EndRaceInstruction
public IView RaceStartingMessage(CCSPlayerController prisoner) {
return new SimpleView {
{
LastRequestMessages.PREFIX, prisoner,
PREFIX, prisoner,
" is starting a race. Pay attention to where they set the end point!"
}
};
Expand All @@ -38,18 +36,15 @@ public IView RaceStartingMessage(CCSPlayerController prisoner) {
public IView NotInRaceLR() {
return new SimpleView {
{
LastRequestMessages.PREFIX,
PREFIX,
$"You must be in a race {ChatColors.Blue + "!lr" + ChatColors.White} to use this command"
}
};
}

public IView NotInPendingState() {
return new SimpleView {
{
LastRequestMessages.PREFIX,
"You must be in the pending state to use this command."
}
{ PREFIX, "You must be in the pending state to use this command." }
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

namespace Jailbreak.English.Logs;

public class
LogMessages : ILogMessages, ILanguage<Formatting.Languages.English> {
public class LogLocale : ILogLocale, ILanguage<Formatting.Languages.English> {
public IView BeginJailbreakLogs
=> new SimpleView {
"********************************",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Jailbreak.English.Mute;

public class PeaceMessages : IPeaceMessages,
public class WardenPeaceLocale : IWardenPeaceLocale,
ILanguage<Formatting.Languages.English> {
private static readonly FormatObject PREFIX =
new HiddenFormatObject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@

namespace Jailbreak.English.Rebel;

public class JihadC4Notifications : IJihadC4Notifications,
ILanguage<Formatting.Languages.English> {
public class Ic4Locale : IC4Locale, ILanguage<Formatting.Languages.English> {
public IView JihadC4Pickup
=> new SimpleView {
RebelNotifications.PREFIX, "You picked up a Jihad C4!"
};
=> new SimpleView { RebelLocale.PREFIX, "You picked up a Jihad C4!" };

public IView JihadC4Received
=> new SimpleView { RebelNotifications.PREFIX, "You received a Jihad C4!" };
=> new SimpleView { RebelLocale.PREFIX, "You received a Jihad C4!" };

public IView JihadC4Usage1
=> new SimpleView {
RebelNotifications.PREFIX,
RebelLocale.PREFIX,
$"To detonate it, hold it out and press {ChatColors.Yellow + "E" + ChatColors.Default}."
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Jailbreak.English.Rebel;

public class RebelNotifications : IRebelNotifications,
public class RebelLocale : IRebelLocale,
ILanguage<Formatting.Languages.English> {
public static readonly FormatObject PREFIX =
new HiddenFormatObject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@

namespace Jailbreak.English.SpecialDay;

public class HNSDayMessages() : TeamDayMessages("Hide and Seek",
public class HnsDayLocale() : TeamDayLocale("Hide and Seek",
"CTs must hide while the Ts seek!", "Ts have 250 HP!") {
public IView StayInArmory
=> new SimpleView {
SpecialDayMessages.PREFIX, "Today is", Name, ", stay in the armory!"
};
=> new SimpleView { PREFIX, "Today is", Name, ", stay in the armory!" };

public override IView BeginsIn(int seconds) {
if (seconds == 0)
return new SimpleView {
SpecialDayMessages.PREFIX, "Ready or not, here they come!"
};
return new SimpleView { PREFIX, "Ready or not, here they come!" };
return new SimpleView {
SpecialDayMessages.PREFIX,
PREFIX,
Name,
"begins in",
seconds,
Expand All @@ -25,10 +21,7 @@ public override IView BeginsIn(int seconds) {

public IView DamageWarning(int seconds) {
return new SimpleView {
SpecialDayMessages.PREFIX,
"You will be vulnerable to damage in",
seconds,
"seconds."
PREFIX, "You will be vulnerable to damage in", seconds, "seconds."
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

namespace Jailbreak.English.SpecialDay;

public class InfectionDayMessages() : TeamDayMessages("Infection",
public class InfectionDayLocale() : TeamDayLocale("Infection",
"CTs are infected and try to infect Ts!",
"Ts can scavenge for any guns, but CTs can only use pistols!") {
public override IView SpecialDayEnd() {
var winner = PlayerUtil.GetAlive().FirstOrDefault()?.Team
?? CsTeam.Spectator;
return new SimpleView {
SpecialDayMessages.PREFIX,
PREFIX,
Name,
"ended.",
(winner == CsTeam.CounterTerrorist ? ChatColors.Blue : ChatColors.Red)
Expand All @@ -24,11 +24,11 @@ public override IView SpecialDayEnd() {
public IView YouWereInfectedMessage(CCSPlayerController? player) {
return player == null || !player.IsValid ?
new SimpleView {
SpecialDayMessages.PREFIX,
PREFIX,
$"{ChatColors.Red}You were {ChatColors.DarkRed}infected{ChatColors.Red}! You are now a zombie!"
} :
new SimpleView {
SpecialDayMessages.PREFIX,
PREFIX,
$"{ChatColors.Red}You were {ChatColors.DarkRed}infected{ChatColors.Red} by",
player,
"! You are now a zombie!"
Expand All @@ -37,15 +37,15 @@ public IView YouWereInfectedMessage(CCSPlayerController? player) {

public IView InfectedWarning(CCSPlayerController player) {
return new SimpleView {
SpecialDayMessages.PREFIX,
PREFIX,
player,
$"was {ChatColors.DarkRed}infected{ChatColors.Default}! {ChatColors.Red}Watch out!"
};
}

public IView DamageWarning(int seconds) {
return new SimpleView {
SpecialDayMessages.PREFIX,
PREFIX,
"Damage will be enabled for the",
CsTeam.Terrorist,
"team in",
Expand Down
Loading

0 comments on commit 65b0b6a

Please sign in to comment.