From 7b52ecd62ac62b1b852a5f132a50edfed8966618 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 21 Sep 2024 13:05:07 +0300 Subject: [PATCH 1/2] add: experimentel teleport --- .../ExperimentalTeleporterComponent.cs | 28 ++++ .../ExperimentalTeleporterSystem.cs | 111 ++++++++++++++++ .../_White/Object/Devices/attributions.yml | 4 + .../Devices/experimentalsyndicateteleport.ogg | Bin 0 -> 11769 bytes .../en-US/_white/store/uplink-catalog.ftl | 5 +- .../experimental-teleporter.ftl | 2 + .../ru-RU/_white/store/uplink-catalog.ftl | 5 +- .../_White/Catalog/uplink_catalog.yml | 10 ++ .../_White/Entities/Effects/effects.yml | 39 ++++++ .../experimental_teleporter.yml | 16 +++ .../icon.png | Bin 0 -> 409 bytes .../in.png | Bin 0 -> 5476 bytes .../inhand-left.png | Bin 0 -> 248 bytes .../inhand-right.png | Bin 0 -> 247 bytes .../meta.json | 122 ++++++++++++++++++ .../out.png | Bin 0 -> 4370 bytes 16 files changed, 340 insertions(+), 2 deletions(-) create mode 100644 Content.Server/_White/Teleporter/ExperimentalTeleporterComponent.cs create mode 100644 Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs create mode 100644 Resources/Audio/_White/Object/Devices/attributions.yml create mode 100644 Resources/Audio/_White/Object/Devices/experimentalsyndicateteleport.ogg create mode 100644 Resources/Locale/ru-RU/_white/prototypes/entities/objects/device/syndicate_gadgets/experimental-teleporter.ftl create mode 100644 Resources/Prototypes/_White/Entities/Effects/effects.yml create mode 100644 Resources/Prototypes/_White/Entities/Objects/Devices/Syndicate_Gadgets/experimental_teleporter.yml create mode 100644 Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/icon.png create mode 100644 Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/in.png create mode 100644 Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/inhand-left.png create mode 100644 Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/inhand-right.png create mode 100644 Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/meta.json create mode 100644 Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/out.png diff --git a/Content.Server/_White/Teleporter/ExperimentalTeleporterComponent.cs b/Content.Server/_White/Teleporter/ExperimentalTeleporterComponent.cs new file mode 100644 index 0000000000..c9a773e531 --- /dev/null +++ b/Content.Server/_White/Teleporter/ExperimentalTeleporterComponent.cs @@ -0,0 +1,28 @@ +using Robust.Shared.Audio; + +namespace Content.Server._White.Teleporter; + +[RegisterComponent] +public sealed partial class ExperimentalTeleporterComponent : Component +{ + [DataField] + public int MinTeleportRange = 3; + + [DataField] + public int MaxTeleportRange = 8; + + [DataField] + public int EmergencyLength = 4; + + [DataField] + public List RandomRotations = new() {90, -90}; + + [DataField] + public string? TeleportInEffect = "ExperimentalTeleporterInEffect"; + + [DataField] + public string? TeleportOutEffect = "ExperimentalTeleporterOutEffect"; + + [DataField] + public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/_White/Object/Devices/experimentalsyndicateteleport.ogg"); +} diff --git a/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs b/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs new file mode 100644 index 0000000000..7bc70b6bfd --- /dev/null +++ b/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs @@ -0,0 +1,111 @@ +using System.Linq; +using System.Numerics; +using Content.Server.Body.Systems; +using Content.Server.Standing; +using Content.Shared.Charges.Systems; +using Content.Shared.Coordinates.Helpers; +using Content.Shared.Interaction.Events; +using Content.Shared.Maps; +using Content.Shared.Tag; +using Robust.Server.Audio; +using Robust.Server.Containers; +using Robust.Server.GameObjects; +using Robust.Shared.Map; +using Robust.Shared.Map.Components; +using Robust.Shared.Random; + +namespace Content.Server._White.Teleporter; + +public sealed class ExperimentalTeleporterSystem : EntitySystem +{ + [Dependency] private readonly TransformSystem _transform = default!; + [Dependency] private readonly BodySystem _bodySystem = default!; + [Dependency] private readonly MapSystem _mapSystem = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly AudioSystem _audio = default!; + [Dependency] private readonly ContainerSystem _containerSystem = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly LayingDownSystem _layingDown = default!; + [Dependency] private readonly SharedChargesSystem _charges = default!; + [Dependency] private readonly TagSystem _tag = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnUse); + } + + private void OnUse(EntityUid uid, ExperimentalTeleporterComponent component, UseInHandEvent args) + { + if (_charges.IsEmpty(uid) + || !TryComp(args.User, out var xform) + || _containerSystem.IsEntityInContainer(args.User) + && !_containerSystem.TryRemoveFromContainer(args.User)) + return; + + var oldCoords = xform.Coordinates; + var random = _random.Next(component.MinTeleportRange, component.MaxTeleportRange); + var offset = xform.LocalRotation.ToWorldVec().Normalized(); + var direction = xform.LocalRotation.GetDir().ToVec(); + var newOffset = offset + direction * random; + + var coords = xform.Coordinates.Offset(newOffset).SnapToGrid(EntityManager); + + Teleport(args.User, uid, component, coords, oldCoords); + + if (!TryCheckWall(coords) + || EmergencyTeleportation(args.User, uid, component, xform, oldCoords, newOffset)) + return; + + _bodySystem.GibBody(args.User, true, splatModifier: 3F); + } + + private bool EmergencyTeleportation(EntityUid uid, EntityUid teleporterUid, ExperimentalTeleporterComponent component, TransformComponent xform, EntityCoordinates oldCoords, Vector2 offset) + { + var newOffset = offset + VectorRandomDirection(component, offset, component.EmergencyLength); + var coords = xform.Coordinates.Offset(newOffset).SnapToGrid(EntityManager); + + if (_charges.IsEmpty(teleporterUid)) + return false; + + Teleport(uid, teleporterUid, component, coords, oldCoords); + + return !TryCheckWall(coords); + } + + private void Teleport(EntityUid uid, EntityUid teleporterUid, ExperimentalTeleporterComponent component, EntityCoordinates coords, EntityCoordinates oldCoords) + { + SoundAndEffects(component, coords, oldCoords); + + _layingDown.LieDownInRange(uid, coords); + _transform.SetCoordinates(uid, coords); + + _charges.UseCharge(teleporterUid); + } + + private void SoundAndEffects(ExperimentalTeleporterComponent component, EntityCoordinates coords, EntityCoordinates oldCoords) + { + _audio.PlayPvs(component.TeleportSound, coords); + _audio.PlayPvs(component.TeleportSound, oldCoords); + + _entManager.SpawnEntity(component.TeleportInEffect, coords); + _entManager.SpawnEntity(component.TeleportOutEffect, oldCoords); + } + + private bool TryCheckWall(EntityCoordinates coords) + { + if (!coords.TryGetTileRef(out var tile) + || !TryComp(tile.Value.GridUid, out var mapGridComponent)) + return false; + + var anchoredEntities = _mapSystem.GetAnchoredEntities(tile.Value.GridUid, mapGridComponent, coords); + + return anchoredEntities.Any(x => _tag.HasTag(x, "Wall")); + } + + private Vector2 VectorRandomDirection(ExperimentalTeleporterComponent component, Vector2 offset, int length) + { + var randomRotation = _random.Next(0, component.RandomRotations.Count); + return Angle.FromDegrees(component.RandomRotations[randomRotation]).RotateVec(offset.Normalized() * length); + } +} diff --git a/Resources/Audio/_White/Object/Devices/attributions.yml b/Resources/Audio/_White/Object/Devices/attributions.yml new file mode 100644 index 0000000000..a8950150f7 --- /dev/null +++ b/Resources/Audio/_White/Object/Devices/attributions.yml @@ -0,0 +1,4 @@ +- files: ["experimentalsyndicateteleport.ogg"] + license: "CC-BY-NC-SA-4.0" + copyright: "Taken from White Dream" + source: "https://github.com/frosty-dev/ss14-core/blob/master/Resources/Audio/White/Devices/expsyndicateteleport.ogg" \ No newline at end of file diff --git a/Resources/Audio/_White/Object/Devices/experimentalsyndicateteleport.ogg b/Resources/Audio/_White/Object/Devices/experimentalsyndicateteleport.ogg new file mode 100644 index 0000000000000000000000000000000000000000..37a5b3839c3152fba758da1df4cd760d7356aa88 GIT binary patch literal 11769 zcmb7qbzD_V_wO7!4oJ5Mf^-T8q&ubIkWvRwx!hGF4 zQ4U@g447i|#UB9QwPBb4Z7}VNmj6x{EiWW}_61B=3eW#DrC|QmLj;L6tbOkyZt;nV z@CgbCU_lHf=x66@<7R8;DFq2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!uEB5YWOD{O|BmfI!3BVaKYQN81RdJRs}aXx}I$cr;Q&$rP0I&aXOqY>=uB z8$=jR!)Fr$&mWg--k%4dQSWEAs_Lb`9e(pnzcNe6VX9pa;owO?ruhi^5Khk~r8~Fi zh<^*q6cfB2$zBay4q_{RI>;CulJpF*oBxVjn=O07`8b3b1S-$t*`QS$UP#gz(g1<} zsk{8Uv=nhC4kI7sEP_1B*gZKNyBgdqK11J9s_Qc9Ssb0KV$g%O)<{M4t>Wzk?>oyq z_a#POSxVD!ev8*BcDKQFmRFFtPW9o%GL=0U9CYoo9UM)~aGM?1OHb!@s5;9$?h1Ic z-UXY$5O4kImoUth%*rf3PzwNNEY436hXm_ZY%uVQZ!nWp-aaRyV)E|UM6mnUIU%m2 zo|EZ~eP_h!)XUNr^BQ&^G(>pr&I>opXa{&yFd5(PKXp*UC@t-)J&!c`Mn~8dz3Ynf zy#;S0kkzR><}9ogV9VtA`W`3ScOo^WTbV$%l2a#jwzr;k-mz^m)Fu>`QJxPn zep~9g?cj_g<9jqo1?2)|E7&A58n|~BU99C;CIYMAYDoxsLJ;#JK9}bEiKZt#hVF+O zBgBS;R)!3?E8Ks-fX3Qw_}}lWp_lH!=m+KtSW$s}*PxI&g*|iX0^Gx9fl**U6~&XF zYZ5~OCIcO&dOkjEVN`j&(YhSmSvnmO__mw-%`SQbhk!pfFeo6Paee*4UYMhAMJ=Q8 z{&=0+#F^wD+!npxo~H1r^yA$sn8Er%D_+*R-Ov5Iay3!xX7H%zrZ=g(mmPo7Aw!;- m_HX(0H7zeK)mwz&72t)QK&gub46Jyc{KBcD0$n}bu>S?s?DIna literal 0 HcmV?d00001 diff --git a/Resources/Locale/en-US/_white/store/uplink-catalog.ftl b/Resources/Locale/en-US/_white/store/uplink-catalog.ftl index 44ce8ca0fa..5a8d9288ca 100644 --- a/Resources/Locale/en-US/_white/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/_white/store/uplink-catalog.ftl @@ -2,4 +2,7 @@ uplink-emp-flashlight-desc = A rechargeable device disguised as a flashlight designed to disrupt electronic systems. Useful for disrupting communications, security's energy weapons, and APCs when you're in a tight spot. uplink-betrayal-knife-name = Betrayal dagger -uplink-betrayal-knife-desc = The betrayal dagger allows the user to teleport a short distance, and also causes significant damage when stabbed in the back. \ No newline at end of file +uplink-betrayal-knife-desc = The betrayal dagger allows the user to teleport a short distance, and also causes significant damage when stabbed in the back. + +uplink-betrayal-knife-name = Experimental syndicate teleporter +uplink-betrayal-knife-desc = Syndicate teleporter, when used, moves 3-8 meters forward. In case of teleportation into a wall, uses emergency teleportation. Has 4 charge. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_white/prototypes/entities/objects/device/syndicate_gadgets/experimental-teleporter.ftl b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/device/syndicate_gadgets/experimental-teleporter.ftl new file mode 100644 index 0000000000..f9359375ac --- /dev/null +++ b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/device/syndicate_gadgets/experimental-teleporter.ftl @@ -0,0 +1,2 @@ +ent-ExperimentalSyndicateTeleporter = экспериментальный телепортер синдиката + .desc = Телепортер синдиката, при использовании перемещает на 3-8 метров вперед. В случае телепортации в стену, использует экстренную телепортацию. Имеет 4 заряда и автоматически заряжается. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl b/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl index 5953a18549..9d757b318a 100644 --- a/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl +++ b/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl @@ -2,4 +2,7 @@ uplink-emp-flashlight-desc = Замаскированное под фонарик устройство. При ударе выпускает ЭМИ, поражающий электрические устройства. uplink-betrayal-knife-name = Предательский кинжал -uplink-betrayal-knife-desc = Предательский кинжал позволяет пользователю телепортироваться на короткое расстояние, а также наносит значительные повреждения при ударе в спину. \ No newline at end of file +uplink-betrayal-knife-desc = Предательский кинжал позволяет пользователю телепортироваться на короткое расстояние, а также наносит значительные повреждения при ударе в спину. + +uplink-experimental-syndicate-teleporter-name = Экспериментальный телепортер синдиката +uplink-experimental-syndicate-teleporter-desc = Телепортер синдиката, при использовании перемещает на 3-8 метров вперед. В случае телепортации в стену, использует экстренную телепортацию. Имеет 4 заряда и автоматически заряжается. \ No newline at end of file diff --git a/Resources/Prototypes/_White/Catalog/uplink_catalog.yml b/Resources/Prototypes/_White/Catalog/uplink_catalog.yml index 4c1e4b0a60..960188ea00 100644 --- a/Resources/Prototypes/_White/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/_White/Catalog/uplink_catalog.yml @@ -8,6 +8,16 @@ categories: - UplinkUtility +- type: listing + id: UplinkExperimentalSyndicateTeleporter + name: uplink-experimental-syndicate-teleporter-name + description: uplink-experimental-syndicate-teleporter-desc + productEntity: ExperimentalSyndicateTeleporter + cost: + Telecrystal: 10 + categories: + - UplinkUtility + - type: listing id: UplinkBetrayalKnife name: uplink-betrayal-knife-name diff --git a/Resources/Prototypes/_White/Entities/Effects/effects.yml b/Resources/Prototypes/_White/Entities/Effects/effects.yml new file mode 100644 index 0000000000..2c20be01c5 --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Effects/effects.yml @@ -0,0 +1,39 @@ +- type: entity + id: ExperimentalTeleporterInEffect + name: experimental syndicate teleporter in effect + components: + - type: TimedDespawn + lifetime: 0.6 + - type: EvaporationSparkle + - type: Transform + noRot: true + anchored: true + - type: Sprite + layers: + - sprite: /Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi + state: in + shader: unshaded + netsync: false + drawdepth: Effects + - type: PointLight + color: "#008DFE" + +- type: entity + id: ExperimentalTeleporterOutEffect + name: experimental syndicate teleporter out effect + components: + - type: TimedDespawn + lifetime: 0.6 + - type: EvaporationSparkle + - type: Transform + noRot: true + anchored: true + - type: Sprite + layers: + - sprite: /Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi + state: out + shader: unshaded + netsync: false + drawdepth: Effects + - type: PointLight + color: "#008DFE" \ No newline at end of file diff --git a/Resources/Prototypes/_White/Entities/Objects/Devices/Syndicate_Gadgets/experimental_teleporter.yml b/Resources/Prototypes/_White/Entities/Objects/Devices/Syndicate_Gadgets/experimental_teleporter.yml new file mode 100644 index 0000000000..9bade18288 --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Objects/Devices/Syndicate_Gadgets/experimental_teleporter.yml @@ -0,0 +1,16 @@ +- type: entity + id: ExperimentalSyndicateTeleporter + parent: BaseItem + name: experimental syndicate teleporter + description: Syndicate teleporter, when used, moves 3-8 meters forward. In case of teleportation into a wall, uses emergency teleportation. Has 4 charge. + components: + - type: Sprite + sprite: /Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi + layers: + - state: icon + - type: ExperimentalTeleporter + - type: LimitedCharges + maxCharges: 4 + charges: 4 + - type: AutoRecharge + rechargeDuration: 10 \ No newline at end of file diff --git a/Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/icon.png b/Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..106f3f415c8b82bf3a934a7ccf22d97bab6320d9 GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`#0L0;xU$M= z@ONBcw~pb?Tw-itBO$989Ua}%(-SmxR>8W>o?%H^ffhMC>WUAwq^&J0KiRo=@4hn( z3^N%RywdV{_ylai;=S6sfrb?@Ff3qU*~P%{pMjx^fk9v2Ku%8XfQXn4P)@!i$S?Rm zcEA7?J{B;)8mM%?r;B4qMC;pW2f3OJ1YDRUKZt2^@T&ayKmVqL?yNNTtX#!ua})G7 z|2AT|X!?D!5m$y_!5nKTW b!WsBI8e_yXpS`LAdWFH$)z4*}Q$iB}Um2xI literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter.rsi/in.png b/Resources/Textures/_White/Objects/Devices/experimentalsyndicateteleporter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DseYq?PI;ztr&>(6EYljUTA0>pz!u0{%Ux6Ng2C2++7Q z0lw7PqCPQP{?k-_-QWGFSj-5_02<+Txq@ea3&MOWZK4b5B)5ml44{Ho@7qIT3!RRe zZG^z+*||Zvx|;!1g7q<5!8G0;43COjUEKNa&^)MShpHJsC83p9jh=R<#=mWO9l|+) zKN8ohhTC4C5+ZwXwB$=}!RSr@RNEbF1gIc2*^&TG>@E#qf^)g8y5!vq=Pd+@BOpJi zKu^B7+w=PM;clVvw`5Dn=hlDl{;}<6vzxyS{WKpF$q}WrAq%tbo@yZ`X9Uqj8Hvte z0sRN%0vVydi!4Nj3XuIhAyP~6$=!vqgBMaG;{y6m5?PIx4G8#!5Oj-zFF~T`@#G~x zd(UYtM^3(E1CY{x5~B7uY*q*fdb*1Mv#2xMf*0ia9)9jiYr&#G8Cs2i!hmLO*g4?H zhDrNgs&6v@BrOe@G8P||(Mf_}YGRE(R9`qsV&9h;0D_hVOnF1g$|C^={*~Z`>8

{oq44{`usWw_J&q(^ml(jqxhcZ4Fbu;mCMUWV#ra|8j~TOq-tuckU@QS*FZf8YV#7d_ZQM2r7=ux?66_X1 ztcN$&C6S*!`8UIu0&{bW6`?r$Y9oO$2Nj31t??Ukpm;xkVRS<@Bx(j=Oie)pH@C;= z9g-7aD#@V?gMeZK`1_y#{Z~yMcEgy0zyJN8|0Ta*BY?32=HDCZVZFOC8GjXh8ydg_ z7cm$H8g!(`MhRmeiqfJSNlM=mU$T+GSb}>`AG(>tCdkGpG%ti5*?28irLi>T`x^sN zKLQjscyo)4X|YTY#(J2`V;BH42xCCTyD8o<2q`xJxX@*WU<}Ux0mb&}IMn Date: Thu, 26 Sep 2024 07:45:36 +0300 Subject: [PATCH 2/2] fix --- .../Teleporter/ExperimentalTeleporterSystem.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs b/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs index 7bc70b6bfd..4a4fc5dab4 100644 --- a/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs +++ b/Content.Server/_White/Teleporter/ExperimentalTeleporterSystem.cs @@ -39,15 +39,15 @@ private void OnUse(EntityUid uid, ExperimentalTeleporterComponent component, Use { if (_charges.IsEmpty(uid) || !TryComp(args.User, out var xform) - || _containerSystem.IsEntityInContainer(args.User) - && !_containerSystem.TryRemoveFromContainer(args.User)) + || (_containerSystem.IsEntityInContainer(args.User) + && !_containerSystem.TryRemoveFromContainer(args.User))) return; var oldCoords = xform.Coordinates; - var random = _random.Next(component.MinTeleportRange, component.MaxTeleportRange); + var range = _random.Next(component.MinTeleportRange, component.MaxTeleportRange); var offset = xform.LocalRotation.ToWorldVec().Normalized(); var direction = xform.LocalRotation.GetDir().ToVec(); - var newOffset = offset + direction * random; + var newOffset = offset + direction * range; var coords = xform.Coordinates.Offset(newOffset).SnapToGrid(EntityManager); @@ -75,7 +75,7 @@ private bool EmergencyTeleportation(EntityUid uid, EntityUid teleporterUid, Expe private void Teleport(EntityUid uid, EntityUid teleporterUid, ExperimentalTeleporterComponent component, EntityCoordinates coords, EntityCoordinates oldCoords) { - SoundAndEffects(component, coords, oldCoords); + PlaySoundAndEffects(component, coords, oldCoords); _layingDown.LieDownInRange(uid, coords); _transform.SetCoordinates(uid, coords); @@ -83,7 +83,7 @@ private void Teleport(EntityUid uid, EntityUid teleporterUid, ExperimentalTelepo _charges.UseCharge(teleporterUid); } - private void SoundAndEffects(ExperimentalTeleporterComponent component, EntityCoordinates coords, EntityCoordinates oldCoords) + private void PlaySoundAndEffects(ExperimentalTeleporterComponent component, EntityCoordinates coords, EntityCoordinates oldCoords) { _audio.PlayPvs(component.TeleportSound, coords); _audio.PlayPvs(component.TeleportSound, oldCoords); @@ -105,6 +105,9 @@ private bool TryCheckWall(EntityCoordinates coords) private Vector2 VectorRandomDirection(ExperimentalTeleporterComponent component, Vector2 offset, int length) { + if (component.RandomRotations.Count == 0) + return Vector2.Zero; + var randomRotation = _random.Next(0, component.RandomRotations.Count); return Angle.FromDegrees(component.RandomRotations[randomRotation]).RotateVec(offset.Normalized() * length); }