More artifact content (#22574)
* 3 new effect * new trigger * swap portal to Cak * cake * portals * finish * pupupu * limitations (same maps) * its broken now * a * portal fix, thx deltanedas
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When activated artifact will spawn an pair portals. First - right in artifact, Second - at random point of station.
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent, Access(typeof(PortalArtifactSystem))]
|
||||||
|
public sealed partial class PortalArtifactComponent : Component
|
||||||
|
{
|
||||||
|
[DataField]
|
||||||
|
public EntProtoId PortalProto = "PortalArtifact";
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||||
|
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||||
|
using Content.Shared.Mind.Components;
|
||||||
|
using Content.Shared.Teleportation.Systems;
|
||||||
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||||
|
|
||||||
|
public sealed class PortalArtifactSystem : EntitySystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly LinkedEntitySystem _link = default!;
|
||||||
|
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
SubscribeLocalEvent<PortalArtifactComponent, ArtifactActivatedEvent>(OnActivate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnActivate(Entity<PortalArtifactComponent> artifact, ref ArtifactActivatedEvent args)
|
||||||
|
{
|
||||||
|
var map = Transform(artifact).MapID;
|
||||||
|
var firstPortal = Spawn(artifact.Comp.PortalProto, _transform.GetMapCoordinates(artifact));
|
||||||
|
|
||||||
|
var minds = new List<EntityUid>();
|
||||||
|
var mindQuery = EntityQueryEnumerator<MindContainerComponent, TransformComponent>();
|
||||||
|
while (mindQuery.MoveNext(out var uid, out var mc, out var xform))
|
||||||
|
{
|
||||||
|
if (mc.HasMind && xform.MapID == map)
|
||||||
|
minds.Add(uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
var target = _random.Pick(minds);
|
||||||
|
var secondPortal = Spawn(artifact.Comp.PortalProto, _transform.GetMapCoordinates(target));
|
||||||
|
|
||||||
|
//Manual position swapping, because the portal that opens doesn't trigger a collision, and doesn't teleport targets the first time.
|
||||||
|
_transform.SetCoordinates(artifact, Transform(secondPortal).Coordinates);
|
||||||
|
_transform.SetCoordinates(target, Transform(firstPortal).Coordinates);
|
||||||
|
|
||||||
|
_link.TryLink(firstPortal, secondPortal, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ artifact-effect-hint-phasing = Structural phasing
|
|||||||
artifact-effect-hint-sentience = Neurological activity
|
artifact-effect-hint-sentience = Neurological activity
|
||||||
artifact-effect-hint-polymorph = Transmogrificational activity
|
artifact-effect-hint-polymorph = Transmogrificational activity
|
||||||
artifact-effect-hint-magnet = Magnetic waves
|
artifact-effect-hint-magnet = Magnetic waves
|
||||||
|
artifact-effect-hint-visual = Visual distortions
|
||||||
|
|
||||||
# the triggers should be more obvious than the effects
|
# 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")
|
# gives people an idea of what to do: don't be too specific (i.e. no "welders")
|
||||||
@@ -30,6 +31,7 @@ artifact-trigger-hint-physical = Physical trauma
|
|||||||
artifact-trigger-hint-tool = Tool usage
|
artifact-trigger-hint-tool = Tool usage
|
||||||
artifact-trigger-hint-music = Sonic vibrations
|
artifact-trigger-hint-music = Sonic vibrations
|
||||||
artifact-trigger-hint-water = Hydro-reactive
|
artifact-trigger-hint-water = Hydro-reactive
|
||||||
|
artifact-trigger-hint-blood = Reaction with hemoglobin
|
||||||
artifact-trigger-hint-magnet = Magnetic waves
|
artifact-trigger-hint-magnet = Magnetic waves
|
||||||
artifact-trigger-hint-death = Life essence
|
artifact-trigger-hint-death = Life essence
|
||||||
artifact-trigger-hint-radiation = Radiation
|
artifact-trigger-hint-radiation = Radiation
|
||||||
|
|||||||
@@ -51,3 +51,20 @@
|
|||||||
radius: 3
|
radius: 3
|
||||||
energy: 1
|
energy: 1
|
||||||
netsync: false
|
netsync: false
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: PortalArtifact
|
||||||
|
parent: BasePortal
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
layers:
|
||||||
|
- state: portal-artifact
|
||||||
|
- type: PointLight
|
||||||
|
color: "#ed85c2"
|
||||||
|
radius: 3
|
||||||
|
energy: 1
|
||||||
|
netsync: false
|
||||||
|
- type: TimedDespawn
|
||||||
|
lifetime: 120
|
||||||
|
- type: Portal
|
||||||
|
canTeleportToOtherMaps: true
|
||||||
|
|||||||
@@ -255,6 +255,37 @@
|
|||||||
components:
|
components:
|
||||||
- type: KnockArtifact
|
- type: KnockArtifact
|
||||||
|
|
||||||
|
- type: artifactEffect
|
||||||
|
id: EffectMagnet
|
||||||
|
targetDepth: 1
|
||||||
|
effectHint: artifact-effect-hint-magnet
|
||||||
|
components:
|
||||||
|
- type: GravityWell
|
||||||
|
maxRange: 3
|
||||||
|
baseRadialAcceleration: 1
|
||||||
|
baseTangentialAcceleration: 3
|
||||||
|
|
||||||
|
- type: artifactEffect
|
||||||
|
id: EffectAntiMagnet
|
||||||
|
targetDepth: 1
|
||||||
|
effectHint: artifact-effect-hint-magnet
|
||||||
|
components:
|
||||||
|
- type: GravityWell
|
||||||
|
maxRange: 3
|
||||||
|
baseRadialAcceleration: -1
|
||||||
|
baseTangentialAcceleration: -3
|
||||||
|
|
||||||
|
- type: artifactEffect
|
||||||
|
id: EffectInvisibility
|
||||||
|
targetDepth: 2
|
||||||
|
effectHint: artifact-effect-hint-visual
|
||||||
|
components:
|
||||||
|
- type: Stealth
|
||||||
|
hadOutline: true
|
||||||
|
- type: StealthOnMove
|
||||||
|
passiveVisibilityRate: -0.10
|
||||||
|
movementVisibilityRate: 0.10
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectExplosionScary
|
id: EffectExplosionScary
|
||||||
targetDepth: 2
|
targetDepth: 2
|
||||||
@@ -562,24 +593,11 @@
|
|||||||
maxIntensity: 50
|
maxIntensity: 50
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectMagnet
|
id: EffectPortal
|
||||||
targetDepth: 1
|
targetDepth: 3
|
||||||
effectHint: artifact-effect-hint-magnet
|
effectHint: artifact-effect-hint-displacement
|
||||||
components:
|
components:
|
||||||
- type: GravityWell
|
- type: PortalArtifact
|
||||||
maxRange: 3
|
|
||||||
baseRadialAcceleration: 1
|
|
||||||
baseTangentialAcceleration: 3
|
|
||||||
|
|
||||||
- type: artifactEffect
|
|
||||||
id: EffectAntiMagnet
|
|
||||||
targetDepth: 1
|
|
||||||
effectHint: artifact-effect-hint-magnet
|
|
||||||
components:
|
|
||||||
- type: GravityWell
|
|
||||||
maxRange: 3
|
|
||||||
baseRadialAcceleration: -1
|
|
||||||
baseTangentialAcceleration: -3
|
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectSingulo
|
id: EffectSingulo
|
||||||
|
|||||||
@@ -107,6 +107,18 @@
|
|||||||
isOpen: true
|
isOpen: true
|
||||||
solution: beaker
|
solution: beaker
|
||||||
|
|
||||||
|
- type: artifactEffect
|
||||||
|
id: EffectSpeedUp
|
||||||
|
targetDepth: 2
|
||||||
|
effectHint: artifact-effect-hint-displacement
|
||||||
|
whitelist:
|
||||||
|
components:
|
||||||
|
- Item
|
||||||
|
permanentComponents:
|
||||||
|
- type: HeldSpeedModifier
|
||||||
|
walkModifier: 1.2
|
||||||
|
sprintModifier: 1.3
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectDrill
|
id: EffectDrill
|
||||||
targetDepth: 3
|
targetDepth: 3
|
||||||
@@ -125,7 +137,6 @@
|
|||||||
path: /Audio/Weapons/bladeslice.ogg
|
path: /Audio/Weapons/bladeslice.ogg
|
||||||
- type: Sharp
|
- type: Sharp
|
||||||
|
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectPowerGen20K
|
id: EffectPowerGen20K
|
||||||
targetDepth: 3
|
targetDepth: 3
|
||||||
|
|||||||
@@ -103,6 +103,20 @@
|
|||||||
effects:
|
effects:
|
||||||
- !type:ActivateArtifact
|
- !type:ActivateArtifact
|
||||||
|
|
||||||
|
- type: artifactTrigger
|
||||||
|
id: TriggerBlood
|
||||||
|
targetDepth: 1
|
||||||
|
triggerHint: artifact-trigger-hint-blood
|
||||||
|
components:
|
||||||
|
- type: Reactive
|
||||||
|
groups:
|
||||||
|
Acidic: [ Touch ]
|
||||||
|
reactions:
|
||||||
|
- reagents: [ Blood ]
|
||||||
|
methods: [ Touch ]
|
||||||
|
effects:
|
||||||
|
- !type:ActivateArtifact
|
||||||
|
|
||||||
- type: artifactTrigger
|
- type: artifactTrigger
|
||||||
id: TriggerGas
|
id: TriggerGas
|
||||||
targetDepth: 2
|
targetDepth: 2
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"y": 32
|
"y": 32
|
||||||
},
|
},
|
||||||
"license": "CC-BY-SA-3.0",
|
"license": "CC-BY-SA-3.0",
|
||||||
"copyright": "Taken from tgStation at commit https://github.com/tgstation/tgstation/blob/4a367160a204db4c5b51c1f811a3b899f0bde3ea/icons/obj/stationobjs.dmi and repaletted using old tg sprites by mirrorcult",
|
"copyright": "Taken from tgStation at commit https://github.com/tgstation/tgstation/blob/4a367160a204db4c5b51c1f811a3b899f0bde3ea/icons/obj/stationobjs.dmi and repaletted using old tg sprites by mirrorcult, portal-artifact recolored by TheShuEd",
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"name": "portal-blue",
|
"name": "portal-blue",
|
||||||
@@ -24,6 +24,15 @@
|
|||||||
0.1, 0.1
|
0.1, 0.1
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "portal-artifact",
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
|
||||||
|
0.1, 0.1
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Resources/Textures/Effects/portal.rsi/portal-artifact.png
Normal file
BIN
Resources/Textures/Effects/portal.rsi/portal-artifact.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user