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:
mtrs163
2025-10-15 06:05:29 +07:00
committed by GitHub
parent 96712acb08
commit f6972de87d
3 changed files with 8 additions and 3 deletions

View File

@@ -104,7 +104,12 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
return;
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)