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;
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;
}
[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>
[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;
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).
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