Files
Jailbreak/lang/Jailbreak.English/LastRequest/RPSLocale.cs
Isaac 9710049643 Cleaup/aug (#290)
* Reformat

* Add cvar config for HNS

* Add more HNS customization support

* Add customizations to noscope

* Remove unused class var

* More tidying up

* Remove config infra

* Add configurability to C4

* Add contributing, add config explanation in readme
2024-08-27 17:57:20 -07:00

45 lines
1.0 KiB
C#

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 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"
};
}
}