Skip to content

Spacesuit

A Spacesuit is the player’s EVA (extra-vehicular activity) suit — what they’re in after abandoning a ship. Spacesuit is a specialised Ship subtype with oxygen tracking — it’s the only ship type that runs out of life support if you stay outside too long.

Inheritance: component → destructible → object → controllable → defensible → container → ship → spacesuit.

PropertyTypeDescription
.oxygenemptyboolSuit is out of oxygen (player dies)
.oxygenlowboolLow oxygen warning threshold
.oxygenpercentagefloatRemaining oxygen (0..1)
.oxygentimeremainingtimeSeconds until depletion

That’s all the spacesuit datatype adds. Everything else is inherited from Ship.

PropertySourceDescription
.knownnamecomponentSuit display name
.macrocomponentSpacesuit macro
.sector / .positionobjectWhere the player is
.cargocontainerSuit cargo (limited)

A spacesuit only exists when the player is in EVA mode:

Stateplayer.spacesuitplayer.occupiedship
Piloting a shipnullthe ship
On a stationnullnull
In spacesuitthe spacesuitnull (if not piloting)
Spacesuit + jumped to shipnullthe ship

The player can <eject> from a ship into EVA; spacesuit appears. Re-entering a ship transitions back. The spacesuit is a per-session object — it’s not persistent across save/load reliably.

<do_if value="@player.spacesuit">
<!-- in EVA mode -->
</do_if>
<do_if value="@player.spacesuit
and player.spacesuit.oxygenlow
and not player.spacesuit.oxygenempty">
<!-- low oxygen, warn -->
</do_if>

There’s no direct <eject> MD action for the player — vanilla handles ejection through UI / damage events. Mods that need to programmatically eject the player typically work through <order> mechanics or station interactions.

  • Spacesuit is a ship_xs class — not its own size. $ship.isclass.ship_xs is true for spacesuit AND drones. Filter via isclass.spacesuit for spacesuit specifically.
  • Spacesuit lifetime is bounded by the EVA session. Don’t store long-term references to player.spacesuit — the suit goes away when player re-enters a ship.
  • Oxygen drain is engine-side. Don’t try to read/write .oxygenpercentage directly to control survival — engine handles it.
  • Spacesuit has tiny cargo capacity. Don’t expect to use it as a transport. Few wares fit; valuable wares (inv_*) the player carries personally are in player.entity.inventory, not player.spacesuit.cargo.