* - add: Some tweaks and localization.

* - add: Teleport spell.

* - tweak: Tweak wizard hardsuit.

* - add: Turn off shield on cast.

* - add: New wizard clothes & update wizard shuttle,

* - remove: Remove old clothes from shuttle.

* - fix: No teleporting to centcomm.
This commit is contained in:
Aviu00
2024-06-09 16:26:27 +00:00
committed by GitHub
parent daa881b51b
commit 0c34a1fd9b
42 changed files with 1042 additions and 629 deletions

View File

@@ -0,0 +1,29 @@
using Content.Server.Pinpointer;
using Content.Server.Warps;
namespace Content.Server._White.Wizard.Teleport;
public sealed class TeleportLocationSystem : EntitySystem
{
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<SpawnTeleportLocationComponent, MapInitEvent>(OnMapInit,
after: new[] {typeof(NavMapSystem)});
}
private void OnMapInit(Entity<SpawnTeleportLocationComponent> ent, ref MapInitEvent args)
{
if (!TryComp(ent, out WarpPointComponent? warpPoint) || warpPoint.Location == null)
return;
var newEnt = Spawn(null, Transform(ent).Coordinates);
var xForm = EnsureComp<TransformComponent>(newEnt);
_transformSystem.AttachToGridOrMap(newEnt, xForm);
var location = EnsureComp<TeleportLocationComponent>(newEnt);
location.Location = warpPoint.Location;
}
}