From 5524e029f440045d3dd5f9a7dfa61836ed0cdcaa Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:48:38 +0300 Subject: [PATCH] Essence splitter (#948) * disable rotting * pipipi * essence storage * energy splitter * Update essence_splitter.yml * Update impact.png * visual fixes * sound fix * Update twoHandedStaffs.yml * unhardcode * Update meta.json * fix --- .../Chemistry/ReagentEffect/CP14ManaChange.cs | 4 +- .../CP14MagicEnergySystem.Scanner.cs | 16 --- .../Inventory/InventorySystem.Relay.cs | 5 +- .../CP14MagicTypePrototype.cs | 9 +- .../CP14MagicEnergyScannerComponent.cs | 11 -- .../SharedCP14MagicEnergySystem.cs | 8 +- .../CP14MagicEssenceContainerComponent.cs | 16 +++ .../CP14MagicEssenceScannerComponent.cs | 11 ++ .../CP14MagicEssenceSplitterComponent.cs | 22 ++++ .../MagicEssence/CP14MagicEssenceSystem.cs | 114 ++++++++++++++++++ .../en-US/_CP14/magicEnergy/magic-types.ftl | 7 +- .../ru-RU/_CP14/magicEnergy/magic-types.ftl | 8 +- .../Prototypes/Entities/Mobs/Species/base.yml | 2 +- .../{Necromancy => Death}/T1_resurrection.yml | 2 +- .../Spells/{Healing => Life}/T0_cure_heat.yml | 2 +- .../{Healing => Life}/T0_cure_poison.yml | 2 +- .../{Healing => Life}/T0_cure_wounds.yml | 2 +- .../{Healing => Life}/T0_heal_ballade.yml | 2 +- .../{Healing => Life}/T0_peace_ballade.yml | 2 +- .../{Healing => Life}/T0_plant_growth.yml | 2 +- .../{Healing => Life}/T0_speed_ballade.yml | 2 +- .../magical_acceleration.yml | 0 .../_CP14/Entities/Clothing/Eyes/eyes.yml | 2 +- .../Objects/Specific/Thaumaturgy/essence.yml | 36 +++++- .../Objects/Weapons/Magic/twoHandedStaffs.yml | 2 +- .../Structures/Flora/Crystal/shards.yml | 24 +++- .../Specific/Alchemy/normalizer.yml | 3 - .../Specific/Thaumaturgy/essence_splitter.yml | 60 +++++++++ .../Prototypes/_CP14/MagicTypes/magic.yml | 21 +++- .../Thaumaturgy/essence_splitter.rsi/base.png | Bin 0 -> 682 bytes .../essence_splitter.rsi/impact.png | Bin 0 -> 2435 bytes .../essence_splitter.rsi/meta.json | 27 +++++ 32 files changed, 350 insertions(+), 74 deletions(-) rename Content.Shared/_CP14/{MagicRitual/Prototypes => MagicEnergy}/CP14MagicTypePrototype.cs (64%) delete mode 100644 Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyScannerComponent.cs create mode 100644 Content.Shared/_CP14/MagicEssence/CP14MagicEssenceContainerComponent.cs create mode 100644 Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs create mode 100644 Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSplitterComponent.cs create mode 100644 Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Necromancy => Death}/T1_resurrection.yml (98%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_cure_heat.yml (98%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_cure_poison.yml (99%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_cure_wounds.yml (98%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_heal_ballade.yml (98%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_peace_ballade.yml (98%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_plant_growth.yml (99%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/T0_speed_ballade.yml (98%) rename Resources/Prototypes/_CP14/Entities/Actions/Spells/{Healing => Life}/magical_acceleration.yml (100%) create mode 100644 Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/essence_splitter.yml create mode 100644 Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/base.png create mode 100644 Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/impact.png create mode 100644 Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/meta.json diff --git a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs index ffb664307f..1e10d7bf9a 100644 --- a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs +++ b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs @@ -34,7 +34,9 @@ public sealed partial class CP14ManaChange : EntityEffect } var magicSystem = args.EntityManager.System(); - magicSystem.ChangeEnergy(args.TargetEntity, ManaDelta * scale, out _, out _, safe: Safe); + magicSystem.ChangeEnergy(args.TargetEntity, ManaDelta * scale, out var changed, out var overload, safe: Safe); + + scale -= FixedPoint2.Abs(changed + overload); if (args.EntityManager.TryGetComponent(args.TargetEntity, out var crystalSlot)) diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs index 1524a6502d..d0ad19ed46 100644 --- a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs @@ -1,23 +1,13 @@ -using Content.Shared._CP14.MagicEnergy; using Content.Shared._CP14.MagicEnergy.Components; using Content.Shared.Examine; -using Content.Shared.Inventory; namespace Content.Server._CP14.MagicEnergy; public partial class CP14MagicEnergySystem { - private void InitializeScanner() { SubscribeLocalEvent(OnExamined); - SubscribeLocalEvent(OnMagicScanAttempt); - SubscribeLocalEvent>((e, c, ev) => OnMagicScanAttempt(e, c, ev.Args)); - } - - private void OnMagicScanAttempt(EntityUid uid, CP14MagicEnergyScannerComponent component, CP14MagicEnergyScanEvent args) - { - args.CanScan = true; } private void OnExamined(Entity ent, ref ExaminedEvent args) @@ -28,12 +18,6 @@ public partial class CP14MagicEnergySystem if (!args.IsInDetailsRange) return; - //var scanEvent = new CP14MagicEnergyScanEvent(); - //RaiseLocalEvent(args.Examiner, scanEvent); -// - //if (!scanEvent.CanScan) - // return; - args.PushMarkup(GetEnergyExaminedText(ent, magicContainer)); } } diff --git a/Content.Shared/Inventory/InventorySystem.Relay.cs b/Content.Shared/Inventory/InventorySystem.Relay.cs index 03f94acfd4..fd14ca86ff 100644 --- a/Content.Shared/Inventory/InventorySystem.Relay.cs +++ b/Content.Shared/Inventory/InventorySystem.Relay.cs @@ -1,4 +1,4 @@ -using Content.Shared._CP14.MagicEnergy; +using Content.Shared._CP14.MagicEssence; using Content.Shared._CP14.MagicSpell.Events; using Content.Shared.Armor; using Content.Shared.Chat; @@ -30,9 +30,8 @@ public partial class InventorySystem public void InitializeRelay() { //CP14 Relayed events - SubscribeLocalEvent(RelayInventoryEvent); + SubscribeLocalEvent(RelayInventoryEvent); SubscribeLocalEvent(RelayInventoryEvent); - //CP14 End SubscribeLocalEvent(RelayInventoryEvent); diff --git a/Content.Shared/_CP14/MagicRitual/Prototypes/CP14MagicTypePrototype.cs b/Content.Shared/_CP14/MagicEnergy/CP14MagicTypePrototype.cs similarity index 64% rename from Content.Shared/_CP14/MagicRitual/Prototypes/CP14MagicTypePrototype.cs rename to Content.Shared/_CP14/MagicEnergy/CP14MagicTypePrototype.cs index 60da4bbf74..ee757904ff 100644 --- a/Content.Shared/_CP14/MagicRitual/Prototypes/CP14MagicTypePrototype.cs +++ b/Content.Shared/_CP14/MagicEnergy/CP14MagicTypePrototype.cs @@ -3,17 +3,20 @@ using Robust.Shared.Prototypes; namespace Content.Shared._CP14.MagicRitual.Prototypes; /// -/// A round-start setup preset, such as which antagonists to spawn. +/// Represents a type of magic /// [Prototype("magicType")] -public sealed partial class CP14MagicTypePrototype : IPrototype +public sealed class CP14MagicTypePrototype : IPrototype { [IdDataField] public string ID { get; private set; } = default!; [DataField(required: true)] - public string Name = string.Empty; + public LocId Name = string.Empty; [DataField(required: true)] public Color Color = Color.White; + + [DataField] + public EntProtoId? EssenceProto; } diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyScannerComponent.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyScannerComponent.cs deleted file mode 100644 index c50b4f62c5..0000000000 --- a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyScannerComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Inventory; - -namespace Content.Shared._CP14.MagicEnergy.Components; - -/// -/// Allows you to see how much magic energy is stored in objects -/// -[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] -public sealed partial class CP14MagicEnergyScannerComponent : Component -{ -} diff --git a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs index 30a570c0eb..1fc134d20b 100644 --- a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs +++ b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs @@ -55,7 +55,7 @@ public partial class SharedCP14MagicEnergySystem : EntitySystem changedEnergy = 0; overloadEnergy = 0; - if (!Resolve(uid, ref component)) + if (!Resolve(uid, ref component, false)) return; if (!safe) @@ -178,9 +178,3 @@ public sealed class CP14MagicEnergyBurnOutEvent : EntityEventArgs { public FixedPoint2 BurnOutEnergy; } - -public sealed class CP14MagicEnergyScanEvent : EntityEventArgs, IInventoryRelayEvent -{ - public bool CanScan; - public SlotFlags TargetSlots { get; } = SlotFlags.EYES; -} diff --git a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceContainerComponent.cs b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceContainerComponent.cs new file mode 100644 index 0000000000..bd2f571f79 --- /dev/null +++ b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceContainerComponent.cs @@ -0,0 +1,16 @@ +using Content.Shared._CP14.MagicRitual.Prototypes; +using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.MagicEssence; + +/// +/// Reflects the amount of essence stored in this item. The item can be destroyed to release the essence from it. +/// +[RegisterComponent, NetworkedComponent] +[Access(typeof(CP14MagicEssenceSystem))] +public sealed partial class CP14MagicEssenceContainerComponent : Component +{ + [DataField] + public Dictionary, int> Essences = new(); +} diff --git a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs new file mode 100644 index 0000000000..701889caee --- /dev/null +++ b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs @@ -0,0 +1,11 @@ +using Content.Shared._CP14.MagicEnergy; + +namespace Content.Shared._CP14.MagicEssence; + +/// +/// Allows you to see how much magic essence is stored in objects +/// +[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] +public sealed partial class CP14MagicEssenceScannerComponent : Component +{ +} diff --git a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSplitterComponent.cs b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSplitterComponent.cs new file mode 100644 index 0000000000..684362301c --- /dev/null +++ b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSplitterComponent.cs @@ -0,0 +1,22 @@ +using Content.Shared.Whitelist; +using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.MagicEssence; + +/// +/// +/// +[RegisterComponent, NetworkedComponent] +[Access(typeof(CP14MagicEssenceSystem))] +public sealed partial class CP14MagicEssenceSplitterComponent : Component +{ + [DataField] + public EntProtoId ImpactEffect = "CP14EssenceSplitterImpactEffect"; + + [DataField] + public float ThrowForce = 10f; + + [DataField] + public EntityWhitelist? Whitelist; +} diff --git a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs new file mode 100644 index 0000000000..ff68bcbb07 --- /dev/null +++ b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs @@ -0,0 +1,114 @@ +using System.Text; +using Content.Shared._CP14.MagicEnergy; +using Content.Shared._CP14.MagicEnergy.Components; +using Content.Shared.Examine; +using Content.Shared.Inventory; +using Content.Shared.Throwing; +using Content.Shared.Whitelist; +using Robust.Shared.Network; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; + +namespace Content.Shared._CP14.MagicEssence; + +public partial class CP14MagicEssenceSystem : EntitySystem +{ + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly EntityLookupSystem _lookup = default!; + [Dependency] private readonly ThrowingSystem _throwing = default!; + [Dependency] private readonly EntityWhitelistSystem _whitelist = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly INetManager _net = default!; + [Dependency] private readonly SharedCP14MagicEnergySystem _magicEnergy = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnExamine); + + SubscribeLocalEvent(OnMagicScanAttempt); + SubscribeLocalEvent>((e, c, ev) => OnMagicScanAttempt(e, c, ev.Args)); + + SubscribeLocalEvent(OnEnergyOverload); + } + + private void OnEnergyOverload(Entity ent, ref CP14MagicEnergyOverloadEvent args) + { + if (!TryComp(ent, out var energyContainer)) + return; + + _magicEnergy.ChangeEnergy(ent, -energyContainer.Energy, out _, out _, energyContainer, safe: true); + + //TODO move to server + if (_net.IsClient) + return; + + var entities = _lookup.GetEntitiesInRange(ent, 0.5f, LookupFlags.Uncontained); + foreach (var entUid in entities) + { + var splitting = !(ent.Comp.Whitelist is not null && !_whitelist.IsValid(ent.Comp.Whitelist, entUid)); + if (splitting) + TrySplitToEssence(entUid); + + //Vector from splitter to item + var dir = (Transform(entUid).Coordinates.Position - Transform(ent).Coordinates.Position).Normalized() * ent.Comp.ThrowForce; + _throwing.TryThrow(entUid, dir, ent.Comp.ThrowForce); + } + SpawnAttachedTo(ent.Comp.ImpactEffect, Transform(ent).Coordinates); + } + + private void OnMagicScanAttempt(EntityUid uid, CP14MagicEssenceScannerComponent component, CP14MagicEssenceScanEvent args) + { + args.CanScan = true; + } + + private bool TrySplitToEssence(EntityUid uid) + { + if (!TryComp(uid, out var essenceContainer)) + return false; + + foreach (var essence in essenceContainer.Essences) + { + if (_proto.TryIndex(essence.Key, out var magicType)) + { + for (var i = 0; i < essence.Value; i++) + { + var spawned = SpawnAtPosition(magicType.EssenceProto, Transform(uid).Coordinates); + _transform.AttachToGridOrMap(spawned); + } + } + } + + QueueDel(uid); + return true; + } + + private void OnExamine(Entity ent, ref ExaminedEvent args) + { + var scanEvent = new CP14MagicEssenceScanEvent(); + RaiseLocalEvent(args.Examiner, scanEvent); + + if (!scanEvent.CanScan) + return; + + var sb = new StringBuilder(); + sb.Append(Loc.GetString("cp14-magic-essence-title") + "\n"); + foreach (var essence in ent.Comp.Essences) + { + if (_proto.TryIndex(essence.Key, out var magicType)) + { + sb.Append($"[color={magicType.Color.ToHex()}]{Loc.GetString(magicType.Name)}[/color]: x{essence.Value}\n"); + } + } + + args.PushMarkup(sb.ToString()); + } +} + +public sealed class CP14MagicEssenceScanEvent : EntityEventArgs, IInventoryRelayEvent +{ + public bool CanScan; + public SlotFlags TargetSlots { get; } = SlotFlags.EYES; +} diff --git a/Resources/Locale/en-US/_CP14/magicEnergy/magic-types.ftl b/Resources/Locale/en-US/_CP14/magicEnergy/magic-types.ftl index b395abf981..451493ce06 100644 --- a/Resources/Locale/en-US/_CP14/magicEnergy/magic-types.ftl +++ b/Resources/Locale/en-US/_CP14/magicEnergy/magic-types.ftl @@ -1,11 +1,12 @@ cp14-magic-type-fire = Fire cp14-magic-type-water = Water cp14-magic-type-earth = Earth -cp14-magic-type-healing = Healing +cp14-magic-type-healing = Life cp14-magic-type-light = Light cp14-magic-type-dimension = Dimension cp14-magic-type-meta = Metamagic -cp14-magic-type-necro = Necromancy +cp14-magic-type-death = Death cp14-magic-manacost = Manacost -cp14-magic-magic-type = Magic type \ No newline at end of file +cp14-magic-magic-type = Magic type +cp14-magic-essence-title = From here, essences can be extracted: \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-types.ftl b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-types.ftl index 8b9d7f47a9..a69f58494b 100644 --- a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-types.ftl +++ b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-types.ftl @@ -1,11 +1,13 @@ cp14-magic-type-fire = Огонь cp14-magic-type-water = Вода cp14-magic-type-earth = Земля -cp14-magic-type-healing = Исцеление +cp14-magic-type-healing = Жизнь cp14-magic-type-light = Свет cp14-magic-type-dimension = Пространство cp14-magic-type-meta = Метамагия -cp14-magic-type-necro = Некромантия +cp14-magic-type-death = Смерть +cp14-magic-type-electric = Молния cp14-magic-manacost = Затраты маны -cp14-magic-magic-type = Тип магии \ No newline at end of file +cp14-magic-magic-type = Тип магии +cp14-magic-essence-title = Отсюда можно извлечь эссенции: \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 81b37958e6..0474c0cdb0 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -264,7 +264,7 @@ shiveringHeatRegulation: 2000 normalBodyTemperature: 310.15 thermalRegulationTemperatureThreshold: 25 - - type: Perishable + #- type: Perishable #CP14 - disable rotting - type: Butcherable butcheringType: Spike # TODO human. spawned: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Necromancy/T1_resurrection.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Death/T1_resurrection.yml similarity index 98% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Necromancy/T1_resurrection.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Death/T1_resurrection.yml index 7fa81ef618..f0081b5028 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Necromancy/T1_resurrection.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Death/T1_resurrection.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 100 - type: CP14MagicEffect - magicType: Necromancy + magicType: Death telegraphyEffects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_heat.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_heat.yml similarity index 98% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_heat.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_heat.yml index 54f5b4e4b3..81f330444f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_heat.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_heat.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 10 - type: CP14MagicEffect - magicType: Healing + magicType: Life telegraphyEffects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_poison.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_poison.yml similarity index 99% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_poison.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_poison.yml index cdc4724242..ae5a4c9821 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_poison.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_poison.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 10 - type: CP14MagicEffect - magicType: Healing + magicType: Life telegraphyEffects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_wounds.yml similarity index 98% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_wounds.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_wounds.yml index 6556256b41..f03fd8c036 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_cure_wounds.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_cure_wounds.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 10 - type: CP14MagicEffect - magicType: Healing + magicType: Life telegraphyEffects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_heal_ballade.yml similarity index 98% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_heal_ballade.yml index ff5c57b4cd..a52f80db2c 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_heal_ballade.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 5 - type: CP14MagicEffect - magicType: Healing + magicType: Life effects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_peace_ballade.yml similarity index 98% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_peace_ballade.yml index 39b2ead4be..1483469f20 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_peace_ballade.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 5 - type: CP14MagicEffect - magicType: Healing + magicType: Life effects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_plant_growth.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_plant_growth.yml similarity index 99% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_plant_growth.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_plant_growth.yml index e5d7354934..db43b443b8 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_plant_growth.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_plant_growth.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 5 - type: CP14MagicEffect - magicType: Healing + magicType: Life telegraphyEffects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_speed_ballade.yml similarity index 98% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_speed_ballade.yml index 94d0cff45f..1082d89ea2 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/T0_speed_ballade.yml @@ -11,7 +11,7 @@ - type: CP14MagicEffectManaCost manaCost: 5 - type: CP14MagicEffect - magicType: Healing + magicType: Life effects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/magical_acceleration.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml similarity index 100% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/magical_acceleration.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Eyes/eyes.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Eyes/eyes.yml index 9e4a4d1016..cf9aaf819d 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Eyes/eyes.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Eyes/eyes.yml @@ -98,5 +98,5 @@ sprite: _CP14/Clothing/Eyes/thaumaturgy_glasses.rsi - type: Clothing sprite: _CP14/Clothing/Eyes/thaumaturgy_glasses.rsi - - type: CP14MagicEnergyScanner + - type: CP14MagicEssenceScanner diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/essence.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/essence.yml index 10ef00effc..62c13eaf14 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/essence.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/essence.yml @@ -35,6 +35,14 @@ restitution: 0.3 # fite me friction: 0.2 +- type: entity + parent: CP14BaseEssence + id: CP14EssenceEarth + name: earth essence + components: + - type: Sprite + color: "#70533f" + - type: entity parent: CP14BaseEssence id: CP14EssenceFire @@ -45,11 +53,11 @@ - type: entity parent: CP14BaseEssence - id: CP14EssenceEarth - name: earth essence + id: CP14EssenceLife + name: life essence components: - type: Sprite - color: "#70533f" + color: "#89e04f" - type: entity parent: CP14BaseEssence @@ -69,8 +77,24 @@ - type: entity parent: CP14BaseEssence - id: CP14EssenceDarkness - name: darkness essence + id: CP14EssenceDimension + name: dimension essence components: - type: Sprite - color: "#391c57" \ No newline at end of file + color: "#391c57" + +- type: entity + parent: CP14BaseEssence + id: CP14EssenceDeath + name: death essence + components: + - type: Sprite + color: "#55877a" + +- type: entity + parent: CP14BaseEssence + id: CP14EssenceElectric + name: electric essence + components: + - type: Sprite + color: "#caed72" \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml index dc479e58fb..452d86133f 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml @@ -66,7 +66,7 @@ - CP14ActionSpellResurrection - type: CP14MagicManacostModify modifiers: - Healing: 1.4 + Life: 1.4 - type: CP14MagicEnergyExaminable - type: CP14MagicEnergyContainer energy: 80 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Crystal/shards.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Crystal/shards.yml index 35ebc18f30..82c05dcf49 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Crystal/shards.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Crystal/shards.yml @@ -35,14 +35,20 @@ components: - type: Sprite color: "#5eabeb" + - type: CP14MagicEssenceContainer + essences: + Water: 3 - type: entity parent: CP14CrystalShardBase id: CP14CrystalShardHealing - suffix: Healing + suffix: Life components: - type: Sprite color: "#3de063" + - type: CP14MagicEssenceContainer + essences: + Life: 3 - type: entity parent: CP14CrystalShardBase @@ -51,6 +57,9 @@ components: - type: Sprite color: "#ed731c" + - type: CP14MagicEssenceContainer + essences: + Fire: 3 - type: entity parent: CP14CrystalShardBase @@ -59,6 +68,9 @@ components: - type: Sprite color: "#f1c7ff" + - type: CP14MagicEssenceContainer + essences: + Light: 3 - type: entity parent: CP14CrystalShardBase @@ -67,11 +79,17 @@ components: - type: Sprite color: "#e6ff6b" + - type: CP14MagicEssenceContainer + essences: + Electric: 3 - type: entity parent: CP14CrystalShardBase id: CP14CrystalShardDarkness - suffix: Darkness + suffix: Dimension components: - type: Sprite - color: "#391c57" \ No newline at end of file + color: "#391c57" + - type: CP14MagicEssenceContainer + essences: + Dimension: 3 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml index 3e0f213412..7941e9afc3 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml @@ -6,10 +6,7 @@ name: solution normalizer description: An alchemical device that removes fine precipitates from solutions, and stabilizes it for further work categories: [ ForkFiltered ] - placement: - mode: PlaceFree components: - # TODO: energy consuming (magic or fireplace) - type: InteractionOutline - type: Sprite drawdepth: Items diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/essence_splitter.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/essence_splitter.yml new file mode 100644 index 0000000000..ddee07ade6 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/essence_splitter.yml @@ -0,0 +1,60 @@ +- type: entity + id: CP14EssenceSplitter + parent: + - BaseStructureDynamic + name: essence splitter + description: A device capable of splitting objects into magical essence when overloaded with energy. + categories: [ ForkFiltered ] + components: + - type: InteractionOutline + - type: Sprite + drawdepth: Items + noRot: true + offset: 0, 0.2 + sprite: _CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi + layers: + - state: base + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 125 + mask: + - TabletopMachineMask + - type: CP14MagicEnergyExaminable + - type: CP14MagicEnergyContainer + maxEnergy: 50 + energy: 0 + unsafeSupport: true + - type: CP14MagicEssenceSplitter + whitelist: + components: + - Item + +- type: entity + id: CP14EssenceSplitterImpactEffect + name: essence splitter impact + categories: [ HideSpawnMenu ] + components: + - type: Sprite + drawdepth: Effects + noRot: true + offset: 0, 0.2 + sprite: _CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi + layers: + - state: impact + shader: unshaded + - type: PointLight + radius: 1.5 + - type: TimedDespawn + lifetime: 3.95 + - type: EffectVisuals + - type: Tag + tags: + - HideContextMenu + - type: AnimationPlayer + - type: EmitSoundOnSpawn + sound: + path: /Audio/Magic/ethereal_enter.ogg \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/MagicTypes/magic.yml b/Resources/Prototypes/_CP14/MagicTypes/magic.yml index c9bb5f3f85..cc48954430 100644 --- a/Resources/Prototypes/_CP14/MagicTypes/magic.yml +++ b/Resources/Prototypes/_CP14/MagicTypes/magic.yml @@ -2,26 +2,31 @@ id: Earth name: cp14-magic-type-earth color: "#70533f" + essenceProto: CP14EssenceEarth - type: magicType id: Fire name: cp14-magic-type-fire color: "#d9741c" + essenceProto: CP14EssenceFire - type: magicType - id: Healing + id: Life name: cp14-magic-type-healing color: "#89e04f" + essenceProto: CP14EssenceLife - type: magicType id: Light name: cp14-magic-type-light color: "#ba97b8" + essenceProto: CP14EssenceLight - type: magicType id: Dimension name: cp14-magic-type-dimension color: "#4e0691" + essenceProto: CP14EssenceDimension - type: magicType id: Meta @@ -32,8 +37,16 @@ id: Water name: cp14-magic-type-water color: "#1c94d9" + essenceProto: CP14EssenceWater - type: magicType - id: Necromancy - name: cp14-magic-type-necro - color: "#55877a" \ No newline at end of file + id: Death + name: cp14-magic-type-death + color: "#55877a" + essenceProto: CP14EssenceDeath + +- type: magicType + id: Electric + name: cp14-magic-type-electric + color: "#caed72" + essenceProto: CP14EssenceElectric \ No newline at end of file diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/base.png b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..8690e6da04f5d5402f2364ff2015173151ef5bd1 GIT binary patch literal 682 zcmV;b0#*HqP)Px%WJyFpR9J=WmA_9DVHn3hJ?T~q)Pt(}hS_Y`8R`gJ~GbLI*15%mHm$7@)D&?bLH9ccG#7PD`BL&-C2g^E~hO zeSYLXAP@)y0)ap<0CVMxF;~tQgXEB|O3c49G)VB5{MY|0z$|xuX3+&uRo#8RJK?Wd zFkJg?*+;p!A*mXYs&SNy8@+t4RKVDqW#i%jsicfNwTnEpODZXM9d7zwser2Lrc^m$ zJsfobq^9Rl8ahftCpA3}z$ z*H9Wdhp`1H6m4@mTbHM=jj?f^>WjDwIven)@`KsQTL6?QCln`#xD#G>L1zf7svF+F zvd!>gn&T4h5&u6td8|6LMMtRTjJFC@=Rw8h2cV=Qcy=Ir*UVzfjSv|k4xrV)V zJe8CQKlE5Ja{1V*P(N&kFp}BoDxuQQQBRwf{M6GXN<;4(D-Z|-0zof+1Ey*IU^tTm QJpcdz07*qoM6N<$g4$j{1ONa4 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/impact.png b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/impact.png new file mode 100644 index 0000000000000000000000000000000000000000..32af56b5fb2238eac1e2677c83e15b1dd206d40f GIT binary patch literal 2435 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 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/meta.json b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/meta.json new file mode 100644 index 0000000000..6b78860a2e --- /dev/null +++ b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/meta.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "license": "All right reserved", + "copyright": "Created by TheShuEd for CrystallEdge", + "size": { + "x": 32, + "y": 48 + }, + "states": [ + { + "name": "base" + }, + { + "name": "impact", + "delays": [ + [ + 0.1, + 0.2, + 0.2, + 0.2, + 0.2, + 3.3 + ] + ] + } + ] +} \ No newline at end of file