Adds twenty-one new smites, moves the explosion smite to the verb category. (#8456)
* Adds seven new smites, moves the explosion smite to the verb category. * adds even more smites. * Even more smites, some messages for specific smites. * Adds even more smites. * Removes some junk, adds a smite that angers the pointing arrows. * get rid of dumb component. * Remove mistake from verb menu presentation. * How did that happen? * whoops * c * e * fuck * Loading... * removes the BoM go away * adds the funny kill sign. Fixes ghost smite. * Move systems around. * Adjust organ vomit. * Adds a smite that turns people into an instrument, and one that removes their gravity. * oops * typo Co-authored-by: Veritius <veritiusgaming@gmail.com>
This commit is contained in:
@@ -1,14 +1,32 @@
|
||||
using Content.Shared.Clothing;
|
||||
using Content.Shared.Gravity;
|
||||
using Content.Shared.Inventory;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Movement.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MovementIgnoreGravityComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not gravity is on or off for this object.
|
||||
/// </summary>
|
||||
[DataField("gravityState")] public bool Weightless = false;
|
||||
}
|
||||
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public sealed class MovementIgnoreGravityComponentState : ComponentState
|
||||
{
|
||||
public bool Weightless;
|
||||
|
||||
public MovementIgnoreGravityComponentState(MovementIgnoreGravityComponent component)
|
||||
{
|
||||
Weightless = component.Weightless;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GravityExtensions
|
||||
@@ -20,8 +38,8 @@ namespace Content.Shared.Movement.Components
|
||||
if (body == null)
|
||||
entityManager.TryGetComponent(entity, out body);
|
||||
|
||||
if (entityManager.HasComponent<MovementIgnoreGravityComponent>(entity) ||
|
||||
(body?.BodyType & (BodyType.Static | BodyType.Kinematic)) != 0) return false;
|
||||
if (entityManager.TryGetComponent<MovementIgnoreGravityComponent>(entity, out var ignoreGravityComponent) ||
|
||||
(body?.BodyType & (BodyType.Static | BodyType.Kinematic)) != 0) return ignoreGravityComponent.Weightless;
|
||||
|
||||
var transform = entityManager.GetComponent<TransformComponent>(entity);
|
||||
var gridId = transform.GridID;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Movement.EntitySystems;
|
||||
|
||||
public sealed class MovementIgnoreGravitySystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<MovementIgnoreGravityComponent, ComponentGetState>(GetState);
|
||||
SubscribeLocalEvent<MovementIgnoreGravityComponent, ComponentHandleState>(HandleState);
|
||||
}
|
||||
|
||||
private void HandleState(EntityUid uid, MovementIgnoreGravityComponent component, ref ComponentHandleState args)
|
||||
{
|
||||
if (args.Next is null)
|
||||
return;
|
||||
|
||||
component.Weightless = ((MovementIgnoreGravityComponentState) args.Next).Weightless;
|
||||
}
|
||||
|
||||
private void GetState(EntityUid uid, MovementIgnoreGravityComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new MovementIgnoreGravityComponentState(component);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user