Makes magboots grant gravity. (#6054)

This commit is contained in:
Moony
2022-01-13 06:13:25 -08:00
committed by GitHub
parent e306131841
commit bd359dd54c
3 changed files with 11 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
using Content.Shared.Clothing;
using Content.Shared.Gravity;
using Content.Shared.Inventory;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
@@ -36,6 +38,13 @@ namespace Content.Shared.Movement.Components
mapManager ??= IoCManager.Resolve<IMapManager>();
var grid = mapManager.GetGrid(gridId);
var invSys = EntitySystem.Get<InventorySystem>();
if (invSys.TryGetSlotEntity(entity, "shoes", out var ent))
{
if (entityManager.TryGetComponent<SharedMagbootsComponent>(ent, out var boots) && boots.On)
return false;
}
if (!entityManager.GetComponent<GravityComponent>(grid.GridEntityId).Enabled)
{