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 0000000000..8690e6da04 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/base.png differ 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 0000000000..32af56b5fb Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/essence_splitter.rsi/impact.png differ 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