mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Shared.Physics.Dynamics;
|
|
using Robust.Shared.Physics.Systems;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Robust.Shared.Physics
|
|
{
|
|
/// <summary>
|
|
/// Storage for physics fixtures
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// In its own component to decrease physics comp state size significantly.
|
|
/// </remarks>
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed partial class FixturesComponent : Component
|
|
{
|
|
// This is a snowflake component whose main job is making physics states smaller for massive bodies
|
|
// (e.g. grids)
|
|
// Content generally shouldn't care about its existence.
|
|
|
|
[ViewVariables]
|
|
public int FixtureCount => Fixtures.Count;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("fixtures", customTypeSerializer:typeof(FixtureSerializer))]
|
|
[NeverPushInheritance]
|
|
[Access(typeof(FixtureSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
|
|
public Dictionary<string, Fixture> Fixtures = new();
|
|
}
|
|
}
|