diff --git a/Content.Shared/Inventory/InventorySystem.Relay.cs b/Content.Shared/Inventory/InventorySystem.Relay.cs index 14463f3b70..f81251fbb9 100644 --- a/Content.Shared/Inventory/InventorySystem.Relay.cs +++ b/Content.Shared/Inventory/InventorySystem.Relay.cs @@ -1,6 +1,6 @@ using Content.Shared._CP14.MagicEssence; using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared._CP14.ResearchTable; +using Content.Shared._CP14.Skill; using Content.Shared.Armor; using Content.Shared.Atmos; using Content.Shared.Chat; diff --git a/Content.Shared/_CP14/ResearchTable/CP14SharedResearchSystem.cs b/Content.Shared/_CP14/ResearchTable/CP14SharedResearchSystem.cs index f2103f0fc2..04c032a6ea 100644 --- a/Content.Shared/_CP14/ResearchTable/CP14SharedResearchSystem.cs +++ b/Content.Shared/_CP14/ResearchTable/CP14SharedResearchSystem.cs @@ -1,78 +1,12 @@ -using System.Text; -using Content.Shared._CP14.Skill; -using Content.Shared._CP14.Skill.Components; using Content.Shared._CP14.Skill.Prototypes; using Content.Shared.DoAfter; -using Content.Shared.Examine; -using Content.Shared.Inventory; -using Content.Shared.Verbs; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Utility; namespace Content.Shared._CP14.ResearchTable; public abstract class CP14SharedResearchSystem : EntitySystem { - [Dependency] private readonly ExamineSystemShared _examine = default!; - [Dependency] private readonly IPrototypeManager _proto = default!; - [Dependency] private readonly CP14SharedSkillSystem _skill = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnSkillScan); - SubscribeLocalEvent>((e, c, ev) => OnSkillScan(e, c, ev.Args)); - - SubscribeLocalEvent>(OnExamined); - } - - private void OnExamined(Entity ent, ref GetVerbsEvent args) - { - var scanEvent = new CP14SkillScanEvent(); - RaiseLocalEvent(args.User, scanEvent); - - if (!scanEvent.CanScan) - return; - - var markup = GetSkillExamine(ent); - - _examine.AddDetailedExamineVerb( - args, - ent.Comp, - markup, - Loc.GetString("cp14-skill-examine"), - "/Textures/Interface/students-cap.svg.192dpi.png"); - } - - private FormattedMessage GetSkillExamine(Entity ent) - { - var msg = new FormattedMessage(); - - var sb = new StringBuilder(); - - sb.Append(Loc.GetString("cp14-skill-examine-title") + "\n"); - - foreach (var skill in ent.Comp.LearnedSkills) - { - if (!_proto.TryIndex(skill, out var indexedSkill)) - continue; - - if(!_proto.TryIndex(indexedSkill.Tree, out var indexedTree)) - continue; - - var skillName = _skill.GetSkillName(skill); - sb.Append($"• [color={indexedTree.Color.ToHex()}]{skillName}[/color]\n"); - } - msg.AddMarkupOrThrow(sb.ToString()); - return msg; - } - - private void OnSkillScan(EntityUid uid, CP14SkillScannerComponent component, CP14SkillScanEvent args) - { - args.CanScan = true; - } } [Serializable, NetSerializable] @@ -83,9 +17,3 @@ public sealed partial class CP14ResearchDoAfterEvent : DoAfterEvent public override DoAfterEvent Clone() => this; } - -public sealed class CP14SkillScanEvent : EntityEventArgs, IInventoryRelayEvent -{ - public bool CanScan; - public SlotFlags TargetSlots { get; } = SlotFlags.EYES; -} diff --git a/Content.Shared/_CP14/Skill/CP14SharedSkillSystem.cs b/Content.Shared/_CP14/Skill/CP14SharedSkillSystem.cs index 575903e9e1..5d3e2a3f2f 100644 --- a/Content.Shared/_CP14/Skill/CP14SharedSkillSystem.cs +++ b/Content.Shared/_CP14/Skill/CP14SharedSkillSystem.cs @@ -3,7 +3,6 @@ using System.Text; using Content.Shared._CP14.Skill.Components; using Content.Shared._CP14.Skill.Prototypes; using Content.Shared.FixedPoint; -using Content.Shared.Popups; using Robust.Shared.Prototypes; namespace Content.Shared._CP14.Skill; @@ -22,6 +21,7 @@ public abstract partial class CP14SharedSkillSystem : EntitySystem InitializeAdmin(); InitializeChecks(); + InitializeScanning(); } private void OnMapInit(Entity ent, ref MapInitEvent args) diff --git a/Content.Shared/_CP14/Skill/CP14SkillSystem.Scanning.cs b/Content.Shared/_CP14/Skill/CP14SkillSystem.Scanning.cs new file mode 100644 index 0000000000..7191253a95 --- /dev/null +++ b/Content.Shared/_CP14/Skill/CP14SkillSystem.Scanning.cs @@ -0,0 +1,75 @@ +using System.Text; +using Content.Shared._CP14.Skill.Components; +using Content.Shared.Examine; +using Content.Shared.Inventory; +using Content.Shared.Verbs; +using Robust.Shared.Utility; + +namespace Content.Shared._CP14.Skill; + +public abstract partial class CP14SharedSkillSystem +{ + [Dependency] private readonly ExamineSystemShared _examine = default!; + + private void InitializeScanning() + { + SubscribeLocalEvent(OnSkillScan); + SubscribeLocalEvent>((e, c, ev) => OnSkillScan(e, c, ev.Args)); + + SubscribeLocalEvent>(OnExamined); + } + + private void OnExamined(Entity ent, ref GetVerbsEvent args) + { + var scanEvent = new CP14SkillScanEvent(); + RaiseLocalEvent(args.User, scanEvent); + + if (!scanEvent.CanScan) + return; + + var markup = GetSkillExamine(ent); + + _examine.AddDetailedExamineVerb( + args, + ent.Comp, + markup, + Loc.GetString("cp14-skill-info-title"), + "/Textures/Interface/students-cap.svg.192dpi.png"); + } + + private FormattedMessage GetSkillExamine(Entity ent) + { + var msg = new FormattedMessage(); + + var sb = new StringBuilder(); + + sb.Append(Loc.GetString("cp14-skill-examine-title") + "\n"); + + foreach (var skill in ent.Comp.LearnedSkills) + { + if (!_proto.TryIndex(skill, out var indexedSkill)) + continue; + + if(!_proto.TryIndex(indexedSkill.Tree, out var indexedTree)) + continue; + + var skillName = GetSkillName(skill); + sb.Append($"• [color={indexedTree.Color.ToHex()}]{skillName}[/color]\n"); + } + + sb.Append($"\n{Loc.GetString("cp14-skill-menu-level")} {ent.Comp.SkillsSumExperience}/{ent.Comp.ExperienceMaxCap}\n"); + msg.AddMarkupOrThrow(sb.ToString()); + return msg; + } + + private void OnSkillScan(EntityUid uid, CP14SkillScannerComponent component, CP14SkillScanEvent args) + { + args.CanScan = true; + } +} + +public sealed class CP14SkillScanEvent : EntityEventArgs, IInventoryRelayEvent +{ + public bool CanScan; + public SlotFlags TargetSlots { get; } = SlotFlags.EYES; +} diff --git a/Resources/Audio/_CP14/Effects/attributions.yml b/Resources/Audio/_CP14/Effects/attributions.yml index 2962b1a785..3c17d8a357 100644 --- a/Resources/Audio/_CP14/Effects/attributions.yml +++ b/Resources/Audio/_CP14/Effects/attributions.yml @@ -96,4 +96,9 @@ - files: ["ritual_begin.ogg", "ritual_end.ogg"] license: "CC-BY-4.0" copyright: 'Created by SilverIllusionist on Freesound.org' - source: "https://freesound.org/people/SilverIllusionist/sounds/671928/" \ No newline at end of file + source: "https://freesound.org/people/SilverIllusionist/sounds/671928/" + +- files: ["moon_strike1.ogg", "moon_strike2.ogg", "moon_strike3.ogg", "moon_strike4.ogg"] + license: "CC-BY-4.0" + copyright: 'Created by EminYILDIRIM on Freesound.org' + source: "https://freesound.org/people/EminYILDIRIM/sounds/668244/" \ No newline at end of file diff --git a/Resources/Audio/_CP14/Effects/moon_strike1.ogg b/Resources/Audio/_CP14/Effects/moon_strike1.ogg new file mode 100644 index 0000000000..d83a00f3f8 Binary files /dev/null and b/Resources/Audio/_CP14/Effects/moon_strike1.ogg differ diff --git a/Resources/Audio/_CP14/Effects/moon_strike2.ogg b/Resources/Audio/_CP14/Effects/moon_strike2.ogg new file mode 100644 index 0000000000..dadb098323 Binary files /dev/null and b/Resources/Audio/_CP14/Effects/moon_strike2.ogg differ diff --git a/Resources/Audio/_CP14/Effects/moon_strike3.ogg b/Resources/Audio/_CP14/Effects/moon_strike3.ogg new file mode 100644 index 0000000000..bbd3cdda7d Binary files /dev/null and b/Resources/Audio/_CP14/Effects/moon_strike3.ogg differ diff --git a/Resources/Audio/_CP14/Effects/moon_strike4.ogg b/Resources/Audio/_CP14/Effects/moon_strike4.ogg new file mode 100644 index 0000000000..c6ca0da5be Binary files /dev/null and b/Resources/Audio/_CP14/Effects/moon_strike4.ogg differ diff --git a/Resources/Locale/en-US/_CP14/skill/ui.ftl b/Resources/Locale/en-US/_CP14/skill/ui.ftl index 7217fa18b2..af94a8f730 100644 --- a/Resources/Locale/en-US/_CP14/skill/ui.ftl +++ b/Resources/Locale/en-US/_CP14/skill/ui.ftl @@ -18,5 +18,4 @@ cp14-skill-desc-unlock-recipes = Opens up the possibility of crafting: cp14-skill-popup-added-points = The boundaries of your consciousness are expanding. New memory points: {$count} -cp14-skill-examine-verb = Learn the character's skills cp14-skill-examine-title = This character has the following skills: \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/skill/ui.ftl b/Resources/Locale/ru-RU/_CP14/skill/ui.ftl index 3981ca2fee..1a11e1c85f 100644 --- a/Resources/Locale/ru-RU/_CP14/skill/ui.ftl +++ b/Resources/Locale/ru-RU/_CP14/skill/ui.ftl @@ -18,5 +18,4 @@ cp14-skill-desc-unlock-recipes = Открывает возможность со cp14-skill-popup-added-points = Границы вашего сознания расширяются. Новых очков памяти: {$count} -cp14-skill-examine-verb = Изучить навыки персонажа cp14-skill-examine-title = Этот персонаж владеет следующими навыками: \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml new file mode 100644 index 0000000000..a847777e4c --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml @@ -0,0 +1,23 @@ +- type: entity + id: CP14ActionSpellGodLumeraMoonStrike + name: Lunar strike + description: You focus the concentrated light of the stars into a single point, blinding and damaging everything that comes within reach of the angry goddess. + components: + - type: CP14MagicEffectReligionRestricted + - type: CP14MagicEffectManaCost + manaCost: 20 + - type: CP14MagicEffect + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SkyLumeraStrike + - type: WorldTargetAction + repeat: true + checkCanAccess: false + range: 100 + itemIconStyle: BigAction + icon: + sprite: _CP14/Actions/DemigodSpells/lumera.rsi + state: moon_beam + event: !type:CP14WorldTargetActionEvent + cooldown: 0.5 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml index 76c3f24cc6..8ca6e6df6e 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml @@ -4,6 +4,8 @@ description: You renounce your patron by severing your connection with him. After that, you can never become his follower again, but you can become a follower of another patron. components: - type: InstantAction + checkCanInteract: false + checkConsciousness: false icon: sprite: _CP14/Interface/Alerts/divine_offer.rsi state: unoffer diff --git a/Resources/Prototypes/_CP14/Entities/Effects/sky_lightning.yml b/Resources/Prototypes/_CP14/Entities/Effects/sky_lightning.yml index 65b9755a82..4626cbe47c 100644 --- a/Resources/Prototypes/_CP14/Entities/Effects/sky_lightning.yml +++ b/Resources/Prototypes/_CP14/Entities/Effects/sky_lightning.yml @@ -91,3 +91,50 @@ variation: 0.2 volume: -5 +- type: entity + id: CP14SkyLumeraStrike + categories: [ ForkFiltered ] + name: lumera strike + save: false + components: + - type: Sprite + sprite: _CP14/Effects/lumera_strike.rsi + drawdepth: Mobs + noRot: true + offset: 0,3 + layers: + - state: pewpew + shader: unshaded + - type: TimedDespawn + lifetime: 2 + - type: Tag + tags: + - HideContextMenu + - type: PointLight + color: "#7ca5d8" + enabled: true + radius: 10 + energy: 8 + netsync: false + - type: LightFade + duration: 1 + - type: CP14AreaEntityEffect + range: 1 + effects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + - !type:HealthChange + damage: + types: + Heat: 10 + - type: TriggerOnSpawn + - type: FlashOnTrigger + range: 4 + - type: CP14FarSound + closeSound: + collection: CP14MoonStrike + params: + variation: 0.2 + maxDistance: 20 + volume: 20 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Religion/base.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Religion/base.yml index fb2d3fb87f..6bb733612d 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Religion/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Religion/base.yml @@ -23,6 +23,7 @@ - type: CP14ReligionAltar - type: ActiveListener range: 1 + - type: InteractionOutline - type: entity parent: CP14BaseAltar diff --git a/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml b/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml index 0728186d9b..398a6f6d10 100644 --- a/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml +++ b/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml @@ -73,7 +73,7 @@ - !type:NeedPrerequisite prerequisite: LumeraT1 - !type:GodFollowerPercentage - percentage: 0.3 + percentage: 0.25 - type: cp14Skill id: LumeraDarkMist @@ -90,6 +90,21 @@ - !type:NeedPrerequisite prerequisite: LumeraT2 +- type: cp14Skill + id: LumeraMoonStrike + skillUiPosition: 8, 3 + tree: GodLumera + learnCost: 1.0 + icon: + sprite: _CP14/Actions/DemigodSpells/lumera.rsi + state: moon_beam + effects: + - !type:AddAction + action: CP14ActionSpellGodLumeraMoonStrike + restrictions: + - !type:NeedPrerequisite + prerequisite: LumeraT2 + # T3 - type: cp14Skill @@ -105,7 +120,7 @@ - !type:NeedPrerequisite prerequisite: LumeraT2 - !type:GodFollowerPercentage - percentage: 0.6 + percentage: 0.5 - type: cp14Skill id: LumeraMindUpgrade diff --git a/Resources/Prototypes/_CP14/SoundCollections/misc.yml b/Resources/Prototypes/_CP14/SoundCollections/misc.yml index c9c5bf5a90..1069061784 100644 --- a/Resources/Prototypes/_CP14/SoundCollections/misc.yml +++ b/Resources/Prototypes/_CP14/SoundCollections/misc.yml @@ -42,3 +42,11 @@ - /Audio/_CP14/Effects/coin_impact2.ogg - /Audio/_CP14/Effects/coin_impact3.ogg +- type: soundCollection + id: CP14MoonStrike + files: + - /Audio/_CP14/Effects/moon_strike1.ogg + - /Audio/_CP14/Effects/moon_strike2.ogg + - /Audio/_CP14/Effects/moon_strike3.ogg + - /Audio/_CP14/Effects/moon_strike4.ogg + diff --git a/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/meta.json b/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/meta.json index 8b7286b8a7..50232c6789 100644 --- a/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/meta.json @@ -25,6 +25,9 @@ { "name": "mind_scan" }, + { + "name": "moon_beam" + }, { "name": "t1" }, diff --git a/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/moon_beam.png b/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/moon_beam.png new file mode 100644 index 0000000000..7a2bbf3e6c Binary files /dev/null and b/Resources/Textures/_CP14/Actions/DemigodSpells/lumera.rsi/moon_beam.png differ diff --git a/Resources/Textures/_CP14/Effects/lumera_strike.rsi/meta.json b/Resources/Textures/_CP14/Effects/lumera_strike.rsi/meta.json new file mode 100644 index 0000000000..2fe0e6da9e --- /dev/null +++ b/Resources/Textures/_CP14/Effects/lumera_strike.rsi/meta.json @@ -0,0 +1,29 @@ +{ + "version": 1, + "copyright": "Created bby TheShuEd", + "license": "CC-BY-SA-3.0", + "size": { + "x": 38, + "y": 200 + }, + "states": [ + { + "name": "pewpew", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 2 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/lumera_strike.rsi/pewpew.png b/Resources/Textures/_CP14/Effects/lumera_strike.rsi/pewpew.png new file mode 100644 index 0000000000..4c7d53d2bd Binary files /dev/null and b/Resources/Textures/_CP14/Effects/lumera_strike.rsi/pewpew.png differ