mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-19 15:51:58 +00:00
something
This commit is contained in:
1 parent
fef281ee11
commit
7ed8519fb4
6 files changed
+29
-29
No files matched your search
@@ -69,7 +69,7 @@ public static class NaturalDisasters
|
||||
Color color = Utils.GetRoleColor(CustomRoles.NDPlayer);
|
||||
const CustomGameMode gameMode = CustomGameMode.NaturalDisasters;
|
||||
|
||||
DisasterFrequency = new FloatOptionItem(id++, "ND_DisasterFrequency", new(0f, 20f, 0.1f), 1f, TabGroup.GameSettings)
|
||||
DisasterFrequency = new FloatOptionItem(id++, "ND_DisasterFrequency", new(0f, 20f, 0.1f), 2f, TabGroup.GameSettings)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(gameMode)
|
||||
.SetColor(color)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace EHR
|
||||
|
||||
private int SnapToSendFrameCount;
|
||||
|
||||
private bool IsPooled;
|
||||
protected bool IsPooled;
|
||||
|
||||
public void RpcChangeSprite(string sprite)
|
||||
{
|
||||
@@ -695,7 +695,7 @@ namespace EHR
|
||||
CreateNetObject(warning, position);
|
||||
}
|
||||
|
||||
protected override bool ConstantlyChangesPosition => !SpawnTimer.IsRunning && DisasterName is "Tsunami" or "Tornado";
|
||||
protected override bool ConstantlyChangesPosition => !SpawnTimer.IsRunning && DisasterName is "Tsunami" or "Tornado" && !IsPooled;
|
||||
|
||||
public SystemTypes? Room { get; }
|
||||
public string DisasterName { get; }
|
||||
|
||||
@@ -190,30 +190,6 @@ public static class CollectionExtensions
|
||||
return (list1, list2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Splits a collection into two integers based on a predicate
|
||||
/// </summary>
|
||||
/// <param name="predicate">The predicate to split the collection by</param>
|
||||
/// <returns>
|
||||
/// A tuple containing two integers: one that is the number of elements that satisfy the predicate, and one that is the number of elements that
|
||||
/// do not
|
||||
/// </returns>
|
||||
public (int TrueCount, int FalseCount) SplitCount(Func<T, bool> predicate)
|
||||
{
|
||||
var int1 = 0;
|
||||
var int2 = 0;
|
||||
|
||||
foreach (T element in collection)
|
||||
{
|
||||
if (predicate(element))
|
||||
int1++;
|
||||
else
|
||||
int2++;
|
||||
}
|
||||
|
||||
return (int1, int2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a collection contains any elements that satisfy a predicate and returns the first element that
|
||||
/// satisfies the predicate
|
||||
@@ -476,6 +452,29 @@ public static class CollectionExtensions
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Splits a collection into two integers based on a predicate
|
||||
/// </summary>
|
||||
/// <param name="predicate">The predicate to split the collection by</param>
|
||||
/// <returns>
|
||||
/// A tuple containing two integers: one that is the number of elements that satisfy the predicate, and one that is the number of elements that do not
|
||||
/// </returns>
|
||||
public (int TrueCount, int FalseCount) SplitCount(Func<T, bool> predicate)
|
||||
{
|
||||
var int1 = 0;
|
||||
var int2 = 0;
|
||||
|
||||
for (var i = 0; i < collection.Count; i++)
|
||||
{
|
||||
if (predicate(collection[i]))
|
||||
int1++;
|
||||
else
|
||||
int2++;
|
||||
}
|
||||
|
||||
return (int1, int2);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+1
-1
@@ -2526,7 +2526,7 @@ public static class Utils
|
||||
name = $"<color={GetString("HostColor")}>{GetString("HostText")}</color><color={GetString("IconColor")}>{GetString("Icon")}</color><color={GetString("NameColor")}>{name}</color>";
|
||||
|
||||
CustomGameMode gameMode = Options.CurrentGameMode;
|
||||
var modeText = $"<size=1.8>{GetString(gameMode == CustomGameMode.HideAndSeek && CustomHnS.SNS ? "HNS.ShiftAndSeek" : $"Mode{gameMode}")}</size>";
|
||||
var modeText = $"<size=1.8>{GetString(gameMode == CustomGameMode.HideAndSeek && CustomHnS.SNS ? "ModeShiftAndSeek" : $"Mode{gameMode}")}</size>";
|
||||
|
||||
name = gameMode switch
|
||||
{
|
||||
|
||||
@@ -4464,6 +4464,7 @@
|
||||
"FFA_TeamNumber": "Number of Teams",
|
||||
"HideAndSeek": "HIDE AND SEEK",
|
||||
"ModeHideAndSeek": "Gamemode: Hide And Seek",
|
||||
"ModeShiftAndSeek": "Gamemode: Shift And Seek",
|
||||
"ModeDescribe.HideAndSeek": "In the Hide And Seek gamemode, seekers have to kill all hiders, while hiders have to complete all tasks without being killed in order to win.\\nIf the time limit reaches 0, hiders win.\\nIf everyone apart from the Seekers die, the Seekers win.\\n\\nRoles: Hider, Seeker, Fox, Troll, Jumper, Detector, Jet, Dasher, Locator, Venter, Agent, Taskinator",
|
||||
"GameModeTutorial.HideAndSeek": "<size=90%>The current game mode is <#345eeb>Hide And Seek (Modded)</color>.</size>\\n<size=80%>Seekers must kill all hiders to win,\\nhiders must complete tasks to lower the timer.\\nIf the time limit ends, hiders win.</size>",
|
||||
"HNS.DangerMeter": "Show (Custom) Danger Meter",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"LanguageID": "0",
|
||||
"LanguageID": "4",
|
||||
"HostText": "EHR - 호스트",
|
||||
"HostColor": "#00ffa5",
|
||||
"HostIconInMeeting": "호스트: {0}",
|
||||
|
||||
Reference in new issue
Block a user