diff --git a/Content.Client/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs b/Content.Client/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs new file mode 100644 index 0000000000..0345c0cdce --- /dev/null +++ b/Content.Client/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs @@ -0,0 +1,46 @@ +using Content.Shared.Xenoarchaeology.XenoArtifacts; +using Robust.Client.GameObjects; + +namespace Content.Client.Xenoarchaeology.XenoArtifacts; + +public sealed class RandomArtifactSpriteSystem : VisualizerSystem +{ + protected override void OnAppearanceChange(EntityUid uid, RandomArtifactSpriteComponent component, ref AppearanceChangeEvent args) + { + if (args.Sprite == null) + return; + + if (!AppearanceSystem.TryGetData(uid, SharedArtifactsVisuals.SpriteIndex, out var ind, args.Component) + || ind is not int spriteIndex) + return; + + if (!AppearanceSystem.TryGetData(uid, SharedArtifactsVisuals.IsActivated, out var act, args.Component) + || act is not bool isActivated) + isActivated = false; + + var spriteIndexStr = spriteIndex.ToString("D2"); + var spritePrefix = isActivated ? "_on" : ""; + + // layered artifact sprite + if (args.Sprite.LayerMapTryGet(ArtifactsVisualLayers.Effect, out var layer)) + { + var spriteState = "ano" + spriteIndexStr; + args.Sprite.LayerSetState(ArtifactsVisualLayers.Base, spriteState); + args.Sprite.LayerSetState(layer, spriteState + "_on"); + args.Sprite.LayerSetVisible(layer, isActivated); + } + // non-layered + else + { + var spriteState = "ano" + spriteIndexStr + spritePrefix; + args.Sprite.LayerSetState(ArtifactsVisualLayers.Base, spriteState); + } + + } +} + +public enum ArtifactsVisualLayers : byte +{ + Base, + Effect // doesn't have to use this +} diff --git a/Content.Client/Xenoarchaeology/XenoArtifacts/RandomArtifactVisualizer.cs b/Content.Client/Xenoarchaeology/XenoArtifacts/RandomArtifactVisualizer.cs deleted file mode 100644 index 3f7b3448ae..0000000000 --- a/Content.Client/Xenoarchaeology/XenoArtifacts/RandomArtifactVisualizer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Content.Shared.Xenoarchaeology.XenoArtifacts; -using Robust.Client.GameObjects; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; - -namespace Content.Client.Xenoarchaeology.XenoArtifacts; - -public sealed class RandomArtifactVisualizer : AppearanceVisualizer -{ - [Obsolete("Subscribe to AppearanceChangeEvent instead.")] - public override void OnChangeData(AppearanceComponent component) - { - base.OnChangeData(component); - - var entities = IoCManager.Resolve(); - if (!entities.TryGetComponent(component.Owner, out ISpriteComponent? sprite)) return; - - if (!component.TryGetData(SharedArtifactsVisuals.SpriteIndex, out int spriteIndex)) - return; - - if (!component.TryGetData(SharedArtifactsVisuals.IsActivated, out bool isActivated)) - isActivated = false; - - var spriteIndexStr = spriteIndex.ToString("D2"); - var spritePrefix = isActivated ? "_on" : ""; - - var spriteState = "ano" + spriteIndexStr + spritePrefix; - sprite.LayerSetState(0, spriteState); - } -} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Commands.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Commands.cs new file mode 100644 index 0000000000..1cdd6b6c93 --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Commands.cs @@ -0,0 +1,51 @@ +using System.Linq; +using Content.Server.Administration; +using Content.Shared.Administration; +using Content.Shared.Xenoarchaeology.XenoArtifacts; +using Robust.Shared.Console; +using Robust.Shared.Utility; + +namespace Content.Server.Xenoarchaeology.XenoArtifacts; + +public partial class ArtifactSystem +{ + [Dependency] private readonly IConsoleHost _conHost = default!; + + public void InitializeCommands() + { + _conHost.RegisterCommand("forceartifactnode", "Forces an artifact to traverse to a given node", "forceartifacteffect ", + ForceArtifactNode, + ForceArtifactNodeCompletions); + } + + [AdminCommand(AdminFlags.Fun)] + private void ForceArtifactNode(IConsoleShell shell, string argstr, string[] args) + { + if (args.Length != 2) + shell.WriteError("Argument length must be 2"); + + if (!EntityUid.TryParse(args[0], out var uid) || ! int.TryParse(args[1], out var id)) + return; + + if (!TryComp(uid, out var artifact) || artifact.NodeTree == null) + return; + + if (artifact.NodeTree.AllNodes.FirstOrDefault(n => n.Id == id) is { } node) + { + EnterNode(uid, ref node); + } + } + + private CompletionResult ForceArtifactNodeCompletions(IConsoleShell shell, string[] args) + { + if (args.Length == 2 && EntityUid.TryParse(args[0], out var uid)) + { + if (TryComp(uid, out var artifact) && artifact.NodeTree != null) + { + return CompletionResult.FromHintOptions(artifact.NodeTree.AllNodes.Select(s => s.Id.ToString()), ""); + } + } + + return CompletionResult.Empty; + } +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index d616637dcf..0125fc6fa5 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -1,5 +1,6 @@ using System.Linq; using Content.Server.Xenoarchaeology.XenoArtifacts.Events; +using Content.Shared.Item; using Content.Shared.Xenoarchaeology.XenoArtifacts; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -20,7 +21,7 @@ public sealed partial class ArtifactSystem /// /// The tree being generated. /// The amount of nodes it has. - private void GenerateArtifactNodeTree(ref ArtifactTree tree, int nodeAmount) + private void GenerateArtifactNodeTree(EntityUid artifact, ref ArtifactTree tree, int nodeAmount) { if (nodeAmount < 1) { @@ -33,14 +34,14 @@ public sealed partial class ArtifactSystem while (uninitializedNodes.Any()) { - GenerateNode(ref uninitializedNodes, ref tree, nodeAmount); + GenerateNode(artifact, ref uninitializedNodes, ref tree, nodeAmount); } } /// /// Generate an individual node on the tree. /// - private void GenerateNode(ref List uninitializedNodes, ref ArtifactTree tree, int targetNodeAmount) + private void GenerateNode(EntityUid artifact, ref List uninitializedNodes, ref ArtifactTree tree, int targetNodeAmount) { if (!uninitializedNodes.Any()) return; @@ -69,8 +70,8 @@ public sealed partial class ArtifactSystem uninitializedNodes.Add(neighbor); } - node.Trigger = GetRandomTrigger(ref node); - node.Effect = GetRandomEffect(ref node); + node.Trigger = GetRandomTrigger(artifact, ref node); + node.Effect = GetRandomEffect(artifact, ref node); tree.AllNodes.Add(node); } @@ -78,28 +79,31 @@ public sealed partial class ArtifactSystem //yeah these two functions are near duplicates but i don't //want to implement an interface or abstract parent - private ArtifactTriggerPrototype GetRandomTrigger(ref ArtifactNode node) + private ArtifactTriggerPrototype GetRandomTrigger(EntityUid artifact, ref ArtifactNode node) { var allTriggers = _prototype.EnumeratePrototypes().ToList(); var validDepth = allTriggers.Select(x => x.TargetDepth).Distinct().ToList(); var weights = GetDepthWeights(validDepth, node.Depth); var selectedRandomTargetDepth = GetRandomTargetDepth(weights); - var targetTriggers = allTriggers.Where(x => - x.TargetDepth == selectedRandomTargetDepth).ToList(); + var targetTriggers = allTriggers + .Where(x => x.TargetDepth == selectedRandomTargetDepth) + .Where(x => (x.Whitelist?.IsValid(artifact, EntityManager) ?? true) && (!x.Blacklist?.IsValid(artifact, EntityManager) ?? true)).ToList(); + return _random.Pick(targetTriggers); } - private ArtifactEffectPrototype GetRandomEffect(ref ArtifactNode node) + private ArtifactEffectPrototype GetRandomEffect(EntityUid artifact, ref ArtifactNode node) { var allEffects = _prototype.EnumeratePrototypes().ToList(); var validDepth = allEffects.Select(x => x.TargetDepth).Distinct().ToList(); var weights = GetDepthWeights(validDepth, node.Depth); var selectedRandomTargetDepth = GetRandomTargetDepth(weights); - var targetEffects = allEffects.Where(x => - x.TargetDepth == selectedRandomTargetDepth).ToList(); + var targetEffects = allEffects + .Where(x => x.TargetDepth == selectedRandomTargetDepth) + .Where(x => (x.Whitelist?.IsValid(artifact, EntityManager) ?? true) && (!x.Blacklist?.IsValid(artifact, EntityManager) ?? true)).ToList(); return _random.Pick(targetEffects); } @@ -164,11 +168,22 @@ public sealed partial class ArtifactSystem foreach (var (name, entry) in allComponents) { var reg = _componentFactory.GetRegistration(name); + + if (EntityManager.HasComponent(uid, reg.Type)) + { + // Don't re-add permanent components + if (node.Effect.PermanentComponents.ContainsKey(name)) + continue; + + EntityManager.RemoveComponent(uid, reg.Type); + } + var comp = (Component) _componentFactory.GetComponent(reg); comp.Owner = uid; var temp = (object) comp; _serialization.Copy(entry.Component, ref temp); + EntityManager.AddComponent(uid, (Component) temp!, true); } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs index 60955a5381..7b535e5b30 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs @@ -22,6 +22,8 @@ public sealed partial class ArtifactSystem : EntitySystem SubscribeLocalEvent(OnInit); SubscribeLocalEvent(GetPrice); + + InitializeCommands(); } private void OnInit(EntityUid uid, ArtifactComponent component, MapInitEvent args) @@ -105,7 +107,7 @@ public sealed partial class ArtifactSystem : EntitySystem component.NodeTree = new ArtifactTree(); - GenerateArtifactNodeTree(ref component.NodeTree, nodeAmount); + GenerateArtifactNodeTree(component.Owner, ref component.NodeTree, nodeAmount); EnterNode(component.Owner, ref component.NodeTree.StartNode, component); } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/SpawnArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/SpawnArtifactSystem.cs index b2cc629cac..f8e5f16a77 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/SpawnArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/SpawnArtifactSystem.cs @@ -44,7 +44,7 @@ public sealed class SpawnArtifactSystem : EntitySystem toSpawn = _random.Pick(component.PossiblePrototypes); // select spawn position near artifact - var artifactCord = Transform(uid).Coordinates; + var artifactCord = Transform(uid).MapPosition; var dx = _random.NextFloat(-component.Range, component.Range); var dy = _random.NextFloat(-component.Range, component.Range); var spawnCord = artifactCord.Offset(new Vector2(dx, dy)); diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactLandTriggerComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactLandTriggerComponent.cs new file mode 100644 index 0000000000..700b162635 --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactLandTriggerComponent.cs @@ -0,0 +1,9 @@ +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; + +/// +/// Triggers when the artifact lands after being thrown. +/// +[RegisterComponent] +public sealed class ArtifactLandTriggerComponent : Component +{ +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactMicrowaveTriggerComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactMicrowaveTriggerComponent.cs new file mode 100644 index 0000000000..038c7f4a1b --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactMicrowaveTriggerComponent.cs @@ -0,0 +1,9 @@ +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; + +/// +/// Triggers when an item artifact is microwaved. +/// +[RegisterComponent] +public sealed class ArtifactMicrowaveTriggerComponent : Component +{ +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactLandSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactLandSystem.cs new file mode 100644 index 0000000000..1183250ac9 --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactLandSystem.cs @@ -0,0 +1,21 @@ +using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; +using Content.Shared.Throwing; + +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; + +public sealed class ArtifactLandSystem : EntitySystem +{ + [Dependency] private readonly ArtifactSystem _artifact = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnLand); + } + + private void OnLand(EntityUid uid, ArtifactLandTriggerComponent component, LandEvent args) + { + _artifact.TryActivateArtifact(uid, args.User); + } +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMicrowaveTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMicrowaveTriggerSystem.cs new file mode 100644 index 0000000000..ca61c8f8ab --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMicrowaveTriggerSystem.cs @@ -0,0 +1,20 @@ +using Content.Server.Kitchen.Components; +using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; + +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; + +public sealed class ArtifactMicrowaveTriggerSystem : EntitySystem +{ + [Dependency] private readonly ArtifactSystem _artifact = default!; + + /// + public override void Initialize() + { + SubscribeLocalEvent(OnMicrowaved); + } + + private void OnMicrowaved(EntityUid uid, ArtifactMicrowaveTriggerComponent component, BeingMicrowavedEvent args) + { + _artifact.TryActivateArtifact(uid); + } +} diff --git a/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs b/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs index 2b42cff916..0fa62fdee0 100644 --- a/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs +++ b/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs @@ -1,4 +1,6 @@ -using Robust.Shared.Prototypes; +using Content.Shared.Item; +using Content.Shared.Whitelist; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Xenoarchaeology.XenoArtifacts; @@ -33,4 +35,10 @@ public sealed class ArtifactEffectPrototype : IPrototype [DataField("effectHint")] public string? EffectHint; + + [DataField("whitelist")] + public EntityWhitelist? Whitelist; + + [DataField("blacklist")] + public EntityWhitelist? Blacklist; } diff --git a/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactTriggerPrototype.cs b/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactTriggerPrototype.cs index c00fde2abb..ff34f6fafe 100644 --- a/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactTriggerPrototype.cs +++ b/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactTriggerPrototype.cs @@ -1,4 +1,6 @@ -using Robust.Shared.Prototypes; +using Content.Shared.Item; +using Content.Shared.Whitelist; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Xenoarchaeology.XenoArtifacts; @@ -22,4 +24,10 @@ public sealed class ArtifactTriggerPrototype : IPrototype [DataField("triggerHint")] public string? TriggerHint; + + [DataField("whitelist")] + public EntityWhitelist? Whitelist; + + [DataField("blacklist")] + public EntityWhitelist? Blacklist; } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteComponent.cs b/Content.Shared/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteComponent.cs similarity index 84% rename from Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteComponent.cs rename to Content.Shared/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteComponent.cs index 3091cf8dd2..545c6f4b85 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteComponent.cs +++ b/Content.Shared/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteComponent.cs @@ -1,4 +1,4 @@ -namespace Content.Server.Xenoarchaeology.XenoArtifacts; +namespace Content.Shared.Xenoarchaeology.XenoArtifacts; [RegisterComponent] public sealed class RandomArtifactSpriteComponent : Component diff --git a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl index a8e5d7bf27..6ec6b7a6f6 100644 --- a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl +++ b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl @@ -10,6 +10,10 @@ artifact-effect-hint-consumption = Energy consumption artifact-effect-hint-release = Energy release artifact-effect-hint-biochemical = Biochemical disruption artifact-effect-hint-destruction = Station-wide destruction +artifact-effect-hint-gun = Small entity accelerator +artifact-effect-hint-multitool = Utility conglomerate +artifact-effect-hint-storage = Internal chamber +artifact-effect-hint-drill = Serrated rotator # the triggers should be more obvious than the effects # gives people an idea of what to do: don't be too specific (i.e. no "welders") @@ -24,4 +28,5 @@ artifact-trigger-hint-magnet = Magnetic waves artifact-trigger-hint-death = Life essence artifact-trigger-hint-radiation = Radiation artifact-trigger-hint-pressure = Extreme pressure -artifact-trigger-hint-gas = Gas \ No newline at end of file +artifact-trigger-hint-gas = Gas +artifact-trigger-hint-land = Active deceleration diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/artifacts.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/artifacts.yml index 38b5288eaf..853dd8bc32 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/artifacts.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/artifacts.yml @@ -13,8 +13,13 @@ - MediumXenoArtifact - MediumXenoArtifact - MediumXenoArtifact + - MediumXenoArtifact - ComplexXenoArtifact - ComplexXenoArtifact + - ComplexXenoArtifact + - SimpleXenoArtifactItem + - MediumXenoArtifactItem + - ComplexXenoArtifactItem chance: 1 - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml new file mode 100644 index 0000000000..3205a154db --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml @@ -0,0 +1,59 @@ +- type: entity + parent: BaseItem + id: BaseXenoArtifactItem + name: alien artifact + description: A strange handheld alien device. + abstract: true + components: + - type: Sprite + sprite: Objects/Specific/Xenoarchaeology/item_artifacts.rsi + netsync: false + layers: + - state: ano01 + map: [ "enum.ArtifactsVisualLayers.Base" ] + - state: ano01_on + map: [ "enum.ArtifactsVisualLayers.Effect" ] + visible: false + - type: Damageable + - type: Physics + bodyType: Dynamic + - type: InteractionOutline + - type: Artifact + - type: RandomArtifactSprite + maxSprite: 11 + activationTime: 2.4 + - type: RandomSprite + available: + - enum.ArtifactsVisualLayers.Effect: + ano01_on: Rainbow + - type: Appearance + - type: StaticPrice + price: 500 + +- type: entity + parent: BaseXenoArtifactItem + id: SimpleXenoArtifactItem + suffix: Simple + components: + - type: Artifact + nodesMin: 2 + nodesMax: 5 + +- type: entity + parent: BaseXenoArtifactItem + id: MediumXenoArtifactItem + suffix: Medium + components: + - type: Artifact + nodesMin: 5 + nodesMax: 9 + +- type: entity + parent: BaseXenoArtifactItem + id: ComplexXenoArtifactItem + suffix: Complex + components: + - type: Artifact + nodesMin: 9 + nodesMax: 13 + diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_artifacts.yml similarity index 93% rename from Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml rename to Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_artifacts.yml index 93a523fd4f..ff33084649 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/structure_artifacts.yml @@ -9,6 +9,9 @@ drawdepth: SmallObjects sprite: Objects/Specific/Xenoarchaeology/xeno_artifacts.rsi netsync: false + layers: + - state: ano01 + map: [ "enum.ArtifactsVisualLayers.Base" ] state: ano01 noRot: true - type: Damageable @@ -31,9 +34,6 @@ - type: Artifact - type: RandomArtifactSprite - type: Appearance - visuals: - - type: RandomArtifactVisualizer - - type: StaticPrice price: 500 diff --git a/Resources/Prototypes/XenoArch/artifact_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml similarity index 78% rename from Resources/Prototypes/XenoArch/artifact_effects.yml rename to Resources/Prototypes/XenoArch/Effects/normal_effects.yml index 6378bd3790..eb2d43f489 100644 --- a/Resources/Prototypes/XenoArch/artifact_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml @@ -1,32 +1,32 @@ -- type: artifactEffect +- type: artifactEffect id: EffectBadFeeling targetDepth: 0 effectHint: artifact-effect-hint-mental components: - type: TelepathicArtifact messages: - - badfeeling-artifact-1 - - badfeeling-artifact-2 - - badfeeling-artifact-3 - - badfeeling-artifact-4 - - badfeeling-artifact-5 - - badfeeling-artifact-6 - - badfeeling-artifact-7 - - badfeeling-artifact-8 - - badfeeling-artifact-9 - - badfeeling-artifact-10 - - badfeeling-artifact-11 - - badfeeling-artifact-12 - - badfeeling-artifact-13 - - badfeeling-artifact-14 - - badfeeling-artifact-15 + - badfeeling-artifact-1 + - badfeeling-artifact-2 + - badfeeling-artifact-3 + - badfeeling-artifact-4 + - badfeeling-artifact-5 + - badfeeling-artifact-6 + - badfeeling-artifact-7 + - badfeeling-artifact-8 + - badfeeling-artifact-9 + - badfeeling-artifact-10 + - badfeeling-artifact-11 + - badfeeling-artifact-12 + - badfeeling-artifact-13 + - badfeeling-artifact-14 + - badfeeling-artifact-15 drastic: - - badfeeling-artifact-drastic-1 - - badfeeling-artifact-drastic-2 - - badfeeling-artifact-drastic-3 - - badfeeling-artifact-drastic-4 - - badfeeling-artifact-drastic-5 - - badfeeling-artifact-drastic-6 + - badfeeling-artifact-drastic-1 + - badfeeling-artifact-drastic-2 + - badfeeling-artifact-drastic-3 + - badfeeling-artifact-drastic-4 + - badfeeling-artifact-drastic-5 + - badfeeling-artifact-drastic-6 - type: artifactEffect id: EffectGoodFeeling @@ -35,27 +35,27 @@ components: - type: TelepathicArtifact messages: - - goodfeeling-artifact-1 - - goodfeeling-artifact-2 - - goodfeeling-artifact-3 - - goodfeeling-artifact-4 - - goodfeeling-artifact-5 - - goodfeeling-artifact-6 - - goodfeeling-artifact-7 - - goodfeeling-artifact-8 - - goodfeeling-artifact-9 - - goodfeeling-artifact-10 - - goodfeeling-artifact-11 - - goodfeeling-artifact-12 - - goodfeeling-artifact-13 - - goodfeeling-artifact-14 + - goodfeeling-artifact-1 + - goodfeeling-artifact-2 + - goodfeeling-artifact-3 + - goodfeeling-artifact-4 + - goodfeeling-artifact-5 + - goodfeeling-artifact-6 + - goodfeeling-artifact-7 + - goodfeeling-artifact-8 + - goodfeeling-artifact-9 + - goodfeeling-artifact-10 + - goodfeeling-artifact-11 + - goodfeeling-artifact-12 + - goodfeeling-artifact-13 + - goodfeeling-artifact-14 drastic: - - goodfeeling-artifact-drastic-1 - - goodfeeling-artifact-drastic-2 - - goodfeeling-artifact-drastic-3 - - goodfeeling-artifact-drastic-4 - - goodfeeling-artifact-drastic-5 - - goodfeeling-artifact-drastic-6 + - goodfeeling-artifact-drastic-1 + - goodfeeling-artifact-drastic-2 + - goodfeeling-artifact-drastic-3 + - goodfeeling-artifact-drastic-4 + - goodfeeling-artifact-drastic-5 + - goodfeeling-artifact-drastic-6 - type: artifactEffect id: EffectJunkSpawn @@ -241,7 +241,6 @@ - UltraHighPowerMicroLaserStockPart - SuperMatterBinStockPart - - type: artifactEffect id: EffectDisease targetDepth: 3 @@ -271,14 +270,6 @@ - GoldOre1 - UraniumOre1 -- type: artifactEffect - id: EffectPowerGen20K - targetDepth: 3 - effectHint: artifact-effect-hint-release - components: - - type: PowerSupplier - supplyRate: 20000 - - type: artifactEffect id: EffectHeat targetDepth: 3 @@ -316,4 +307,4 @@ - type: SpawnArtifact maxSpawns: 1 possiblePrototypes: - - Singularity \ No newline at end of file + - Singularity diff --git a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml new file mode 100644 index 0000000000..ef16f571c3 --- /dev/null +++ b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml @@ -0,0 +1,163 @@ +# Utility effects permanently modify the entity in some way when triggered, and they generally make it 'useful' for some purpose, +# like turning the artifact into a tool, or gun, or whatever. + +- type: artifactEffect + id: EffectStorage + targetDepth: 2 + effectHint: artifact-effect-hint-storage + whitelist: + components: + - Item # it doesnt necessarily have to be restricted from structures, but i think it'll be better that way + permanentComponents: + - type: UserInterface + interfaces: + - key: enum.StorageUiKey.Key + type: StorageBoundUserInterface + - type: ContainerContainer + containers: + storagebase: !type:Container + ents: [ ] + - type: Storage + capacity: 50 + +- type: artifactEffect + id: EffectSolutionStorage + targetDepth: 2 + effectHint: artifact-effect-hint-storage + whitelist: + components: + - Item + permanentComponents: + - type: UserInterface + interfaces: + - key: enum.TransferAmountUiKey.Key + type: TransferAmountBoundUserInterface + - type: SolutionContainerManager + solutions: + beaker: + maxVol: 150 + - type: FitsInDispenser + solution: beaker + - type: RefillableSolution + solution: beaker + - type: DrainableSolution + solution: beaker + - type: ExaminableSolution + solution: beaker + - type: DrawableSolution + solution: beaker + - type: InjectableSolution + solution: beaker + - type: SolutionTransfer + canChangeTransferAmount: true + - type: Drink + isOpen: true + solution: beaker + +- type: artifactEffect + id: EffectDrill + targetDepth: 3 + effectHint: artifact-effect-hint-drill + permanentComponents: + - type: GatheringTool + damage: + types: + Structural: 125 + gatheringTime: 0.50 + MaxGatheringEntities: 3 + - type: ItemCooldown + - type: MeleeWeapon + damage: + types: + Piercing: 18 + Blunt: 4 + soundHit: + path: /Audio/Weapons/bladeslice.ogg + - type: Sharp + + +- type: artifactEffect + id: EffectPowerGen20K + targetDepth: 3 + effectHint: artifact-effect-hint-release + blacklist: + components: + - Item + permanentComponents: + - type: PowerSupplier + supplyRate: 20000 + +- type: artifactEffect + id: EffectBigIron + targetDepth: 3 + effectHint: artifact-effect-hint-gun + whitelist: + components: + - Item + permanentComponents: + - type: ContainerContainer + containers: + revolver-ammo: !type:Container + - type: RevolverAmmoProvider + whitelist: + tags: + - CartridgeMagnumHC + - SpeedLoaderMagnumHC + proto: CartridgeMagnumHC + capacity: 7 + chambers: [ True, True, True, True, True, True, True ] + ammoSlots: [ null, null, null, null, null, null, null ] + soundEject: + path: /Audio/Weapons/Guns/MagOut/revolver_magout.ogg + soundInsert: + path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg + - type: Gun + selectedMode: SemiAuto + fireRate: 2 + availableModes: + - SemiAuto + - FullAuto # no alien revolver in buildings + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/revolver.ogg + +- type: artifactEffect + id: EffectMultitool + targetDepth: 3 + effectHint: artifact-effect-hint-multitool + whitelist: + components: + - Item + permanentComponents: + - type: TilePrying + - type: SignalLinker + - type: Tool + qualities: + - Screwing + speed: 2 # Very powerful multitool to balance out the desire to sell or scrap for points + useSound: /Audio/Items/drill_use.ogg + - type: MultipleTool + statusShowBehavior: true + entries: + - behavior: Screwing + useSound: + path: /Audio/Items/drill_use.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Prying + useSound: + path: /Audio/Items/jaws_pry.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Anchoring + useSound: + path: /Audio/Items/ratchet.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Cutting + useSound: + path: /Audio/Items/jaws_cut.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Pulsing + changeSound: + path: /Audio/Items/change_drill.ogg diff --git a/Resources/Prototypes/XenoArch/artifact_triggers.yml b/Resources/Prototypes/XenoArch/artifact_triggers.yml index 81bab760e0..3f79e479cd 100644 --- a/Resources/Prototypes/XenoArch/artifact_triggers.yml +++ b/Resources/Prototypes/XenoArch/artifact_triggers.yml @@ -21,6 +21,9 @@ id: TriggerAnchor targetDepth: 0 triggerHint: artifact-trigger-hint-tool + blacklist: + components: + - Item components: - type: ArtifactAnchorTrigger @@ -28,6 +31,9 @@ id: TriggerElectricity targetDepth: 0 triggerHint: artifact-trigger-hint-electricity + blacklist: + components: + - Item components: - type: ArtifactElectricityTrigger - type: PowerConsumer @@ -61,10 +67,20 @@ - type: ArtifactDamageTrigger damageTypes: - Blunt - - Slash + - Slash - Piercing damageThreshold: 50 +- type: artifactTrigger + id: TriggerItemLanded + targetDepth: 1 + triggerHint: artifact-trigger-hint-land + whitelist: + components: + - Item + components: + - type: ArtifactLandTrigger + - type: artifactTrigger id: TriggerHeat targetDepth: 1 @@ -98,6 +114,16 @@ components: - type: ArtifactMagnetTrigger +- type: artifactTrigger + id: TriggerMicrowave + targetDepth: 2 + triggerHint: artifact-trigger-hint-radiation + whitelist: + components: + - Item + components: + - type: ArtifactMicrowaveTrigger + - type: artifactTrigger id: TriggerLowPressure targetDepth: 2 @@ -141,4 +167,4 @@ - type: ArtifactGasTrigger #don't add in new targetdepth values until you have a few -#or else it will skew heavily towards a few options. \ No newline at end of file +#or else it will skew heavily towards a few options. diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01.png new file mode 100644 index 0000000000..3b62846045 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01_on.png new file mode 100644 index 0000000000..7db0ddebc1 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02.png new file mode 100644 index 0000000000..2f380fa481 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02_on.png new file mode 100644 index 0000000000..f20d6f9a69 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03.png new file mode 100644 index 0000000000..03ebcaaf75 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03_on.png new file mode 100644 index 0000000000..ff4cf4fbb5 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04.png new file mode 100644 index 0000000000..a485a769c0 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04_on.png new file mode 100644 index 0000000000..774e69acaa Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05.png new file mode 100644 index 0000000000..e815d930aa Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05_on.png new file mode 100644 index 0000000000..513e52fed0 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06.png new file mode 100644 index 0000000000..9468bac5fd Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06_on.png new file mode 100644 index 0000000000..a2ca5550f1 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07.png new file mode 100644 index 0000000000..a985a670b1 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07_on.png new file mode 100644 index 0000000000..cbba282e4f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08.png new file mode 100644 index 0000000000..5d3c340977 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08_on.png new file mode 100644 index 0000000000..4020839a83 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09.png new file mode 100644 index 0000000000..7c79595dbb Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09_on.png new file mode 100644 index 0000000000..834ae91201 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10.png new file mode 100644 index 0000000000..0f9d74868c Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10_on.png new file mode 100644 index 0000000000..8433382878 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11.png new file mode 100644 index 0000000000..c9392a774d Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11_on.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11_on.png new file mode 100644 index 0000000000..7fe421318f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11_on.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/meta.json b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/meta.json new file mode 100644 index 0000000000..a6ffbe8156 --- /dev/null +++ b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/meta.json @@ -0,0 +1,178 @@ +{ + "version": 1, + "license": "CC-BY-NC-SA 3.0", + "copyright": "goonstation at 4059e4be90832b02b1228b1bee3db342094e4f1e. ano11/ano11_on by brainfood#7460", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "ano01" + }, + { + "name": "ano01_on", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "ano02" + }, + { + "name": "ano02_on", + "delays": [ + [ + 0.17, + 0.17, + 0.17, + 0.17, + 0.17, + 0.17, + 0.17 + ] + ] + }, + { + "name": "ano03" + }, + { + "name": "ano03_on", + "delays": [ + [ + 0.24, + 0.24, + 0.24, + 0.24, + 0.24 + ] + ] + }, + { + "name": "ano04" + }, + { + "name": "ano04_on", + "delays": [ + [ + 0.24, + 0.24, + 0.24, + 0.24, + 0.24 + ] + ] + }, + { + "name": "ano05" + }, + { + "name": "ano05_on", + "delays": [ + [ + 0.24, + 0.24, + 0.24, + 0.24, + 0.24 + ] + ] + }, + { + "name": "ano06" + }, + { + "name": "ano06_on", + "delays": [ + [ + 0.24, + 0.24, + 0.24, + 0.24, + 0.24 + ] + ] + }, + { + "name": "ano07" + }, + { + "name": "ano07_on", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "ano08" + }, + { + "name": "ano08_on", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "ano09" + }, + { + "name": "ano09_on", + "delays": [ + [ + 0.24, + 0.24, + 0.24, + 0.24, + 0.24 + ] + ] + }, + { + "name": "ano10" + }, + { + "name": "ano10_on", + "delays": [ + [ + 0.24, + 0.24, + 0.24, + 0.24, + 0.24 + ] + ] + }, + { + "name": "ano11" + }, + { + "name": "ano11_on", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + ] +} \ No newline at end of file