diff --git a/CustomRoles.cs b/CustomRoles.cs index a36dc9dcc..9e2761f72 100644 --- a/CustomRoles.cs +++ b/CustomRoles.cs @@ -325,6 +325,7 @@ public enum CustomRoles // Sub-role after 500 NotAssigned = 500, Antidote, + AntiTP, Asthmatic, Autopsy, Avanger, diff --git a/EHR.sln.DotSettings b/EHR.sln.DotSettings index 9e3dc3aa3..b91809f94 100644 --- a/EHR.sln.DotSettings +++ b/EHR.sln.DotSettings @@ -1,4 +1,6 @@ - + AU CD CK @@ -24,5 +26,6 @@ SSCD TMP EHR + TP UI VN \ No newline at end of file diff --git a/Modules/Utils.cs b/Modules/Utils.cs index 89a3ff1d4..859b282f3 100644 --- a/Modules/Utils.cs +++ b/Modules/Utils.cs @@ -112,6 +112,7 @@ public static class Utils public static bool TP(CustomNetworkTransform nt, Vector2 location, bool log = true) { var pc = nt.myPlayer; + if (pc.Is(CustomRoles.AntiTP)) return false; if (pc.inVent || pc.inMovingPlat || pc.onLadder || !pc.IsAlive() || pc.MyPhysics.Animations.IsPlayingAnyLadderAnimation() || pc.MyPhysics.Animations.IsPlayingEnterVentAnimation()) { if (log) Logger.Warn($"Target ({pc.GetNameWithRole().RemoveHtmlTags()}) is in an un-teleportable state - Teleporting canceled", "TP"); diff --git a/Resources/Lang/en_US.json b/Resources/Lang/en_US.json index d15832313..db7972614 100644 --- a/Resources/Lang/en_US.json +++ b/Resources/Lang/en_US.json @@ -263,6 +263,7 @@ "Ntr": "Neptune", "Watcher": "Watcher", "Sleuth": "Sleuth", + "AntiTP": "Anti-TP", "Taskcounter": "Taskcounter", "Bloodlust": "Bloodlust", "Stained": "Stained", @@ -323,6 +324,7 @@ "Prefix.Ntr": "Neptune", "Prefix.Watcher": "Watcher", "Prefix.Sleuth": "Sleuth", + "Prefix.AntiTP": "Anti-TP", "Prefix.Taskcounter": "Taskcounter", "Prefix.Bloodlust": "Bloodlust", "Prefix.Stained": "Stained", @@ -580,6 +582,7 @@ "AsthmaticInfo": "Stop And Go", "MagnetInfo": "Pull your victims to you", "SleuthInfo": "Know the roles of the bodies you report", + "AntiTPInfo": "You can't be teleported", "TaskcounterInfo": "You see the total tasks completed in real time", "BloodlustInfo": "You can kill", "StainedInfo": "Your killer gets a violet name for 3s", @@ -595,7 +598,7 @@ "LazyInfo": "You're too lazy", "AutopsyInfo": "You see how others died", "DiscoInfo": "You continuously change colors", - "Sonar": "You have an arrow pointing to the nearest player", + "SonarInfo": "You have an arrow pointing to the nearest player", "LoyalInfo": "You cannot be recruited", "EvilSpiritInfo": "You are an evil Spirit", "RecruitInfo": "Help the Jackal", @@ -788,6 +791,7 @@ "WatcherInfoLong": "(Add-ons):\\nDuring the meeting, Watcher can see everyone's votes.", "MagnetInfoLong": "(Add-ons):\\nWhen you kill, your victims lunge to you, instead of you lunging to them", "SleuthInfoLong": "(Add-ons):\\nYou know the roles of the bodies you report.", + "AntiTPInfoLong": "(Add-ons):\\nYou cannot be teleported.", "TaskcounterInfoLong": "(Add-ons):\\nTask Counter can see the total number of tasks completed (by everyone all together) next to their role name, which updates in real-time.", "BloodlustInfoLong": "(Add-ons):\\nYou can kill. You are a neutral killer, while also keeping the ability of your role (as much as host-only limitations allow).", "StainedInfoLong": "(Add-ons):\\nYour killer gets a violet name for 3 seconds.", diff --git a/Roles/AddOns/Common/AntiTP.cs b/Roles/AddOns/Common/AntiTP.cs new file mode 100644 index 000000000..10c7782a8 --- /dev/null +++ b/Roles/AddOns/Common/AntiTP.cs @@ -0,0 +1,12 @@ +namespace EHR.Roles.AddOns.Common +{ + public class AntiTP : IAddon + { + public AddonTypes Type => AddonTypes.Mixed; + + public void SetupCustomOption() + { + Options.SetupAdtRoleOptions(16894, CustomRoles.AntiTP, canSetNum: true, teamSpawnOptions: true); + } + } +} \ No newline at end of file diff --git a/Roles/Neutral/Simon.cs b/Roles/Neutral/Simon.cs index 9d6d6044b..81c1ab6e8 100644 --- a/Roles/Neutral/Simon.cs +++ b/Roles/Neutral/Simon.cs @@ -90,6 +90,8 @@ namespace EHR.Neutral pc.Notify(Translator.GetString(GetNotify(kvp.Value.Instruction, kvp.Value.DoAction, false)), 300f); } + + Utils.NotifyRoles(SpecifySeer: physics.myPlayer, SpecifyTarget: physics.myPlayer); } static string GetNotify(Instruction instruction, bool doAction, bool forSimon) diff --git a/main.cs b/main.cs index 5f80f2eb0..05e1e0e61 100644 --- a/main.cs +++ b/main.cs @@ -493,6 +493,7 @@ public class Main : BasePlugin { CustomRoles.Madmate, "#ff1919" }, { CustomRoles.Watcher, "#800080" }, { CustomRoles.Sleuth, "#30221c" }, + { CustomRoles.AntiTP, "#fcba03" }, { CustomRoles.Taskcounter, "#ff1919" }, { CustomRoles.Stained, "#e6bf91" }, { CustomRoles.Clumsy, "#b8b8b8" },