Don't add ImplicitRoof to grids with roof component (#38551)
* Don't add implicitroof to grids with roof component * changes 1
This commit is contained in:
@@ -104,7 +104,12 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
EnsureComp<ShuttleComponent>(ev.EntityUid);
|
EnsureComp<ShuttleComponent>(ev.EntityUid);
|
||||||
EnsureComp<ImplicitRoofComponent>(ev.EntityUid);
|
|
||||||
|
// This and RoofComponent should be mutually exclusive, so ImplicitRoof should be removed if the grid has RoofComponent
|
||||||
|
if (HasComp<RoofComponent>(ev.EntityUid))
|
||||||
|
RemComp<ImplicitRoofComponent>(ev.EntityUid);
|
||||||
|
else
|
||||||
|
EnsureComp<ImplicitRoofComponent>(ev.EntityUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnShuttleStartup(EntityUid uid, ShuttleComponent component, ComponentStartup args)
|
private void OnShuttleStartup(EntityUid uid, ShuttleComponent component, ComponentStartup args)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using Robust.Shared.GameStates;
|
|||||||
namespace Content.Shared.Light.Components;
|
namespace Content.Shared.Light.Components;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Assumes the entire attached grid is rooved.
|
/// Assumes the entire attached grid is rooved. This component will get removed if the grid has RoofComponent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||||
public sealed partial class ImplicitRoofComponent : Component
|
public sealed partial class ImplicitRoofComponent : Component
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using Robust.Shared.GameStates;
|
|||||||
namespace Content.Shared.Light.Components;
|
namespace Content.Shared.Light.Components;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will draw shadows over tiles flagged as roof tiles on the attached grid.
|
/// Will draw shadows over tiles flagged as roof tiles on the attached grid. ImplicitRoofComponent will get removed if the grid has this component.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||||
public sealed partial class RoofComponent : Component
|
public sealed partial class RoofComponent : Component
|
||||||
|
|||||||
Reference in New Issue
Block a user