mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-14 19:30:01 +01:00
* modules tip * add color * solved a edge case * use ContentLocalizationManager instead of hardcoded grammar * improve summary * improve improved summary Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * not my first language Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * keep names consistent Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * keep consistent part 2 * fixed the yml error --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Silicons.Borgs.Components;
|
|
|
|
/// <summary>
|
|
/// This is used for modules that can be inserted into borgs
|
|
/// to give them unique abilities and attributes.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
|
|
[AutoGenerateComponentState]
|
|
public sealed partial class BorgModuleComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The entity this module is installed into
|
|
/// </summary>
|
|
[DataField("installedEntity")]
|
|
public EntityUid? InstalledEntity;
|
|
|
|
public bool Installed => InstalledEntity != null;
|
|
|
|
/// <summary>
|
|
/// If true, this is a "default" module that cannot be removed from a borg.
|
|
/// </summary>
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public bool DefaultModule;
|
|
|
|
/// <summary>
|
|
/// List of types of borgs this module fits into.
|
|
/// This only affects examine text. The actual whitelist for modules that can be inserted into a borg is defined in its <see cref="BorgChassisComponent"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<LocId>? BorgFitTypes;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Raised on a module when it is installed in order to add specific behavior to an entity.
|
|
/// </summary>
|
|
/// <param name="ChassisEnt"></param>
|
|
[ByRefEvent]
|
|
public readonly record struct BorgModuleInstalledEvent(EntityUid ChassisEnt);
|
|
|
|
/// <summary>
|
|
/// Raised on a module when it's uninstalled in order to
|
|
/// </summary>
|
|
/// <param name="ChassisEnt"></param>
|
|
[ByRefEvent]
|
|
public readonly record struct BorgModuleUninstalledEvent(EntityUid ChassisEnt);
|