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:
@@ -199,6 +199,9 @@ public sealed partial class PolymorphSystem : EntitySystem
|
|||||||
|
|
||||||
var targetTransformComp = Transform(uid);
|
var targetTransformComp = Transform(uid);
|
||||||
|
|
||||||
|
if (configuration.PolymorphSound != null)
|
||||||
|
_audio.PlayPvs(configuration.PolymorphSound, targetTransformComp.Coordinates);
|
||||||
|
|
||||||
var child = Spawn(configuration.Entity, _transform.GetMapCoordinates(uid, targetTransformComp), rotation: _transform.GetWorldRotation(uid));
|
var child = Spawn(configuration.Entity, _transform.GetMapCoordinates(uid, targetTransformComp), rotation: _transform.GetWorldRotation(uid));
|
||||||
|
|
||||||
MakeSentientCommand.MakeSentient(child, EntityManager);
|
MakeSentientCommand.MakeSentient(child, EntityManager);
|
||||||
@@ -288,6 +291,9 @@ public sealed partial class PolymorphSystem : EntitySystem
|
|||||||
var uidXform = Transform(uid);
|
var uidXform = Transform(uid);
|
||||||
var parentXform = Transform(parent);
|
var parentXform = Transform(parent);
|
||||||
|
|
||||||
|
if (component.Configuration.ExitPolymorphSound != null)
|
||||||
|
_audio.PlayPvs(component.Configuration.ExitPolymorphSound, uidXform.Coordinates);
|
||||||
|
|
||||||
_transform.SetParent(parent, parentXform, uidXform.ParentUid);
|
_transform.SetParent(parent, parentXform, uidXform.ParentUid);
|
||||||
_transform.SetCoordinates(parent, parentXform, uidXform.Coordinates, uidXform.LocalRotation);
|
_transform.SetCoordinates(parent, parentXform, uidXform.Coordinates, uidXform.LocalRotation);
|
||||||
|
|
||||||
|
|||||||
26
Content.Shared/Jaunt/JauntComponent.cs
Normal file
26
Content.Shared/Jaunt/JauntComponent.cs
Normal 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
|
||||||
|
}
|
||||||
26
Content.Shared/Jaunt/JauntSystem.cs
Normal file
26
Content.Shared/Jaunt/JauntSystem.cs
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
|
||||||
|
|
||||||
@@ -115,6 +116,18 @@ public sealed partial record PolymorphConfiguration
|
|||||||
[DataField(serverOnly: true)]
|
[DataField(serverOnly: true)]
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public TimeSpan Cooldown = TimeSpan.Zero;
|
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
|
public enum PolymorphInventoryChange : byte
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
- forcewall.ogg
|
- forcewall.ogg
|
||||||
- knock.ogg
|
- knock.ogg
|
||||||
- blink.ogg
|
- blink.ogg
|
||||||
copyright: '"ForceWall.ogg", "Knock.ogg", and "blink.ogg" by Citadel Station 13'
|
- ethereal_enter.ogg
|
||||||
|
- ethereal_exit.ogg
|
||||||
|
copyright: '"forcewall.ogg", "knock.ogg", "blink.ogg", "ethereal_enter.ogg", and "ethereal_exit.ogg" by Citadel Station 13'
|
||||||
license: CC-BY-SA-3.0
|
license: CC-BY-SA-3.0
|
||||||
source: https://github.com/Citadel-Station-13/Citadel-Station-13/commit/35a1723e98a60f375df590ca572cc90f1bb80bd5
|
source: https://github.com/Citadel-Station-13/Citadel-Station-13/commit/35a1723e98a60f375df590ca572cc90f1bb80bd5
|
||||||
|
|||||||
BIN
Resources/Audio/Magic/ethereal_enter.ogg
Normal file
BIN
Resources/Audio/Magic/ethereal_enter.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Magic/ethereal_exit.ogg
Normal file
BIN
Resources/Audio/Magic/ethereal_exit.ogg
Normal file
Binary file not shown.
@@ -17,6 +17,9 @@ spellbook-polymorph-rod-desc = Change into an Immovable Rod with limited movemen
|
|||||||
spellbook-charge-name = Charge
|
spellbook-charge-name = Charge
|
||||||
spellbook-charge-desc = Adds a charge back to your wand!
|
spellbook-charge-desc = Adds a charge back to your wand!
|
||||||
|
|
||||||
|
spellbook-ethereal-jaunt-name = Ethereal Jaunt
|
||||||
|
spellbook-ethereal-jaunt-description = Slip into the ethereal plane to slip away from your enemies!
|
||||||
|
|
||||||
# Equipment
|
# Equipment
|
||||||
|
|
||||||
spellbook-wand-polymorph-door-name = Wand of Entrance
|
spellbook-wand-polymorph-door-name = Wand of Entrance
|
||||||
@@ -33,3 +36,6 @@ spellbook-event-summon-ghosts-description = Who ya gonna call?
|
|||||||
# Upgrades
|
# Upgrades
|
||||||
spellbook-upgrade-fireball-name = Upgrade Fireball
|
spellbook-upgrade-fireball-name = Upgrade Fireball
|
||||||
spellbook-upgrade-fireball-description = Upgrades Fireball to a maximum of level 3!
|
spellbook-upgrade-fireball-description = Upgrades Fireball to a maximum of level 3!
|
||||||
|
|
||||||
|
spellbook-upgrade-jaunt-name = Upgrade Ethereal Jaunt
|
||||||
|
spellbook-upgrade-jaunt-description = Upgrades Jaunt to a maximum of level 3!
|
||||||
|
|||||||
@@ -40,3 +40,53 @@
|
|||||||
icon:
|
icon:
|
||||||
sprite: Objects/Fun/immovable_rod.rsi
|
sprite: Objects/Fun/immovable_rod.rsi
|
||||||
state: icon
|
state: icon
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: ActionPolymorphJaunt
|
||||||
|
name: Ethereal Jaunt
|
||||||
|
description: Melt into the Ethereal Plane for a quick getaway!
|
||||||
|
components:
|
||||||
|
- type: Magic
|
||||||
|
- type: InstantAction
|
||||||
|
useDelay: 30
|
||||||
|
event: !type:PolymorphActionEvent
|
||||||
|
protoId: Jaunt
|
||||||
|
itemIconStyle: NoItem
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Magic/magicactions.rsi
|
||||||
|
state: jaunt
|
||||||
|
# TODO: Effect ECS (from cardboard box)
|
||||||
|
- type: ActionUpgrade
|
||||||
|
effectedLevels:
|
||||||
|
2: ActionPolymorphJauntII
|
||||||
|
3: ActionPolymorphJauntIII
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: ActionPolymorphJauntII
|
||||||
|
parent: ActionPolymorphJaunt
|
||||||
|
name: Ethereal Jaunt II
|
||||||
|
description: Melt into the Ethereal Plane for an even quicker getaway!
|
||||||
|
components:
|
||||||
|
- type: InstantAction
|
||||||
|
useDelay: 25
|
||||||
|
event: !type:PolymorphActionEvent
|
||||||
|
protoId: Jaunt
|
||||||
|
itemIconStyle: NoItem
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Magic/magicactions.rsi
|
||||||
|
state: jaunt
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: ActionPolymorphJauntIII
|
||||||
|
parent: ActionPolymorphJaunt
|
||||||
|
name: Ethereal Jaunt III
|
||||||
|
description: Are you even tangible anymore?
|
||||||
|
components:
|
||||||
|
- type: InstantAction
|
||||||
|
useDelay: 20
|
||||||
|
event: !type:PolymorphActionEvent
|
||||||
|
protoId: Jaunt
|
||||||
|
itemIconStyle: NoItem
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Magic/magicactions.rsi
|
||||||
|
state: jaunt
|
||||||
|
|||||||
@@ -77,6 +77,20 @@
|
|||||||
- !type:ListingLimitedStockCondition
|
- !type:ListingLimitedStockCondition
|
||||||
stock: 1
|
stock: 1
|
||||||
|
|
||||||
|
- type: listing
|
||||||
|
id: SpellbookJaunt
|
||||||
|
name: spellbook-ethereal-jaunt-name
|
||||||
|
description: spellbook-ethereal-jaunt-description
|
||||||
|
productAction: ActionPolymorphJaunt
|
||||||
|
productUpgradeId: SpellbookJauntUpgrade
|
||||||
|
cost:
|
||||||
|
WizCoin: 2
|
||||||
|
categories:
|
||||||
|
- SpellbookUtility
|
||||||
|
conditions:
|
||||||
|
- !type:ListingLimitedStockCondition
|
||||||
|
stock: 1
|
||||||
|
|
||||||
# Equipment
|
# Equipment
|
||||||
- type: listing
|
- type: listing
|
||||||
id: SpellbookWandDoor
|
id: SpellbookWandDoor
|
||||||
@@ -138,3 +152,22 @@
|
|||||||
# manual for now
|
# manual for now
|
||||||
- !type:ListingLimitedStockCondition
|
- !type:ListingLimitedStockCondition
|
||||||
stock: 2
|
stock: 2
|
||||||
|
|
||||||
|
- type: listing
|
||||||
|
id: SpellbookJauntUpgrade
|
||||||
|
productUpgradeId: SpellbookJauntUpgrade
|
||||||
|
name: spellbook-upgrade-jaunt-name
|
||||||
|
description: spellbook-upgrade-jaunt-description
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Magic/magicactions.rsi
|
||||||
|
state: jaunt
|
||||||
|
cost:
|
||||||
|
WizCoin: 2
|
||||||
|
categories:
|
||||||
|
- SpellbookUtility
|
||||||
|
conditions:
|
||||||
|
- !type:BuyBeforeCondition
|
||||||
|
whitelist:
|
||||||
|
- SpellbookJaunt
|
||||||
|
- !type:ListingLimitedStockCondition
|
||||||
|
stock: 2
|
||||||
|
|||||||
40
Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
Normal file
40
Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
- type: entity
|
||||||
|
name: jaunt
|
||||||
|
parent: [Incorporeal, BaseMob]
|
||||||
|
id: BaseMobJaunt
|
||||||
|
description: Faint traces of a humanoid figure linger here
|
||||||
|
suffix: Ethereal
|
||||||
|
components:
|
||||||
|
- type: ContentEye
|
||||||
|
maxZoom: 1.44,1.44
|
||||||
|
- type: Eye
|
||||||
|
drawFov: false
|
||||||
|
- type: Input
|
||||||
|
context: "ghost"
|
||||||
|
- type: InputMover
|
||||||
|
- type: MovementSpeedModifier
|
||||||
|
baseSprintSpeed: 12
|
||||||
|
baseWalkSpeed: 8
|
||||||
|
- type: Visibility
|
||||||
|
layer: 2
|
||||||
|
- type: Spectral
|
||||||
|
|
||||||
|
# Should be slow, for balance
|
||||||
|
- type: entity
|
||||||
|
name: jaunt
|
||||||
|
parent: BaseMobJaunt
|
||||||
|
id: EtherealJaunt
|
||||||
|
suffix: Wizard
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Mobs/Ghosts/ghost_human.rsi
|
||||||
|
color: "#60f7eb"
|
||||||
|
layers:
|
||||||
|
- state: animated
|
||||||
|
shader: unshaded
|
||||||
|
noRot: true
|
||||||
|
overrideContainerOcclusion: true
|
||||||
|
drawdepth: Ghosts
|
||||||
|
- type: MovementSpeedModifier
|
||||||
|
baseSprintSpeed: 6
|
||||||
|
baseWalkSpeed: 4
|
||||||
@@ -186,3 +186,19 @@
|
|||||||
forced: true
|
forced: true
|
||||||
revertOnCrit: false
|
revertOnCrit: false
|
||||||
revertOnDeath: false
|
revertOnDeath: false
|
||||||
|
|
||||||
|
# Temporary Jaunt
|
||||||
|
# Don't make permanent jaunts until action system can be reworked to allow do afters and cooldown pausing
|
||||||
|
- type: polymorph
|
||||||
|
id: Jaunt
|
||||||
|
configuration:
|
||||||
|
entity: EtherealJaunt
|
||||||
|
transferName: true
|
||||||
|
inventory: None
|
||||||
|
forced: true
|
||||||
|
revertOnDeath: true
|
||||||
|
revertOnCrit: true
|
||||||
|
allowRepeatedMorphs: false
|
||||||
|
polymorphSound: /Audio/Magic/ethereal_enter.ogg
|
||||||
|
exitPolymorphSound: /Audio/Magic/ethereal_exit.ogg
|
||||||
|
duration: 3
|
||||||
|
|||||||
BIN
Resources/Textures/Objects/Magic/magicactions.rsi/jaunt.png
Normal file
BIN
Resources/Textures/Objects/Magic/magicactions.rsi/jaunt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 431 B |
@@ -25,6 +25,9 @@
|
|||||||
{
|
{
|
||||||
"name": "magicmissile"
|
"name": "magicmissile"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "jaunt"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "gib"
|
"name": "gib"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user