From: Flareguy <78941145+Flareguy@users.noreply.github.com>
Date: Wed, 16 Apr 2025 01:33:39 +0000 (+0000)
Subject: New Experimental Science T3: Desynchronizer (#35752)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=92b0f62500250385cf258ec3dfca400d2336e532;p=space-station-14.git
New Experimental Science T3: Desynchronizer (#35752)
* desynchronizer real
* yaml stuff from slarti branch
* C# stuff
* oops
* review
* improve
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
---
diff --git a/Content.Server/Polymorph/Systems/PolymorphSystem.cs b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
index e305109ad5..ddbde38a08 100644
--- a/Content.Server/Polymorph/Systems/PolymorphSystem.cs
+++ b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
@@ -5,6 +5,7 @@ using Content.Server.Mind.Commands;
using Content.Server.Polymorph.Components;
using Content.Shared.Actions;
using Content.Shared.Buckle;
+using Content.Shared.Coordinates;
using Content.Shared.Damage;
using Content.Shared.Destructible;
using Content.Shared.Hands.EntitySystems;
@@ -277,6 +278,10 @@ public sealed partial class PolymorphSystem : EntitySystem
var ev = new PolymorphedEvent(uid, child, false);
RaiseLocalEvent(uid, ref ev);
+ // visual effect spawn
+ if (configuration.EffectProto != null)
+ SpawnAttachedTo(configuration.EffectProto, child.ToCoordinates());
+
return child;
}
@@ -353,6 +358,10 @@ public sealed partial class PolymorphSystem : EntitySystem
var ev = new PolymorphedEvent(uid, parent, true);
RaiseLocalEvent(uid, ref ev);
+ // visual effect spawn
+ if (component.Configuration.EffectProto != null)
+ SpawnAttachedTo(component.Configuration.EffectProto, parent.ToCoordinates());
+
if (component.Configuration.ExitPolymorphPopup != null)
_popup.PopupEntity(Loc.GetString(component.Configuration.ExitPolymorphPopup,
("parent", Identity.Entity(uid, EntityManager)),
diff --git a/Content.Shared/Polymorph/PolymorphPrototype.cs b/Content.Shared/Polymorph/PolymorphPrototype.cs
index 07901b1857..d731c4bfc5 100644
--- a/Content.Shared/Polymorph/PolymorphPrototype.cs
+++ b/Content.Shared/Polymorph/PolymorphPrototype.cs
@@ -40,6 +40,14 @@ public sealed partial record PolymorphConfiguration
[DataField(required: true, serverOnly: true)]
public EntProtoId Entity;
+ ///
+ /// Additional entity to spawn when polymorphing/reverting.
+ /// Gets parented to the entity polymorphed into.
+ /// Useful for visual effects.
+ ///
+ [DataField(serverOnly: true)]
+ public EntProtoId? EffectProto;
+
///
/// The delay between the polymorph's uses in seconds
/// Slightly weird as of right now.
diff --git a/Resources/Locale/en-US/research/technologies.ftl b/Resources/Locale/en-US/research/technologies.ftl
index 0b0970ec08..f4f12eec52 100644
--- a/Resources/Locale/en-US/research/technologies.ftl
+++ b/Resources/Locale/en-US/research/technologies.ftl
@@ -48,6 +48,7 @@ research-technology-anomaly-harnessing = Anomaly Core Harnessing
research-technology-abnormal-artifact-manipulation = Artifact Recycling
research-technology-gravity-manipulation = Gravity Manipulation
research-technology-quantum-leaping = Quantum Leaping
+research-technology-bluespace-time-manipulation = Bluespace Time Manipulation
research-technology-advanced-anomaly-research = Advanced Anomaly Research
research-technology-rped = Rapid Part Exchange
research-technology-super-parts = Super Parts
diff --git a/Resources/Prototypes/Entities/Effects/desynchronizer_effecs.yml b/Resources/Prototypes/Entities/Effects/desynchronizer_effecs.yml
new file mode 100644
index 0000000000..6bede2fa8d
--- /dev/null
+++ b/Resources/Prototypes/Entities/Effects/desynchronizer_effecs.yml
@@ -0,0 +1,19 @@
+- type: entity
+ id: EffectDesynchronizer
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: Sprite
+ drawdepth: Effects
+ noRot: true
+ layers:
+ - shader: unshaded
+ map: ["enum.EffectLayers.Unshaded"]
+ sprite: Effects/chronofield.rsi
+ state: chronofield
+ - type: AnimationPlayer
+ - type: EffectVisuals
+ - type: TimedDespawn
+ lifetime: 0.8
+ - type: Tag
+ tags:
+ - HideContextMenu
\ No newline at end of file
diff --git a/Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml b/Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
index 3002264a75..fbc0b1943c 100644
--- a/Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
+++ b/Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
@@ -38,3 +38,14 @@
- type: MovementSpeedModifier
baseSprintSpeed: 6
baseWalkSpeed: 4
+
+- type: entity
+ parent: [Incorporeal, BaseMob]
+ id: DesynchronizedPocket
+ name: desynchronized pocket
+ description: A pocket in spacetime, keeping the user a fraction of a second in the future.
+ components:
+ - type: Spectral
+ - type: MovementSpeedModifier
+ baseSprintSpeed: 0
+ baseWalkSpeed: 0
diff --git a/Resources/Prototypes/Entities/Objects/Devices/desynchronizer.yml b/Resources/Prototypes/Entities/Objects/Devices/desynchronizer.yml
new file mode 100644
index 0000000000..d5f8352baa
--- /dev/null
+++ b/Resources/Prototypes/Entities/Objects/Devices/desynchronizer.yml
@@ -0,0 +1,14 @@
+- type: entity
+ id: DeviceDesynchronizer
+ parent: BaseItem
+ name: desynchronizer
+ description: An experimental device that can temporarily desynchronize the user from spacetime, effectively making them disappear while it's active.
+ components:
+ - type: Sprite
+ sprite: Objects/Devices/desynchronizer.rsi
+ state: icon
+ - type: TriggerOnUse
+ - type: PolymorphOnTrigger
+ polymorph: VoidPocket
+ - type: UseDelay
+ delay: 220 # long delay to ensure it can't be spammed, use it wisely
diff --git a/Resources/Prototypes/Polymorphs/polymorph.yml b/Resources/Prototypes/Polymorphs/polymorph.yml
index 935b2b27f5..06ec7b0e50 100644
--- a/Resources/Prototypes/Polymorphs/polymorph.yml
+++ b/Resources/Prototypes/Polymorphs/polymorph.yml
@@ -222,3 +222,18 @@
polymorphSound: /Audio/Magic/ethereal_enter.ogg
exitPolymorphSound: /Audio/Magic/ethereal_exit.ogg
duration: 3
+
+# Desynchronized / Void Pocket status
+- type: polymorph
+ id: VoidPocket
+ configuration:
+ entity: DesynchronizedPocket
+ transferName: false
+ inventory: None
+ forced: false
+ revertOnDeath: true
+ allowRepeatedMorphs: false
+ polymorphSound: /Audio/Magic/ethereal_enter.ogg
+ exitPolymorphSound: /Audio/Magic/ethereal_exit.ogg
+ duration: 120
+ effectProto: EffectDesynchronizer
\ No newline at end of file
diff --git a/Resources/Prototypes/Recipes/Lathes/Packs/science.yml b/Resources/Prototypes/Recipes/Lathes/Packs/science.yml
index 42786937a7..a86b4bbebf 100644
--- a/Resources/Prototypes/Recipes/Lathes/Packs/science.yml
+++ b/Resources/Prototypes/Recipes/Lathes/Packs/science.yml
@@ -29,6 +29,7 @@
- HoloprojectorField
- SignallerAdvanced
- DeviceQuantumSpinInverter
+ - DeviceDesynchronizer
- type: latheRecipePack
id: ScienceClothing
diff --git a/Resources/Prototypes/Recipes/Lathes/devices.yml b/Resources/Prototypes/Recipes/Lathes/devices.yml
index 21ec6773ef..62a6122342 100644
--- a/Resources/Prototypes/Recipes/Lathes/devices.yml
+++ b/Resources/Prototypes/Recipes/Lathes/devices.yml
@@ -175,6 +175,15 @@
Glass: 100
Uranium: 100
+- type: latheRecipe
+ id: DeviceDesynchronizer
+ result: DeviceDesynchronizer
+ completetime: 5
+ materials:
+ Steel: 700
+ Glass: 100
+ Uranium: 200
+
- type: latheRecipe
id: WeaponProtoKineticAccelerator
result: WeaponProtoKineticAccelerator
diff --git a/Resources/Prototypes/Research/experimental.yml b/Resources/Prototypes/Research/experimental.yml
index be19a11702..da3c053c68 100644
--- a/Resources/Prototypes/Research/experimental.yml
+++ b/Resources/Prototypes/Research/experimental.yml
@@ -124,8 +124,6 @@
- WeaponParticleDecelerator
- HoloprojectorField
-# Tier 3
-
- type: technology
id: GravityManipulation
name: research-technology-gravity-manipulation
@@ -133,12 +131,14 @@
sprite: Objects/Weapons/Guns/Launchers/tether_gun.rsi
state: base
discipline: Experimental
- tier: 3
+ tier: 2
cost: 10000
recipeUnlocks:
- WeaponForceGun
- WeaponTetherGun
+# Tier 3
+
- type: technology
id: QuantumLeaping
name: research-technology-quantum-leaping
@@ -150,3 +150,15 @@
cost: 10000
recipeUnlocks:
- DeviceQuantumSpinInverter
+
+- type: technology
+ id: BluespaceTimeManipulation
+ name: research-technology-bluespace-time-manipulation
+ icon:
+ sprite: Objects/Devices/desynchronizer.rsi
+ state: icon
+ discipline: Experimental
+ tier: 3
+ cost: 10000
+ recipeUnlocks:
+ - DeviceDesynchronizer
\ No newline at end of file
diff --git a/Resources/Textures/Effects/chronofield.rsi/chronofield.png b/Resources/Textures/Effects/chronofield.rsi/chronofield.png
new file mode 100644
index 0000000000..af43def9eb
Binary files /dev/null and b/Resources/Textures/Effects/chronofield.rsi/chronofield.png differ
diff --git a/Resources/Textures/Effects/chronofield.rsi/meta.json b/Resources/Textures/Effects/chronofield.rsi/meta.json
new file mode 100644
index 0000000000..b043ddc931
--- /dev/null
+++ b/Resources/Textures/Effects/chronofield.rsi/meta.json
@@ -0,0 +1,21 @@
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Taken from https://github.com/tgstation/tgstation at commit 6665eec76c98a4f3f89bebcd10b34b47dcc0b8ae",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "chronofield",
+ "delays": [
+ [
+ 0.1,
+ 0.1,
+ 0.1
+ ]
+ ]
+ }
+ ]
+}
diff --git a/Resources/Textures/Objects/Devices/desynchronizer.rsi/icon-on.png b/Resources/Textures/Objects/Devices/desynchronizer.rsi/icon-on.png
new file mode 100644
index 0000000000..77513c732d
Binary files /dev/null and b/Resources/Textures/Objects/Devices/desynchronizer.rsi/icon-on.png differ
diff --git a/Resources/Textures/Objects/Devices/desynchronizer.rsi/icon.png b/Resources/Textures/Objects/Devices/desynchronizer.rsi/icon.png
new file mode 100644
index 0000000000..4ec0508967
Binary files /dev/null and b/Resources/Textures/Objects/Devices/desynchronizer.rsi/icon.png differ
diff --git a/Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-left.png b/Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-left.png
new file mode 100644
index 0000000000..46e6f88d0f
Binary files /dev/null and b/Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-left.png differ
diff --git a/Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-right.png b/Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-right.png
new file mode 100644
index 0000000000..8d5884e852
Binary files /dev/null and b/Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-right.png differ
diff --git a/Resources/Textures/Objects/Devices/desynchronizer.rsi/meta.json b/Resources/Textures/Objects/Devices/desynchronizer.rsi/meta.json
new file mode 100644
index 0000000000..ca7f337a92
--- /dev/null
+++ b/Resources/Textures/Objects/Devices/desynchronizer.rsi/meta.json
@@ -0,0 +1,40 @@
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/blob/2712e62ee56d46e6ae11fcb3b16d401a01179ec1/icons/obj/device.dmi, inhands sprited by Flareguy for Space Station 14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon-on",
+ "delays": [
+ [
+ 0.1,
+ 0.1,
+ 0.1,
+ 0.1,
+ 0.1
+ ]
+ ]
+ },
+ {
+ "name": "icon",
+ "delays": [
+ [
+ 0.5,
+ 0.5
+ ]
+ ]
+ },
+ {
+ "name": "inhand-left",
+ "directions": 4
+ },
+ {
+ "name": "inhand-right",
+ "directions": 4
+ }
+ ]
+}