Disable Devices for Fungle, Update Pelican BlackRoom Position, Update MurderResultFlags

This commit is contained in:
Gurge44 committed 2023-10-27 18:53:22 +02:00
1 parent 71366a0b6a
commit 8f1210e2eb
14 files changed
+162 -74

No files matched your search

+11 -12
View File
@@ -11,15 +11,15 @@ namespace TOHE;
public static class AntiBlackout
{
///<summary>
///追放処理を上書きするかどうか
///Whether to override the ejection process
///</summary>
public static bool OverrideExiledPlayer => IsRequired && (IsSingleImpostor || Diff_CrewImp == 1);
///<summary>
///インポスターが一人しか存在しない設定かどうか
///Is there only one impostor?
///</summary>
public static bool IsSingleImpostor => Main.RealOptionsData != null ? Main.RealOptionsData.GetInt(Int32OptionNames.NumImpostors) <= 1 : Main.NormalOptions.NumImpostors <= 1;
///<summary>
///AntiBlackout内の処理が必要であるかどうか
///Whether processing within AntiBlackout is required
///</summary>
public static bool IsRequired => Options.NoGameEnd.GetBool()
|| Jackal.IsEnable || Pelican.IsEnable || Magician.IsEnable
@@ -36,7 +36,7 @@ public static class AntiBlackout
|| CustomRoles.Pestilence.RoleExist(true);
//|| Pirate.IsEnable;
///<summary>
///インポスター以外の人数とインポスターの人数の差
///Difference between the number of non-impostors and the number of impostors
///</summary>
public static int Diff_CrewImp
{
@@ -62,7 +62,7 @@ public static class AntiBlackout
logger.Info($"SetIsDead is called from {callerMethodName}");
if (IsCached)
{
logger.Info("再度SetIsDeadを実行する前に、RestoreIsDeadを実行してください。");
logger.Info("Please run RestoreIsDead before running SetIsDead again.");
return;
}
isDeadCache.Clear();
@@ -97,7 +97,7 @@ public static class AntiBlackout
{
logger.Info($"SendGameData is called from {callerMethodName}");
MessageWriter writer = MessageWriter.Get(SendOption.Reliable);
// 書き込み {}は読みやすさのためです。
// {} is for readability.
writer.StartMessage(5); //0x05 GameData
{
writer.Write(AmongUsClient.Instance.GameId);
@@ -105,7 +105,6 @@ public static class AntiBlackout
{
writer.WritePacked(GameData.Instance.NetId);
GameData.Instance.Serialize(writer, true);
}
writer.EndMessage();
}
@@ -116,7 +115,7 @@ public static class AntiBlackout
}
public static void OnDisconnect(GameData.PlayerInfo player)
{
// 実行条件: クライアントがホストである, IsDeadが上書きされている, playerが切断済み
// Execution conditions: client is host, IsDead is overwritten, player is disconnected
if (!AmongUsClient.Instance.AmHost || !IsCached || !player.Disconnected) return;
isDeadCache[player.PlayerId] = (true, true);
player.IsDead = player.Disconnected = false;
@@ -124,13 +123,13 @@ public static class AntiBlackout
}
///<summary>
///一時的にIsDeadを本来のものに戻した状態でコードを実行します
///<param name="action">実行内容</param>
///Run the code with IsDead temporarily restored to its original value
///<param name="action">Execution details</param>
///</summary>
public static void TempRestore(Action action)
{
logger.Info("==Temp Restore==");
//IsDeadが上書きされた状態でTempRestoreが実行されたかどうか
//Whether TempRestore was executed with IsDead overwritten
bool before_IsCached = IsCached;
try
{
@@ -139,7 +138,7 @@ public static class AntiBlackout
}
catch (Exception ex)
{
logger.Warn("AntiBlackout.TempRestore内で例外が発生しました");
logger.Warn("An exception occurred within AntiBlackout.TempRestore");
logger.Exception(ex);
}
finally
+1 -1
View File
@@ -262,7 +262,7 @@ public static class CustomRpcSenderExtensions
{
sender.AutoStartRpc(player.NetId, (byte)RpcCalls.MurderPlayer, targetClientId)
.WriteNetObject(target)
.Write((byte)MurderResultFlags.DecisionByHost)
.Write((byte)ExtendedPlayerControl.ResultFlags)
.EndRpc();
}
}
+17 -3
View File
@@ -24,18 +24,20 @@ class DisableDevice
["AirshipCockpitAdmin"] = new(-22.32f, 0.91f),
["AirshipRecordsAdmin"] = new(19.89f, 12.60f),
["AirshipCamera"] = new(8.10f, -9.63f),
["AirshipVital"] = new(25.24f, -7.94f)
["AirshipVital"] = new(25.24f, -7.94f),
["FungleCamera"] = new(6.20f, 0.10f),
["FungleVital"] = new(-2.50f, -9.80f)
};
public static float UsableDistance()
{
var Map = (MapNames)Main.NormalOptions.MapId;
return Map switch
return (MapNames)Main.NormalOptions.MapId switch
{
MapNames.Skeld => 1.8f,
MapNames.Mira => 2.4f,
MapNames.Polus => 1.8f,
//MapNames.Dleks => 1.5f,
MapNames.Airship => 1.8f,
MapNames.Fungle => 1.8f,
_ => 0.0f
};
}
@@ -96,6 +98,12 @@ class DisableDevice
if (Options.DisableAirshipVital.GetBool())
doComms |= Vector2.Distance(PlayerPos, DevicePos["AirshipVital"]) <= UsableDistance();
break;
case 5:
if (Options.DisableFungleCamera.GetBool())
doComms |= Vector2.Distance(PlayerPos, DevicePos["FungleCamera"]) <= UsableDistance();
if (Options.DisableFungleVital.GetBool())
doComms |= Vector2.Distance(PlayerPos, DevicePos["FungleVital"]) <= UsableDistance();
break;
}
}
doComms &= !ignore;
@@ -177,6 +185,12 @@ public class RemoveDisableDevicesPatch
if (Options.DisableAirshipVital.GetBool())
consoles.DoIf(x => x.name == "panel_vitals", x => x.gameObject.GetComponent<CircleCollider2D>().enabled = false || ignore);
break;
case 5:
if (Options.DisableFungleCamera.GetBool())
consoles.DoIf(x => x.name == "BinocularsSecurityConsole", x => x.gameObject.GetComponent<PolygonCollider2D>().enabled = false || ignore);
if (Options.DisableFungleCamera.GetBool())
consoles.DoIf(x => x.name == "VitalsConsole", x => x.gameObject.GetComponent<BoxCollider2D>().enabled = false || ignore);
break;
}
}
}
+40 -26
View File
@@ -173,7 +173,7 @@ static class ExtendedPlayerControl
if (killer.AmOwner)
{
killer.ProtectPlayer(target, colorId);
killer.MurderPlayer(target, MurderResultFlags.DecisionByHost);
killer.MurderPlayer(target, ResultFlags);
}
// Other Clients
if (killer.PlayerId != 0)
@@ -186,7 +186,7 @@ static class ExtendedPlayerControl
.EndRpc();
sender.StartRpc(killer.NetId, (byte)RpcCalls.MurderPlayer)
.WriteNetObject(target)
.Write((byte)MurderResultFlags.DecisionByHost)
.Write((byte)ResultFlags)
.EndRpc();
sender.EndMessage();
sender.SendMessage();
@@ -264,13 +264,13 @@ static class ExtendedPlayerControl
if (target == null) target = killer;
if (killer.AmOwner)
{
killer.MurderPlayer(target, MurderResultFlags.DecisionByHost);
killer.MurderPlayer(target, ResultFlags);
}
else
{
MessageWriter messageWriter = AmongUsClient.Instance.StartRpcImmediately(killer.NetId, (byte)RpcCalls.MurderPlayer, SendOption.Reliable, killer.GetClientId());
messageWriter.WriteNetObject(target);
messageWriter.Write((byte)MurderResultFlags.DecisionByHost);
messageWriter.Write((byte)ResultFlags);
AmongUsClient.Instance.FinishRpcImmediately(messageWriter);
}
}
@@ -402,8 +402,12 @@ static class ExtendedPlayerControl
{
if (pc == null || !AmongUsClient.Instance.AmHost || pc.AmOwner) return;
var systemtypes = SystemTypes.Reactor;
if (Main.NormalOptions.MapId == 2) systemtypes = SystemTypes.Laboratory;
var systemtypes = (MapNames)Main.NormalOptions.MapId switch
{
MapNames.Polus => SystemTypes.Laboratory,
MapNames.Airship => SystemTypes.HeliSabotage,
_ => SystemTypes.Reactor,
};
_ = new LateTask(() =>
{
@@ -425,10 +429,16 @@ static class ExtendedPlayerControl
public static void ReactorFlash(this PlayerControl pc, float delay = 0f)
{
if (pc == null) return;
int clientId = pc.GetClientId();
// Logger.Info($"{pc}", "ReactorFlash");
var systemtypes = SystemTypes.Reactor;
if (Main.NormalOptions.MapId == 2) systemtypes = SystemTypes.Laboratory;
Logger.Info($"Reactor Flash for {pc}", "ReactorFlash");
var systemtypes = (MapNames)Main.NormalOptions.MapId switch
{
MapNames.Polus => SystemTypes.Laboratory,
MapNames.Airship => SystemTypes.HeliSabotage,
_ => SystemTypes.Reactor,
};
float FlashDuration = Options.KillFlashDuration.GetFloat();
pc.RpcDesyncRepairSystem(systemtypes, 128);
@@ -437,7 +447,7 @@ static class ExtendedPlayerControl
{
pc.RpcDesyncRepairSystem(systemtypes, 16);
if (Main.NormalOptions.MapId == 4) //Airship用
if (Main.NormalOptions.MapId == 4) // on Airship
pc.RpcDesyncRepairSystem(systemtypes, 17);
}, FlashDuration + delay, "Fix Desync Reactor");
}
@@ -1185,7 +1195,7 @@ static class ExtendedPlayerControl
var count = Utils.GetDousedPlayerCount(player.PlayerId);
return count.Item1 >= count.Item2;
}
public static bool IsDrawDone(this PlayerControl player)//判断是否拉拢完成
public static bool IsDrawDone(this PlayerControl player) //Determine whether the conditions to win are met
{
if (!player.Is(CustomRoles.Revolutionist)) return false;
var count = Utils.GetDrawPlayerCount(player.PlayerId, out var _);
@@ -1211,21 +1221,21 @@ static class ExtendedPlayerControl
killer.RpcMurderPlayer(target, true);
}
public static void RpcMurderPlayerV2(this PlayerControl killer, PlayerControl target)
{
if (target == null) target = killer;
if (AmongUsClient.Instance.AmClient)
{
killer.MurderPlayer(target, MurderResultFlags.DecisionByHost);
}
MessageWriter messageWriter = AmongUsClient.Instance.StartRpcImmediately(killer.NetId, (byte)RpcCalls.MurderPlayer, SendOption.None, -1);
messageWriter.WriteNetObject(target);
messageWriter.Write((byte)MurderResultFlags.DecisionByHost);
AmongUsClient.Instance.FinishRpcImmediately(messageWriter);
//public static void RpcMurderPlayerV2(this PlayerControl killer, PlayerControl target)
//{
// if (target == null) target = killer;
// if (AmongUsClient.Instance.AmClient)
// {
// killer.MurderPlayer(target, ResultFlags);
// }
// MessageWriter messageWriter = AmongUsClient.Instance.StartRpcImmediately(killer.NetId, (byte)RpcCalls.MurderPlayer, SendOption.None, -1);
// messageWriter.WriteNetObject(target);
// messageWriter.Write((byte)ResultFlags);
// AmongUsClient.Instance.FinishRpcImmediately(messageWriter);
Utils.NotifyRoles(SpecifySeer: killer);
Utils.NotifyRoles(SpecifySeer: target);
}
// Utils.NotifyRoles(SpecifySeer: killer);
// Utils.NotifyRoles(SpecifySeer: target);
//}
public static bool RpcCheckAndMurder(this PlayerControl killer, PlayerControl target, bool check = false) => CheckMurderPatch.RpcCheckAndMurder(killer, target, check);
public static void NoCheckStartMeeting(this PlayerControl reporter, GameData.PlayerInfo target, bool force = false)
{ /*サボタージュ中でも関係なしに会議を起こせるメソッド
@@ -1370,4 +1380,8 @@ static class ExtendedPlayerControl
return GameStates.InGame || (target != null && (Main.PlayerStates[target.PlayerId].deathReason == PlayerState.DeathReason.Vote));
}
///<summary>Is the player currently protected</summary>
public static bool IsProtected(this PlayerControl self) => self.protectedByGuardianId > -1;
public const MurderResultFlags ResultFlags = MurderResultFlags.Succeeded | MurderResultFlags.DecisionByHost;
}
+12
View File
@@ -578,6 +578,9 @@ public static class Options
public static OptionItem DisableAirshipRecordsAdmin;
public static OptionItem DisableAirshipCamera;
public static OptionItem DisableAirshipVital;
public static OptionItem DisableFungleDevices;
public static OptionItem DisableFungleCamera;
public static OptionItem DisableFungleVital;
public static OptionItem DisableDevicesIgnoreConditions;
public static OptionItem DisableDevicesIgnoreImpostors;
public static OptionItem DisableDevicesIgnoreNeutrals;
@@ -2798,6 +2801,15 @@ public static class Options
.SetParent(DisableAirshipDevices);
DisableAirshipVital = BooleanOptionItem.Create(22919, "DisableAirshipVital", false, TabGroup.GameSettings, false)
.SetParent(DisableAirshipDevices);
DisableFungleDevices = BooleanOptionItem.Create(22925, "DisableFungleDevices", false, TabGroup.GameSettings, false)
.SetParent(DisableDevices)
.SetGameMode(CustomGameMode.Standard);
DisableFungleCamera = BooleanOptionItem.Create(22926, "DisableFungleCamera", false, TabGroup.GameSettings, false)
.SetParent(DisableFungleDevices)
.SetGameMode(CustomGameMode.Standard);
DisableFungleVital = BooleanOptionItem.Create(22927, "DisableFungleVital", false, TabGroup.GameSettings, false)
.SetParent(DisableFungleDevices)
.SetGameMode(CustomGameMode.Standard);
DisableDevicesIgnoreConditions = BooleanOptionItem.Create(22920, "IgnoreConditions", false, TabGroup.GameSettings, false)
.SetParent(DisableDevices);
DisableDevicesIgnoreImpostors = BooleanOptionItem.Create(22921, "IgnoreImpostors", false, TabGroup.GameSettings, false)
+36 -11
View File
@@ -83,12 +83,25 @@ public static class Utils
public static void TP(CustomNetworkTransform nt, Vector2 location)
{
location += new Vector2(0, 0.3636f);
var pc = nt.myPlayer;
if (pc.inVent || pc.inMovingPlat || !pc.IsAlive())
{
Logger.Warn($"Target ({pc.GetNameWithRole().RemoveHtmlTags()}) is in an un-teleportable state - Teleporting canceled", "TP");
return;
}
if (AmongUsClient.Instance.AmHost) nt.SnapTo(location);
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(nt.NetId, (byte)RpcCalls.SnapTo, SendOption.None);
//nt.WriteVector2(location, writer);
NetHelpers.WriteVector2(location, writer);
writer.Write(nt.lastSequenceId);
{
//nt.WriteVector2(location, writer);
NetHelpers.WriteVector2(location, writer);
writer.Write(nt.lastSequenceId);
}
AmongUsClient.Instance.FinishRpcImmediately(writer);
Logger.Info($"{pc.GetNameWithRole().RemoveHtmlTags()} => {location}", "TP");
}
public static ClientData GetClientById(int id)
{
@@ -153,6 +166,12 @@ public static class Utils
return HudOverrideSystemType != null && HudOverrideSystemType.IsActive;
}
}
case SystemTypes.HeliSabotage:
{
if (mapId != 4) return false; // Only Airhip
var HeliSabotageSystem = ShipStatus.Instance.Systems[type].Cast<HeliSabotageSystem>();
return HeliSabotageSystem != null && HeliSabotageSystem.IsActive;
}
case SystemTypes.MushroomMixupSabotage:
{
if (mapId != 5) return false; // Only The Fungle
@@ -257,16 +276,22 @@ public static class Utils
}
public static void KillFlash(this PlayerControl player)
{
//キルフラッシュ(ブラックアウト+リアクターフラッシュ)の処理
bool ReactorCheck = false; //リアクターフラッシュの確認
if (Main.NormalOptions.MapId == 2) ReactorCheck = IsActive(SystemTypes.Laboratory);
else ReactorCheck = IsActive(SystemTypes.Reactor);
//Kill flash (blackout + reactor flash) processing
bool ReactorCheck = false; //Checking whether the reactor sabotage is active
var systemtypes = (MapNames)Main.NormalOptions.MapId switch
{
MapNames.Polus => SystemTypes.Laboratory,
MapNames.Airship => SystemTypes.HeliSabotage,
_ => SystemTypes.Reactor,
};
ReactorCheck = IsActive(systemtypes);
var Duration = Options.KillFlashDuration.GetFloat();
if (ReactorCheck) Duration += 0.2f; //リアクター中はブラックアウトを長くする
if (ReactorCheck) Duration += 0.2f; // Extend blackout during reactor
//実行
Main.PlayerStates[player.PlayerId].IsBlackOut = true; //ブラックアウト
Main.PlayerStates[player.PlayerId].IsBlackOut = true; // Blackout
if (player.AmOwner)
{
FlashColor(new(1f, 0f, 0f, 0.3f));
@@ -277,11 +302,11 @@ public static class Utils
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.KillFlash, SendOption.Reliable, player.GetClientId());
AmongUsClient.Instance.FinishRpcImmediately(writer);
}
else if (!ReactorCheck) player.ReactorFlash(0f); //リアクターフラッシュ
else if (!ReactorCheck) player.ReactorFlash(0f); // reactor flash
player.MarkDirtySettings();
_ = new LateTask(() =>
{
Main.PlayerStates[player.PlayerId].IsBlackOut = false; //ブラックアウト解除
Main.PlayerStates[player.PlayerId].IsBlackOut = false; // Cancel blackout
player.MarkDirtySettings();
}, Options.KillFlashDuration.GetFloat(), "RemoveKillFlash");
}
+15 -14
View File
@@ -614,12 +614,12 @@ class GameEndChecker
public abstract class GameEndPredicate
{
/// <summary>ゲームの終了条件をチェックし、CustomWinnerHolderに値を格納します。</summary>
/// <params name="reason">バニラのゲーム終了処理に使用するGameOverReason</params>
/// <returns>ゲーム終了の条件を満たしているかどうか</returns>
/// <summary>Checks the game ending condition and stores the value in CustomWinnerHolder. </summary>
/// <params name="reason">GameOverReason used for vanilla game end processing</params>
/// <returns>Whether the conditions for ending the game are met</returns>
public abstract bool CheckForEndGame(out GameOverReason reason);
/// <summary>GameData.TotalTasksとCompletedTasksをもとにタスク勝利が可能かを判定します。</summary>
/// <summary>Determine whether the task can be won based on GameData.TotalTasks and CompletedTasks.</summary>
public virtual bool CheckGameEndByTask(out GameOverReason reason)
{
reason = GameOverReason.ImpostorByKill;
@@ -633,20 +633,20 @@ class GameEndChecker
}
return false;
}
/// <summary>ShipStatus.Systems内の要素をもとにサボタージュ勝利が可能かを判定します。</summary>
/// <summary>Determines whether sabotage victory is possible based on the elements in ShipStatus.Systems.</summary>
public virtual bool CheckGameEndBySabotage(out GameOverReason reason)
{
reason = GameOverReason.ImpostorByKill;
if (ShipStatus.Instance.Systems == null) return false;
// TryGetValueは使用不可
// TryGetValue is not available
var systems = ShipStatus.Instance.Systems;
LifeSuppSystemType LifeSupp;
if (systems.ContainsKey(SystemTypes.LifeSupp) && // サボタージュ存在確認
(LifeSupp = systems[SystemTypes.LifeSupp].TryCast<LifeSuppSystemType>()) != null && // キャスト可能確認
LifeSupp.Countdown < 0f) // タイムアップ確認
if (systems.ContainsKey(SystemTypes.LifeSupp) && // Confirmation of sabotage existence
(LifeSupp = systems[SystemTypes.LifeSupp].TryCast<LifeSuppSystemType>()) != null && // Confirmation that cast is possible
LifeSupp.Countdown < 0f) // Time up confirmation
{
// 酸素サボタージュ
// oxygen sabotage
CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Impostor);
reason = GameOverReason.ImpostorBySabotage;
LifeSupp.Countdown = 10000f;
@@ -656,13 +656,14 @@ class GameEndChecker
ISystemType sys = null;
if (systems.ContainsKey(SystemTypes.Reactor)) sys = systems[SystemTypes.Reactor];
else if (systems.ContainsKey(SystemTypes.Laboratory)) sys = systems[SystemTypes.Laboratory];
else if (systems.ContainsKey(SystemTypes.HeliSabotage)) sys = systems[SystemTypes.HeliSabotage];
ICriticalSabotage critical;
if (sys != null && // サボタージュ存在確認
(critical = sys.TryCast<ICriticalSabotage>()) != null && // キャスト可能確認
critical.Countdown < 0f) // タイムアップ確認
if (sys != null && // Confirmation of sabotage existence
(critical = sys.TryCast<ICriticalSabotage>()) != null && // Confirmation that cast is possible
critical.Countdown < 0f) // Time up confirmation
{
// リアクターサボタージュ
// reactor sabotage
CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Impostor);
reason = GameOverReason.ImpostorBySabotage;
critical.ClearSabotage();
+2 -2
View File
@@ -47,11 +47,11 @@ public class FallFromLadder
.EndRpc();
sender.AutoStartRpc(player.NetId, (byte)RpcCalls.MurderPlayer)
.WriteNetObject(player)
.Write((byte)MurderResultFlags.DecisionByHost)
.Write((byte)ExtendedPlayerControl.ResultFlags)
.EndRpc();
sender.SendMessage();
player.NetTransform.SnapTo(targetPos);
player.MurderPlayer(player, MurderResultFlags.DecisionByHost);
player.MurderPlayer(player, ExtendedPlayerControl.ResultFlags);
Main.PlayerStates[player.PlayerId].deathReason = PlayerState.DeathReason.Fall;
Main.PlayerStates[player.PlayerId].SetDead();
}, 0.05f, "LadderFallTask");
+4 -4
View File
@@ -113,7 +113,7 @@ class CheckMurderPatch
Logger.Info("Kill during meeting, canceled", "CheckMurder");
return false;
}
var divice = Options.CurrentGameMode == CustomGameMode.SoloKombat || Options.CurrentGameMode == CustomGameMode.FFA ? 3000f : 2000f;
float minTime = Mathf.Max(0.02f, AmongUsClient.Instance.Ping / divice * 6f); //※AmongUsClient.Instance.Pingの値はミリ秒(ms)なので÷1000
//TimeSinceLastKillに値が保存されていない || 保存されている時間がminTime以上 => キルを許可
@@ -647,7 +647,7 @@ class CheckMurderPatch
AmongUsClient.Instance.FinishRpcImmediately(writer);
target.NetTransform.SnapTo(location);
killer.MurderPlayer(target, MurderResultFlags.DecisionByHost);
killer.MurderPlayer(target, ExtendedPlayerControl.ResultFlags);
if (target.Is(CustomRoles.Avanger))
{
@@ -1007,10 +1007,10 @@ class MurderPlayerPatch
{
public static void Prefix(PlayerControl __instance, [HarmonyArgument(0)] PlayerControl target)
{
Logger.Info($"{__instance.GetNameWithRole().RemoveHtmlTags()} => {target.GetNameWithRole().RemoveHtmlTags()}{(target.protectedByGuardianThisRound ? "(Protected)" : string.Empty)}", "MurderPlayer");
Logger.Info($"{__instance.GetNameWithRole().RemoveHtmlTags()} => {target.GetNameWithRole().RemoveHtmlTags()}{(target.IsProtected() ? "(Protected)" : string.Empty)}", "MurderPlayer");
if (RandomSpawn.CustomNetworkTransformPatch.NumOfTP.TryGetValue(__instance.PlayerId, out var num) && num > 2) RandomSpawn.CustomNetworkTransformPatch.NumOfTP[__instance.PlayerId] = 3;
if (!target.protectedByGuardianThisRound)
if (!target.IsProtected())
Camouflage.RpcSetSkin(target, ForceRevert: true);
}
public static void Postfix(PlayerControl __instance, [HarmonyArgument(0)] PlayerControl target)
+10
View File
@@ -19,4 +19,14 @@ class ServerUpdatePatch
}
}
}
[HarmonyPatch(typeof(Constants), nameof(Constants.IsVersionModded))]
public static class IsVersionModdedPatch
{
public static bool Prefix(ref bool __result)
{
__result = true;
return false;
}
}
+1
View File
@@ -1122,6 +1122,7 @@
"DisablePolusVital","禁用波鲁斯生命监测装置","Disable Vitals","Отключить Пульсы","禁用Polus心電圖","禁用波鲁斯生命监测装置"
"DisableAirshipVital","禁用飞艇生命监测装置","Disable Vitals","Отключить Пульсы","禁用The Airship心電圖","禁用飞艇生命监测装置"
"DisableFungleVital","","Disable Vitals","","",""
"DisableFungleCamera","","Disable Binoculars","","",""
"IgnoreConditions","忽略条件","Ignore Conditions","Игнорируют условия","忽略條件","忽略条件"
"IgnoreImpostors","忽略<color=#ff1919>内鬼</color>","Ignore <color=#ff1919>Impostors</color>","<color=#ff1919>Предатели</color> игнорируют условия","忽略<color=#ff1919>偽裝者</color>","忽略<color=#ff1919>内鬼</color>"
"IgnoreNeutrals","忽略<color=#7f8c8d>中立</color>","Ignore <color=#7f8c8d>Neutrals</color>","<color=#7f8c8d>Нейтралы</color> игнорируют условия","忽略<color=#7f8c8d>中立</color>","忽略<color=#7f8c8d>中立</color>"
Can't render this file because it is too large.
+6
View File
@@ -91,6 +91,12 @@ internal class Monitor
if (!Options.DisableAirshipVital.GetBool())
Vital |= Vector2.Distance(PlayerPos, DisableDevice.DevicePos["AirshipVital"]) <= DisableDevice.UsableDistance();
break;
case 5:
if (!Options.DisableFungleCamera.GetBool())
Camera |= Vector2.Distance(PlayerPos, DisableDevice.DevicePos["FungleCamera"]) <= DisableDevice.UsableDistance();
if (!Options.DisableFungleVital.GetBool())
Vital |= Vector2.Distance(PlayerPos, DisableDevice.DevicePos["FungleVital"]) <= DisableDevice.UsableDistance();
break;
}
}
catch (Exception ex)
+6
View File
@@ -89,6 +89,12 @@ internal class AntiAdminer
if (!Options.DisableAirshipVital.GetBool())
Vital |= Vector2.Distance(PlayerPos, DisableDevice.DevicePos["AirshipVital"]) <= DisableDevice.UsableDistance();
break;
case 5:
if (!Options.DisableFungleCamera.GetBool())
Camera |= Vector2.Distance(PlayerPos, DisableDevice.DevicePos["FungleCamera"]) <= DisableDevice.UsableDistance();
if (!Options.DisableFungleVital.GetBool())
Vital |= Vector2.Distance(PlayerPos, DisableDevice.DevicePos["FungleVital"]) <= DisableDevice.UsableDistance();
break;
}
}
catch (Exception ex)
+1 -1
View File
@@ -94,7 +94,7 @@ public static class Pelican
1 => new(-11.4f, 8.2f), // MIRA HQ
2 => new(42.6f, -19.9f), // Polus
4 => new(-16.8f, -6.2f), // Airship
5 => new Vector2(-30.3f, -0.6f), // The Fungle
5 => new Vector2(9.6f, 23.2f), // The Fungle
_ => throw new System.NotImplementedException(),
};
}