mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
another thing
This commit is contained in:
1 parent
9085c8eb13
commit
1310196993
5 files changed
+20
-11
No files matched your search
@@ -269,7 +269,7 @@ public static class Deathrace
|
||||
{
|
||||
if (!GameGoing || seer.PlayerId != target.PlayerId || (seer.IsHost() && !hud) || !Data.TryGetValue(seer.PlayerId, out var data)) return string.Empty;
|
||||
|
||||
StringBuilder sb = new();
|
||||
StringBuilder sb = new("<#ffffff>");
|
||||
PlainShipRoom room = seer.GetPlainShipRoom();
|
||||
|
||||
sb.AppendLine($"<#888888>{string.Format(Translator.GetString("Deathrace.Lap"), data.Lap + 1, LapsToWin)}</color>");
|
||||
|
||||
@@ -222,7 +222,6 @@ internal static class ChatCommands
|
||||
new(["retribute", "воздать", "报复"], "{id}", GetString("CommandDescription.Retribute"), Command.UsageLevels.Everyone, Command.UsageTimes.InMeeting, RetributeCommand, true, true, [GetString("CommandArgs.Retribute.Id")]),
|
||||
new(["revive", "воскрешение", "воскрешать", "复活", "reviver"], "{id}", GetString("CommandDescription.Revive"), Command.UsageLevels.Host, Command.UsageTimes.InGame, ReviveCommand, true, false, [GetString("CommandArgs.Revive.Id")]),
|
||||
new(["select", "выбратьигрока", "选择玩家", "selecionar"], "{id} {role}", GetString("CommandDescription.Select"), Command.UsageLevels.Everyone, Command.UsageTimes.InMeeting, SelectCommand, true, true, [GetString("CommandArgs.Select.Id"), GetString("CommandArgs.Select.Role")]),
|
||||
//UIScaleCommand
|
||||
new(["uiscale", "масштаб"], "{scale}", GetString("CommandDescription.UIScale"), Command.UsageLevels.Modded, Command.UsageTimes.Always, UIScaleCommand, true, false, [GetString("CommandArgs.UIScale.Scale")]),
|
||||
|
||||
new(["confirmauth"], "{uuid}", GetString("CommandDescription.ConfirmAuth"), Command.UsageLevels.Everyone, Command.UsageTimes.Always, ConfirmAuthCommand, true, false, [GetString("CommandArgs.ConfirmAuth.UUID")]),
|
||||
|
||||
@@ -1533,6 +1533,7 @@
|
||||
"ForensicCanknowAddons": "Can find the dead player's add-ons",
|
||||
"ForensicCanknowKillTime": "Can find how long ago the player died",
|
||||
"ForensicCanknowColorType": "Can find the color type of the killer",
|
||||
"ForensicCanknowColorTypeMinBodyAge": "Minimum body age to find color type",
|
||||
"ParanoiaVentCooldown": "Vent Cooldown",
|
||||
"ParanoiaNumOfUseButton": "Max number of portable buttons",
|
||||
"EveryOneKnowSuperStar": "Everyone knows the <color=#f6f657>Super Star</color>",
|
||||
|
||||
@@ -99,7 +99,7 @@ public class CopyCat : RoleBase
|
||||
|
||||
if (CopyCrewVar.GetBool())
|
||||
{
|
||||
role = role switch
|
||||
var newRole = role switch
|
||||
{
|
||||
CustomRoles.Swooper or CustomRoles.Wraith => CustomRoles.Chameleon,
|
||||
CustomRoles.Stealth or CustomRoles.Nonplus => CustomRoles.Grenadier,
|
||||
@@ -157,6 +157,9 @@ public class CopyCat : RoleBase
|
||||
CustomRoles.Bandit => CustomRoles.Cleanser,
|
||||
_ => role
|
||||
};
|
||||
|
||||
if (newRole.GetMode() != 0 || CopyCrewVarEvenIfDisabled.GetBool())
|
||||
role = newRole;
|
||||
}
|
||||
|
||||
if (tpc.IsCrewmate() && !tpc.Is(CustomRoles.Rascal) && !tpc.Is(CustomRoles.Jailor) && !tpc.IsConverted())
|
||||
|
||||
@@ -11,6 +11,7 @@ internal class Forensic : RoleBase
|
||||
public static OptionItem ForensicCanknowAddons;
|
||||
public static OptionItem ForensicCanknowKillTime;
|
||||
public static OptionItem ForensicCanknowColorType;
|
||||
public static OptionItem ForensicCanknowColorTypeMinBodyAge;
|
||||
|
||||
public static Dictionary<byte, string> ForensicNotify = [];
|
||||
|
||||
@@ -34,6 +35,10 @@ internal class Forensic : RoleBase
|
||||
|
||||
ForensicCanknowColorType = new BooleanOptionItem(6614, "ForensicCanknowColorType", false, TabGroup.CrewmateRoles)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Forensic]);
|
||||
|
||||
ForensicCanknowColorTypeMinBodyAge = new IntegerOptionItem(6615, "ForensicCanknowColorTypeMinBodyAge", new(1, 60, 1), 10, TabGroup.CrewmateRoles)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(ForensicCanknowColorType);
|
||||
}
|
||||
|
||||
public override void Init() { }
|
||||
@@ -54,19 +59,20 @@ internal class Forensic : RoleBase
|
||||
msg += ";" + string.Format(Translator.GetString("ForensicNoticeKiller"), realKiller.GetCustomRole().ToColoredString());
|
||||
}
|
||||
|
||||
if (ForensicCanknowDeathReason.GetBool()) msg += ";" + string.Format(Translator.GetString("ForensicNoticeDeathReason"), Translator.GetString($"DeathReason.{Main.PlayerStates[tpc.PlayerId].deathReason}"));
|
||||
if (ForensicCanknowDeathReason.GetBool())
|
||||
msg += ";" + string.Format(Translator.GetString("ForensicNoticeDeathReason"), Translator.GetString($"DeathReason.{Main.PlayerStates[tpc.PlayerId].deathReason}"));
|
||||
|
||||
if (ForensicCanknowAddons.GetBool()) msg += ";" + string.Format(Translator.GetString("ForensicNoticeAddons"), string.Join(", ", tpc.GetCustomSubRoles().Select(x => x.ToColoredString())));
|
||||
if (ForensicCanknowAddons.GetBool())
|
||||
msg += ";" + string.Format(Translator.GetString("ForensicNoticeAddons"), string.Join(", ", tpc.GetCustomSubRoles().Select(x => x.ToColoredString())));
|
||||
|
||||
DateTime deathTimeStamp = Main.PlayerStates[tpc.PlayerId].RealKiller.TimeStamp;
|
||||
DateTime now = DateTime.Now;
|
||||
double timeSpanSeconds = (now - deathTimeStamp).TotalSeconds;
|
||||
|
||||
if (ForensicCanknowKillTime.GetBool())
|
||||
{
|
||||
DateTime deathTimeStamp = Main.PlayerStates[tpc.PlayerId].RealKiller.TimeStamp;
|
||||
DateTime now = DateTime.Now;
|
||||
double timeSpanSeconds = (now - deathTimeStamp).TotalSeconds;
|
||||
msg += ";" + string.Format(Translator.GetString("ForensicNoticeKillTime"), (int)timeSpanSeconds);
|
||||
}
|
||||
|
||||
if (ForensicCanknowColorType.GetBool() && realKiller != null)
|
||||
if (ForensicCanknowColorType.GetBool() && realKiller != null && timeSpanSeconds >= ForensicCanknowColorTypeMinBodyAge.GetInt())
|
||||
{
|
||||
var darker = new List<int> { 0, 1, 2, 6, 8, 9, 12, 15 };
|
||||
bool isDarker = darker.Contains(realKiller.CurrentOutfit.ColorId);
|
||||
|
||||
Reference in new issue
Block a user