Show / Hide Table of Contents

Class SharedMechSystem

Handles all of the interactions, UI handling, and items shennanigans for MechComponent

Inheritance
System.Object
SharedMechSystem
MechSystem
MechSystem
Namespace: Content.Shared.Mech.EntitySystems
Assembly: Content.Shared.dll
Syntax
public abstract class SharedMechSystem : EntitySystem

Methods

| Improve this Doc View Source

BreakMech(EntityUid, MechComponent)

Destroys the mech, removing the user and ejecting all installed equipment.

Declaration
public virtual void BreakMech(EntityUid uid, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid
MechComponent component
| Improve this Doc View Source

CanInsert(EntityUid, EntityUid, MechComponent)

Checks if an entity can be inserted into the mech.

Declaration
public bool CanInsert(EntityUid uid, EntityUid toInsert, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid
EntityUid toInsert
MechComponent component
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CycleEquipment(EntityUid, MechComponent)

Cycles through the currently selected equipment.

Declaration
public void CycleEquipment(EntityUid uid, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid
MechComponent component
| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
| Improve this Doc View Source

InsertEquipment(EntityUid, EntityUid, MechComponent, MechEquipmentComponent)

Inserts an equipment item into the mech.

Declaration
public void InsertEquipment(EntityUid uid, EntityUid toInsert, MechComponent component = null, MechEquipmentComponent equipmentComponent = null)
Parameters
Type Name Description
EntityUid uid
EntityUid toInsert
MechComponent component
MechEquipmentComponent equipmentComponent
| Improve this Doc View Source

IsEmpty(MechComponent)

Checks if the pilot is present

Declaration
public bool IsEmpty(MechComponent component)
Parameters
Type Name Description
MechComponent component
Returns
Type Description
System.Boolean

Whether or not the pilot is present

| Improve this Doc View Source

RemoveEquipment(EntityUid, EntityUid, MechComponent, MechEquipmentComponent, Boolean)

Removes an equipment item from a mech.

Declaration
public void RemoveEquipment(EntityUid uid, EntityUid toRemove, MechComponent component = null, MechEquipmentComponent equipmentComponent = null, bool forced = false)
Parameters
Type Name Description
EntityUid uid
EntityUid toRemove
MechComponent component
MechEquipmentComponent equipmentComponent
System.Boolean forced

Whether or not the removal can be cancelled

| Improve this Doc View Source

SetIntegrity(EntityUid, FixedPoint2, MechComponent)

Sets the integrity of the mech.

Declaration
public void SetIntegrity(EntityUid uid, FixedPoint2 value, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid

The mech itself

FixedPoint2 value

The value the integrity will be set at

MechComponent component
| Improve this Doc View Source

TryChangeEnergy(EntityUid, FixedPoint2, MechComponent)

Attempts to change the amount of energy in the mech.

Declaration
public virtual bool TryChangeEnergy(EntityUid uid, FixedPoint2 delta, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid

The mech itself

FixedPoint2 delta

The change in energy

MechComponent component
Returns
Type Description
System.Boolean

If the energy was successfully changed.

| Improve this Doc View Source

TryEject(EntityUid, MechComponent)

Attempts to eject the current pilot from the mech

Declaration
public bool TryEject(EntityUid uid, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid
MechComponent component
Returns
Type Description
System.Boolean

Whether or not the pilot was ejected.

| Improve this Doc View Source

TryInsert(EntityUid, Nullable<EntityUid>, MechComponent)

Attempts to insert a pilot into the mech.

Declaration
public bool TryInsert(EntityUid uid, EntityUid? toInsert, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid
System.Nullable<EntityUid> toInsert
MechComponent component
Returns
Type Description
System.Boolean

Whether or not the entity was inserted

| Improve this Doc View Source

UpdateUserInterface(EntityUid, MechComponent)

Updates the user interface

Declaration
public virtual void UpdateUserInterface(EntityUid uid, MechComponent component = null)
Parameters
Type Name Description
EntityUid uid
MechComponent component
Remarks

This is defined here so that UI updates can be accessed from shared.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾