Make godmode able to be disabled and more accessible to the rest of the code (#2560)

* Make Godmode able to be disabled and more accessible

* You got a license for that exclamation mark?

* Move restore logic to the entity system

* Make MovedByPressureComponent able to be disabled

* Add extension that gives you the moved by pressure component

* Fix not disabling moved by pressure
This commit is contained in:
DrSmugleaf
2020-11-22 04:45:15 +01:00
committed by GitHub
parent 1f654df977
commit eb97168e30
4 changed files with 129 additions and 13 deletions

View File

@@ -197,7 +197,7 @@ namespace Content.Server.Atmos
foreach (var entity in _gridTileLookupSystem.GetEntitiesIntersecting(GridIndex, GridIndices))
{
if (!entity.TryGetComponent(out IPhysicsComponent physics)
|| !entity.TryGetComponent(out MovedByPressureComponent pressure)
|| !entity.IsMovedByPressure(out var pressure)
|| entity.IsInContainer())
continue;