From 92b0f62500250385cf258ec3dfca400d2336e532 Mon Sep 17 00:00:00 2001 From: Flareguy <78941145+Flareguy@users.noreply.github.com> Date: Wed, 16 Apr 2025 01:33:39 +0000 Subject: [PATCH] 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> --- .../Polymorph/Systems/PolymorphSystem.cs | 9 ++++ .../Polymorph/PolymorphPrototype.cs | 8 ++++ .../Locale/en-US/research/technologies.ftl | 1 + .../Effects/desynchronizer_effecs.yml | 19 +++++++++ .../Entities/Mobs/Player/jaunt_mobs.yml | 11 +++++ .../Objects/Devices/desynchronizer.yml | 14 ++++++ Resources/Prototypes/Polymorphs/polymorph.yml | 15 +++++++ .../Recipes/Lathes/Packs/science.yml | 1 + .../Prototypes/Recipes/Lathes/devices.yml | 9 ++++ .../Prototypes/Research/experimental.yml | 18 ++++++-- .../Effects/chronofield.rsi/chronofield.png | Bin 0 -> 1339 bytes .../Effects/chronofield.rsi/meta.json | 21 +++++++++ .../Devices/desynchronizer.rsi/icon-on.png | Bin 0 -> 975 bytes .../Devices/desynchronizer.rsi/icon.png | Bin 0 -> 573 bytes .../desynchronizer.rsi/inhand-left.png | Bin 0 -> 322 bytes .../desynchronizer.rsi/inhand-right.png | Bin 0 -> 318 bytes .../Devices/desynchronizer.rsi/meta.json | 40 ++++++++++++++++++ 17 files changed, 163 insertions(+), 3 deletions(-) create mode 100644 Resources/Prototypes/Entities/Effects/desynchronizer_effecs.yml create mode 100644 Resources/Prototypes/Entities/Objects/Devices/desynchronizer.yml create mode 100644 Resources/Textures/Effects/chronofield.rsi/chronofield.png create mode 100644 Resources/Textures/Effects/chronofield.rsi/meta.json create mode 100644 Resources/Textures/Objects/Devices/desynchronizer.rsi/icon-on.png create mode 100644 Resources/Textures/Objects/Devices/desynchronizer.rsi/icon.png create mode 100644 Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Devices/desynchronizer.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Devices/desynchronizer.rsi/meta.json 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 0000000000000000000000000000000000000000..af43def9eb862de2d1ddca8eb818beadbb96366f GIT binary patch literal 1339 zcmV-B1;qM^P)!4GpI&VYpC7)x&ED_sUVdz8uUUX&58xPmMrCWpQY8R4 z`r-5S`$F0KmI2iETigG;-Tu%&>SyC93SftQeg6={+KR>z z3V;DvgG~Cxv(nJVvQ`%s(IS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)EU`#k4;HNR?1592Ww&8pL!1(~Z@&TEFe1IpM4^R>1d_WJ*2XH=s z^8uU>IB&24FdQ}jhQkKHaM%DC4jTZ&IXC%$anU*-5C+=h1E|pA`2mz@_51(|w0M31 zC0ac{fC6ovA3%jR`2Z@k%?E^qR`~!5^jaMzK(BlN0Xzd#8=iGOfC}yM0b!#>K7bOf x@&OcRkq@9mn|uHjTIB;M;Jd;w95w)k^A{zC>+3a!Ly`ah002ovPDHLkV1g-*#`^#O literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4ec05089677e1c4ea17f1ac8812fe43ce7aec3f4 GIT binary patch literal 573 zcmV-D0>b@?P)?}J7dW&?hfW>poTVK@ zmqMWkLYES{b?MN_4xPL7Z;0SvP>13WM1>8!5VY(hSt z7lsf5K<9-*f!#}y2pmX~qt9?K0KL_MR4N6Ura`@456QC3pmAmB9UO$F>;KwHZLx>AD!PkJs&6G;o}poPm=2caABAiq6z0K(xgvxD)NU0l6h4>r--`v69y-|sKfz3x}x;=2?afLc-kYSv8-K&dJajYbzD z;Mcit0PdVwaE3qd2+W+LZNoo{04_SEt+0`Ec}1Z0c7IuXEW(R%hQ+Im0Jzjcm05&w zdj%29I*`n6x9j;lA%IS&1Mzr#=Gg9N8DcaVG0UABh5;L&hFmxed_zL5ihyM8lDe+L zWHMppt$YvQ(P|kJk6KZQd<_W$*dcuM6_T$h@bln60D=$!5C8!X00B^bfbs*oogXlB zCWLD9f&F@Z!0voiyND=1K>2~)`8#H!`~c+#fbs*BAE5jI0c>ACh&zOTgbzkX00000 LNkvXXu0mjfFd_FS literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..46e6f88d0fc074ba6ab22ab3c9e16d89e0fad7bb GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|{&>1LhE&XX zd+T6svx7kE!{-|A+Z`A^oSEMxcrD<)~L*qkNt2rVtLk!~0Hw Otnqa9b6Mw<&;$VW(26+# literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8d5884e852c4070d91c959f01f7a5abdc44be29a GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|et5b#hE&XX zd+VU*5eJE*AH_drC^v>Tva&2|$vpV@mV4i{1a9t?iTP|g3avGACC&oZccg4m`|y9R z5YzoVl4(Uh-I#!;0D+3vhrYJ2H`9Jr$)a5C z