xenoarch inhands + a few effects (#12655)
@@ -0,0 +1,17 @@
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Artifact that ignites surrounding entities when triggered.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class IgniteArtifactComponent : Component
|
||||
{
|
||||
[DataField("range")]
|
||||
public float Range = 2f;
|
||||
|
||||
[DataField("minFireStack")]
|
||||
public int MinFireStack = 2;
|
||||
|
||||
[DataField("maxFireStack")]
|
||||
public int MaxFireStack = 5;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class RandomInstrumentArtifactComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -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!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<IgniteArtifactComponent, ArtifactActivatedEvent>(OnActivate);
|
||||
}
|
||||
|
||||
private void OnActivate(EntityUid uid, IgniteArtifactComponent component, ArtifactActivatedEvent args)
|
||||
{
|
||||
var flammable = GetEntityQuery<FlammableComponent>();
|
||||
var targets = new HashSet<EntityUid>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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!;
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<RandomInstrumentArtifactComponent, ComponentStartup>(OnStartup);
|
||||
}
|
||||
|
||||
private void OnStartup(EntityUid uid, RandomInstrumentArtifactComponent component, ComponentStartup args)
|
||||
{
|
||||
if (!TryComp<SharedInstrumentComponent>(uid, out var instrument))
|
||||
return;
|
||||
|
||||
_instrument.SetInstrumentProgram(instrument, (byte) _random.Next(0, 127), 0);
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
After Width: | Height: | Size: 327 B |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 477 B |
|
After Width: | Height: | Size: 385 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 256 B |
|
After Width: | Height: | Size: 261 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 482 B |
|
After Width: | Height: | Size: 640 B |
|
After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 648 B |
|
After Width: | Height: | Size: 664 B |
|
After Width: | Height: | Size: 578 B |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 540 B |
|
After Width: | Height: | Size: 551 B |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 544 B |
@@ -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
|
||||
},
|
||||
]
|
||||
}
|
||||