mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-26 08:46:56 +00:00
d
This commit is contained in:
1 parent
f5de605830
commit
6af6778c0e
5 files changed
+25
-12
No files matched your search
@@ -81,10 +81,10 @@ public static class NaturalDisasters
|
||||
LoadAllDisasters();
|
||||
|
||||
AllDisasters.ConvertAll(x => x.Name).ForEach(x => DisasterSpawnChances[x] = new IntegerOptionItem(id++, "ND_Disaster.SpawnChance", new(0, 100, 5), 50, TabGroup.GameSettings)
|
||||
.SetGameMode(gameMode)
|
||||
.SetColor(color)
|
||||
.SetValueFormat(OptionFormat.Percent)
|
||||
.AddReplacement(("{disaster}", Translator.GetString($"ND_{x}"))));
|
||||
.SetGameMode(gameMode)
|
||||
.SetColor(color)
|
||||
.SetValueFormat(OptionFormat.Percent)
|
||||
.AddReplacement(("{disaster}", Translator.GetString($"ND_{x}"))));
|
||||
|
||||
AllDisasters.ForEach(x => x.GetMethod("SetupOwnCustomOption")?.Invoke(null, null));
|
||||
}
|
||||
@@ -283,10 +283,14 @@ public static class NaturalDisasters
|
||||
|
||||
if (now - LastSync >= 10)
|
||||
{
|
||||
if (Options.CurrentGameMode == CustomGameMode.AllInOne)
|
||||
{
|
||||
BuildingCollapse.CollapsedRooms.Clear();
|
||||
Sinkhole.RemoveRandomSinkhole();
|
||||
Utils.NotifyRoles();
|
||||
}
|
||||
|
||||
LastSync = now;
|
||||
BuildingCollapse.CollapsedRooms.Clear();
|
||||
Sinkhole.RemoveRandomSinkhole();
|
||||
Utils.NotifyRoles();
|
||||
Utils.MarkEveryoneDirtySettings();
|
||||
}
|
||||
}
|
||||
|
||||
+11
-2
@@ -706,7 +706,16 @@ public static class GuessManager
|
||||
foreach (PlayerVoteArea pva in __instance.playerStates)
|
||||
{
|
||||
PlayerControl pc = Utils.GetPlayerById(pva.TargetPlayerId);
|
||||
if (pc == null || !pc.IsAlive()) continue;
|
||||
|
||||
if (pc == null) continue;
|
||||
|
||||
bool skip = PlayerControl.LocalPlayer.Is(CustomRoles.NecroGuesser) switch
|
||||
{
|
||||
true => pc.IsAlive() || pc.Is(CustomRoles.Gravestone) || (Options.SeeEjectedRolesInMeeting.GetBool() && Main.PlayerStates[pva.TargetPlayerId].deathReason == PlayerState.DeathReason.Vote),
|
||||
false => !pc.IsAlive()
|
||||
};
|
||||
|
||||
if (skip) continue;
|
||||
|
||||
GameObject template = pva.Buttons.transform.Find("CancelButton").gameObject;
|
||||
GameObject targetBox = Object.Instantiate(template, pva.transform);
|
||||
@@ -969,7 +978,7 @@ public static class GuessManager
|
||||
or CustomRoles.SuperStar
|
||||
or CustomRoles.Konan
|
||||
or CustomRoles.GuardianAngelEHR
|
||||
)
|
||||
)
|
||||
continue;
|
||||
|
||||
if (!role.IsEnable() && !role.RoleExist(true) && !role.IsConverted()) continue;
|
||||
|
||||
@@ -16,7 +16,7 @@ public static class Statistics
|
||||
|
||||
public static void OnGameEnd()
|
||||
{
|
||||
if (CustomWinnerHolder.WinnerTeam is CustomWinner.None or CustomWinner.Draw or CustomWinner.Error || Main.AllPlayerControls.Length <= 3) return;
|
||||
if (CustomWinnerHolder.WinnerTeam is CustomWinner.None or CustomWinner.Draw or CustomWinner.Error || Main.AllPlayerControls.Length <= MinPlayers) return;
|
||||
|
||||
var lp = PlayerControl.LocalPlayer;
|
||||
var role = lp.GetCustomRole();
|
||||
|
||||
@@ -117,7 +117,7 @@ internal static class ChatCommands
|
||||
new(["dump", "дамп", "лог", "导出日志"], "", GetString("CommandDescription.Dump"), Command.UsageLevels.Modded, Command.UsageTimes.Always, DumpCommand, false),
|
||||
new(["v", "version", "в", "версия", "检查版本", "versão"], "", GetString("CommandDescription.Version"), Command.UsageLevels.Modded, Command.UsageTimes.Always, VersionCommand, false),
|
||||
new(["cs", "changesetting", "измнастр", "修改设置", "mudarconfig", "mudarconfiguração"], "{name} {?} [?]", GetString("CommandDescription.ChangeSetting"), Command.UsageLevels.Host, Command.UsageTimes.InLobby, ChangeSettingCommand, true, [GetString("CommandArgs.ChangeSetting.Name"), GetString("CommandArgs.ChangeSetting.UnknownValue"), GetString("CommandArgs.ChangeSetting.UnknownValue")]),
|
||||
new(["w", "win", "winner", "победители", "获胜者", "vencedor"], "", GetString("CommandDescription.Winner"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, WinnerCommand, true),
|
||||
new(["win", "winner", "победители", "获胜者", "vencedor"], "", GetString("CommandDescription.Winner"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, WinnerCommand, true),
|
||||
new(["l", "lastresult", "л", "对局职业信息", "resultados", "ultimoresultado"], "", GetString("CommandDescription.LastResult"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, LastResultCommand, true),
|
||||
new(["rn", "rename", "рн", "ренейм", "переименовать", "修改名称", "renomear"], "{name}", GetString("CommandDescription.Rename"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, RenameCommand, true, [GetString("CommandArgs.Rename.Name")]),
|
||||
new(["hn", "hidename", "хн", "спрник", "隐藏姓名", "semnome", "escondernome"], "", GetString("CommandDescription.HideName"), Command.UsageLevels.Host, Command.UsageTimes.InLobby, HideNameCommand, true),
|
||||
|
||||
@@ -2785,7 +2785,7 @@
|
||||
"DisabledByProgram": "Public rooms have been disabled by the program",
|
||||
"EnterVentToWin": "Enter a Vent to Ignite!",
|
||||
"EatenByPelican": "You're swallowed, waiting for the Pelican to die or a meeting",
|
||||
"KBBackCountDown": "<#ff0000>DEAD</color>\\n<#ffffff>Respawning in <#ffff00>{0}</color> seconds to revive</color>\\n\\n",
|
||||
"KBBackCountDown": "<#ff0000>DEAD</color>\\n<#ffffff>Respawning in <#ffff00>{0}</color>s</color>\\n\\n",
|
||||
"SoloKombat.WinnersKillCount": "They got <color=#ffffff>{0}</color> kills!",
|
||||
"FireworksPutPhase": "{0} Fireworks Left",
|
||||
"FireworksWaitPhase": "Wait for it...",
|
||||
|
||||
Reference in new issue
Block a user