]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
New Experimental Science T3: Desynchronizer (#35752)
authorFlareguy <78941145+Flareguy@users.noreply.github.com>
Wed, 16 Apr 2025 01:33:39 +0000 (01:33 +0000)
committerGitHub <noreply@github.com>
Wed, 16 Apr 2025 01:33:39 +0000 (11:33 +1000)
* desynchronizer real

* yaml stuff from slarti branch

* C# stuff

* oops

* review

* improve

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
17 files changed:
Content.Server/Polymorph/Systems/PolymorphSystem.cs
Content.Shared/Polymorph/PolymorphPrototype.cs
Resources/Locale/en-US/research/technologies.ftl
Resources/Prototypes/Entities/Effects/desynchronizer_effecs.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Mobs/Player/jaunt_mobs.yml
Resources/Prototypes/Entities/Objects/Devices/desynchronizer.yml [new file with mode: 0644]
Resources/Prototypes/Polymorphs/polymorph.yml
Resources/Prototypes/Recipes/Lathes/Packs/science.yml
Resources/Prototypes/Recipes/Lathes/devices.yml
Resources/Prototypes/Research/experimental.yml
Resources/Textures/Effects/chronofield.rsi/chronofield.png [new file with mode: 0644]
Resources/Textures/Effects/chronofield.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Devices/desynchronizer.rsi/icon-on.png [new file with mode: 0644]
Resources/Textures/Objects/Devices/desynchronizer.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-left.png [new file with mode: 0644]
Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-right.png [new file with mode: 0644]
Resources/Textures/Objects/Devices/desynchronizer.rsi/meta.json [new file with mode: 0644]

index e305109ad54e2f9916089a3221a23f7062ce4f86..ddbde38a08c991eb42590cb4bfc8aa5499f17326 100644 (file)
@@ -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)),
index 07901b1857f0afaceb04adbc866aecfdaa55038d..d731c4bfc552f61e9cb615401e8c26c4caec5284 100644 (file)
@@ -40,6 +40,14 @@ public sealed partial record PolymorphConfiguration
     [DataField(required: true, serverOnly: true)]
     public EntProtoId Entity;
 
+    /// <summary>
+    /// Additional entity to spawn when polymorphing/reverting.
+    /// Gets parented to the entity polymorphed into.
+    /// Useful for visual effects.
+    /// </summary>
+    [DataField(serverOnly: true)]
+    public EntProtoId? EffectProto;
+
     /// <summary>
     /// The delay between the polymorph's uses in seconds
     /// Slightly weird as of right now.
index 0b0970ec08f10cd1977cfcb3e97cd6ed3a98ae9a..f4f12eec5253540be0fd46c9cc40bcdf3d98d8d8 100644 (file)
@@ -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 (file)
index 0000000..6bede2f
--- /dev/null
@@ -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
index 3002264a754117f4c96e459780a7c74ba798689c..fbc0b1943ca8656d39b494905eb6d14ec381ab40 100644 (file)
   - 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 (file)
index 0000000..d5f8352
--- /dev/null
@@ -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
index 935b2b27f544a4d33599043559ab73d7671705bd..06ec7b0e50bdc44e6089c351c2ba2e1e983e13a9 100644 (file)
     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
index 42786937a79715539ee2ada04177991bc503e180..a86b4bbebfb1484354f3926505f7087dd8e30cd5 100644 (file)
@@ -29,6 +29,7 @@
   - HoloprojectorField
   - SignallerAdvanced
   - DeviceQuantumSpinInverter
+  - DeviceDesynchronizer
 
 - type: latheRecipePack
   id: ScienceClothing
index 21ec6773efe2d82208ec32e3e7a1c04174016945..62a61223426b21c32e9c784ad56f9ce71062bd55 100644 (file)
     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
index be19a1170287f68997e332f062fa23a92dd91d8b..da3c053c68961a559a44cd2ffa9cbf09acce5fb4 100644 (file)
   - WeaponParticleDecelerator
   - HoloprojectorField
 
-# Tier 3
-
 - type: technology
   id: GravityManipulation
   name: research-technology-gravity-manipulation
     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
   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 (file)
index 0000000..af43def
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 (file)
index 0000000..b043ddc
--- /dev/null
@@ -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 (file)
index 0000000..77513c7
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 (file)
index 0000000..4ec0508
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 (file)
index 0000000..46e6f88
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 (file)
index 0000000..8d5884e
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 (file)
index 0000000..ca7f337
--- /dev/null
@@ -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
+        }
+    ]
+}