--- /dev/null
+using Content.Shared.Clothing;
+using Content.Shared.Inventory.Events;
+using Content.Shared.Movement.Systems;
+using Content.Server.Damage.Systems;
+
+namespace Content.Server.Clothing;
+
+public sealed class SkatesSystem : EntitySystem
+{
+ [Dependency] private readonly MovementSpeedModifierSystem _move = default!;
+ [Dependency] private readonly DamageOnHighSpeedImpactSystem _impact = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent<SkatesComponent, GotEquippedEvent>(OnGotEquipped);
+ SubscribeLocalEvent<SkatesComponent, GotUnequippedEvent>(OnGotUnequipped);
+ }
+
+ public void OnGotUnequipped(EntityUid uid, SkatesComponent component, GotUnequippedEvent args)
+ {
+ if (args.Slot == "shoes")
+ {
+ _move.ChangeFriction(args.Equipee, 20f, null, 20f);
+ _impact.ChangeCollide(args.Equipee, 20f, 1f, 2f);
+ }
+ }
+
+ private void OnGotEquipped(EntityUid uid, SkatesComponent component, GotEquippedEvent args)
+ {
+ if (args.Slot == "shoes")
+ {
+ _move.ChangeFriction(args.Equipee, 5f, 5f, 20f);
+ _impact.ChangeCollide(args.Equipee, 4f, 1f, 2f);
+ }
+ }
+}
_audio.PlayPvs(component.SoundHit, uid, AudioParams.Default.WithVariation(0.125f).WithVolume(-0.125f));
_color.RaiseEffect(Color.Red, new List<EntityUid>() { uid }, Filter.Pvs(uid, entityManager: EntityManager));
}
+
+ public void ChangeCollide(EntityUid uid, float minimumSpeed, float stunSeconds, float damageCooldown, DamageOnHighSpeedImpactComponent? collide = null)
+ {
+ if (!Resolve(uid, ref collide, false))
+ return;
+
+ collide.MinimumSpeed = minimumSpeed;
+ collide.StunSeconds = stunSeconds;
+ collide.DamageCooldown = damageCooldown;
+ Dirty(uid, collide);
+ }
}
--- /dev/null
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Clothing;
+
+[RegisterComponent]
+[NetworkedComponent]
+public sealed partial class SkatesComponent : Component
+{
+}
"skub" is licensed under CC0.
"sitcom_laugh" taken from Kinoton at https://freesound.org/people/Kinoton/sounds/371562/ under CC0 1.0, clipped by github Henri215, turned into mono by github lapatison
"sitcom_laugh2" taken from mrrap4food at https://freesound.org/people/mrrap4food/sounds/618972/ under CC0 1.0, clipped by Henri215
+"skates" taken from PeteBarry at https://freesound.org/people/PeteBarry/sounds/464857/ under CC BY 4.0, shortened by Brainfood1183 (github).
- id: ClothingShoesClownLarge
- id: ClothingHeadHatMagician
- id: BeachBall
+ - id: ClothingShoesSkates
- type: entity
id: CrateFunBikeHornImplants
prob: 0.2
- id: PlushieSnake
prob: 0.2
+ - id: ClothingShoesSkates
+ prob: 0.1
- id: ClothingHandsGlovesColorYellow
prob: 0.05
- id: ClothingHandsGlovesFingerlessInsulated
- type: ClothingSpeedModifier
walkModifier: 0.85
sprintModifier: 0.8
+
+- type: entity
+ parent: ClothingShoesBaseButcherable
+ id: ClothingShoesSkates
+ name: roller skates
+ description: "Get your skates on!"
+ components:
+ - type: Sprite
+ sprite: Clothing/Shoes/Specific/skates.rsi
+ - type: Clothing
+ sprite: Clothing/Shoes/Specific/skates.rsi
+ clothingVisuals:
+ shoes:
+ - state: equipped-FEET
+ offset: "0, -0.04"
+ - type: Item
+ size: 10
+ sprite: Clothing/Shoes/Specific/skates.rsi
+ - type: ClothingSpeedModifier
+ walkModifier: 1.3
+ sprintModifier: 1.3
+ - type: Skates
+ - type: FootstepModifier
+ footstepSoundCollection:
+ collection: FootstepSkates
- /Audio/Effects/Footsteps/jesterstep1.ogg
- /Audio/Effects/Footsteps/jesterstep2.ogg
+- type: soundCollection
+ id: FootstepSkates
+ files:
+ - /Audio/Items/Toys/skates.ogg
+
- type: soundCollection
id: FootstepDuck
files:
--- /dev/null
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Made by brainfood1183 (github)",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon"
+ },
+ {
+ "name": "equipped-FEET",
+ "directions": 4
+ },
+ {
+ "name": "inhand-left",
+ "directions": 4
+ },
+ {
+ "name": "inhand-right",
+ "directions": 4
+ }
+ ]
+}