diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 114ab943ea..15cf24d0f2 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -877,9 +877,9 @@ public sealed partial class AdminVerbSystem var hadSlipComponent = EnsureComp(args.Target, out SlipperyComponent slipComponent); if (!hadSlipComponent) { - slipComponent.SuperSlippery = true; - slipComponent.ParalyzeTime = 5; - slipComponent.LaunchForwardsMultiplier = 20; + slipComponent.SlipData.SuperSlippery = true; + slipComponent.SlipData.ParalyzeTime = TimeSpan.FromSeconds(5); + slipComponent.SlipData.LaunchForwardsMultiplier = 20; } _slipperySystem.TrySlip(args.Target, slipComponent, args.Target, requiresContact: false); diff --git a/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs b/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs deleted file mode 100644 index 8c8b371da3..0000000000 --- a/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Content.Server.Fluids.EntitySystems; -using Content.Shared.Chemistry.Components; -using Content.Shared.Chemistry.Reaction; -using Content.Shared.Chemistry.Reagent; -using Content.Shared.FixedPoint; -using JetBrains.Annotations; -using Robust.Shared.Map; - -namespace Content.Server.Chemistry.TileReactions -{ - [UsedImplicitly] - [DataDefinition] - public sealed partial class SpillIfPuddlePresentTileReaction : ITileReaction - { - public FixedPoint2 TileReact(TileRef tile, - ReagentPrototype reagent, - FixedPoint2 reactVolume, - IEntityManager entityManager, - List? data) - { - var spillSystem = entityManager.System(); - if (reactVolume < 5 || !spillSystem.TryGetPuddle(tile, out _)) - return FixedPoint2.Zero; - - return spillSystem.TrySpillAt(tile, new Solution(reagent.ID, reactVolume, data), out _, sound: false, tileReact: false) - ? reactVolume - : FixedPoint2.Zero; - } - } -} diff --git a/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs b/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs deleted file mode 100644 index 68c1966de8..0000000000 --- a/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Content.Server.Fluids.EntitySystems; -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.Movement.Systems; -using Content.Shared.Slippery; -using Content.Shared.StepTrigger.Components; -using Content.Shared.StepTrigger.Systems; -using JetBrains.Annotations; -using Robust.Shared.Map; - -namespace Content.Server.Chemistry.TileReactions -{ - [UsedImplicitly] - [DataDefinition] - public sealed partial class SpillTileReaction : ITileReaction - { - [DataField("launchForwardsMultiplier")] public float LaunchForwardsMultiplier = 1; - [DataField("requiredSlipSpeed")] public float RequiredSlipSpeed = 6; - [DataField("paralyzeTime")] public float ParalyzeTime = 1; - - /// - /// - /// - [DataField("superSlippery")] public bool SuperSlippery; - - public FixedPoint2 TileReact(TileRef tile, - ReagentPrototype reagent, - FixedPoint2 reactVolume, - IEntityManager entityManager, - List? data) - { - if (reactVolume < 5) - return FixedPoint2.Zero; - - if (entityManager.EntitySysManager.GetEntitySystem() - .TrySpillAt(tile, new Solution(reagent.ID, reactVolume, data), out var puddleUid, false, false)) - { - var slippery = entityManager.EnsureComponent(puddleUid); - slippery.LaunchForwardsMultiplier = LaunchForwardsMultiplier; - slippery.ParalyzeTime = ParalyzeTime; - slippery.SuperSlippery = SuperSlippery; - entityManager.Dirty(puddleUid, slippery); - - var step = entityManager.EnsureComponent(puddleUid); - entityManager.EntitySysManager.GetEntitySystem().SetRequiredTriggerSpeed(puddleUid, RequiredSlipSpeed, step); - - var slow = entityManager.EnsureComponent(puddleUid); - var speedModifier = 1 - reagent.Viscosity; - entityManager.EntitySysManager.GetEntitySystem().ChangeModifiers(puddleUid, speedModifier, slow); - - return reactVolume; - } - - return FixedPoint2.Zero; - } - } -} diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index be45a1dbc4..8b66853210 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -71,8 +71,6 @@ public sealed partial class PuddleSystem : SharedPuddleSystem private static string[] _standoutReagents = [Blood, Slime, CopperBlood]; - public static readonly float PuddleVolume = 1000; - // Using local deletion queue instead of the standard queue so that we can easily "undelete" if a puddle // loses & then gains reagents in a single tick. private HashSet _deletionQueue = []; @@ -94,7 +92,6 @@ public sealed partial class PuddleSystem : SharedPuddleSystem // Shouldn't need re-anchoring. SubscribeLocalEvent(OnAnchorChanged); SubscribeLocalEvent(OnSolutionUpdate); - SubscribeLocalEvent(OnPuddleInit); SubscribeLocalEvent(OnPuddleSpread); SubscribeLocalEvent(OnPuddleSlip); @@ -327,11 +324,6 @@ public sealed partial class PuddleSystem : SharedPuddleSystem TickEvaporation(); } - private void OnPuddleInit(Entity entity, ref ComponentInit args) - { - _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName, out _, FixedPoint2.New(PuddleVolume)); - } - private void OnSolutionUpdate(Entity entity, ref SolutionContainerChangedEvent args) { if (args.SolutionId != entity.Comp.SolutionName) @@ -344,7 +336,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem } _deletionQueue.Remove(entity); - UpdateSlip(entity, entity.Comp, args.Solution); + UpdateSlip((entity, entity.Comp), args.Solution); UpdateSlow(entity, args.Solution); UpdateEvaporation(entity, args.Solution); UpdateAppearance(entity, entity.Comp); @@ -389,62 +381,89 @@ public sealed partial class PuddleSystem : SharedPuddleSystem _appearance.SetData(uid, PuddleVisuals.SolutionColor, color, appearance); } - private void UpdateSlip(EntityUid entityUid, PuddleComponent component, Solution solution) + private void UpdateSlip(Entity entity, Solution solution) { - var isSlippery = false; - var isSuperSlippery = false; - // The base sprite is currently at 0.3 so we require at least 2nd tier to be slippery or else it's too hard to see. - var amountRequired = FixedPoint2.New(component.OverflowVolume.Float() * LowThreshold); - var slipperyAmount = FixedPoint2.Zero; + if (!TryComp(entity, out var comp)) + return; - // Utilize the defaults from their relevant systems... this sucks, and is a bandaid - var launchForwardsMultiplier = SlipperyComponent.DefaultLaunchForwardsMultiplier; - var paralyzeTime = SlipperyComponent.DefaultParalyzeTime; - var requiredSlipSpeed = StepTriggerComponent.DefaultRequiredTriggeredSpeed; + // This is the base amount of reagent needed before a puddle can be considered slippery. Is defined based on + // the sprite threshold for a puddle larger than 5 pixels. + var smallPuddleThreshold = FixedPoint2.New(entity.Comp.OverflowVolume.Float() * LowThreshold); + + // Stores how many units of slippery reagents a puddle has + var slipperyUnits = FixedPoint2.Zero; + // Stores how many units of super slippery reagents a puddle has + var superSlipperyUnits = FixedPoint2.Zero; + + // These three values will be averaged later and all start at zero so the calculations work + // A cumulative weighted amount of minimum speed to slip values + var puddleFriction = FixedPoint2.Zero; + // A cumulative weighted amount of minimum speed to slip values + var slipStepTrigger = FixedPoint2.Zero; + // A cumulative weighted amount of launch multipliers from slippery reagents + var launchMult = FixedPoint2.Zero; + // A cumulative weighted amount of stun times from slippery reagents + var stunTimer = TimeSpan.Zero; + + // Check if the puddle is big enough to slip in to avoid doing unnecessary logic + if (solution.Volume <= smallPuddleThreshold) + { + _stepTrigger.SetActive(entity, false, comp); + _tile.SetModifier(entity, TileFrictionController.DefaultFriction); + return; + } + + if (!TryComp(entity, out var slipComp)) + return; foreach (var (reagent, quantity) in solution.Contents) { var reagentProto = _prototypeManager.Index(reagent.Prototype); - if (!reagentProto.Slippery) + // Calculate the minimum speed needed to slip in the puddle. Average the overall slip thresholds for all reagents + var deltaSlipTrigger = reagentProto.SlipData?.RequiredSlipSpeed ?? entity.Comp.DefaultSlippery; + slipStepTrigger += quantity * deltaSlipTrigger; + + // Aggregate Friction based on quantity + puddleFriction += reagentProto.Friction * quantity; + + if (reagentProto.SlipData == null) continue; - slipperyAmount += quantity; - if (slipperyAmount <= amountRequired) - continue; - isSlippery = true; + slipperyUnits += quantity; + // Aggregate launch speed based on quantity + launchMult += reagentProto.SlipData.LaunchForwardsMultiplier * quantity; + // Aggregate stun times based on quantity + stunTimer += reagentProto.SlipData.ParalyzeTime * (float)quantity; - foreach (var tileReaction in reagentProto.TileReactions) - { - if (tileReaction is not SpillTileReaction spillTileReaction) - continue; - isSuperSlippery = spillTileReaction.SuperSlippery; - launchForwardsMultiplier = launchForwardsMultiplier < spillTileReaction.LaunchForwardsMultiplier ? spillTileReaction.LaunchForwardsMultiplier : launchForwardsMultiplier; - requiredSlipSpeed = requiredSlipSpeed > spillTileReaction.RequiredSlipSpeed ? spillTileReaction.RequiredSlipSpeed : requiredSlipSpeed; - paralyzeTime = paralyzeTime < spillTileReaction.ParalyzeTime ? spillTileReaction.ParalyzeTime : paralyzeTime; - } + if (reagentProto.SlipData.SuperSlippery) + superSlipperyUnits += quantity; } - if (isSlippery) + // Turn on the step trigger if it's slippery + _stepTrigger.SetActive(entity, slipperyUnits > smallPuddleThreshold, comp); + + // This is based of the total volume and not just the slippery volume because there is a default + // slippery for all reagents even if they aren't technically slippery. + slipComp.SlipData.RequiredSlipSpeed = (float)(slipStepTrigger / solution.Volume); + _stepTrigger.SetRequiredTriggerSpeed(entity, slipComp.SlipData.RequiredSlipSpeed); + + // Divide these both by only total amount of slippery reagents. + // A puddle with 10 units of lube vs a puddle with 10 of lube and 20 catchup should stun and launch forward the same amount. + if (slipperyUnits > 0) { - var comp = EnsureComp(entityUid); - _stepTrigger.SetActive(entityUid, true, comp); - var friction = EnsureComp(entityUid); - _tile.SetModifier(entityUid, TileFrictionController.DefaultFriction * 0.5f, friction); - - if (!TryComp(entityUid, out var slipperyComponent)) - return; - slipperyComponent.SuperSlippery = isSuperSlippery; - _stepTrigger.SetRequiredTriggerSpeed(entityUid, requiredSlipSpeed); - slipperyComponent.LaunchForwardsMultiplier = launchForwardsMultiplier; - slipperyComponent.ParalyzeTime = paralyzeTime; - - } - else if (TryComp(entityUid, out var comp)) - { - _stepTrigger.SetActive(entityUid, false, comp); - RemCompDeferred(entityUid); + slipComp.SlipData.LaunchForwardsMultiplier = (float)(launchMult/slipperyUnits); + slipComp.SlipData.ParalyzeTime = (stunTimer/(float)slipperyUnits); } + + // Only make it super slippery if there is enough super slippery units for its own puddle + slipComp.SlipData.SuperSlippery = superSlipperyUnits >= smallPuddleThreshold; + + // Lower tile friction based on how slippery it is, lets items slide across a puddle of lube + slipComp.SlipData.SlipFriction = (float)(puddleFriction/solution.Volume); + _tile.SetModifier(entity, TileFrictionController.DefaultFriction * slipComp.SlipData.SlipFriction); + + Dirty(entity, slipComp); } private void UpdateSlow(EntityUid uid, Solution solution) diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index cfca682e9b..b4fed5fc03 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -9,6 +9,8 @@ using Content.Shared.Chemistry.Reaction; using Content.Shared.EntityEffects; using Content.Shared.Database; using Content.Shared.Nutrition; +using Content.Shared.Prototypes; +using Content.Shared.Slippery; using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Prototypes; @@ -98,11 +100,12 @@ namespace Content.Shared.Chemistry.Reagent [DataField] public bool MetamorphicChangeColor { get; private set; } = true; + /// - /// If this reagent is part of a puddle is it slippery. + /// If not null, makes something slippery. Also defines slippery interactions like stun time and launch mult. /// [DataField] - public bool Slippery; + public SlipperyEffectEntry? SlipData; /// /// The speed at which the reagent evaporates over time. @@ -130,6 +133,13 @@ namespace Content.Shared.Chemistry.Reagent [DataField] public float Viscosity; + /// + /// Linear Friction Multiplier for a reagent + /// 0 - frictionless, 1 - no effect on friction + /// + [DataField] + public float Friction = 1.0f; + /// /// Should this reagent work on the dead? /// diff --git a/Content.Shared/Fluids/Components/PuddleComponent.cs b/Content.Shared/Fluids/Components/PuddleComponent.cs index 5434479fb7..105206fece 100644 --- a/Content.Shared/Fluids/Components/PuddleComponent.cs +++ b/Content.Shared/Fluids/Components/PuddleComponent.cs @@ -19,6 +19,12 @@ namespace Content.Shared.Fluids.Components [DataField("solution")] public string SolutionName = "puddle"; + /// + /// Default minimum speed someone must be moving to slip for all reagents. + /// + [DataField] + public float DefaultSlippery = 5.5f; + [ViewVariables] public Entity? Solution; } diff --git a/Content.Shared/Slippery/SlidingSystem.cs b/Content.Shared/Slippery/SlidingSystem.cs index d44ddc883b..dde9bb6ab0 100644 --- a/Content.Shared/Slippery/SlidingSystem.cs +++ b/Content.Shared/Slippery/SlidingSystem.cs @@ -11,20 +11,11 @@ public sealed class SlidingSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(OnSlideAttempt); SubscribeLocalEvent(OnStand); SubscribeLocalEvent(OnStartCollide); SubscribeLocalEvent(OnEndCollide); } - /// - /// Modify the friction by the frictionModifier stored on the component. - /// - private void OnSlideAttempt(EntityUid uid, SlidingComponent component, ref TileFrictionEvent args) - { - args.Modifier = component.FrictionModifier; - } - /// /// Remove the component when the entity stands up again. /// @@ -38,11 +29,10 @@ public sealed class SlidingSystem : EntitySystem /// private void OnStartCollide(EntityUid uid, SlidingComponent component, ref StartCollideEvent args) { - if (!TryComp(args.OtherEntity, out var slippery) || !slippery.SuperSlippery) + if (!TryComp(args.OtherEntity, out var slippery) || !slippery.SlipData.SuperSlippery) return; component.CollidingEntities.Add(args.OtherEntity); - component.FrictionModifier = 0; Dirty(uid, component); } @@ -55,7 +45,7 @@ public sealed class SlidingSystem : EntitySystem return; if (component.CollidingEntities.Count == 0) - component.FrictionModifier = SharedStunSystem.KnockDownModifier; + RemComp(uid); Dirty(uid, component); } diff --git a/Content.Shared/Slippery/SlipperyComponent.cs b/Content.Shared/Slippery/SlipperyComponent.cs index a6bf0fce91..f6b6dd0b35 100644 --- a/Content.Shared/Slippery/SlipperyComponent.cs +++ b/Content.Shared/Slippery/SlipperyComponent.cs @@ -1,6 +1,7 @@ using Content.Shared.StepTrigger.Components; using Robust.Shared.Audio; using Robust.Shared.GameStates; +using Robust.Shared.Serialization; namespace Content.Shared.Slippery { @@ -13,8 +14,6 @@ namespace Content.Shared.Slippery [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SlipperyComponent : Component { - public const float DefaultParalyzeTime = 1.5f; - public const float DefaultLaunchForwardsMultiplier = 1.5f; /// /// Path to the sound to be played when a mob slips. /// @@ -23,25 +22,47 @@ namespace Content.Shared.Slippery public SoundSpecifier SlipSound = new SoundPathSpecifier("/Audio/Effects/slip.ogg"); /// - /// How many seconds the mob will be paralyzed for. + /// Loads the data needed to determine how slippery something is. /// [DataField, AutoNetworkedField] - [Access(Other = AccessPermissions.ReadWrite)] - public float ParalyzeTime = DefaultParalyzeTime; + public SlipperyEffectEntry SlipData = new(); + } + /// + /// Stores the data for slipperiness that way reagents and this component can use it. + /// + [DataDefinition, Serializable, NetSerializable] + public sealed partial class SlipperyEffectEntry + { + /// + /// How many seconds the mob will be paralyzed for. + /// + [DataField] + public TimeSpan ParalyzeTime = TimeSpan.FromSeconds(1.5); /// /// The entity's speed will be multiplied by this to slip it forwards. /// - [DataField, AutoNetworkedField] - [Access(Other = AccessPermissions.ReadWrite)] - public float LaunchForwardsMultiplier = DefaultLaunchForwardsMultiplier; + [DataField] + public float LaunchForwardsMultiplier = 1.5f; + + /// + /// Minimum speed entity must be moving to slip. + /// + [DataField] + public float RequiredSlipSpeed = 3.5f; /// /// If this is true, any slipping entity loses its friction until /// it's not colliding with any SuperSlippery entities anymore. + /// They also will fail any attempts to stand up unless they have no-slips. /// - [DataField, AutoNetworkedField] - [Access(Other = AccessPermissions.ReadWrite)] + [DataField] public bool SuperSlippery; + + /// + /// This is used to store the friction modifier that is used on a sliding entity. + /// + [DataField] + public float SlipFriction; } } diff --git a/Content.Shared/Slippery/SlipperySystem.cs b/Content.Shared/Slippery/SlipperySystem.cs index acf120ad1b..4da347acbd 100644 --- a/Content.Shared/Slippery/SlipperySystem.cs +++ b/Content.Shared/Slippery/SlipperySystem.cs @@ -39,7 +39,6 @@ public sealed class SlipperySystem : EntitySystem SubscribeLocalEvent(OnNoSlipAttempt); SubscribeLocalEvent(OnSlowedOverSlipAttempt); SubscribeLocalEvent(OnThrownSlipAttempt); - // as long as slip-resistant mice are never added, this should be fine (otherwise a mouse-hat will transfer it's power to the wearer). SubscribeLocalEvent>((e, c, ev) => OnNoSlipAttempt(e, c, ev.Args)); SubscribeLocalEvent>((e, c, ev) => OnSlowedOverSlipAttempt(e, c, ev.Args)); SubscribeLocalEvent>(OnGetSlowedOverSlipperyModifier); @@ -93,7 +92,7 @@ public sealed class SlipperySystem : EntitySystem public void TrySlip(EntityUid uid, SlipperyComponent component, EntityUid other, bool requiresContact = true) { - if (HasComp(other) && !component.SuperSlippery) + if (HasComp(other) && !component.SlipData.SuperSlippery) return; var attemptEv = new SlipAttemptEvent(); @@ -114,9 +113,9 @@ public sealed class SlipperySystem : EntitySystem if (TryComp(other, out PhysicsComponent? physics) && !HasComp(other)) { - _physics.SetLinearVelocity(other, physics.LinearVelocity * component.LaunchForwardsMultiplier, body: physics); + _physics.SetLinearVelocity(other, physics.LinearVelocity * component.SlipData.LaunchForwardsMultiplier, body: physics); - if (component.SuperSlippery && requiresContact) + if (component.SlipData.SuperSlippery && requiresContact) { var sliding = EnsureComp(other); sliding.CollidingEntities.Add(uid); @@ -126,7 +125,7 @@ public sealed class SlipperySystem : EntitySystem var playSound = !_statusEffects.HasStatusEffect(other, "KnockedDown"); - _stun.TryParalyze(other, TimeSpan.FromSeconds(component.ParalyzeTime), true); + _stun.TryParalyze(other, component.SlipData.ParalyzeTime, true); // Preventing from playing the slip sound when you are already knocked down. if (playSound) diff --git a/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs b/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs index 87d6d37a7f..b8483d021a 100644 --- a/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs +++ b/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs @@ -8,7 +8,6 @@ namespace Content.Shared.StepTrigger.Components; [Access(typeof(StepTriggerSystem))] public sealed partial class StepTriggerComponent : Component { - public const float DefaultRequiredTriggeredSpeed = 3.5f; /// /// List of entities that are currently colliding with the entity. /// @@ -38,7 +37,7 @@ public sealed partial class StepTriggerComponent : Component /// Entities will only be triggered if their speed exceeds this limit. /// [DataField, AutoNetworkedField] - public float RequiredTriggeredSpeed = DefaultRequiredTriggeredSpeed; + public float RequiredTriggeredSpeed = 3.5f; /// /// If any entities occupy the blacklist on the same tile then steptrigger won't work. diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 49962ec189..f89e850193 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -113,6 +113,8 @@ components: - type: Clickable - type: Slippery + - type: TileFrictionModifier + modifier: 0.3 - type: Transform noRot: true anchored: true diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml index 3dae7023d9..2a959a1099 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml @@ -179,7 +179,8 @@ rootTask: task: HonkbotCompound - type: Slippery - launchForwardsMultiplier: 2 + slipData: + launchForwardsMultiplier: 2 - type: Speech speechVerb: Cluwne - type: StepTrigger diff --git a/Resources/Prototypes/Entities/Objects/Fun/dice.yml b/Resources/Prototypes/Entities/Objects/Fun/dice.yml index 433a4ebac3..32df1f402d 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/dice.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/dice.yml @@ -125,7 +125,8 @@ - type: Slippery slipSound: path: /Audio/Effects/glass_step.ogg - launchForwardsMultiplier: 0 + slipData: + launchForwardsMultiplier: 0 - type: DamageUserOnTrigger damage: types: diff --git a/Resources/Prototypes/Entities/Objects/Fun/error.yml b/Resources/Prototypes/Entities/Objects/Fun/error.yml index e4b9af61e0..6f157d4fed 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/error.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/error.yml @@ -16,8 +16,9 @@ - ReagentId: Nutriment Quantity: 5 - type: Slippery - paralyzeTime: 3 - launchForwardsMultiplier: 3 + slipData: + paralyzeTime: 3 + launchForwardsMultiplier: 3 - type: StepTrigger intersectRatio: 0.2 - type: CollisionWake diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index 05dd5ce309..13f301148f 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -1742,7 +1742,8 @@ - type: UseDelay delay: 0.8 - type: Slippery - paralyzeTime: 0 + slipData: + paralyzeTime: 0 slipSound: collection: Parp params: diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml index 718d1ad8e3..2457404b48 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml @@ -69,7 +69,8 @@ - type: Slippery slipSound: path: /Audio/Effects/glass_step.ogg - launchForwardsMultiplier: 0 + slipData: + launchForwardsMultiplier: 0 - type: TriggerOnStepTrigger - type: DamageUserOnTrigger damage: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml index 3f605119d7..9cedbb23ca 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml @@ -127,8 +127,9 @@ - type: SolutionContainerVisuals fillBaseName: syndie- - type: Slippery - paralyzeTime: 3 - launchForwardsMultiplier: 3 + slipData: + paralyzeTime: 3 + launchForwardsMultiplier: 3 - type: Item heldPrefix: syndie - type: FlavorProfile @@ -152,8 +153,9 @@ layers: - state: syndie-soaplet - type: Slippery - paralyzeTime: 1.5 # these things are tiny - launchForwardsMultiplier: 1.5 + slipData: + paralyzeTime: 1.5 # these things are tiny + launchForwardsMultiplier: 1.5 - type: StepTrigger intersectRatio: 0.04 - type: Item @@ -218,8 +220,9 @@ - type: SolutionContainerVisuals fillBaseName: omega- - type: Slippery - paralyzeTime: 5.0 - launchForwardsMultiplier: 3.0 + slipData: + paralyzeTime: 5.0 + launchForwardsMultiplier: 3.0 - type: Item heldPrefix: omega - type: SolutionContainerManager diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml index e041e23900..2bf72de35e 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml @@ -133,7 +133,6 @@ name: reagent-name-ethanol parent: BaseAlcohol desc: reagent-desc-ethanol - slippery: true physicalDesc: reagent-physical-desc-strong-smelling flavor: alcohol color: "#b05b3c" diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml b/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml index 19a5e1bf8f..dac16dcb1c 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml @@ -2,7 +2,8 @@ id: BaseDrink group: Drinks abstract: true - slippery: true + slipData: + requiredSlipSpeed: 3.5 metabolisms: Drink: effects: @@ -18,7 +19,6 @@ amount: 1 tileReactions: - !type:ExtinguishTileReaction { } - - !type:SpillIfPuddlePresentTileReaction { } - type: reagent id: BaseSoda @@ -46,6 +46,9 @@ id: BaseAlcohol group: Drinks abstract: true + slipData: + requiredSlipSpeed: 3.5 + friction: 0.4 metabolisms: Drink: effects: diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml index 4f65cc0f25..028b0c4a8a 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml @@ -435,7 +435,6 @@ name: reagent-name-water parent: BaseDrink desc: reagent-desc-water - slippery: true evaporationSpeed: 0.3 absorbent: true physicalDesc: reagent-physical-desc-translucent @@ -444,6 +443,7 @@ recognizable: true boilingPoint: 100.0 meltingPoint: 0.0 + friction: 0.4 metabolisms: Drink: effects: @@ -454,12 +454,15 @@ id: Ice name: reagent-name-ice desc: reagent-desc-ice + slipData: + requiredSlipSpeed: 3.5 physicalDesc: reagent-physical-desc-frosty flavor: cold color: "#bed8e6" recognizable: true meltingPoint: 0.0 boilingPoint: 100.0 + friction: 0.05 #Copied from Ice Crust plantMetabolism: - !type:PlantAdjustWater amount: 1 diff --git a/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml b/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml index f419605307..1dde464128 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/condiments.yml @@ -174,10 +174,7 @@ color: "#fb7125" recognizable: true physicalDesc: reagent-physical-desc-sticky - slippery: false viscosity: 0.55 #Start using syrup to attach your remote recievers to your microwaves! - tileReactions: - - !type:SpillTileReaction metabolisms: Food: # 12 diona blood for 1 unit of syrup, this stuff better be worthwhile. diff --git a/Resources/Prototypes/Reagents/biological.yml b/Resources/Prototypes/Reagents/biological.yml index 6490e87ffb..df5ed51945 100644 --- a/Resources/Prototypes/Reagents/biological.yml +++ b/Resources/Prototypes/Reagents/biological.yml @@ -13,7 +13,6 @@ metamorphicChangeColor: false recognizable: true physicalDesc: reagent-physical-desc-ferrous - slippery: false metabolisms: Drink: effects: @@ -56,7 +55,6 @@ color: "#808A51" recognizable: true physicalDesc: reagent-physical-desc-slimy - slippery: false - type: reagent id: Slime @@ -67,10 +65,7 @@ color: "#2cf274" recognizable: true physicalDesc: reagent-physical-desc-viscous - slippery: false viscosity: 0.25 - tileReactions: - - !type:SpillTileReaction metabolisms: Food: # Delicious! @@ -91,10 +86,7 @@ color: "#cd7314" recognizable: true physicalDesc: reagent-physical-desc-sticky - slippery: false viscosity: 0.10 - tileReactions: - - !type:SpillTileReaction metabolisms: Food: # Sweet! @@ -118,7 +110,6 @@ color: "#162581" recognizable: true physicalDesc: reagent-physical-desc-metallic - slippery: false - type: reagent parent: Blood @@ -130,7 +121,6 @@ color: "#7a8bf2" recognizable: true physicalDesc: reagent-physical-desc-pungent - slippery: false - type: reagent id: ZombieBlood @@ -140,7 +130,6 @@ physicalDesc: reagent-physical-desc-necrotic flavor: bitter color: "#2b0700" - slippery: false metabolisms: Drink: # Disgusting! @@ -202,7 +191,6 @@ flavor: terrible color: "#d8d8b0" physicalDesc: reagent-physical-desc-exotic-smelling - slippery: false footstepSound: collection: FootstepBlood params: @@ -216,7 +204,9 @@ flavor: terrible color: "#87ab08" physicalDesc: reagent-physical-desc-pungent - slippery: true + slipData: + requiredSlipSpeed: 4.0 #It's not as slippery as water + friction: 0.4 metabolisms: Drink: effects: @@ -238,7 +228,6 @@ physicalDesc: reagent-physical-desc-neural flavor: mindful color: "#C584B8" - slippery: false metabolisms: Drink: effects: diff --git a/Resources/Prototypes/Reagents/chemicals.yml b/Resources/Prototypes/Reagents/chemicals.yml index 85f518bf5e..4542c97565 100644 --- a/Resources/Prototypes/Reagents/chemicals.yml +++ b/Resources/Prototypes/Reagents/chemicals.yml @@ -165,7 +165,6 @@ flavor: bitter color: "#E6E6DA" physicalDesc: reagent-physical-desc-crystalline - slippery: false - type: reagent id: Rororium diff --git a/Resources/Prototypes/Reagents/cleaning.yml b/Resources/Prototypes/Reagents/cleaning.yml index a6b53be688..1c0f220160 100644 --- a/Resources/Prototypes/Reagents/cleaning.yml +++ b/Resources/Prototypes/Reagents/cleaning.yml @@ -68,17 +68,16 @@ id: SpaceLube name: reagent-name-space-lube desc: reagent-desc-space-lube - slippery: true + slipData: + requiredSlipSpeed: 1 + superSlippery: true physicalDesc: reagent-physical-desc-shiny flavor: funny color: "#77b58e" recognizable: true boilingPoint: 290.0 # Glycerin meltingPoint: 18.2 - tileReactions: - - !type:SpillTileReaction - requiredSlipSpeed: 1 - superSlippery: true + friction: 0.0 - type: reagent id: SpaceGlue @@ -90,8 +89,6 @@ boilingPoint: 250.0 meltingPoint: 380.0 viscosity: 0.5 - tileReactions: - - !type:SpillTileReaction reactiveEffects: Acidic: methods: [ Touch ] diff --git a/Resources/Prototypes/Reagents/fun.yml b/Resources/Prototypes/Reagents/fun.yml index 00d31cbd10..adbf202c7e 100644 --- a/Resources/Prototypes/Reagents/fun.yml +++ b/Resources/Prototypes/Reagents/fun.yml @@ -170,7 +170,8 @@ id: Razorium name: reagent-name-razorium group: Toxins - slippery: true + slipData: + requiredSlipSpeed: 3.5 desc: reagent-desc-razorium physicalDesc: reagent-physical-desc-reflective flavor: sharp @@ -209,7 +210,8 @@ id: Fresium name: reagent-name-fresium group: Toxins - slippery: true + slipData: + requiredSlipSpeed: 3.5 desc: reagent-desc-fresium physicalDesc: reagent-physical-desc-frosty flavor: cold @@ -305,7 +307,8 @@ physicalDesc: reagent-physical-desc-funny flavor: funny color: "#FF4DD2" - slippery: true #clown juice gotta slip + slipData: + requiredSlipSpeed: 3.5 #clown juice gotta slip metabolisms: Medicine: effects: diff --git a/Resources/Prototypes/Reagents/pyrotechnic.yml b/Resources/Prototypes/Reagents/pyrotechnic.yml index 4bc1652da9..3ff7eb5ad6 100644 --- a/Resources/Prototypes/Reagents/pyrotechnic.yml +++ b/Resources/Prototypes/Reagents/pyrotechnic.yml @@ -149,13 +149,15 @@ parent: BasePyrotechnic desc: reagent-desc-welding-fuel physicalDesc: reagent-physical-desc-oily - slippery: true + slipData: + requiredSlipSpeed: 3.5 flavor: bitter flavorMinimum: 0.01 color: "#a76b1c" recognizable: true boilingPoint: -84.7 # Acetylene. Close enough. meltingPoint: -80.7 + friction: 0.4 tileReactions: - !type:FlammableTileReaction {} metabolisms: @@ -177,4 +179,4 @@ flavor: bitter color: "#9e6b38" boilingPoint: 190.0 # Perfluorooctanoic Acid. - meltingPoint: 45.0 \ No newline at end of file + meltingPoint: 45.0 diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 6235136dbc..5f6e5581dd 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -171,7 +171,6 @@ flavor: sour color: "#48b3b8" physicalDesc: reagent-physical-desc-ferrous - slippery: false metabolisms: Drink: effects: