Re-organize all projects (#4166)
This commit is contained in:
22
Content.Shared/Clothing/ClothingComponentState.cs
Normal file
22
Content.Shared/Clothing/ClothingComponentState.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.NetIDs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Clothing
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public class ClothingComponentState : ComponentState
|
||||
{
|
||||
public string? ClothingEquippedPrefix { get; }
|
||||
|
||||
public string? EquippedPrefix { get; }
|
||||
|
||||
public ClothingComponentState(string? clothingEquippedPrefix, string? equippedPrefix) : base(ContentNetIDs.CLOTHING)
|
||||
{
|
||||
ClothingEquippedPrefix = clothingEquippedPrefix;
|
||||
EquippedPrefix = equippedPrefix;
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Content.Shared/Clothing/SharedMagbootsComponent.cs
Normal file
37
Content.Shared/Clothing/SharedMagbootsComponent.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Content.Shared.NetIDs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Clothing
|
||||
{
|
||||
public abstract class SharedMagbootsComponent : Component, IMoveSpeedModifier
|
||||
{
|
||||
public sealed override string Name => "Magboots";
|
||||
public sealed override uint? NetID => ContentNetIDs.MAGBOOTS;
|
||||
|
||||
public abstract bool On { get; set; }
|
||||
|
||||
|
||||
protected void OnChanged()
|
||||
{
|
||||
MovementSpeedModifierComponent.RefreshItemModifiers(Owner);
|
||||
}
|
||||
|
||||
public float WalkSpeedModifier => On ? 0.85f : 1;
|
||||
public float SprintSpeedModifier => On ? 0.65f : 1;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class MagbootsComponentState : ComponentState
|
||||
{
|
||||
public bool On { get; }
|
||||
|
||||
public MagbootsComponentState(bool @on) : base(ContentNetIDs.MAGBOOTS)
|
||||
{
|
||||
On = on;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user