]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add space glue (#16355)
authorSlava0135 <40753025+Slava0135@users.noreply.github.com>
Sun, 14 May 2023 15:35:10 +0000 (18:35 +0300)
committerGitHub <noreply@github.com>
Sun, 14 May 2023 15:35:10 +0000 (01:35 +1000)
Content.Server/Chemistry/TileReactions/SpillTileReaction.cs
Content.Server/StationEvents/Components/VentClogRuleComponent.cs
Content.Shared/Chemistry/Reagent/ReagentPrototype.cs
Resources/Locale/en-US/reagents/meta/cleaning.ftl
Resources/Prototypes/Reagents/cleaning.yml

index e04ea30cb64b9ef6be82ce0dd074dbd48e40ce94..78457386d528bc328462239c092490316c0ea796 100644 (file)
@@ -3,8 +3,8 @@ using Content.Shared.Chemistry.Components;
 using Content.Shared.Chemistry.Reaction;
 using Content.Shared.Chemistry.Reagent;
 using Content.Shared.FixedPoint;
+using Content.Shared.Movement.Components;
 using Content.Shared.Slippery;
-using Content.Shared.StepTrigger;
 using Content.Shared.StepTrigger.Components;
 using Content.Shared.StepTrigger.Systems;
 using JetBrains.Annotations;
@@ -37,6 +37,12 @@ namespace Content.Server.Chemistry.TileReactions
                 var step = entityManager.EnsureComponent<StepTriggerComponent>(puddleUid);
                 entityManager.EntitySysManager.GetEntitySystem<StepTriggerSystem>().SetRequiredTriggerSpeed(puddleUid, _requiredSlipSpeed, step);
 
+                var slow = entityManager.EnsureComponent<SlowContactsComponent>(puddleUid);
+                var speedModifier = 1 - reagent.Viscosity;
+                slow.WalkSpeedModifier = speedModifier;
+                slow.SprintSpeedModifier = speedModifier;
+                entityManager.Dirty(slow);
+
                 return reactVolume;
             }
 
index b18687f9ed5567f7e76247b018d94bf772e9a0e2..eb016a5a831b2540189ea31bc3503dc43d3bec8b 100644 (file)
@@ -15,7 +15,7 @@ public sealed class VentClogRuleComponent : Component
     [DataField("safeishVentChemicals", customTypeSerializer: typeof(PrototypeIdListSerializer<ReagentPrototype>))]
     public readonly IReadOnlyList<string> SafeishVentChemicals = new[]
     {
-        "Water", "Blood", "Slime", "SpaceDrugs", "SpaceCleaner", "Nutriment", "Sugar", "SpaceLube", "Ephedrine", "Ale", "Beer"
+        "Water", "Blood", "Slime", "SpaceDrugs", "SpaceCleaner", "Nutriment", "Sugar", "SpaceLube", "Ephedrine", "Ale", "Beer", "SpaceGlue"
     };
 
     /// <summary>
index 09bdb41beffd7e8baff675071de7997885b8c91b..25e56608c23d33cc6b5b68ee2a9e7f786b723557 100644 (file)
@@ -80,6 +80,13 @@ namespace Content.Shared.Chemistry.Reagent
         [DataField("slippery")]
         public bool Slippery = false;
 
+        /// <summary>
+        /// How much reagent slows entities down if it's part of a puddle. 
+        /// 0 - no slowdown; 1 - can't move.
+        /// </summary>
+        [DataField("viscosity")]
+        public float Viscosity = 0;
+
         [DataField("metabolisms", serverOnly: true, customTypeSerializer: typeof(PrototypeIdDictionarySerializer<ReagentEffectsEntry, MetabolismGroupPrototype>))]
         public Dictionary<string, ReagentEffectsEntry>? Metabolisms = null;
 
index 8e14fe64a64118acee549d6b304bf20ef46e12d7..4c1ec87ddd5d71329eb7eb9e4aca17a26b42e9a9 100644 (file)
@@ -6,3 +6,6 @@ reagent-desc-space-cleaner = This is able to clean almost all surfaces of almost
 
 reagent-name-space-lube = space lube
 reagent-desc-space-lube = Space Lube is a high performance lubricant intended for maintenance of extremely complex mechanical equipment (and certainly not used to make people slip).
+
+reagent-name-space-glue = space glue
+reagent-desc-space-glue = Space Glue is a high performance glue intended for maintenance of extremely complex mechanical equipment (and certainly not used to make people stick to the floor).
index a7f01b5c1a6302be5bc57eb846cfa6ed16540264..19e1346da308ee646b685c5577dcaa5a64dbb36c 100644 (file)
       paralyzeTime: 3
       launchForwardsMultiplier: 2
       requiredSlipSpeed: 1
+
+- type: reagent
+  id: SpaceGlue
+  name: reagent-name-space-glue
+  desc: reagent-desc-space-glue
+  physicalDesc: reagent-physical-desc-sticky
+  flavor: funny
+  color: "#ffffff"
+  boilingPoint: 250.0
+  meltingPoint: 380.0
+  viscosity: 0.5
+  tileReactions:
+    - !type:SpillTileReaction
+  metabolisms:
+    Narcotic:
+      effects:
+      - !type:GenericStatusEffect
+        key: SeeingRainbows
+        component: SeeingRainbows
+        type: Add
+        time: 5
+        refresh: false
+      - !type:GenericStatusEffect
+        key: Muted
+        component: Muted
+        type: Add
+        time: 5
+        refresh: false