mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-19 15:51:59 +00:00
Suicide option, fix vent issues
This commit is contained in:
1 parent
00e2a384c9
commit
744da1b726
14 files changed
+140
-42
No files matched your search
+1
-1
@@ -45,7 +45,7 @@ public partial class Main : BasePlugin
|
||||
|
||||
public static bool HasArgumentException;
|
||||
public static string CredentialsText;
|
||||
public const string ModVersion = "v2.1.0";
|
||||
public const string ModVersion = "v2.1.1";
|
||||
|
||||
public static float GameTimer;
|
||||
public static float AfkTimer;
|
||||
|
||||
@@ -287,7 +287,8 @@ public static class BanManager
|
||||
Dictionary<string, string> variables = new()
|
||||
{
|
||||
{ "ModVersion", Main.ModVersion },
|
||||
{ "\\n", Environment.NewLine }
|
||||
{ "\\n", Environment.NewLine },
|
||||
{ "FirstDeath", NormalGameEndChecker.firstDeath }
|
||||
};
|
||||
|
||||
foreach (var kvp in variables)
|
||||
|
||||
@@ -352,6 +352,7 @@ namespace AmongUsRevamped
|
||||
public static OptionItem SNSDisableMushroomMixup;
|
||||
public static OptionItem SNSDisableCloseDoor;
|
||||
public static OptionItem SNSImpostorsCanVent;
|
||||
public static OptionItem SNSSuicideMode;
|
||||
|
||||
public static OptionItem TabGroupSpeedrun;
|
||||
public static OptionItem GameAutoEndsAfter;
|
||||
@@ -583,6 +584,7 @@ namespace AmongUsRevamped
|
||||
SNSDisableCloseDoor = BooleanOptionItem.Create(70064, Translator.Get("snsDisableCloseDoor"), true, TabGroup.GamemodeSettings, false)
|
||||
.SetColor(Color.red);
|
||||
SNSImpostorsCanVent = BooleanOptionItem.Create(70065, Translator.Get("snsImpostorCanVent"), true, TabGroup.GamemodeSettings, false);
|
||||
SNSSuicideMode = BooleanOptionItem.Create(70066, Translator.Get("snsSuicideMode"), false, TabGroup.GamemodeSettings, false);
|
||||
|
||||
TabGroupSpeedrun = TextOptionItem.Create(70076, Translator.Get("tabGroupSpeedrun"), TabGroup.GamemodeSettings)
|
||||
.SetColor(Color.green);
|
||||
|
||||
@@ -119,7 +119,7 @@ public static class FixedUpdate
|
||||
}
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && !Utils.IsLobby)
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && !Utils.IsLobby && !Options.SNSSuicideMode.GetBool())
|
||||
{
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
|
||||
@@ -565,7 +565,7 @@ internal static class SendChatPatch
|
||||
|
||||
if (text == "/sns" || text == "/shiftandseek")
|
||||
{
|
||||
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing\nWrong kills are blocked. Kill animations are off", true);
|
||||
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing Crewmates", true);
|
||||
return false;
|
||||
}
|
||||
if (text == "/sns2" || text == "/shiftandseek2")
|
||||
@@ -598,7 +598,7 @@ internal static class SendChatPatch
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing\nWrong kills are blocked. Kill animations are off", true);
|
||||
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing Crewmates", true);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -1009,7 +1009,7 @@ public static class RPCHandlerPatch
|
||||
if (text == "/sns" || text == "/shiftandseek")
|
||||
{
|
||||
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
|
||||
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing\nWrong kills are blocked. Kill animations are off", true);
|
||||
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing Crewmates", true);
|
||||
}
|
||||
if (text == "/sns2" || text == "/shiftandseek2")
|
||||
{
|
||||
@@ -1042,7 +1042,7 @@ public static class RPCHandlerPatch
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing\nWrong kills are blocked. Kill animations are off", true);
|
||||
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing Crewmates", true);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
@@ -31,7 +31,7 @@ class ExileControllerWrapUpPatch
|
||||
}
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() == 1)
|
||||
if (Options.Gamemode.GetValue() == 1 && !Options.SNSSuicideMode.GetBool())
|
||||
{
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
|
||||
+24
-20
@@ -64,30 +64,34 @@ internal static class CoShowIntroPatch
|
||||
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek)
|
||||
{
|
||||
if (Main.NormalOptions.roleOptions.TryGetRoleOptions<GuardianAngelRoleOptionsV11>(RoleTypes.GuardianAngel, out var GuardianAngelOptions))
|
||||
{
|
||||
GuardianAngelOptions.ProtectionDurationSeconds = 254f;
|
||||
}
|
||||
OptionManager.SyncGameOptions();
|
||||
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
if (p.Data == null || p.Data.IsDead || p.Data.RoleType == RoleTypes.Shapeshifter) continue;
|
||||
p.RpcProtectPlayer(p, p.cosmetics.ColorId);
|
||||
p.Data.MarkDirty();
|
||||
}
|
||||
|
||||
if (Options.SNSChatInGameExtend.GetBool())
|
||||
{
|
||||
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing\nWrong kills are blocked. Kill animations are off", true);
|
||||
}
|
||||
if (Options.SNSChatInGameExtend2.GetBool())
|
||||
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nMeetings & Reports = Off", $"Crewmates win by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing Crewmates", true);
|
||||
}
|
||||
|
||||
if (!Options.SNSSuicideMode.GetBool())
|
||||
{
|
||||
_ = new LateTask(() =>
|
||||
if (Main.NormalOptions.roleOptions.TryGetRoleOptions<GuardianAngelRoleOptionsV11>(RoleTypes.GuardianAngel, out var GuardianAngelOptions))
|
||||
{
|
||||
Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, "Correctly killing a target will directly turn them into a ghost and leave no dead body", "", false);
|
||||
}, 6.6f, "SNSChatInGameExtend2");
|
||||
}
|
||||
GuardianAngelOptions.ProtectionDurationSeconds = 254f;
|
||||
}
|
||||
OptionManager.SyncGameOptions();
|
||||
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
if (p.Data == null || p.Data.IsDead || p.Data.RoleType == RoleTypes.Shapeshifter) continue;
|
||||
p.RpcProtectPlayer(p, p.cosmetics.ColorId);
|
||||
p.Data.MarkDirty();
|
||||
}
|
||||
|
||||
if (Options.SNSChatInGameExtend2.GetBool())
|
||||
{
|
||||
_ = new LateTask(() =>
|
||||
{
|
||||
Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, "Correctly killing a target will directly turn them into a ghost and leave no dead body", "", false);
|
||||
}, 6.6f, "SNSChatInGameExtend2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((GameOptionsManager.Instance.CurrentGameOptions.GetFloat(FloatOptionNames.KillCooldown) == 0.001f))
|
||||
|
||||
@@ -68,11 +68,11 @@ internal static class MurderPlayerPatch
|
||||
|
||||
if (resultFlags.HasFlag(MurderResultFlags.Succeeded))
|
||||
{
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek)
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && target.Data.PlayerId != __instance.shapeshiftTargetPlayerId)
|
||||
{
|
||||
if (target.Data.PlayerId == __instance.shapeshiftTargetPlayerId) return;
|
||||
Logger.Info($" {__instance.Data.PlayerName} directly killed {target.Data.PlayerName} in SnS, forcing suicide. (Are they hacking?)", "MurderPlayer");
|
||||
__instance.RpcSetRole(RoleTypes.ImpostorGhost);
|
||||
Logger.SendInGame($"{__instance.Data.PlayerName} directly misfired, forcing suicide");
|
||||
Logger.Info($" {__instance.Data.PlayerName} directly misfired, forcing suicide", "MurderPlayer");
|
||||
__instance.RpcSetRole(RoleTypes.ImpostorGhost);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -113,17 +113,16 @@ public static class MessageReaderUpdateSystemPatch
|
||||
if (player.Data.ClientId == AmongUsClient.Instance.HostId) return true;
|
||||
|
||||
// Thanks to D1GQ for finding.
|
||||
if (systemType == SystemTypes.Ventilation)
|
||||
if (systemType is SystemTypes.Ventilation)
|
||||
{
|
||||
_ = reader.ReadUInt16();
|
||||
var operation = (VentilationSystem.Operation)reader.ReadByte();
|
||||
if (operation == VentilationSystem.Operation.BootImpostors)
|
||||
{
|
||||
Logger.Info($"BLOCKED: {operation}, {player}", "s");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
|
||||
|
||||
|
||||
# 🎮 Features (v2.1.0):
|
||||
# 🎮 Features (v2.1.1):
|
||||
|
||||
## <b>♠️ Client Side settings:</b>
|
||||
- Toggle Game Master (Spectator)
|
||||
@@ -66,7 +66,7 @@
|
||||
## <b>🔧 Gameplay Settings:</b>
|
||||
- Change sabotage cooldown and durations
|
||||
- Dead impostors can sabotage
|
||||
- Disable critical sabotages (invividual)
|
||||
- Disable critical sabotages (individual)
|
||||
- Disable door sabotages
|
||||
- Disable meeting calls first 30s
|
||||
- Disable devices (per map, individual)
|
||||
|
||||
@@ -394,6 +394,8 @@
|
||||
|
||||
"tabGroupGameplayMapModifications": "Map Modifications",
|
||||
|
||||
"disableChatModifier": "Disable Chat Modifications"
|
||||
"disableChatModifier": "Disable Chat Modifications",
|
||||
|
||||
"snsSuicideMode": "Disable Shield System"
|
||||
|
||||
}
|
||||
@@ -363,5 +363,36 @@
|
||||
"fungleMushroomMixupDuration": "Fungle キノコ幻覚の持続時間",
|
||||
|
||||
"privateDesc": "ロビーを非公開に設定します。",
|
||||
"publicDesc": "ロビーを公開に設定します。"
|
||||
"publicDesc": "ロビーを公開に設定します。",
|
||||
"mapVoteDesc": "選択したマップの中から投票を開始します。",
|
||||
"modeVoteDesc": "選択したゲームモードの中から投票を開始します。",
|
||||
|
||||
"tabGroupAnticheat": "アンチチート",
|
||||
"hackingPunishment": "チートへの処罰",
|
||||
"detectBadRPC": "無効な RPC を検出",
|
||||
"detectBadSabotage": "無効なサボタージュを検出",
|
||||
"detectBadVent": "無効なベントを検出",
|
||||
"detectBadTask": "無効なタスク完了を検出",
|
||||
"detectBadKill": "無効なキルを検出",
|
||||
"detectBadAnimation": "無効なアニメーションを検出",
|
||||
"detectBadMeeting": "無効な会議を検出",
|
||||
|
||||
"customizeMapVote": "マップ投票をカスタマイズ",
|
||||
"includeSkeld": "Skeld を含める",
|
||||
"includeMira": "Mira を含める",
|
||||
"includePolus": "Polus を含める",
|
||||
"includeAirship": "Airship を含める",
|
||||
"includeFungle": "Fungle を含める",
|
||||
"includeDleks": "Dleks を含める",
|
||||
|
||||
"customizeModeVote": "ゲームモード投票をカスタマイズ",
|
||||
"includeStandard": "スタンダードを含める",
|
||||
"includeNoKillCooldown": "キルクールダウン 0 を含める",
|
||||
"includeShiftAndSeek": "Shift And Seek を含める",
|
||||
"includePoofAndSeek": "Poof And Seek を含める",
|
||||
"includeSpeedrun": "Speedrun を含める",
|
||||
|
||||
"tabGroupGameplayMapModifications": "マップの変更",
|
||||
|
||||
"disableChatModifier": "チャット変更を無効化"
|
||||
}
|
||||
@@ -364,5 +364,33 @@
|
||||
"fungleMushroomMixupDuration": "Длительность Сабботажа Грибного Переполоха",
|
||||
|
||||
"privateDesc": "Изменяет Публичность Лобби на Приватный.",
|
||||
"publicDesc": "Изменяет Публичность Лобби на Публичный."
|
||||
"publicDesc": "Изменяет Публичность Лобби на Публичный.",
|
||||
"tabGroupAnticheat": "Античит",
|
||||
"hackingPunishment": "Наказание за Читерство",
|
||||
"detectBadRPC": "Обнаруживать Неправильные RPC",
|
||||
"detectBadSabotage": "Обнаруживать Неправильные Sabotages",
|
||||
"detectBadVent": "Обнаруживать Неправильные Уходы в Люк",
|
||||
"detectBadTask": "Обнаруживать Неправильные Выполнения Заданий",
|
||||
"detectBadKill": "Обнаруживать Неправильные Убийства",
|
||||
"detectBadAnimation": "Обнаруживать Неправильные Анимации",
|
||||
"detectBadMeeting": "Обнаруживать Неправильные Собрания",
|
||||
|
||||
"customizeMapVote": "Кастомизировать Голосование За Карты",
|
||||
"includeSkeld": "Включить Skeld",
|
||||
"includeMira": "Включить Mira",
|
||||
"includePolus": "Включить Polus",
|
||||
"includeAirship": "Включить Airship",
|
||||
"includeFungle": "Включить Fungle",
|
||||
"includeDleks": "Включить Dleks",
|
||||
|
||||
"customizeModeVote": "Кастомизировать Голосование За Режим",
|
||||
"includeStandard": "Включить Стандарт",
|
||||
"includeNoKillCooldown": "Включить 0 Перезарядка Убийств",
|
||||
"includeShiftAndSeek": "Включить Клона",
|
||||
"includePoofAndSeek": "Включить Фантомные Прятки",
|
||||
"includeSpeedrun": "Включить Спидран",
|
||||
|
||||
"tabGroupGameplayMapModifications": "Модификации Карт",
|
||||
|
||||
"disableChatModifier": "Выключить Модификации Чата"
|
||||
}
|
||||
@@ -350,5 +350,36 @@
|
||||
"fungleMushroomMixupDuration": "Fungle 蘑菇幻觉持续时间",
|
||||
|
||||
"privateDesc": "将房间改为私人。",
|
||||
"publicDesc": "将房间改为公开。"
|
||||
"publicDesc": "将房间改为公开。",
|
||||
"mapVoteDesc": "在选定的地图之间发起投票。",
|
||||
"modeVoteDesc": "在选定的游戏模式之间发起投票。",
|
||||
|
||||
"tabGroupAnticheat": "反作弊",
|
||||
"hackingPunishment": "作弊惩罚",
|
||||
"detectBadRPC": "检测无效 RPC",
|
||||
"detectBadSabotage": "检测无效破坏",
|
||||
"detectBadVent": "检测无效钻管",
|
||||
"detectBadTask": "检测无效任务完成",
|
||||
"detectBadKill": "检测无效击杀",
|
||||
"detectBadAnimation": "检测无效动画",
|
||||
"detectBadMeeting": "检测无效会议",
|
||||
|
||||
"customizeMapVote": "自定义地图投票",
|
||||
"includeSkeld": "包含 Skeld",
|
||||
"includeMira": "包含 Mira",
|
||||
"includePolus": "包含 Polus",
|
||||
"includeAirship": "包含 Airship",
|
||||
"includeFungle": "包含 Fungle",
|
||||
"includeDleks": "包含 Dleks",
|
||||
|
||||
"customizeModeVote": "自定义游戏模式投票",
|
||||
"includeStandard": "包含标准模式",
|
||||
"includeNoKillCooldown": "包含 0 击杀冷却",
|
||||
"includeShiftAndSeek": "包含SnS",
|
||||
"includePoofAndSeek": "包含PnS",
|
||||
"includeSpeedrun": "包含速通",
|
||||
|
||||
"tabGroupGameplayMapModifications": "地图修改",
|
||||
|
||||
"disableChatModifier": "禁用聊天修改"
|
||||
}
|
||||
Reference in new issue
Block a user