a few fixes

This commit is contained in:
Gurge44 committed 2025-03-02 10:01:33 +01:00
1 parent e639ef3f91
commit 00b42a22b3
9 files changed
+21 -7

No files matched your search

+2 -1
View File
@@ -57,6 +57,7 @@ public static class CaptureTheFlag
private static long GameStartTS;
private static int RoundsPlayed => TeamData.Values.Sum(x => x.RoundsWon);
public static bool IsDeathPossible => TaggedPlayersGet.GetValue() == 1;
public static float KCD => TagCooldown.GetFloat();
private static NetworkedPlayerInfo.PlayerOutfit YellowOutfit => new NetworkedPlayerInfo.PlayerOutfit().Set("", 5, "", "", "", "pet_coaltonpet", "");
private static NetworkedPlayerInfo.PlayerOutfit BlueOutfit => new NetworkedPlayerInfo.PlayerOutfit().Set("", 1, "", "", "", "pet_coaltonpet", "");
@@ -193,7 +194,7 @@ public static class CaptureTheFlag
if (TemporarilyOutPlayers.TryGetValue(seer.PlayerId, out var backTS))
{
var timeLeft = backTS - Utils.TimeStamp;
str += $"{Translator.GetString("CTF_BackIn")}{timeLeft}\n";
str += $"{string.Format(Translator.GetString("CTF_BackIn"), timeLeft)}\n";
}
return str + string.Join("<#ffffff> | </color>", TeamData.Select(x => Utils.ColorString(x.Key.GetTeamColor(), x.Value.RoundsWon.ToString())));
+1
View File
@@ -1408,6 +1408,7 @@ internal static class ExtendedPlayerControl
CustomRoles.KB_Normal => SoloPVP.KB_ATKCooldown.GetFloat(),
CustomRoles.Killer => FreeForAll.FFAKcd.GetFloat(),
CustomRoles.Runner => Speedrun.KCD,
CustomRoles.CTFPlayer => CaptureTheFlag.KCD,
_ => Main.AllPlayerKillCooldown[player.PlayerId]
};
+1 -1
View File
@@ -2339,7 +2339,7 @@ public static class Options
PassiveNeutralsCanGuess = new BooleanOptionItem(19713, "PassiveNeutralsCanGuess", false, TabGroup.TaskSettings)
.SetParent(GuesserMode);
CovenCanGuess = new BooleanOptionItem(19730, "CovenCanGuess", false, TabGroup.TaskSettings)
CovenCanGuess = new BooleanOptionItem(19735, "CovenCanGuess", false, TabGroup.TaskSettings)
.SetParent(GuesserMode);
BetrayalAddonsCanGuess = new BooleanOptionItem(19719, "BetrayalAddonsCanGuess", false, TabGroup.TaskSettings)
+1 -1
View File
@@ -141,7 +141,7 @@ public static class Translator
return str;
}
private static string GetString(string str, SupportedLangs langId)
public static string GetString(string str, SupportedLangs langId)
{
var res = $"<INVALID:{str}>";
+2 -2
View File
@@ -3264,7 +3264,7 @@
"CanWinAfterDeath": "Can win after death",
"Starspawn": "Starspawn",
"StarspawnInfo": "Isolate Players & Call Daybreak",
"StarspawnInfoLong": "(Impostors):\\nAs the Starspawn, you can isolate players by using your kill button on them. Only evil players can interact with isolated players.\\nOnce in a game, you can call daybreak in a meeting by typing <b>/daybreak</b> in the chat. This will prevent ALL meeting abilities from being used in that meeting. This includes guessing, judging, and all other meeting abilities that are role-specific.\\n\\nYou win if crewmates lose.",
"StarspawnInfoLong": "(Neutrals):\\nAs the Starspawn, you can isolate players by using your kill button on them. Only evil players can interact with isolated players.\\nOnce in a game, you can call daybreak in a meeting by typing <b>/daybreak</b> in the chat. This will prevent ALL meeting abilities from being used in that meeting. This includes guessing, judging, and all other meeting abilities that are role-specific.\\n\\nYou win if crewmates lose.",
"StarspawnUsedDayBreak": "<#ff0000>⚠</color> <#ffff00>Daybreak has been called by the {0}!</color> <#ff0000>⚠</color>\\nThis means that NO meeting abilities can be used in this meeting anymore.",
"Spirit": "Spirit",
"SpiritInfo": "Place Candles to Swap Interactions",
@@ -4468,7 +4468,7 @@
"BusyShortTasks": "Amount of Extra Short Tasks",
"Shy": "Shy",
"ShyInfo": "You don't hear whispers",
"ShyInfoLong": "(Crewmates):\\nAs the Shy, you can't hear whispers. You can still send them, but you won't be able to hear them.",
"ShyInfoLong": "(Add-ons):\\nAs the Shy, you can't hear whispers. You can still send them, but you won't be able to hear them.",
"Prefix.Shy": "Shy",
"Changeling": "Changeling",
"ChangelingInfo": "Pick Your Impostor Role!",
+1 -1
View File
@@ -90,7 +90,7 @@ public class Oracle : RoleBase
if (IRandom.Instance.Next(100) < FailChance.GetInt())
team = Enum.GetValues<Team>().Without(team).RandomElement();
string msg = string.Format(GetString($"OracleCheck.{GetString($"ShortTeamName.{team}")}"), target.GetRealName());
string msg = string.Format(GetString($"OracleCheck.{GetString($"ShortTeamName.{team}", SupportedLangs.English)}"), target.GetRealName());
Utils.SendMessage($"{GetString("OracleCheck")}\n{msg}\n\n{string.Format(GetString("OracleCheckLimit"), player.GetAbilityUseLimit())}", player.PlayerId, Utils.ColorString(Utils.GetRoleColor(CustomRoles.Oracle), GetString("OracleCheckMsgTitle")));
+1 -1
View File
@@ -20,7 +20,7 @@ public class Seamstress : RoleBase
public override void SetupCustomOption()
{
StartSetup(645500)
StartSetup(645800)
.AutoSetupOption(ref ShapeshiftCooldown, 15f, new FloatValueRule(0.5f, 60f, 0.5f), OptionFormat.Seconds);
}
+7
View File
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Modules;
using Hazel;
@@ -38,6 +39,12 @@ public class Spirit : RoleBase
Targets = (byte.MaxValue, byte.MaxValue);
}
public override void ApplyGameOptions(IGameOptions opt, byte playerId)
{
AURoleOptions.ShapeshifterCooldown = ShapeshiftCooldown.GetFloat();
AURoleOptions.ShapeshifterDuration = 1f;
}
public override bool OnShapeshift(PlayerControl shapeshifter, PlayerControl target, bool shapeshifting)
{
bool firstIsSet = Targets.Item1 != byte.MaxValue;
+5
View File
@@ -43,6 +43,11 @@ public class Starspawn : RoleBase
HasUsedDayBreak = false;
}
public override bool CanUseKillButton(PlayerControl pc)
{
return pc.IsAlive();
}
public override void SetKillCooldown(byte id)
{
Main.AllPlayerKillCooldown[id] = AbilityCooldown.GetFloat();