diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/IgniteArtifactComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/IgniteArtifactComponent.cs new file mode 100644 index 0000000000..100fb15b63 --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/IgniteArtifactComponent.cs @@ -0,0 +1,17 @@ +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; + +/// +/// Artifact that ignites surrounding entities when triggered. +/// +[RegisterComponent] +public sealed class IgniteArtifactComponent : Component +{ + [DataField("range")] + public float Range = 2f; + + [DataField("minFireStack")] + public int MinFireStack = 2; + + [DataField("maxFireStack")] + public int MaxFireStack = 5; +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/RandomInstrumentArtifactComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/RandomInstrumentArtifactComponent.cs new file mode 100644 index 0000000000..b268f9907c --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/RandomInstrumentArtifactComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; + +[RegisterComponent] +public sealed class RandomInstrumentArtifactComponent : Component +{ + +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/IgniteArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/IgniteArtifactSystem.cs new file mode 100644 index 0000000000..fa36fae85b --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/IgniteArtifactSystem.cs @@ -0,0 +1,43 @@ +using System.Linq; +using Content.Server.Atmos.Components; +using Content.Server.Atmos.EntitySystems; +using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; +using Content.Server.Xenoarchaeology.XenoArtifacts.Events; +using Robust.Shared.Random; + +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems; + +public sealed class IgniteArtifactSystem : EntitySystem +{ + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly EntityLookupSystem _lookup = default!; + [Dependency] private readonly FlammableSystem _flammable = default!; + + /// + public override void Initialize() + { + SubscribeLocalEvent(OnActivate); + } + + private void OnActivate(EntityUid uid, IgniteArtifactComponent component, ArtifactActivatedEvent args) + { + var flammable = GetEntityQuery(); + var targets = new HashSet(); + if (args.Activator != null) + { + targets.Add(args.Activator.Value); + } + else + { + targets = _lookup.GetEntitiesInRange(uid, component.Range); + } + + foreach (var target in targets) + { + if (!flammable.TryGetComponent(target, out var fl)) + continue; + fl.FireStacks += _random.Next(component.MinFireStack, component.MaxFireStack); + _flammable.Ignite(target, fl); + } + } +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/RandomInstrumentArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/RandomInstrumentArtifactSystem.cs new file mode 100644 index 0000000000..25dc9e2ce1 --- /dev/null +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/RandomInstrumentArtifactSystem.cs @@ -0,0 +1,25 @@ +using Content.Server.Instruments; +using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; +using Content.Shared.Instruments; +using Robust.Shared.Random; + +namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems; + +public sealed class RandomInstrumentArtifactSystem : EntitySystem +{ + [Dependency] private readonly InstrumentSystem _instrument = default!; + [Dependency] private readonly IRobustRandom _random = default!; + /// + public override void Initialize() + { + SubscribeLocalEvent(OnStartup); + } + + private void OnStartup(EntityUid uid, RandomInstrumentArtifactComponent component, ComponentStartup args) + { + if (!TryComp(uid, out var instrument)) + return; + + _instrument.SetInstrumentProgram(instrument, (byte) _random.Next(0, 127), 0); + } +} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs index 50e2b0ecb3..c3af6a11e2 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/RandomArtifactSpriteSystem.cs @@ -1,4 +1,5 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Events; +using Content.Shared.Item; using Content.Shared.Xenoarchaeology.XenoArtifacts; using Robust.Server.GameObjects; using Robust.Shared.Random; @@ -11,6 +12,7 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IGameTiming _time = default!; [Dependency] private readonly AppearanceSystem _appearance = default!; + [Dependency] private readonly SharedItemSystem _item = default!; public override void Initialize() { @@ -41,6 +43,7 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem { var randomSprite = _random.Next(component.MinSprite, component.MaxSprite + 1); _appearance.SetData(uid, SharedArtifactsVisuals.SpriteIndex, randomSprite); + _item.SetHeldPrefix(uid, "ano" + randomSprite.ToString("D2")); //set item artifact inhands } private void OnActivated(EntityUid uid, RandomArtifactSpriteComponent component, ArtifactActivatedEvent args) diff --git a/Content.Shared/Tools/Components/ToolComponent.cs b/Content.Shared/Tools/Components/ToolComponent.cs index 200ca6222b..8f4b9c4303 100644 --- a/Content.Shared/Tools/Components/ToolComponent.cs +++ b/Content.Shared/Tools/Components/ToolComponent.cs @@ -1,9 +1,10 @@ using Robust.Shared.Audio; +using Robust.Shared.GameStates; using Robust.Shared.Utility; namespace Content.Shared.Tools.Components { - [RegisterComponent] // TODO move tool system to shared, and make it a friend. + [RegisterComponent, NetworkedComponent] // TODO move tool system to shared, and make it a friend. public sealed class ToolComponent : Component { [DataField("qualities")] diff --git a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl index 6ec6b7a6f6..7b97d5e9ec 100644 --- a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl +++ b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl @@ -14,6 +14,7 @@ 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 +artifact-effect-hint-soap = Lubricated surface # 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") diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml index 3205a154db..3810ca37a0 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/item_artifacts.yml @@ -29,6 +29,10 @@ - type: Appearance - type: StaticPrice price: 500 + - type: Item + size: 40 + sprite: Objects/Specific/Xenoarchaeology/item_artifacts.rsi + heldPrefix: ano01 - type: entity parent: BaseXenoArtifactItem diff --git a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml index eb2d43f489..2f9d468dcc 100644 --- a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml @@ -299,6 +299,13 @@ - Mold - Amatoxin +- type: artifactEffect + id: EffectIgnite + targetDepth: 3 + effectHint: artifact-effect-hint-release + components: + - type: IgniteArtifact + - type: artifactEffect id: EffectSingulo targetDepth: 100 diff --git a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml index ef16f571c3..376533f0b2 100644 --- a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml @@ -1,5 +1,36 @@ # 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: EffectRandomInstrument + targetDepth: 2 + effectHint: artifact-effect-hint-mental + permanentComponents: + - type: Instrument + - type: ActivatableUI + inHandsOnly: true + singleUser: true + verbText: verb-instrument-openui + key: enum.InstrumentUiKey.Key + - type: UserInterface + interfaces: + - key: enum.InstrumentUiKey.Key + type: InstrumentBoundUserInterface + - type: RandomInstrumentArtifact + +- type: artifactEffect + id: EffectSlippy + targetDepth: 2 + effectHint: artifact-effect-hint-soap + whitelist: + components: + - Item + permanentComponents: + - type: Slippery + paralyzeTime: 7 + launchForwardsMultiplier: 9.0 + - type: StepTrigger + - type: CollisionWake + enabled: false - type: artifactEffect id: EffectStorage diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01-inhand-left.png new file mode 100644 index 0000000000..2de805b9ce Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01-inhand-right.png new file mode 100644 index 0000000000..398e5de11f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano01-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02-inhand-left.png new file mode 100644 index 0000000000..c5f8bb6d76 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02-inhand-right.png new file mode 100644 index 0000000000..7e79087747 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano02-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03-inhand-left.png new file mode 100644 index 0000000000..41586a6d7f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03-inhand-right.png new file mode 100644 index 0000000000..7be971568c Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano03-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04-inhand-left.png new file mode 100644 index 0000000000..ef56c66df5 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04-inhand-right.png new file mode 100644 index 0000000000..2163147b7e Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano04-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05-inhand-left.png new file mode 100644 index 0000000000..df3c743eda Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05-inhand-right.png new file mode 100644 index 0000000000..15a3de614f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano05-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06-inhand-left.png new file mode 100644 index 0000000000..85b5b004fa Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06-inhand-right.png new file mode 100644 index 0000000000..e7825cb28b Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano06-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07-inhand-left.png new file mode 100644 index 0000000000..a4fd94e7e0 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07-inhand-right.png new file mode 100644 index 0000000000..d37e3ad8ea Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano07-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08-inhand-left.png new file mode 100644 index 0000000000..2367ed750b Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08-inhand-right.png new file mode 100644 index 0000000000..95ce16ebb7 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano08-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09-inhand-left.png new file mode 100644 index 0000000000..a4294629b6 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09-inhand-right.png new file mode 100644 index 0000000000..c6f97c8a23 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano09-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10-inhand-left.png new file mode 100644 index 0000000000..b880a0b611 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10-inhand-right.png new file mode 100644 index 0000000000..3279f9dbb6 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano10-inhand-right.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11-inhand-left.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11-inhand-left.png new file mode 100644 index 0000000000..7e3718ea37 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11-inhand-left.png differ diff --git a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11-inhand-right.png b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11-inhand-right.png new file mode 100644 index 0000000000..fb9820faf2 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/ano11-inhand-right.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 index a6ffbe8156..245a64a8c9 100644 --- a/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Xenoarchaeology/item_artifacts.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-NC-SA 3.0", - "copyright": "goonstation at 4059e4be90832b02b1228b1bee3db342094e4f1e. ano11/ano11_on by brainfood#7460", + "copyright": "goonstation at 4059e4be90832b02b1228b1bee3db342094e4f1e. ano11/ano11_on and inhands by brainfood#7460", "size": { "x": 32, "y": 32 @@ -23,6 +23,14 @@ ] ] }, + { + "name": "ano01-inhand-left", + "directions": 4 + }, + { + "name": "ano01-inhand-right", + "directions": 4 + }, { "name": "ano02" }, @@ -40,6 +48,14 @@ ] ] }, + { + "name": "ano02-inhand-left", + "directions": 4 + }, + { + "name": "ano02-inhand-right", + "directions": 4 + }, { "name": "ano03" }, @@ -55,6 +71,14 @@ ] ] }, + { + "name": "ano03-inhand-left", + "directions": 4 + }, + { + "name": "ano03-inhand-right", + "directions": 4 + }, { "name": "ano04" }, @@ -70,6 +94,14 @@ ] ] }, + { + "name": "ano04-inhand-left", + "directions": 4 + }, + { + "name": "ano04-inhand-right", + "directions": 4 + }, { "name": "ano05" }, @@ -85,6 +117,14 @@ ] ] }, + { + "name": "ano05-inhand-left", + "directions": 4 + }, + { + "name": "ano05-inhand-right", + "directions": 4 + }, { "name": "ano06" }, @@ -100,6 +140,14 @@ ] ] }, + { + "name": "ano06-inhand-left", + "directions": 4 + }, + { + "name": "ano06-inhand-right", + "directions": 4 + }, { "name": "ano07" }, @@ -114,6 +162,14 @@ ] ] }, + { + "name": "ano07-inhand-left", + "directions": 4 + }, + { + "name": "ano07-inhand-right", + "directions": 4 + }, { "name": "ano08" }, @@ -128,6 +184,14 @@ ] ] }, + { + "name": "ano08-inhand-left", + "directions": 4 + }, + { + "name": "ano08-inhand-right", + "directions": 4 + }, { "name": "ano09" }, @@ -143,6 +207,14 @@ ] ] }, + { + "name": "ano09-inhand-left", + "directions": 4 + }, + { + "name": "ano09-inhand-right", + "directions": 4 + }, { "name": "ano10" }, @@ -158,6 +230,14 @@ ] ] }, + { + "name": "ano10-inhand-left", + "directions": 4 + }, + { + "name": "ano10-inhand-right", + "directions": 4 + }, { "name": "ano11" }, @@ -174,5 +254,13 @@ ] ] }, + { + "name": "ano11-inhand-left", + "directions": 4 + }, + { + "name": "ano11-inhand-right", + "directions": 4 + }, ] } \ No newline at end of file