Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ethereal Jaunt Spell for Wizard & Jaunt ECS #33201

Merged
merged 25 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cd737f7
Act
lzk228 Jul 25, 2024
b469dcc
merge master
keronshb Oct 6, 2024
1cab30e
Adds Jaunt ECS and related prototypes
keronshb Nov 7, 2024
d3e8b5e
Adds jaunt sounds
keronshb Nov 7, 2024
5ce34a7
Adds enter and exit sound support to polymorphs
keronshb Nov 7, 2024
2d84426
Updates jaunt description
keronshb Nov 7, 2024
7981dcc
Adds jaunt action sprite and changes jaunt polymorph to use it
keronshb Nov 7, 2024
e5d17d7
Adds Jaunt and upgrade to the wizard grimoire
keronshb Nov 7, 2024
d1dbe6a
merge master
keronshb Nov 7, 2024
1b9cef5
Makes base mob jaunt parent off of incorporeal and basemob, adds blue…
keronshb Nov 8, 2024
ccfb1dd
Update Resources/Locale/en-US/store/spellbook-catalog.ftl
keronshb Nov 12, 2024
2db92fa
Merge branch 'master' of https://github.com/space-wizards/space-stati…
keronshb Nov 12, 2024
8b8b014
Update Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
keronshb Nov 12, 2024
b16199e
Update Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
keronshb Nov 12, 2024
94932cf
Update Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
keronshb Nov 12, 2024
8f83ad4
Update Content.Shared/Polymorph/PolymorphPrototype.cs
keronshb Nov 12, 2024
664f331
Update Content.Shared/Polymorph/PolymorphPrototype.cs
keronshb Nov 12, 2024
308d195
removes meta changes
keronshb Nov 12, 2024
fe9f025
removes other meta changes
keronshb Nov 12, 2024
091a5be
adds context menu and a description to basemobjaunt
keronshb Nov 12, 2024
33f36a0
comments for jaunt component and adds on component shutdown method
keronshb Nov 12, 2024
4f46cba
Update Content.Shared/Jaunt/JauntComponent.cs
slarticodefast Nov 13, 2024
4b6a635
Update Content.Shared/Jaunt/JauntComponent.cs
slarticodefast Nov 13, 2024
e389b7a
Update Content.Shared/Jaunt/JauntComponent.cs
slarticodefast Nov 13, 2024
8436b84
Update Resources/Prototypes/Catalog/spellbook_catalog.yml
slarticodefast Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Content.Server/Polymorph/Systems/PolymorphSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ private void OnDestruction(Entity<PolymorphedEntityComponent> ent, ref Destructi

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));

MakeSentientCommand.MakeSentient(child, EntityManager);
Expand Down Expand Up @@ -288,6 +291,9 @@ private void OnDestruction(Entity<PolymorphedEntityComponent> ent, ref Destructi
var uidXform = Transform(uid);
var parentXform = Transform(parent);

if (component.Configuration.ExitPolymorphSound != null)
_audio.PlayPvs(component.Configuration.ExitPolymorphSound, uidXform.Coordinates);

_transform.SetParent(parent, parentXform, uidXform.ParentUid);
_transform.SetCoordinates(parent, parentXform, uidXform.Coordinates, uidXform.LocalRotation);

Expand Down
16 changes: 16 additions & 0 deletions Content.Shared/Jaunt/JauntComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;

namespace Content.Shared.Jaunt;

[RegisterComponent, NetworkedComponent]
public sealed partial class JauntComponent : Component
slarticodefast marked this conversation as resolved.
Show resolved Hide resolved
{
[DataField]
public EntProtoId JauntAction = "ActionPolymorphJaunt";

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
}
19 changes: 19 additions & 0 deletions Content.Shared/Jaunt/JauntSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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);
}

private void OnInit(Entity<JauntComponent> ent, ref MapInitEvent args)
{
_actions.AddAction(ent.Owner, ref ent.Comp.Action, ent.Comp.JauntAction);
}
}

slarticodefast marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 11 additions & 0 deletions Content.Shared/Polymorph/PolymorphPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;

Expand Down Expand Up @@ -115,6 +116,16 @@ 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;
keronshb marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// If not null, this sound will be played when being reverted from a polymorph.
/// </summary>
[DataField] public SoundSpecifier? ExitPolymorphSound;
keronshb marked this conversation as resolved.
Show resolved Hide resolved
}

public enum PolymorphInventoryChange : byte
Expand Down
4 changes: 3 additions & 1 deletion Resources/Audio/Magic/attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
- forcewall.ogg
- knock.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
source: https://github.com/Citadel-Station-13/Citadel-Station-13/commit/35a1723e98a60f375df590ca572cc90f1bb80bd5
Binary file added Resources/Audio/Magic/ethereal_enter.ogg
Binary file not shown.
Binary file added Resources/Audio/Magic/ethereal_exit.ogg
Binary file not shown.
6 changes: 6 additions & 0 deletions Resources/Locale/en-US/store/spellbook-catalog.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spellbook-polymorph-rod-desc = Change into an Immovable Rod with limited movemen
spellbook-charge-name = Charge
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

spellbook-wand-polymorph-door-name = Wand of Entrance
Expand All @@ -33,3 +36,6 @@ spellbook-event-summon-ghosts-description = Who ya gonna call?
# Upgrades
spellbook-upgrade-fireball-name = Upgrade Fireball
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!s
keronshb marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 17 additions & 1 deletion Resources/Maps/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6734,7 +6734,8 @@ entities:
-3,12:
0: 47903
-2,9:
0: 65535
0: 65263
2: 272
-2,10:
0: 64271
-2,11:
Expand Down Expand Up @@ -8374,6 +8375,21 @@ entities:
- 0
- 0
- 0
- volume: 2500
temperature: 293.14975
moles:
- 20.078888
- 75.53487
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
keronshb marked this conversation as resolved.
Show resolved Hide resolved
- volume: 2500
temperature: 293.15
moles:
Expand Down
50 changes: 50 additions & 0 deletions Resources/Prototypes/Actions/polymorph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,53 @@
icon:
sprite: Objects/Fun/immovable_rod.rsi
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
33 changes: 33 additions & 0 deletions Resources/Prototypes/Catalog/spellbook_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@
- !type:ListingLimitedStockCondition
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
- type: listing
id: SpellbookWandDoor
Expand Down Expand Up @@ -138,3 +152,22 @@
# manual for now
- !type:ListingLimitedStockCondition
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
slarticodefast marked this conversation as resolved.
Show resolved Hide resolved
- !type:ListingLimitedStockCondition
stock: 2
47 changes: 47 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
- type: entity
name: jaunt
parent: [Incorporeal, BaseMob]
id: BaseMobJaunt
description: You shouldn't see this!
slarticodefast marked this conversation as resolved.
Show resolved Hide resolved
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: Physics
bodyType: KinematicController
keronshb marked this conversation as resolved.
Show resolved Hide resolved
- type: Visibility
layer: 2
- type: Spectral
- type: CanMoveInAir
keronshb marked this conversation as resolved.
Show resolved Hide resolved
- type: NoSlip
keronshb marked this conversation as resolved.
Show resolved Hide resolved
- type: Tag
tags:
- HideContextMenu
slarticodefast marked this conversation as resolved.
Show resolved Hide resolved

# 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
16 changes: 16 additions & 0 deletions Resources/Prototypes/Polymorphs/polymorph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,19 @@
forced: true
revertOnCrit: 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion Resources/Textures/Objects/Magic/magicactions.rsi/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
{
"name": "magicmissile"
},
{
"name": "jaunt"
},
{
"name": "gib"
}
]
}
}
Loading