Echoes of voices from the demiplanes (#840)

* split lightdarkness type magic to 2

* signal lights

* finish spells

* demiplane voices echoes

* Update closets.yml

* spells impact relay

* sprite fix
This commit is contained in:
Ed
2025-02-05 14:21:12 +03:00
committed by GitHub
parent 4becbd2c12
commit d100ed765b
28 changed files with 401 additions and 40 deletions

View File

@@ -14,7 +14,7 @@ public sealed partial class CP14DemiplaneSystem
private void OnRiftInit(Entity<CP14DemiplaneRiftComponent> rift, ref MapInitEvent args)
{
var map = Transform(rift).MapUid;
if (TryComp<CP14DemiplaneComponent>(map, out var demiplane)) // In demiplane
if (_demiplaneQuery.TryComp(map, out var demiplane)) // In demiplane
{
if (rift.Comp.TryAutoLinkToMap)
rift.Comp.Demiplane = map.Value;
@@ -24,7 +24,7 @@ public sealed partial class CP14DemiplaneSystem
}
else if (rift.Comp.Demiplane is not null) //We out of demiplane
{
if (TryComp<CP14DemiplaneComponent>(rift.Comp.Demiplane, out var riftDemiplane))
if (_demiplaneQuery.TryComp(rift.Comp.Demiplane, out var riftDemiplane))
{
if (rift.Comp.ActiveTeleport)
AddDemiplaneRandomExitPoint((rift.Comp.Demiplane.Value, riftDemiplane), rift);
@@ -37,7 +37,7 @@ public sealed partial class CP14DemiplaneSystem
if (rift.Comp.Demiplane is null)
return;
if (!TryComp<CP14DemiplaneComponent>(rift.Comp.Demiplane, out var riftDemiplane))
if (!_demiplaneQuery.TryComp(rift.Comp.Demiplane, out var riftDemiplane))
return;
RemoveDemiplaneRandomEntryPoint((rift.Comp.Demiplane.Value, riftDemiplane), rift);

View File

@@ -0,0 +1,34 @@
using Content.Server.Chat.Systems;
using Robust.Shared.Random;
namespace Content.Server._CP14.Demiplane;
public sealed partial class CP14DemiplaneSystem
{
[Dependency] private readonly ChatSystem _chat = default!;
private void InitEchoes()
{
SubscribeLocalEvent<EntitySpokeEvent>(OnSpeak);
}
private void OnSpeak(EntitySpokeEvent ev)
{
var map = Transform(ev.Source).MapUid;
if (!_demiplaneQuery.TryComp(map, out var demiplane))
return;
//Get random exit, and send message there
if (demiplane.ExitPoints.Count == 0)
return;
var exit = _random.Pick(demiplane.ExitPoints);
_chat.TrySendInGameICMessage(exit,
ev.Message,
InGameICChatType.Whisper,
ChatTransmitRange.NoGhosts,
nameOverride: Loc.GetString("cp14-demiplane-echoes"),
hideLog: true);
}
}

View File

@@ -146,7 +146,7 @@ public sealed partial class CP14DemiplaneSystem
return;
}
//We cant open demiplane in another demiplane or if parent is not Map
if (HasComp<CP14DemiplaneComponent>(Transform(generator).MapUid) || !HasComp<MapGridComponent>(_transform.GetParentUid(args.User)))
if (_demiplaneQuery.HasComp(Transform(generator).MapUid) || !HasComp<MapGridComponent>(_transform.GetParentUid(args.User)))
{
_popup.PopupEntity(Loc.GetString("cp14-demiplan-cannot-open", ("name", MetaData(generator).EntityName)), generator, args.User);
return;

View File

@@ -1,3 +1,4 @@
using Content.Server._CP14.Demiplane.Components;
using Content.Server._CP14.RoundStatistic;
using Content.Server.Flash;
using Content.Server.Procedural;
@@ -28,15 +29,43 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly CP14RoundStatTrackerSystem _statistic = default!;
private EntityQuery<CP14DemiplaneComponent> _demiplaneQuery;
public override void Initialize()
{
base.Initialize();
_demiplaneQuery = GetEntityQuery<CP14DemiplaneComponent>();
InitGeneration();
InitConnections();
InitStabilization();
InitEchoes();
SubscribeLocalEvent<CP14DemiplaneComponent, ComponentShutdown>(OnDemiplanShutdown);
SubscribeLocalEvent<CP14SpawnOutOfDemiplaneComponent, MapInitEvent>(OnSpawnOutOfDemiplane);
}
private void OnSpawnOutOfDemiplane(Entity<CP14SpawnOutOfDemiplaneComponent> ent, ref MapInitEvent args)
{
//Check if entity is in demiplane
var map = Transform(ent).MapUid;
if (!_demiplaneQuery.TryComp(map, out var demiplane))
return;
//Get random exit demiplane point and spawn entity there
if (demiplane.ExitPoints.Count == 0)
return;
var exit = _random.Pick(demiplane.ExitPoints);
var coordinates = Transform(exit).Coordinates;
var proto = ent.Comp.Proto;
if (proto is null)
proto = MetaData(ent).EntityPrototype?.ID;
Spawn(proto, coordinates);
}
public override void Update(float frameTime)

View File

@@ -0,0 +1,16 @@
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.Demiplane.Components;
/// <summary>
/// Creates an entity on demiplane exit points when that entity appears.
/// </summary>
[RegisterComponent]
public sealed partial class CP14SpawnOutOfDemiplaneComponent : Component
{
/// <summary>
/// If null, the ProtoId of this entity is taken from the entity itself.
/// </summary>
[DataField]
public EntProtoId? Proto;
}

View File

@@ -1,5 +1,6 @@
stalker-discord-info = To play on the server you need to go to our server in discord to authorise your account.
stalker-discord-auth-quit-btn = Exit
stalker-discord-auth-title = Authorisation
stalker-discord-auth-link = https://discord.com/invite/Sud2DMfhCC
stalker-discord-auth-browser-btn = Discord Server
cp14-discord-info = To play on the server you need to go to our server in discord to authorise your account.
cp14-discord-auth-quit-btn = Exit
cp14-discord-auth-title = Authorisation
cp14-discord-auth-link = https://discord.com/invite/Sud2DMfhCC
cp14-discord-auth-browser-btn = Discord Server
cp14-discord-auth-text = Authorize

View File

@@ -7,3 +7,6 @@ cp14-round-end-monolith-50 = The demiplane link crystal is half discharged.
cp14-round-end-monolith-discharged = You feel the connection to the other worlds begin to break.... The demiplane link crystal power will run out in { $time } { $units } if you don't charge it with mana completely...
cp14-round-end-monolith-recharged = Contact with the other worlds is being re-established. The demiplane link crystal is fully charged.
cp14-round-end = The demiplane link crystal was completely discharged. The connection to the other worlds has been severed. The "interesting" part of the story is over here....
cp14-demiplane-echoes = Echoes of voices

View File

@@ -2,7 +2,8 @@ cp14-magic-type-fire = Fire
cp14-magic-type-water = Water
cp14-magic-type-earth = Earth
cp14-magic-type-healing = Healing
cp14-magic-type-light-darkness = Light and darkness
cp14-magic-type-light = Light
cp14-magic-type-darkness = Darkness
cp14-magic-type-meta = Metamagic
cp14-magic-type-gate = Gate
cp14-magic-type-movement = Movement

View File

@@ -7,3 +7,6 @@ cp14-round-end-monolith-50 = Кристалл связи с демипланам
cp14-round-end-monolith-discharged = Вы чувствуете, что связь с другими мирами начинает рваться... Сила кристалла связи иссякнет через { $time } { $units }, если не запитать его маной полностью...
cp14-round-end-monolith-recharged = Связь с другими мирами восстанавливается. Энергия кристалла связи восстановлена.
cp14-round-end = Кристалл связи с демипланами окончательно разрядился. Связь с другими мирами оборвалась. "Интересная" часть этой истории окончена...
cp14-demiplane-echoes = Эхо голосов

View File

@@ -2,7 +2,8 @@ cp14-magic-type-fire = Огонь
cp14-magic-type-water = Вода
cp14-magic-type-earth = Земля
cp14-magic-type-healing = Исцеление
cp14-magic-type-light-darkness = Свет и тьма
cp14-magic-type-light = Свет
cp14-magic-type-darkness = Тьма
cp14-magic-type-meta = Метамагия
cp14-magic-type-gate = Пространство
cp14-magic-type-movement = Движение

View File

@@ -133,19 +133,16 @@
- type: StorageFill
contents:
- id: CP14Rope
- id: CP14Rope
- id: Bola
amount: 2
- id: Bola
amount: 2
- id: CP14ModularGuardHalberd
- id: CP14BaseShield
- id: CP14ModularGripIronLongGuard
- id: CP14ModularGripIronLongGuard
amount: 2
- id: CP14BaseLightCrossbow
- id: CP14Crossbolt
- id: CP14Crossbolt
- id: CP14Crossbolt
- id: CP14Crossbolt
- id: CP14Crossbolt
amount: 5
- id: CP14EnergyCrystalSmall
- id: CP14CrystalLampBlueEmpty
- id: CP14BookImperialLawsHandBook
@@ -158,13 +155,13 @@
- type: StorageFill
contents:
- id: CP14Rope
- id: CP14Rope
amount: 2
- id: Bola
- id: Bola
- id: CP14ModularGuardHalberd
- id: CP14BaseShield
- id: CP14ModularGripIronLongGuard
- id: CP14ModularGripIronLongGuard
amount: 2
- id: CP14EnergyCrystalSmall
- id: CP14CrystalLampBlueEmpty
- id: CP14StampGuardCommander
@@ -181,4 +178,10 @@
- id: HandLabeler #TODO custom cp14 labeler
- id: CP14StampDenied
- id: CP14StampApproved
- id: CP14PaperFolderBlue
- id: CP14PaperFolderBlue
- id: CP14SpellscrollSignalLightBlue
amount: 4
- id: CP14SpellscrollSignalLightYellow
amount: 4
- id: CP14SpellscrollSignalLightRed
amount: 4

View File

@@ -9,7 +9,7 @@
- type: CP14MagicEffectManaCost
manaCost: 10
- type: CP14MagicEffect
magicType: LightDarkness
magicType: Light
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
@@ -120,7 +120,7 @@
volume: -12
- type: entity
parent: CP14BaseSpellScrollLightDarkness
parent: CP14BaseSpellScrollLight
id: CP14SpellScrollSphereOfLight
name: sphere of light spell scroll
components:

View File

@@ -9,7 +9,7 @@
- type: CP14MagicEffectManaCost
manaCost: 10
- type: CP14MagicEffect
magicType: LightDarkness
magicType: Light
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
@@ -92,7 +92,7 @@
lifetime: 0.5
- type: entity
parent: CP14BaseSpellScrollLightDarkness
parent: CP14BaseSpellScrollLight
id: CP14SpellScrollFlashLight
name: flash light spell scroll
components:

View File

@@ -0,0 +1,249 @@
- type: entity
id: CP14ActionSpellSignalLightBase
abstract: true
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
- type: CP14MagicEffectManaCost
manaCost: 5
- type: CP14MagicEffect
magicType: Light
- type: CP14MagicEffectSomaticAspect
- type: InstantAction
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
event: !type:CP14DelayedInstantActionEvent
cooldown: 10
castDelay: 0.5
breakOnMove: false
# RED
- type: entity
id: CP14ActionSpellSignalLightRed
parent: CP14ActionSpellSignalLightBase
name: Red signal Light
description: You launch a hovering ball of light, briefly emitting a bright glow of red. This glow is able to penetrate the real world even from the demiplane.
components:
- type: Sprite
state: signal_light_red
- type: CP14MagicEffect
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14SignalLightRed
- type: CP14MagicEffectCastingVisual
proto: CP14RuneSignalLightRed
- type: InstantAction
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: signal_light_red
- type: entity
id: CP14RuneSignalLightRed
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#db1616"
- type: Sprite
layers:
- state: sun
color: "#db1616"
shader: unshaded
- type: entity
parent: CP14BaseSpellScrollLight
id: CP14SpellscrollSignalLightRed
name: red signal light spell scroll
components:
- type: CP14SpellStorage
spells:
- CP14ActionSpellSignalLightRed
# YELLOW
- type: entity
id: CP14ActionSpellSignalLightYellow
parent: CP14ActionSpellSignalLightBase
name: Yellow signal Light
description: You launch a hovering ball of light, briefly emitting a bright glow of yellow. This glow is able to penetrate the real world even from the demiplane.
components:
- type: Sprite
state: signal_light_yellow
- type: CP14MagicEffect
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14SignalLightYellow
- type: CP14MagicEffectCastingVisual
proto: CP14RuneSignalLightYellow
- type: InstantAction
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: signal_light_yellow
- type: entity
id: CP14RuneSignalLightYellow
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#ebc942"
- type: Sprite
layers:
- state: sun
color: "#ebc942"
shader: unshaded
- type: entity
parent: CP14BaseSpellScrollLight
id: CP14SpellscrollSignalLightYellow
name: yellow signal light spell scroll
components:
- type: CP14SpellStorage
spells:
- CP14ActionSpellSignalLightYellow
# BLUE
- type: entity
id: CP14ActionSpellSignalLightBlue
parent: CP14ActionSpellSignalLightBase
name: Blue signal Light
description: You launch a hovering ball of light, briefly emitting a bright glow of blue. This glow is able to penetrate the real world even from the demiplane.
components:
- type: Sprite
state: signal_light_blue
- type: CP14MagicEffect
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14SignalLightBlue
- type: CP14MagicEffectCastingVisual
proto: CP14RuneSignalLightBlue
- type: InstantAction
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: signal_light_blue
- type: entity
id: CP14RuneSignalLightBlue
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#42aaeb"
- type: Sprite
layers:
- state: sun
color: "#42aaeb"
shader: unshaded
- type: entity
parent: CP14BaseSpellScrollLight
id: CP14SpellscrollSignalLightBlue
name: blue signal light spell scroll
components:
- type: CP14SpellStorage
spells:
- CP14ActionSpellSignalLightBlue
# Signals
- type: entity
id: CP14SignalLightBase
abstract: true
categories: [ ForkFiltered ]
name: signal light
components:
- type: TimedDespawn
lifetime: 12
- type: Sprite
sprite: _CP14/Effects/Magic/sphere_of_light.rsi
noRot: true
layers:
- state: icon
shader: unshaded
- type: PointLight
radius: 20.0
energy: 1
netsync: false
mask: /Textures/_CP14/Effects/LightMasks/lighthouse_cone.png
- type: EmitSoundOnSpawn
sound:
path: /Audio/Items/Flare/flare_on.ogg
- type: AmbientSound
enabled: true
volume: -5
range: 5
sound:
path: /Audio/Items/Flare/flare_burn.ogg #TODO sound redesign
- type: CP14SpawnOutOfDemiplane
- type: entity
id: CP14SignalLightRed
parent: CP14SignalLightBase
suffix: Red
components:
- type: Sprite
color: "#db1616"
- type: PointLight
color: "#db1616"
- type: LightBehaviour
behaviours:
- !type:PulseBehaviour
interpolate: Cubic
maxDuration: 2
minValue: 1.0
maxValue: 60.0
property: Energy
isLooped: true
enabled: true
- type: RotatingLight
speed: 80
- type: entity
id: CP14SignalLightYellow
parent: CP14SignalLightBase
suffix: Yellow
components:
- type: Sprite
color: "#ebc942"
- type: PointLight
color: "#ebc942"
- type: LightBehaviour
behaviours:
- !type:PulseBehaviour
interpolate: Cubic
maxDuration: 3
minValue: 1.0
maxValue: 60.0
property: Energy
isLooped: true
enabled: true
- type: RotatingLight
speed: 30
- type: entity
id: CP14SignalLightBlue
parent: CP14SignalLightBase
suffix: Blue
components:
- type: Sprite
color: "#42aaeb"
- type: PointLight
color: "#42aaeb"
- type: LightBehaviour
behaviours:
- !type:PulseBehaviour
interpolate: Cubic
maxDuration: 4
minValue: 1.0
maxValue: 60.0
property: Energy
isLooped: true
enabled: true
- type: RotatingLight
speed: 50

View File

@@ -34,4 +34,5 @@
- type: Sprite
drawdepth: Effects
sprite: _CP14/Effects/Magic/cast_impact.rsi
noRot: true
noRot: true
- type: CP14SpawnOutOfDemiplane

View File

@@ -113,7 +113,7 @@
- type: entity
abstract: true
id: CP14BaseSpellScrollLightDarkness
id: CP14BaseSpellScrollLight
parent: CP14BaseSpellScroll
components:
- type: Sprite

View File

@@ -35,7 +35,7 @@
- type: PointLight
enabled: true
color: "#8f42ff"
energy: 30
energy: 1
radius: 5
netsync: false
- type: LightBehaviour

View File

@@ -67,9 +67,7 @@
drawdepth: Effects
sprite: /Textures/_CP14/Structures/Dungeon/demiplan_rift_core.rsi
layers:
- state: core
shader: unshaded
- state: pulse
- state: connective
shader: unshaded
- type: PointLight
radius: 2
@@ -80,6 +78,8 @@
guides:
- CP14_RU_Demiplanes
- CP14_EN_Demiplanes
- type: Speech
speechVerb: Ghost
- type: entity
id: CP14DemiplaneTimedRadiusPassway

View File

@@ -19,10 +19,15 @@
color: "#89e04f"
- type: magicType
id: LightDarkness
name: cp14-magic-type-light-darkness
id: Light
name: cp14-magic-type-light
color: "#ba97b8"
- type: magicType
id: Darkness
name: cp14-magic-type-darkness
color: "#4e0691"
- type: magicType
id: Meta
name: cp14-magic-type-meta

View File

@@ -5,7 +5,7 @@
"y": 32
},
"license": "All right reserved",
"copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint, tiefling_revenge and resurrection by TheShuEd",
"copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint, tiefling_revenge, signal_light_blue, signal_light_red, signal_light_yellow and resurrection by TheShuEd",
"states": [
{
"name": "beer_creation"
@@ -55,6 +55,15 @@
{
"name": "shadow_step"
},
{
"name": "signal_light_blue"
},
{
"name": "signal_light_red"
},
{
"name": "signal_light_yellow"
},
{
"name": "sphere_of_light"
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -1,7 +1,7 @@
{
"version": 1,
"license": "CC0-1.0",
"copyright": "Created by TheShuEd (github) for ss14",
"copyright": "Core created by TheShuEd, connective created by omsoyk",
"size": {
"x": 32,
"y": 32
@@ -11,13 +11,19 @@
"name": "core"
},
{
"name": "pulse",
"name": "connective",
"delays": [
[
0.15625,
0.15625,
0.15625,
0.15625
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15
]
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B