From bf7aa47b32ec4435ca76490cc920ad3bd0fcf05a Mon Sep 17 00:00:00 2001
From: Ed <96445749+TheShuEd@users.noreply.github.com>
Date: Mon, 1 Jan 2024 05:19:03 +0300
Subject: [PATCH] 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
---
.../Components/PortalArtifactComponent.cs | 14 +++++
.../Effects/Systems/PortalArtifactSystem.cs | 43 +++++++++++++++
.../en-US/xenoarchaeology/artifact-hints.ftl | 2 +
.../Prototypes/Entities/Effects/portal.yml | 17 ++++++
.../XenoArch/Effects/normal_effects.yml | 52 ++++++++++++------
.../XenoArch/Effects/utility_effects.yml | 13 ++++-
.../Prototypes/XenoArch/artifact_triggers.yml | 14 +++++
.../Textures/Effects/portal.rsi/meta.json | 11 +++-
.../Effects/portal.rsi/portal-artifact.png | Bin 0 -> 2504 bytes
9 files changed, 147 insertions(+), 19 deletions(-)
create mode 100644 Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PortalArtifactComponent.cs
create mode 100644 Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PortalArtifactSystem.cs
create mode 100644 Resources/Textures/Effects/portal.rsi/portal-artifact.png
diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PortalArtifactComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PortalArtifactComponent.cs
new file mode 100644
index 0000000000..f64b95d821
--- /dev/null
+++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PortalArtifactComponent.cs
@@ -0,0 +1,14 @@
+using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
+
+///
+/// When activated artifact will spawn an pair portals. First - right in artifact, Second - at random point of station.
+///
+[RegisterComponent, Access(typeof(PortalArtifactSystem))]
+public sealed partial class PortalArtifactComponent : Component
+{
+ [DataField]
+ public EntProtoId PortalProto = "PortalArtifact";
+}
diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PortalArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PortalArtifactSystem.cs
new file mode 100644
index 0000000000..e2d2172355
--- /dev/null
+++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PortalArtifactSystem.cs
@@ -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(OnActivate);
+ }
+
+ private void OnActivate(Entity artifact, ref ArtifactActivatedEvent args)
+ {
+ var map = Transform(artifact).MapID;
+ var firstPortal = Spawn(artifact.Comp.PortalProto, _transform.GetMapCoordinates(artifact));
+
+ var minds = new List();
+ var mindQuery = EntityQueryEnumerator();
+ 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);
+ }
+}
diff --git a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl
index 960a84e746..84d832a082 100644
--- a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl
+++ b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl
@@ -20,6 +20,7 @@ artifact-effect-hint-phasing = Structural phasing
artifact-effect-hint-sentience = Neurological activity
artifact-effect-hint-polymorph = Transmogrificational activity
artifact-effect-hint-magnet = Magnetic waves
+artifact-effect-hint-visual = Visual distortions
# 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")
@@ -30,6 +31,7 @@ artifact-trigger-hint-physical = Physical trauma
artifact-trigger-hint-tool = Tool usage
artifact-trigger-hint-music = Sonic vibrations
artifact-trigger-hint-water = Hydro-reactive
+artifact-trigger-hint-blood = Reaction with hemoglobin
artifact-trigger-hint-magnet = Magnetic waves
artifact-trigger-hint-death = Life essence
artifact-trigger-hint-radiation = Radiation
diff --git a/Resources/Prototypes/Entities/Effects/portal.yml b/Resources/Prototypes/Entities/Effects/portal.yml
index 92ead90dbf..653d3f608d 100644
--- a/Resources/Prototypes/Entities/Effects/portal.yml
+++ b/Resources/Prototypes/Entities/Effects/portal.yml
@@ -51,3 +51,20 @@
radius: 3
energy: 1
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
diff --git a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml
index 40fb951b5d..cf6bdd4fc5 100644
--- a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml
+++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml
@@ -255,6 +255,37 @@
components:
- 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
id: EffectExplosionScary
targetDepth: 2
@@ -562,24 +593,11 @@
maxIntensity: 50
- 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
+ id: EffectPortal
+ targetDepth: 3
+ effectHint: artifact-effect-hint-displacement
components:
- - type: GravityWell
- maxRange: 3
- baseRadialAcceleration: -1
- baseTangentialAcceleration: -3
+ - type: PortalArtifact
- type: artifactEffect
id: EffectSingulo
diff --git a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml
index fdf28fe9a0..edfd64b06c 100644
--- a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml
+++ b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml
@@ -107,6 +107,18 @@
isOpen: true
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
id: EffectDrill
targetDepth: 3
@@ -125,7 +137,6 @@
path: /Audio/Weapons/bladeslice.ogg
- type: Sharp
-
- type: artifactEffect
id: EffectPowerGen20K
targetDepth: 3
diff --git a/Resources/Prototypes/XenoArch/artifact_triggers.yml b/Resources/Prototypes/XenoArch/artifact_triggers.yml
index 6e128cef1c..57d1173fe3 100644
--- a/Resources/Prototypes/XenoArch/artifact_triggers.yml
+++ b/Resources/Prototypes/XenoArch/artifact_triggers.yml
@@ -103,6 +103,20 @@
effects:
- !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
id: TriggerGas
targetDepth: 2
diff --git a/Resources/Textures/Effects/portal.rsi/meta.json b/Resources/Textures/Effects/portal.rsi/meta.json
index ff4d8c51ee..62796d8236 100644
--- a/Resources/Textures/Effects/portal.rsi/meta.json
+++ b/Resources/Textures/Effects/portal.rsi/meta.json
@@ -5,7 +5,7 @@
"y": 32
},
"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": [
{
"name": "portal-blue",
@@ -24,6 +24,15 @@
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
+ ]
+ ]
}
]
}
diff --git a/Resources/Textures/Effects/portal.rsi/portal-artifact.png b/Resources/Textures/Effects/portal.rsi/portal-artifact.png
new file mode 100644
index 0000000000000000000000000000000000000000..26f29f7a6285e09ce43edd01b1966bee4eda887c
GIT binary patch
literal 2504
zcmV;(2{-nMP)003YJ1^@s6nkRXg00001b5ch_0Itp)
z=>Px;f=NU{RCt{2UB7P>ITU_-I*QFoSFA#cL|5FE(Y7d|CDKVq2}LLzkVMb3-$W(SO5T*_y9Zv
z2w=ZRpJPHnZwYY-w4
zfF#s1*nuCL>zA;(ei?NRF#)QOnwMI1>~8mAce|g3dvpB~K776bA3ooR5}{Rq9R05t
z#PY}XgIxS))9Ejh&nfxW`b#jL%wRm3!CHSQDL;x2VG<#Q-o37t
zf5|8U$^PfrbPBhYZ^EtRo5}f`vR>0?Qv9ob|3UkVz#m+KDFTqht>v4I|4zyO@%%e{
zJpZ1Y|Kzv_r?ZQzzfWfuaB`fchqJkU3FFD^+UMiRET|L*3y>-R$$)J$C>xC}E`CAr47K!5uo7P;~~xvS%6vb_fT)xl)&TNgy}_s(r5<{V)Ky8il5Y
z+V4~QgKYu6K232=!2(0AQ5B84cqv1;9IZV?aocuPN{rey7
zGXlR=fY07M?8Qu@#4e97o!?caLis5r@N{-@^(s!C6Xf9EKiuir#G}9Y(BF*s@K-$u
zSp?Wb*p&5BK^0+0=|yzYFc#R#pd?%wsFWCRF+vPT0t~qsoHsBBf9yyww}3eKKmGU?
zd>-oeoB|B(hjDF>#MKzSH-d9}W{3!5`D3#n$Mxg04~c`yPcFeeL2$MH&@9BkA0q&+
z>&F;;&&Qd4LqzCvEJ=W+Dgf8TNm+AX7JB>ji!}yGYY>VEYvd;%h%cwn
z1V_z=smytrjB!%(n_}qr!})`PZCdA_(jF`~e^U&L$dA^1G5kR#SSQoHSfruykA^Fd
zYvWYT4O=CEW3_vJKM%6H4Sq5vUI%1;4%sK>b^SAE)5}+$*Gg`CI7^
zn1Ua-C+gb~x%hQ!IW_a?ivaNN-R(Xrf0L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