Ethereal Jaunt Spell for Wizard & Jaunt ECS (#33201)

* Act

* Adds Jaunt ECS and related prototypes

* Adds jaunt sounds

* Adds enter and exit sound support to polymorphs

* Updates jaunt description

* Adds jaunt action sprite and changes jaunt polymorph to use it

* Adds Jaunt and upgrade to the wizard grimoire

* Makes base mob jaunt parent off of incorporeal and basemob, adds blue ghost sprite for ethereal jaunt

* Update Resources/Locale/en-US/store/spellbook-catalog.ftl

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Polymorph/PolymorphPrototype.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Polymorph/PolymorphPrototype.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* removes meta changes

* removes other meta changes

* adds context menu and a description to basemobjaunt

* comments for jaunt component and adds on component shutdown method

* Update Content.Shared/Jaunt/JauntComponent.cs

* Update Content.Shared/Jaunt/JauntComponent.cs

* Update Content.Shared/Jaunt/JauntComponent.cs

* Update Resources/Prototypes/Catalog/spellbook_catalog.yml

---------

Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
keronshb
2024-11-13 18:36:37 -05:00
committed by GitHub
parent 9643598c70
commit fa3a04a527
14 changed files with 223 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Jaunt;
/// <summary>
/// Used to control various aspects of a Jaunt.
/// Can be used in place of giving a jaunt-action directly.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class JauntComponent : Component
{
/// <summary>
/// Which Jaunt Action the component should grant.
/// </summary>
[DataField]
public EntProtoId JauntAction = "ActionPolymorphJaunt";
/// <summary>
/// The jaunt action itself.
/// </summary>
public EntityUid? Action;
// TODO: Enter & Exit Times and Whitelist when Actions are reworked and can support it
// TODO: Cooldown pausing when Actions can support it
}

View File

@@ -0,0 +1,26 @@
using Content.Shared.Actions;
namespace Content.Shared.Jaunt;
public sealed class JauntSystem : EntitySystem
{
[Dependency] private readonly SharedActionsSystem _actions = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<JauntComponent, MapInitEvent>(OnInit);
SubscribeLocalEvent<JauntComponent, ComponentShutdown>(OnShutdown);
}
private void OnInit(Entity<JauntComponent> ent, ref MapInitEvent args)
{
_actions.AddAction(ent.Owner, ref ent.Comp.Action, ent.Comp.JauntAction);
}
private void OnShutdown(Entity<JauntComponent> ent, ref ComponentShutdown args)
{
_actions.RemoveAction(ent.Owner, ent.Comp.Action);
}
}

View File

@@ -1,3 +1,4 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
@@ -115,6 +116,18 @@ public sealed partial record PolymorphConfiguration
[DataField(serverOnly: true)]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Cooldown = TimeSpan.Zero;
/// <summary>
/// If not null, this sound will be played when being polymorphed into something.
/// </summary>
[DataField]
public SoundSpecifier? PolymorphSound;
/// <summary>
/// If not null, this sound will be played when being reverted from a polymorph.
/// </summary>
[DataField]
public SoundSpecifier? ExitPolymorphSound;
}
public enum PolymorphInventoryChange : byte