diff --git a/Content.Server/Parkstation/Slippery/DropOnSlipComponent.cs b/Content.Server/Parkstation/Slippery/DropOnSlipComponent.cs new file mode 100644 index 0000000000..18b9191e0c --- /dev/null +++ b/Content.Server/Parkstation/Slippery/DropOnSlipComponent.cs @@ -0,0 +1,15 @@ +namespace Content.Server.Parkstation.Slippery; + +/// +/// Marks this item as one that may be dropped when its wearer slips with it equipped. +/// +[RegisterComponent] +public sealed partial class DropOnSlipComponent : Component +{ + /// + /// Percent chance to drop this item when slipping + /// + [DataField("chance")] + [ViewVariables(VVAccess.ReadWrite)] + public int Chance = 20; +} diff --git a/Content.Server/Parkstation/Slippery/DropOnSlipSystem.cs b/Content.Server/Parkstation/Slippery/DropOnSlipSystem.cs new file mode 100644 index 0000000000..88f77aeb61 --- /dev/null +++ b/Content.Server/Parkstation/Slippery/DropOnSlipSystem.cs @@ -0,0 +1,96 @@ +using System.Numerics; +using Content.Server.Popups; +using Content.Shared.Administration.Logs; +using Content.Shared.Database; +using Content.Shared.Interaction.Components; +using Content.Shared.Inventory; +using Content.Shared.Popups; +using Content.Shared.Slippery; +using Content.Shared.Throwing; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; +using Robust.Shared.Random; + +namespace Content.Server.Parkstation.Slippery; + +public sealed class DropOnSlipSystem : EntitySystem +{ + [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; + [Dependency] private readonly PopupSystem _popup = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly InventorySystem _inventory = default!; + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + [Dependency] private readonly ThrowingSystem _throwing = default!; + + public float PocketDropChance = 10f; + public float PocketThrowChance = 5f; + + public float ClumsyDropChance = 5f; + public float ClumsyThrowChance = 90f; + + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(HandleSlip); + } + + + private void HandleSlip(EntityUid entity, InventoryComponent invComp, ParkSlipEvent args) + { + if (!_inventory.TryGetSlots(entity, out var slotDefinitions)) + return; + + foreach (var slot in slotDefinitions) + { + if (!_inventory.TryGetSlotEntity(entity, slot.Name, out var item)) + continue; + + if (ShouldBeDropped(entity, slot, item)) + { + var popupString = Loc.GetString("system-drop-on-slip-text-component", ("name", entity), ("item", item)); + + Drop(entity, item.Value, slot.Name, popupString); + } + } + } + + private bool ShouldBeDropped(EntityUid entity, SlotDefinition slot, EntityUid? item) + { + // Check for any items in pockets or other criteria + if (slot.SlotFlags == SlotFlags.POCKET && _random.NextFloat(0, 100) < PocketDropChance) + return true; + + // Check for DropOnSlipComponent + if (EntityManager.TryGetComponent(item, out var dropComp) && _random.NextFloat(0, 100) < dropComp.Chance) + return true; + + // Check for ClumsyComponent + if (slot.Name != "jumpsuit" && _random.NextFloat(0, 100) < ClumsyDropChance && HasComp(entity)) + return true; + + return false; + } + + private void Drop(EntityUid entity, EntityUid item, string slot, string popupString) + { + if (!_inventory.TryUnequip(entity, slot, false, true)) + return; + + EntityManager.TryGetComponent(entity, out var entPhysComp); + + if (entPhysComp != null) + { + var strength = entPhysComp.LinearVelocity.Length() / 1.5f; + Vector2 direction = new Vector2(_random.Next(-8, 8), _random.Next(-8, 8)); + + _throwing.TryThrow(item, direction, strength, entity); + } + + _popup.PopupEntity(popupString, item, PopupType.MediumCaution); + + var logMessage = Loc.GetString("system-drop-on-slip-log", ("entity", ToPrettyString(entity)), ("item", ToPrettyString(item))); + _adminLogger.Add(LogType.Slip, LogImpact.Low, $"{logMessage}"); + } +} diff --git a/Content.Shared/Slippery/SlipperySystem.cs b/Content.Shared/Slippery/SlipperySystem.cs index d20495cfa6..b97c93c2e3 100644 --- a/Content.Shared/Slippery/SlipperySystem.cs +++ b/Content.Shared/Slippery/SlipperySystem.cs @@ -101,6 +101,8 @@ private void TrySlip(EntityUid uid, SlipperyComponent component, EntityUid other _stun.TryParalyze(other, TimeSpan.FromSeconds(component.ParalyzeTime), true); + RaiseLocalEvent(other, new ParkSlipEvent(uid)); // Parkstation-DropOnSlip + // Preventing from playing the slip sound when you are already knocked down. if (playSound) { @@ -131,3 +133,10 @@ public record struct SlipCausingAttemptEvent (bool Cancelled); /// The entity being slipped [ByRefEvent] public readonly record struct SlipEvent(EntityUid Slipped); + +// Parkstation-DropOnSlip-Start +/// +/// This is an event raised on an entity after they slip. Duh. +/// +public readonly record struct ParkSlipEvent(EntityUid Tripper); +// Parkstation-DropOnSlip-End diff --git a/Resources/Locale/en-US/parkstation/Content/Slippery/dropOnSlip.ftl b/Resources/Locale/en-US/parkstation/Content/Slippery/dropOnSlip.ftl new file mode 100644 index 0000000000..518e2028e6 --- /dev/null +++ b/Resources/Locale/en-US/parkstation/Content/Slippery/dropOnSlip.ftl @@ -0,0 +1,5 @@ +system-drop-on-slip-text-component = {$name}'s {$item} slips off! +system-drop-on-slip-text-pocket = Something falls out of {$name}'s pocket! +system-drop-on-slip-text-clumsy = The {$item} tumbles off of {$name}! + +system-drop-on-slip-log = {$entity} dropped {$item} when slipping. diff --git a/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml b/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml index df160f8e5a..04a22a4f7b 100644 --- a/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml +++ b/Resources/Prototypes/Entities/Clothing/Ears/headsets.yml @@ -26,6 +26,8 @@ - type: GuideHelp guides: - Radio + - type: DropOnSlip + chance: 5 - type: entity parent: ClothingHeadset diff --git a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml index 5dfa1df150..ca66723b2a 100644 --- a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml +++ b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml @@ -9,6 +9,8 @@ state: icon_alt - type: Clothing equippedPrefix: alt + - type: DropOnSlip + chance: 0 - type: entity parent: ClothingHeadsetAlt diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml b/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml index 9af8edb002..385e87b6a3 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml @@ -66,6 +66,8 @@ - type: Tag tags: - SecDogWearable # DeltaV - let Laika wear meson goggles + - type: DropOnSlip + chance: 30 - type: entity parent: ClothingEyesBase @@ -83,6 +85,8 @@ - HamsterWearable - WhitelistChameleon - GlassesNearsight # SimpleStation14 NearsightedTrait + - type: DropOnSlip + chance: 30 - type: entity parent: ClothingEyesBase @@ -144,6 +148,8 @@ - SecDogWearable # DeltaV - let Laika wear sunglasses - type: IdentityBlocker coverage: EYES + - type: DropOnSlip + chance: 30 - type: entity parent: ClothingEyesGlassesCheapSunglasses @@ -210,6 +216,8 @@ coefficients: Heat: 0.95 - type: GroupExamine + - type: DropOnSlip + chance: 30 - type: entity parent: ClothingEyesBase diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml b/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml index fabb7bc642..15b85b67d8 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml @@ -12,6 +12,8 @@ damageContainers: - Inorganic - Silicon + - type: DropOnSlip + chance: 25 - type: entity parent: ClothingEyesBase @@ -32,6 +34,8 @@ - type: Tag tags: - HudMedical + - type: DropOnSlip + chance: 25 - type: entity parent: ClothingEyesBase @@ -47,6 +51,8 @@ - type: Tag tags: - HudSecurity + - type: DropOnSlip + chance: 25 - type: entity parent: ClothingEyesBase diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml index 15cda5a69f..c333e79f9c 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml @@ -65,6 +65,8 @@ - type: Tag tags: - WhitelistChameleon + - type: DropOnSlip + chance: 15 - type: entity parent: ClothingHeadHatHardhatBase diff --git a/Resources/Prototypes/Entities/Clothing/Head/hats.yml b/Resources/Prototypes/Entities/Clothing/Head/hats.yml index c845d7cc4a..42ded67423 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hats.yml @@ -8,6 +8,8 @@ sprite: Clothing/Head/Hats/beaver_hat.rsi - type: Clothing sprite: Clothing/Head/Hats/beaver_hat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -24,6 +26,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -57,6 +61,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -64,10 +70,12 @@ name: casa description: Cone-shaped hat components: - - type: Sprite - sprite: Clothing/Head/Hats/casa.rsi - - type: Clothing - sprite: Clothing/Head/Hats/casa.rsi + - type: Sprite + sprite: Clothing/Head/Hats/casa.rsi + - type: Clothing + sprite: Clothing/Head/Hats/casa.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -100,6 +108,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -134,6 +144,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -145,6 +157,8 @@ sprite: DeltaV/Clothing/Head/Hats/beret_warden.rsi # DeltaV - resprite - type: Clothing sprite: DeltaV/Clothing/Head/Hats/beret_warden.rsi # DeltaV - resprite + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -156,6 +170,8 @@ sprite: Clothing/Head/Hats/beret_physician.rsi - type: Clothing sprite: Clothing/Head/Hats/beret_physician.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -167,6 +183,8 @@ sprite: Clothing/Head/Hats/beret_brigmedic.rsi - type: Clothing sprite: Clothing/Head/Hats/beret_brigmedic.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -189,6 +207,8 @@ sprite: Clothing/Head/Hats/bowler_hat.rsi - type: Clothing sprite: Clothing/Head/Hats/bowler_hat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -205,6 +225,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -220,6 +242,8 @@ proto: robot - type: IdentityBlocker - type: IngestionBlocker + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -231,6 +255,8 @@ sprite: Clothing/Head/Hats/centcom.rsi - type: Clothing sprite: Clothing/Head/Hats/centcom.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -257,6 +283,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -273,6 +301,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -284,6 +314,8 @@ sprite: Clothing/Head/Hats/greyfedora.rsi - type: Clothing sprite: Clothing/Head/Hats/greyfedora.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -295,6 +327,8 @@ sprite: Clothing/Head/Hats/fez.rsi - type: Clothing sprite: Clothing/Head/Hats/fez.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -311,6 +345,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -327,6 +363,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -338,6 +376,8 @@ sprite: Clothing/Head/Hats/outlawhat.rsi - type: Clothing sprite: Clothing/Head/Hats/outlawhat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -349,6 +389,8 @@ sprite: Clothing/Head/Hats/witchhat.rsi - type: Clothing sprite: Clothing/Head/Hats/witchhat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -360,6 +402,8 @@ sprite: Clothing/Head/Hats/paper.rsi - type: Clothing sprite: Clothing/Head/Hats/paper.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -371,6 +415,8 @@ sprite: Clothing/Head/Hats/pirate.rsi - type: Clothing sprite: Clothing/Head/Hats/pirate.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -387,6 +433,8 @@ - HidesHair - WhitelistChameleon - ClothMade + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -414,6 +462,8 @@ sprite: Clothing/Head/Hats/santahat.rsi - type: Clothing sprite: Clothing/Head/Hats/santahat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -427,6 +477,8 @@ sprite: Clothing/Head/Hats/sombrero.rsi - type: AddAccentClothing accent: SpanishAccent + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -443,6 +495,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -454,6 +508,8 @@ sprite: Clothing/Head/Hats/surgcap_green.rsi - type: Clothing sprite: Clothing/Head/Hats/surgcap_green.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -465,6 +521,8 @@ sprite: Clothing/Head/Hats/surgcap_purple.rsi - type: Clothing sprite: Clothing/Head/Hats/surgcap_purple.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -481,6 +539,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -494,6 +554,8 @@ sprite: Clothing/Head/Hats/ushanka.rsi - type: AddAccentClothing accent: RussianAccent + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -523,6 +585,8 @@ sprite: DeltaV/Clothing/Head/Hats/warden.rsi # DeltaV - resprite - type: StealTarget stealGroup: ClothingHeadHatWarden + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -539,6 +603,8 @@ - HidesHair - WhitelistChameleon - ClothMade + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -582,6 +648,8 @@ sprite: Clothing/Head/Hats/xmascrown.rsi - type: Clothing sprite: Clothing/Head/Hats/xmascrown.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -593,6 +661,8 @@ sprite: Clothing/Head/Hats/truckershat.rsi - type: Clothing sprite: Clothing/Head/Hats/truckershat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -604,6 +674,8 @@ sprite: Clothing/Head/Hats/pyjamasyndicateblack.rsi - type: Clothing sprite: Clothing/Head/Hats/pyjamasyndicateblack.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -615,6 +687,8 @@ sprite: Clothing/Head/Hats/pyjamasyndicatepink.rsi - type: Clothing sprite: Clothing/Head/Hats/pyjamasyndicatepink.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -626,6 +700,8 @@ sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi - type: Clothing sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -638,6 +714,8 @@ - type: Clothing sprite: Clothing/Head/Hats/papersack.rsi - type: IdentityBlocker + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -650,6 +728,8 @@ - type: Clothing sprite: Clothing/Head/Hats/papersacksmile.rsi - type: IdentityBlocker + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -661,6 +741,8 @@ sprite: Clothing/Head/Hats/fishcap.rsi - type: Clothing sprite: Clothing/Head/Hats/fishcap.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -677,6 +759,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -688,6 +772,8 @@ sprite: Clothing/Head/Hats/rasta.rsi - type: Clothing sprite: Clothing/Head/Hats/rasta.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -699,6 +785,8 @@ sprite: Clothing/Head/Hats/safarihat.rsi - type: Clothing sprite: Clothing/Head/Hats/safarihat.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -710,6 +798,8 @@ sprite: Clothing/Head/Hats/jester.rsi - type: Clothing sprite: Clothing/Head/Hats/jester.rsi + - type: DropOnSlip + chance: 90 - type: entity parent: ClothingHeadHatJester @@ -719,6 +809,8 @@ sprite: Clothing/Head/Hats/jester2.rsi - type: Clothing sprite: Clothing/Head/Hats/jester2.rsi + - type: DropOnSlip + chance: 90 - type: entity parent: ClothingHeadBase @@ -735,6 +827,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadBase @@ -761,6 +855,8 @@ modifiers: coefficients: Blunt: 0.95 + - type: DropOnSlip + chance: 35 - type: entity parent: ClothingHeadBase diff --git a/Resources/Prototypes/Entities/Clothing/Head/misc.yml b/Resources/Prototypes/Entities/Clothing/Head/misc.yml index 3fd55faf26..1c615acca1 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/misc.yml @@ -46,6 +46,8 @@ - type: Construction graph: flowercrown node: flowercrown + - type: DropOnSlip + chance: 50 - type: entity parent: ClothingHeadBase @@ -60,6 +62,8 @@ - type: Construction graph: hairflower node: hairflower + - type: DropOnSlip + chance: 60 - type: entity parent: ClothingHeadLightBase @@ -96,6 +100,8 @@ sprite: Clothing/Head/Misc/pwig.rsi - type: Clothing sprite: Clothing/Head/Misc/pwig.rsi + - type: DropOnSlip + chance: 60 - type: entity parent: ClothingHeadBase @@ -137,6 +143,8 @@ tags: - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 60 - type: entity parent: ClothingHeadBase @@ -151,6 +159,8 @@ - type: PhysicalComposition #you can't just pass up some free plastic! materialComposition: Plastic: 100 + - type: DropOnSlip + chance: 70 - type: entity parent: ClothingHeadBase diff --git a/Resources/Prototypes/Entities/Clothing/Head/soft.yml b/Resources/Prototypes/Entities/Clothing/Head/soft.yml index 163d9937f2..22c9c622ea 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/soft.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/soft.yml @@ -50,11 +50,16 @@ sprite: Clothing/Head/Soft/bluesoft.rsi - type: Clothing sprite: Clothing/Head/Soft/bluesoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatBluesoft] id: ClothingHeadHatBluesoftFlipped name: blue cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -71,6 +76,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatCargosoft] @@ -83,6 +90,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -94,11 +103,16 @@ sprite: Clothing/Head/Soft/qmsoft.rsi - type: Clothing sprite: Clothing/Head/Soft/qmsoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatQMsoft] id: ClothingHeadHatQMsoftFlipped name: logistics officer's cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -110,11 +124,16 @@ sprite: Clothing/Head/Soft/corpsoft.rsi - type: Clothing sprite: Clothing/Head/Soft/corpsoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatCorpsoft] id: ClothingHeadHatCorpsoftFlipped name: corporate cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -126,11 +145,16 @@ sprite: Clothing/Head/Soft/greensoft.rsi - type: Clothing sprite: Clothing/Head/Soft/greensoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatGreensoft] id: ClothingHeadHatGreensoftFlipped name: green cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -142,11 +166,16 @@ sprite: Clothing/Head/Soft/blacksoft.rsi - type: Clothing sprite: Clothing/Head/Soft/blacksoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatBlacksoft] id: ClothingHeadHatBlacksoftFlipped name: black cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -158,11 +187,16 @@ sprite: Clothing/Head/Soft/greysoft.rsi - type: Clothing sprite: Clothing/Head/Soft/greysoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatGreysoft] id: ClothingHeadHatGreysoftFlipped name: grey cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -174,11 +208,16 @@ sprite: Clothing/Head/Soft/mimesoft.rsi - type: Clothing sprite: Clothing/Head/Soft/mimesoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatMimesoft] id: ClothingHeadHatMimesoftFlipped name: mime cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -190,11 +229,16 @@ sprite: Clothing/Head/Soft/orangesoft.rsi - type: Clothing sprite: Clothing/Head/Soft/orangesoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatOrangesoft] id: ClothingHeadHatOrangesoftFlipped name: orange cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -211,6 +255,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatPurplesoft] @@ -222,6 +268,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -233,11 +281,16 @@ sprite: Clothing/Head/Soft/redsoft.rsi - type: Clothing sprite: Clothing/Head/Soft/redsoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatRedsoft] id: ClothingHeadHatRedsoftFlipped name: red cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -249,11 +302,16 @@ sprite: Clothing/Head/Soft/secsoft.rsi - type: Clothing sprite: Clothing/Head/Soft/secsoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatSecsoft] id: ClothingHeadHatSecsoftFlipped name: security cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -265,11 +323,16 @@ sprite: Clothing/Head/Soft/yellowsoft.rsi - type: Clothing sprite: Clothing/Head/Soft/yellowsoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatYellowsoft] id: ClothingHeadHatYellowsoftFlipped name: yellow cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -281,11 +344,16 @@ sprite: Clothing/Head/Soft/bizarresoft.rsi - type: Clothing sprite: Clothing/Head/Soft/bizarresoft.rsi + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatBizarreSoft] id: ClothingHeadHatBizarreSoftFlipped name: troublemaker's cap + components: + - type: DropOnSlip + chance: 20 - type: entity parent: ClothingHeadHeadHatBaseFlippable @@ -302,6 +370,8 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 - type: entity parent: [ClothingHeadHeadHatBaseFlipped, ClothingHeadHatParamedicsoft] @@ -313,3 +383,5 @@ - ClothMade - HamsterWearable - WhitelistChameleon + - type: DropOnSlip + chance: 20 diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml index ad738792a7..cf7d1f8513 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml @@ -196,6 +196,8 @@ - ClownMask - WhitelistChameleon - HidesNose + - type: DropOnSlip + chance: 5 - type: entity parent: ClothingMaskClownBase