Skip to content

Commit

Permalink
Mech Lights (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScyronX authored and sleepyyapril committed Jan 21, 2025
1 parent 9272eaf commit 3e7d857
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Content.Shared/Mech/Components/MechComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ public sealed partial class MechComponent : Component
[DataField]
public EntProtoId MechCycleAction = "ActionMechCycleEquipment";
[DataField]
public EntProtoId ToggleAction = "ActionToggleLight"; //Goobstation Mech Lights toggle action
[DataField]
public EntProtoId MechUiAction = "ActionMechOpenUI";
[DataField]
public EntProtoId MechEjectAction = "ActionMechEject";
Expand All @@ -165,4 +167,5 @@ public sealed partial class MechComponent : Component
[DataField] public EntityUid? MechCycleActionEntity;
[DataField] public EntityUid? MechUiActionEntity;
[DataField] public EntityUid? MechEjectActionEntity;
[DataField, AutoNetworkedField] public EntityUid? ToggleActionEntity; //Goobstation Mech Lights toggle action
}
1 change: 1 addition & 0 deletions Content.Shared/Mech/EntitySystems/SharedMechSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private void SetupUser(EntityUid mech, EntityUid pilot, MechComponent? component
_actions.AddAction(pilot, ref component.MechCycleActionEntity, component.MechCycleAction, mech);
_actions.AddAction(pilot, ref component.MechUiActionEntity, component.MechUiAction, mech);
_actions.AddAction(pilot, ref component.MechEjectActionEntity, component.MechEjectAction, mech);
_actions.AddAction(pilot, ref component.ToggleActionEntity, component.ToggleAction, mech); //Goobstation Mech Lights toggle action
}

private void RemoveUser(EntityUid mech, EntityUid pilot)
Expand Down
9 changes: 9 additions & 0 deletions Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@
- !type:DoActsBehavior
acts: ["Destruction"]
# Goobstation Change Start
- type: UnpoweredFlashlight # Goobstation mech lights for all mechs its unpowered to match hardsuits
- type: PointLight
enabled: false
softness: 5
autoRot: true
mask: /Textures/Effects/LightMasks/cone.png
radius: 7
energy: 3
netsync: false
- type: GenericVisualizer
visuals:
enum.PaperLabelVisuals.HasLabel:
Expand Down

0 comments on commit 3e7d857

Please sign in to comment.