diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs new file mode 100644 index 0000000000..c4383465a3 --- /dev/null +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs @@ -0,0 +1,94 @@ +using System.Numerics; +using Content.Server._CP14.MagicEnergy.Components; +using Content.Shared._CP14.MagicEnergy.Components; + +namespace Content.Server._CP14.MagicEnergy; + +public partial class CP14MagicEnergySystem +{ + private void InitializeDraw() + { + SubscribeLocalEvent(OnDrawMapInit); + SubscribeLocalEvent(OnRandomRangeMapInit); + + } + + private void OnRandomRangeMapInit(Entity random, ref MapInitEvent args) + { + if (!TryComp(random, out var draw)) + return; + + draw.Energy = _random.NextFloat(random.Comp.MinDraw, random.Comp.MaxDraw); + draw.Range = _random.NextFloat(random.Comp.MinRange, random.Comp.MaxRange); + } + + private void OnDrawMapInit(Entity ent, ref MapInitEvent args) + { + ent.Comp.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(ent.Comp.Delay); + } + + private void UpdateDraw(float frameTime) + { + UpdateEnergyContainer(); + UpdateEnergyCrystalSlot(); + UpdateEnergyRadiusDraw(); + } + + private void UpdateEnergyContainer() + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var draw, out var magicContainer)) + { + if (draw.NextUpdateTime >= _gameTiming.CurTime) + continue; + + draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); + + ChangeEnergy(uid, magicContainer, draw.Energy, safe: draw.Safe); + } + } + + private void UpdateEnergyCrystalSlot() + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var draw, out var slot)) + { + if (!draw.Enable) + continue; + + if (draw.NextUpdateTime >= _gameTiming.CurTime) + continue; + + draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); + + if (!_magicSlot.TryGetEnergyCrystalFromSlot(uid, out var energyEnt, out var energyComp)) + continue; + + ChangeEnergy(energyEnt.Value, energyComp, draw.Energy, draw.Safe); + } + } + + private void UpdateEnergyRadiusDraw() + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var draw)) + { + if (!draw.Enable) + continue; + + if (draw.NextUpdateTime >= _gameTiming.CurTime) + continue; + + draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); + + var containers = _lookup.GetEntitiesInRange(Transform(uid).Coordinates, draw.Range); + foreach (var container in containers) + { + var distance = Vector2.Distance(_transform.GetWorldPosition(uid), _transform.GetWorldPosition(container)); + var energyDraw = draw.Energy * (1 - distance / draw.Range); + + ChangeEnergy(container, container.Comp, energyDraw, true); + } + } + } +} diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs new file mode 100644 index 0000000000..389845d73b --- /dev/null +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs @@ -0,0 +1,60 @@ +using System.Numerics; +using Content.Server._CP14.MagicEnergy.Components; +using Content.Shared._CP14.MagicEnergy; +using Content.Shared._CP14.MagicEnergy.Components; +using Content.Shared.Examine; +using Content.Shared.FixedPoint; +using Content.Shared.Interaction.Events; +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)); + + SubscribeLocalEvent(OnAuraScannerUseInHand); + } + + private void OnMagicScanAttempt(EntityUid uid, CP14MagicEnergyScannerComponent component, CP14MagicEnergyScanEvent args) + { + args.CanScan = true; + } + + private void OnExamined(Entity ent, ref ExaminedEvent args) + { + if (!TryComp(ent, out var magicContainer)) + return; + + var scanEvent = new CP14MagicEnergyScanEvent(); + RaiseLocalEvent(args.Examiner, scanEvent); + + if (!scanEvent.CanScan) + return; + + args.PushMarkup(GetEnergyExaminedText(ent, magicContainer)); + } + + private void OnAuraScannerUseInHand(Entity scanner, ref UseInHandEvent args) + { + FixedPoint2 sumDraw = 0f; + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var auraUid, out var node, out var xform)) + { + if (xform.MapUid != Transform(scanner).MapUid) + continue; + + var distance = Vector2.Distance(_transform.GetWorldPosition(auraUid), _transform.GetWorldPosition(scanner)); + if (distance > node.Range) + continue; + + sumDraw += node.Energy * (1 - distance / node.Range); + } + _popup.PopupCoordinates(Loc.GetString("cp14-magic-scanner", ("power", sumDraw)), Transform(scanner).Coordinates, args.User); + } +} diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs index df2aeb72fb..1b14aafd90 100644 --- a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs @@ -1,93 +1,29 @@ -using Content.Server._CP14.MagicEnergy.Components; +using Content.Server.Popups; using Content.Shared._CP14.MagicEnergy; -using Content.Shared._CP14.MagicEnergy.Components; -using Content.Shared.Examine; -using Content.Shared.Inventory; -using Robust.Server.GameObjects; +using Robust.Shared.Random; using Robust.Shared.Timing; namespace Content.Server._CP14.MagicEnergy; public sealed partial class CP14MagicEnergySystem : SharedCP14MagicEnergySystem { + [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly PointLightSystem _light = default!; [Dependency] private readonly CP14MagicEnergyCrystalSlotSystem _magicSlot = default!; + [Dependency] private readonly EntityLookupSystem _lookup = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly PopupSystem _popup = default!; public override void Initialize() { - SubscribeLocalEvent(OnMapInit); - - SubscribeLocalEvent(OnEnergyChange); - - SubscribeLocalEvent(OnExamined); - SubscribeLocalEvent(OnMagicScanAttempt); - SubscribeLocalEvent>((e, c, ev) => OnMagicScanAttempt(e, c, ev.Args)); - } - - private void OnEnergyChange(Entity ent, ref CP14MagicEnergyLevelChangeEvent args) - { - if (!TryComp(ent, out var light)) - return; - - var lightEnergy = MathHelper.Lerp(ent.Comp.MinEnergy, ent.Comp.MaxEnergy, (float)(args.NewValue / args.MaxValue)); - _light.SetEnergy(ent, lightEnergy, light); - } - - private void OnMapInit(Entity ent, ref MapInitEvent args) - { - ent.Comp.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(ent.Comp.Delay); - } - - private void OnMagicScanAttempt(EntityUid uid, CP14MagicEnergyScannerComponent component, CP14MagicEnergyScanEvent args) - { - args.CanScan = true; - } - - private void OnExamined(Entity ent, ref ExaminedEvent args) - { - if (!TryComp(ent, out var magicContainer)) - return; - - var scanEvent = new CP14MagicEnergyScanEvent(); - RaiseLocalEvent(args.Examiner, scanEvent); - - if (!scanEvent.CanScan) - return; - - args.PushMarkup(GetEnergyExaminedText(ent, magicContainer)); + InitializeDraw(); + InitializeScanner(); } public override void Update(float frameTime) { base.Update(frameTime); - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var draw, out var magicContainer)) - { - if (draw.NextUpdateTime >= _gameTiming.CurTime) - continue; - - draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); - - ChangeEnergy(uid, magicContainer, draw.Energy, safe: draw.Safe); - } - - var query2 = EntityQueryEnumerator(); - while (query2.MoveNext(out var uid, out var draw, out var slot)) - { - if (!draw.Enable) - continue; - - if (draw.NextUpdateTime >= _gameTiming.CurTime) - continue; - - draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); - - if (!_magicSlot.TryGetEnergyCrystalFromSlot(uid, out var energyEnt, out var energyComp)) - continue; - - ChangeEnergy(energyEnt.Value, energyComp, draw.Energy, draw.Safe); - } + UpdateDraw(frameTime); } } diff --git a/Content.Server/_CP14/MagicEnergy/Components/CP14AuraNodeComponent.cs b/Content.Server/_CP14/MagicEnergy/Components/CP14AuraNodeComponent.cs new file mode 100644 index 0000000000..bce76f7c8c --- /dev/null +++ b/Content.Server/_CP14/MagicEnergy/Components/CP14AuraNodeComponent.cs @@ -0,0 +1,50 @@ +using Content.Shared.FixedPoint; + +namespace Content.Server._CP14.MagicEnergy.Components; + +[RegisterComponent, Access(typeof(CP14MagicEnergySystem))] +public sealed partial class CP14AuraNodeComponent : Component +{ + [DataField] + public bool Enable = true; + + [DataField] + public FixedPoint2 Energy = 1f; + + [DataField] + public float Range = 10f; + + /// + /// If not safe, restoring or drawing power across boundaries call dangerous events, that may destroy crystals + /// + [DataField] + public bool Safe = true; + + /// + /// how often objects will try to change magic energy. In Seconds + /// + [DataField] + public float Delay = 5f; + + /// + /// the time of the next magic energy change + /// + [DataField] + public TimeSpan NextUpdateTime { get; set; } = TimeSpan.Zero; +} + +[RegisterComponent, Access(typeof(CP14MagicEnergySystem))] +public sealed partial class CP14RandomAuraNodeComponent : Component +{ + [DataField] + public float MinDraw = -2f; + + [DataField] + public float MaxDraw = 2f; + + [DataField] + public float MinRange = 5f; + + [DataField] + public float MaxRange = 10f; +} diff --git a/Content.Server/_CP14/MagicEnergy/Components/CP14AuraScannerComponent.cs b/Content.Server/_CP14/MagicEnergy/Components/CP14AuraScannerComponent.cs new file mode 100644 index 0000000000..742a8b953d --- /dev/null +++ b/Content.Server/_CP14/MagicEnergy/Components/CP14AuraScannerComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server._CP14.MagicEnergy.Components; + +[RegisterComponent, Access(typeof(CP14MagicEnergySystem))] +public sealed partial class CP14AuraScannerComponent : Component +{ +} diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPointLightController.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPointLightController.cs deleted file mode 100644 index 85bf64e9e2..0000000000 --- a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPointLightController.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Content.Shared.Inventory; - -namespace Content.Shared._CP14.MagicEnergy.Components; - -/// -/// Controls the strength of the PointLight component, depending on the amount of mana in the object -/// -[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] -public sealed partial class CP14MagicEnergyPointLightControllerComponent : Component -{ - [DataField] - public float MaxEnergy = 1f; - - [DataField] - public float MinEnergy = 0f; -} diff --git a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs index 08a75a2e06..964159c013 100644 --- a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs +++ b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs @@ -31,7 +31,7 @@ public partial class SharedCP14MagicEnergySystem : EntitySystem public string GetEnergyExaminedText(EntityUid uid, CP14MagicEnergyContainerComponent ent) { - var power = (int)((ent.Energy / ent.MaxEnergy) * 100); + var power = (int)(ent.Energy / ent.MaxEnergy * 100); var color = "#3fc488"; if (power < 66) diff --git a/Resources/Audio/_CP14/Effects/attributions.yml b/Resources/Audio/_CP14/Effects/attributions.yml index 7222c7e955..40444ae3f7 100644 --- a/Resources/Audio/_CP14/Effects/attributions.yml +++ b/Resources/Audio/_CP14/Effects/attributions.yml @@ -16,4 +16,9 @@ - files: ["thud.ogg"] license: "CC0-1.0" copyright: 'BMacZero of Freesound.org' - source: "https://freesound.org/people/BMacZero/sounds/96138/" \ No newline at end of file + source: "https://freesound.org/people/BMacZero/sounds/96138/" + +- files: ["aura_scanner.ogg"] + license: "CC0-1.0" + copyright: 'Breviceps of Freesound.org' + source: "https://freesound.org/people/Breviceps/sounds/493162/" \ No newline at end of file diff --git a/Resources/Audio/_CP14/Effects/aura_scanner.ogg b/Resources/Audio/_CP14/Effects/aura_scanner.ogg new file mode 100644 index 0000000000..abcdfbe7a3 Binary files /dev/null and b/Resources/Audio/_CP14/Effects/aura_scanner.ogg differ diff --git a/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl b/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl index d00edb6038..bef1cb2c38 100644 --- a/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl +++ b/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl @@ -5,3 +5,5 @@ cp14-magic-energy-crystal-slot-name = Energy crystal cp14-magic-energy-no-crystal = No energy crystal! cp14-magic-energy-insufficient = Not enough energy! cp14-magic-energy-insufficient-unsafe = Crystal cracks from lack of energy! + +cp14-magic-scanner = Polarity of ley lines: {$power} diff --git a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl index b9fb9344e8..0ec10efb30 100644 --- a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl +++ b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl @@ -5,3 +5,5 @@ cp14-magic-energy-crystal-slot-name = Энергокристалл cp14-magic-energy-no-crystal = Отсутствует энергокристалл! cp14-magic-energy-insufficient = Не достаточно энергии! cp14-magic-energy-insufficient-unsafe = Кристалл трескается от нехватки энергии! + +cp14-magic-scanner = Полярность лей-линий: {$power} diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml index 89db3240be..722187011a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml @@ -4,7 +4,7 @@ categories: [ HideSpawnMenu ] components: - type: TimedDespawn - lifetime: 2.0 + lifetime: 7.0 - type: Sprite drawdepth: Effects layers: diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/basic_cloak.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/basic_cloak.yml index 42c292cf81..6e613b0c00 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/basic_cloak.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/basic_cloak.yml @@ -42,6 +42,19 @@ - type: Clothing sprite: _CP14/Clothing/Cloak/blacksmith_apron.rsi +- type: entity + parent: + - CP14ClothingCloakBase + - ClothingSlotBase + id: CP14ClothingCloakMaidArpon + name: maid's apron + description: Cleanliness, orderliness and obedience are the main traits of a good maid. + components: + - type: Sprite + sprite: _CP14/Clothing/Cloak/maid_apron.rsi + - type: Clothing + sprite: _CP14/Clothing/Cloak/maid_apron.rsi + - type: entity parent: CP14ClothingCloakBase id: CP14ClothingCloakFurcapeBlack diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Pants/pants.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Pants/pants.yml index 9b17f39f5f..5777d8ad0d 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Pants/pants.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Pants/pants.yml @@ -53,4 +53,15 @@ - type: Sprite sprite: _CP14/Clothing/Pants/loincloth.rsi - type: Clothing - sprite: _CP14/Clothing/Pants/loincloth.rsi \ No newline at end of file + sprite: _CP14/Clothing/Pants/loincloth.rsi + +- type: entity + parent: CP14ClothingPantsBase + id: CP14ClothingDressBlack + name: black dress + description: A roomy, feminine skirt + components: + - type: Sprite + sprite: _CP14/Clothing/Pants/Dress/black.rsi + - type: Clothing + sprite: _CP14/Clothing/Pants/Dress/black.rsi \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/shirt.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/shirt.yml index 1e89cc6ae7..e2221fdae6 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/shirt.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/shirt.yml @@ -86,4 +86,4 @@ - type: Sprite sprite: _CP14/Clothing/Shirt/steampunk.rsi - type: Clothing - sprite: _CP14/Clothing/Shirt/steampunk.rsi \ No newline at end of file + sprite: _CP14/Clothing/Shirt/steampunk.rsi diff --git a/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml b/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml index 9a8ee691d7..2cda9c5fa7 100644 --- a/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml +++ b/Resources/Prototypes/_CP14/Entities/Effects/visual_effect.yml @@ -20,4 +20,30 @@ available: - random: dirt1: "" - dirt2: "" \ No newline at end of file + dirt2: "" + +- type: entity + id: CP14MagicBeam1 + noSpawn: true + components: + - type: Sprite + sprite: /Textures/_CP14/Effects/Beams/magic.rsi + drawdepth: Effects + layers: + - state: magic1 + shader: unshaded + - type: Physics + canCollide: false + - type: PointLight + enabled: true + color: "#4080FF" + radius: 3.5 + softness: 1 + autoRot: true + castShadows: false + - type: Beam + - type: TimedDespawn + lifetime: 3 + - type: Tag + tags: + - HideContextMenu \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Markers/energyNodes.yml b/Resources/Prototypes/_CP14/Entities/Markers/energyNodes.yml new file mode 100644 index 0000000000..b8955a6a95 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Markers/energyNodes.yml @@ -0,0 +1,13 @@ +- type: entity + id: CP14AuraNodeBase + parent: MarkerBase + name: aura node + description: An energy node that affects the elemental energy in the surrounding space. + components: + - type: Sprite + layers: + - state: green + - sprite: Mobs/Animals/mouse.rsi + state: icon-2 #TODO lol + - type: CP14AuraNode + - type: CP14RandomAuraNode \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/crystal.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/crystal.yml index 2924a66380..334e000b39 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/crystal.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/crystal.yml @@ -2,7 +2,7 @@ id: CP14EnergyCrystalBase parent: BaseItem abstract: true - description: Processed quartz crystals are excellent repositories of magical energy. And special connectors allow you to conveniently insert them into magical devices, turning them into energy batteries. + description: Shards of one of the Khyber dragon, used to bind and control elemental energy. components: - type: CP14MagicEnergyCrystal - type: Item @@ -11,13 +11,11 @@ sprite: _CP14/Objects/Specific/Thaumaturgy/crystal.rsi - type: CP14MagicEnergyContainer - type: CP14MagicEnergyExaminable - - type: CP14MagicEnergyPointLightController - - type: entity id: CP14EnergyCrystalSmall parent: CP14EnergyCrystalBase - name: small energy crystal + name: small Khyber shard suffix: Full components: - type: Sprite @@ -48,7 +46,7 @@ - type: entity id: CP14EnergyCrystalMedium parent: CP14EnergyCrystalBase - name: energy crystal + name: Khyber shard suffix: Full components: - type: PointLight diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml new file mode 100644 index 0000000000..e505dca6a2 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml @@ -0,0 +1,19 @@ +- type: entity + id: CP14AuraScanner + parent: BaseItem + name: aura scanner + description: Scans the polarity of the elemental energy flows in this place. + components: + - type: Sprite + sprite: _CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi + state: icon + - type: Item + sprite: _CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi + - type: CP14AuraScanner + - type: EmitSoundOnUse + sound: + path: /Audio/_CP14/Effects/aura_scanner.ogg + params: + variation: 0.03 + - type: UseDelay + delay: 4 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Projectile/hitscan.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Projectile/hitscan.yml new file mode 100644 index 0000000000..2cd08d8ab1 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Projectile/hitscan.yml @@ -0,0 +1,14 @@ +- type: hitscan + id: CP14Magic + damage: + types: + Heat: 0 + muzzleFlash: + sprite: _CP14/Effects/Beams/magic.rsi + state: muzzle_magic + travelFlash: + sprite: _CP14/Effects/Beams/magic.rsi + state: magic + impactFlash: + sprite: _CP14/Effects/Beams/magic.rsi + state: impact_magic \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/grasshighbush.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/grasshighbush.yml index a87f79b41c..6af340e513 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/grasshighbush.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/grasshighbush.yml @@ -31,7 +31,7 @@ hard: false shape: !type:PhysShapeAabb - bounds: "-0.35,-0.4,0.35,0.4" + bounds: "-0.35,-0.35,0.35,0.35" density: 1000 layer: - WallLayer @@ -69,10 +69,6 @@ # CP14WoodLog: # min: 1 # max: 3 - - type: Material - - type: PhysicalComposition # точно ли это нужно? - materialComposition: - CP14WoodenPlanks: 100 - type: SpeedModifierContacts walkSpeedModifier: 0.5 sprintSpeedModifier: 0.5 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml index 6f7f5f6b6f..024bd32b65 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/normalizer.yml @@ -1,6 +1,8 @@ - type: entity id: CP14AlchemyNormalizer - parent: BaseStructureDynamic + parent: + - BaseStructureDynamic + - CP14BaseCrystalSlot name: solution normalizer description: An alchemical device that removes fine precipitates from solutions, and stabilizes it for further work placement: @@ -79,25 +81,4 @@ fillBaseName: liq- - type: CP14MagicEnergyDraw energy: -0.2 - delay: 1 - - type: CP14MagicEnergyCrystalSlot - slotId: crystal_slot - - type: ContainerContainer - containers: - crystal_slot: !type:ContainerSlot - - type: ItemSlots - slots: - crystal_slot: - insertSound: - path: /Audio/_CP14/Items/crystal_insert.ogg - params: - variation: 0.05 - ejectSound: - path: /Audio/_CP14/Items/crystal_eject.ogg - params: - variation: 0.05 - ejectOnInteract: true - name: cp14-magic-energy-crystal-slot-name - whitelist: - components: - - CP14MagicEnergyCrystal \ No newline at end of file + delay: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/elemental_reactor.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/elemental_reactor.yml new file mode 100644 index 0000000000..16bc9892e8 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/elemental_reactor.yml @@ -0,0 +1,27 @@ +- type: entity + id: CP14ElementalReactor + name: elemental reactor + description: A work of art created by the dwarves of Zilagro and House Lyrandar, controlling the fire elemental and allowing it to produce vast amounts of energy. + parent: + - BaseStructure + components: + - type: Sprite + sprite: _CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi #TODO resprite + state: base + drawdepth: Mobs + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.55,-0.85,0.55,0.85" + density: 1000 + layer: + - WallLayer + - type: Physics + bodyType: Static + - type: CP14MagicEnergyContainer + - type: CP14MagicEnergyExaminable + - type: CP14MagicEnergyDraw + energy: 5 + delay: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/pilon.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/pilon.yml new file mode 100644 index 0000000000..29139a2c14 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Thaumaturgy/pilon.yml @@ -0,0 +1,25 @@ +- type: entity + id: CP14BaseCrystalSlot #TODO переструктуризовать объекты + abstract: true + components: + - type: CP14MagicEnergyCrystalSlot + slotId: crystal_slot + - type: ContainerContainer + containers: + crystal_slot: !type:ContainerSlot + - type: ItemSlots + slots: + crystal_slot: + insertSound: + path: /Audio/_CP14/Items/crystal_insert.ogg + params: + variation: 0.05 + ejectSound: + path: /Audio/_CP14/Items/crystal_eject.ogg + params: + variation: 0.05 + ejectOnInteract: true + name: cp14-magic-energy-crystal-slot-name + whitelist: + components: + - CP14MagicEnergyCrystal \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Loadouts/Jobs/basic.yml b/Resources/Prototypes/_CP14/Loadouts/Jobs/basic.yml index bc40ef5725..c9b366b599 100644 --- a/Resources/Prototypes/_CP14/Loadouts/Jobs/basic.yml +++ b/Resources/Prototypes/_CP14/Loadouts/Jobs/basic.yml @@ -7,6 +7,15 @@ id: CP14ClothingCloakBlacksmithArpon equipment: cloak: CP14ClothingCloakBlacksmithArpon + +- type: loadout + id: CP14ClothingCloakMaidArpon + equipment: CP14ClothingCloakMaidArpon + +- type: startingGear + id: CP14ClothingCloakMaidArpon + equipment: + cloak: CP14ClothingCloakMaidArpon - type: loadout @@ -90,6 +99,7 @@ equipment: head: CP14ClothingHeadMetalHeadband + - type: loadout id: CP14ClothingHeadTriangularHat equipment: CP14ClothingHeadTriangularHat @@ -99,6 +109,7 @@ equipment: head: CP14ClothingHeadTriangularHat + - type: loadout id: CP14ClothingHeadTriangularHatGolden equipment: CP14ClothingHeadTriangularHatGolden @@ -108,6 +119,7 @@ equipment: head: CP14ClothingHeadTriangularHatGolden + - type: loadout id: CP14ClothingHeadRedBeret equipment: CP14ClothingHeadRedBeret @@ -117,6 +129,7 @@ equipment: head: CP14ClothingHeadRedBeret + - type: loadout id: CP14ClothingHeadPurpleBeret equipment: CP14ClothingHeadPurpleBeret @@ -126,6 +139,7 @@ equipment: head: CP14ClothingHeadPurpleBeret + - type: loadout id: CP14ClothingHeadYellowBeret equipment: CP14ClothingHeadYellowBeret @@ -204,6 +218,16 @@ id: CP14ClothingPantsLoincloth equipment: pants: CP14ClothingPantsLoincloth + + +- type: loadout + id: CP14ClothingDressBlack + equipment: CP14ClothingDressBlack + +- type: startingGear + id: CP14ClothingDressBlack + equipment: + pants: CP14ClothingDressBlack # Shirt @@ -216,7 +240,6 @@ equipment: shirt: CP14ClothingShirtCottonBlue - - type: loadout id: CP14ClothingShirtCottonBlack equipment: CP14ClothingShirtCottonBlack @@ -226,7 +249,6 @@ equipment: shirt: CP14ClothingShirtCottonBlack - - type: loadout id: CP14ClothingShirtCottonPurple equipment: CP14ClothingShirtCottonPurple diff --git a/Resources/Prototypes/_CP14/Loadouts/loadout_groups.yml b/Resources/Prototypes/_CP14/Loadouts/loadout_groups.yml index db70d8b56c..0f5ea7c755 100644 --- a/Resources/Prototypes/_CP14/Loadouts/loadout_groups.yml +++ b/Resources/Prototypes/_CP14/Loadouts/loadout_groups.yml @@ -10,6 +10,7 @@ - CP14ClothingCloakBlacksmithArpon - CP14ClothingCloakFurcapeBlack - CP14ClothingCloakFurcapeBlue + - CP14ClothingCloakMaidArpon - type: loadoutGroup id: CP14BasicEyes @@ -25,6 +26,7 @@ minLimit: 0 loadouts: - CP14Girdles + - type: loadoutGroup id: CP14BasicMask name: cp14-loadout-basic-mask @@ -54,6 +56,7 @@ - CP14ClothingPantsTrouserDarkBlue - CP14ClothingPantsAristocratic - CP14ClothingPantsLoincloth + - CP14ClothingDressBlack - type: loadoutGroup id: CP14BasicShirt @@ -86,4 +89,4 @@ id: CP14CaptainCloak name: cp14-loadout-captain-cloak loadouts: - - CP14ClothingCloakCaptainJacket \ No newline at end of file + - CP14ClothingCloakCaptainJacket diff --git a/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/equipped-CLOAK.png b/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/equipped-CLOAK.png new file mode 100644 index 0000000000..2e7e5f09ac Binary files /dev/null and b/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/equipped-CLOAK.png differ diff --git a/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/icon.png b/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/icon.png new file mode 100644 index 0000000000..debf4bf168 Binary files /dev/null and b/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/icon.png differ diff --git a/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/meta.json b/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/meta.json new file mode 100644 index 0000000000..e19dbe65a9 --- /dev/null +++ b/Resources/Textures/_CP14/Clothing/Cloak/maid_apron.rsi/meta.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "CrystallPunk14, by TheShuEd", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-CLOAK", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/equipped-PANTS.png b/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/equipped-PANTS.png new file mode 100644 index 0000000000..990b04ed57 Binary files /dev/null and b/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/equipped-PANTS.png differ diff --git a/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/icon.png b/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/icon.png new file mode 100644 index 0000000000..1950887919 Binary files /dev/null and b/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/icon.png differ diff --git a/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/meta.json b/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/meta.json new file mode 100644 index 0000000000..270bdd7dcd --- /dev/null +++ b/Resources/Textures/_CP14/Clothing/Pants/Dress/black.rsi/meta.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "CrystallPunk14, by TheShuEd", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-PANTS", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/equipped-SHIRT.png b/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/equipped-SHIRT.png index 347073e063..fab67dfd54 100644 Binary files a/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/equipped-SHIRT.png and b/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/equipped-SHIRT.png differ diff --git a/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/icon.png b/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/icon.png index 178c1d0a17..2f70773c1d 100644 Binary files a/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/icon.png and b/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/icon.png differ diff --git a/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/meta.json b/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/meta.json index 24e83f9ea6..8163f4aba3 100644 --- a/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/meta.json +++ b/Resources/Textures/_CP14/Clothing/Shirt/Cotton/black.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "All rights reserved for the CrystallPunk14 project only", - "copyright": "CrystallPunk14, by Jaraten and TheShuEd", + "copyright": "CrystallPunk14, by TheShuEd", "size": { "x": 32, "y": 32 diff --git a/Resources/Textures/_CP14/Effects/Beams/magic.rsi/impact_magic.png b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/impact_magic.png new file mode 100644 index 0000000000..bb2219adcf Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/impact_magic.png differ diff --git a/Resources/Textures/_CP14/Effects/Beams/magic.rsi/magic.png b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/magic.png new file mode 100644 index 0000000000..00a71aa27b Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/magic.png differ diff --git a/Resources/Textures/_CP14/Effects/Beams/magic.rsi/magic1.png b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/magic1.png new file mode 100644 index 0000000000..34602e2f77 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/magic1.png differ diff --git a/Resources/Textures/_CP14/Effects/Beams/magic.rsi/meta.json b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/meta.json new file mode 100644 index 0000000000..a6f780b47c --- /dev/null +++ b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/meta.json @@ -0,0 +1,70 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "Created by TheShuEd (Github) for CrystallPunk 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "magic1", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "magic", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "impact_magic", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "muzzle_magic", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/Beams/magic.rsi/muzzle_magic.png b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/muzzle_magic.png new file mode 100644 index 0000000000..280836ca16 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Beams/magic.rsi/muzzle_magic.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/icon.png b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/icon.png new file mode 100644 index 0000000000..141b0fe639 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/icon.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/inhand-left.png b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/inhand-left.png new file mode 100644 index 0000000000..44e94440dd Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/inhand-left.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/inhand-right.png b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/inhand-right.png new file mode 100644 index 0000000000..a5f8d0bda3 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/inhand-right.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/meta.json b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/meta.json new file mode 100644 index 0000000000..6369780fb1 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi/meta.json @@ -0,0 +1,22 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "Created by Jaraten (discord/github) for CrystallPunk 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/icon.png b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/icon.png new file mode 100644 index 0000000000..4f5f48818b Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/icon.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/inhand-left.png b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/inhand-left.png new file mode 100644 index 0000000000..ba4800161e Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/inhand-left.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/inhand-right.png b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/inhand-right.png new file mode 100644 index 0000000000..def47e05aa Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/inhand-right.png differ diff --git a/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/meta.json b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/meta.json new file mode 100644 index 0000000000..6369780fb1 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi/meta.json @@ -0,0 +1,22 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "Created by Jaraten (discord/github) for CrystallPunk 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/crystal.png b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/crystal.png new file mode 100644 index 0000000000..2a0d186de1 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/crystal.png differ diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/meta.json b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/meta.json new file mode 100644 index 0000000000..05b3a2a7bc --- /dev/null +++ b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "Created by Jaraten (discord/github) for CrystallPunk 14", + "size": { + "x": 32, + "y": 48 + }, + "states": [ + { + "name": "spreader" + }, + { + "name": "crystal" + } + ] +} diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/spreader.png b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/spreader.png new file mode 100644 index 0000000000..8690e6da04 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/Spreader.rsi/spreader.png differ diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi/base.png b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi/base.png new file mode 100644 index 0000000000..d2880b3ec7 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi/base.png differ diff --git a/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi/meta.json b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi/meta.json new file mode 100644 index 0000000000..4ea579c198 --- /dev/null +++ b/Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/elemental_reactor.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "Created by TheShued (github) for CrystallPunk 14", + "size": { + "x": 48, + "y": 64 + }, + "states": [ + { + "name": "base" + } + ] +}