Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

SS14 Physics System API

БесплатноБез исполняемых скриптовНе проверен

A complete reference to the SharedPhysicsSystem public API in Space Station 14: all method families, overloads, limitations, rare methods and practical…

makura-gamesот makura-games★ 74 звезды на GitHub

Об этом скилле

PhysicsSystem: API

This skill is the public API directory SharedPhysicsSystem :) For the general architecture, first read SS14 Physics System Core.

How to use this directory

  1. First select the task type:
  • strength/speed,
  • body type/sleep/conflict,
  • fixtures/shapes,
  • contacts/raycasts/distances,
  • transform transformations.
  1. Then select the level:
  • safe gameplay method,
  • or a low-level engine method (rarely needed).
  1. If fixtures/collisions have changed:
  • check if RegenerateContacts is needed.

1) Runtime and world level

  • Initialize()
  • Shutdown()
  • Step(float frameTime, bool prediction)
  • SetGravity(Vector2 value)
  • UpdateIsPredicted(EntityUid? uid, PhysicsComponent? physics = null) (virtual)

Public runtime fields/state:

  • Gravity
  • AwakeBodies
  • EffectiveCurTime (substep-aware time)

When to use:

  • gameplay code usually does not call Initialize/Shutdown/Step directly.
  • SetGravity and UpdateIsPredicted-flow are useful.

2) Impulses and forces

  • ApplyAngularImpulse(EntityUid uid, float impulse, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • ApplyForce(EntityUid uid, Vector2 force, Vector2 point, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • ApplyForce(EntityUid uid, Vector2 force, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • ApplyTorque(EntityUid uid, float torque, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • ApplyLinearImpulse(EntityUid uid, Vector2 impulse, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • ApplyLinearImpulse(EntityUid uid, Vector2 impulse, Vector2 point, FixturesComponent? manager = null, PhysicsComponent? body = null)

Nuance:

  • the methods themselves try to wake up the body; there will be no effect for immobile bodies.

3) Body dynamics and condition

3.1 Speeds, damping, weight

  • DestroyContacts(PhysicsComponent body)
  • DestroyContact(Contact contact)
  • ResetDynamics(EntityUid uid, PhysicsComponent body, bool dirty = true)
  • ResetMassData(EntityUid uid, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • SetAngularVelocity(EntityUid uid, float value, bool dirty = true, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • SetLinearVelocity(EntityUid uid, Vector2 velocity, bool dirty = true, bool wakeBody = true, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • SetAngularDamping(EntityUid uid, PhysicsComponent body, float value, bool dirty = true)
  • SetLinearDamping(EntityUid uid, PhysicsComponent body, float value, bool dirty = true)
  • SetFriction(EntityUid uid, PhysicsComponent body, float value, bool dirty = true)
  • SetInertia(EntityUid uid, PhysicsComponent body, float value, bool dirty = true)
  • SetLocalCenter(EntityUid uid, PhysicsComponent body, Vector2 value)

3.2 Awake/sleep/prediction

  • [Obsolete] SetAwake(EntityUid uid, PhysicsComponent body, bool value, bool updateSleepTime = true)
  • SetAwake(Entity<PhysicsComponent> ent, bool value, bool updateSleepTime = true)
  • SetSleepingAllowed(EntityUid uid, PhysicsComponent body, bool value, bool dirty = true)
  • SetSleepTime(PhysicsComponent body, float value)
  • WakeBody(EntityUid uid, bool force = false, FixturesComponent? manager = null, PhysicsComponent? body = null)

3.3 Body mode and collision

  • TrySetBodyType(EntityUid uid, BodyType value, FixturesComponent? manager = null, PhysicsComponent? body = null, TransformComponent? xform = null)
  • SetBodyType(EntityUid uid, BodyType value, FixturesComponent? manager = null, PhysicsComponent? body = null, TransformComponent? xform = null)
  • SetBodyStatus(EntityUid uid, PhysicsComponent body, BodyStatus status, bool dirty = true)
  • SetCanCollide(EntityUid uid, bool value, bool dirty = true, bool force = false, FixturesComponent? manager = null, PhysicsComponent? body = null)
  • SetFixedRotation(EntityUid uid, bool value, bool dirty = true, FixturesComponent? manager = null, PhysicsComponent? body = null)

Critical:

  • BodyType affects the solver.
  • BodyStatus is a game status flag, not a replacement for BodyType ⚠️

4) Speeds in map terms

  • GetLinearVelocity(EntityUid uid, Vector2 point, PhysicsComponent? component = null, TransformComponent? xform = null)
  • GetMapLinearVelocity(EntityCoordinates coordinates)
  • GetMapLinearVelocity(EntityUid uid, PhysicsComponent? component = null, TransformComponent? xform = null)
  • GetMapAngularVelocity(EntityUid uid, PhysicsComponent? component = null, TransformComponent? xform = null)
  • GetMapVelocities(EntityUid uid, PhysicsComponent? component = null, TransformComponent? xform = null)

When to use:

  • any logic in world/map-space, especially with a parent hierarchy.

5) Fixtures: material and collision profile

  • SetDensity(EntityUid uid, string fixtureId, Fixture fixture, float value, bool update = true, FixturesComponent? manager = null)
  • `Set
Полный SKILL.md на GitHub

Установить SS14 Physics System API в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл SS14 Physics System API?

A complete reference to the SharedPhysicsSystem public API in Space Station 14: all method families, overloads, limitations, rare methods and practical examples of use on the server and client. Use it when you need to accurately select the PhysicsSystem method and not break contacts/collisions/prediction.

Как установить скилл SS14 Physics System API?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл SS14 Physics System API запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить SS14 Physics System API с