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:
@@ -0,0 +1,12 @@
|
||||
namespace Content.Server.Pointing.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Causes pointing arrows to go mode and murder this entity.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PointingArrowAngeringComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("remainingAnger")]
|
||||
public int RemainingAnger = 5;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ namespace Content.Server.Pointing.Components
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("rogue")]
|
||||
private bool _rogue = default;
|
||||
public bool Rogue = false;
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
@@ -73,7 +73,7 @@ namespace Content.Server.Pointing.Components
|
||||
|
||||
if (_duration <= 0)
|
||||
{
|
||||
if (_rogue)
|
||||
if (Rogue)
|
||||
{
|
||||
_entMan.RemoveComponent<PointingArrowComponent>(Owner);
|
||||
_entMan.AddComponent<RoguePointingArrowComponent>(Owner);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Pointing.Components;
|
||||
@@ -120,6 +121,14 @@ namespace Content.Server.Pointing.EntitySystems
|
||||
|
||||
var arrow = EntityManager.SpawnEntity("pointingarrow", mapCoords);
|
||||
|
||||
if (EntityQuery<PointingArrowAngeringComponent>().FirstOrDefault() != null)
|
||||
{
|
||||
if (TryComp<PointingArrowComponent>(arrow, out var pointingArrowComponent))
|
||||
{
|
||||
pointingArrowComponent.Rogue = true;
|
||||
}
|
||||
}
|
||||
|
||||
var layer = (int) VisibilityFlags.Normal;
|
||||
if (TryComp(player, out VisibilityComponent? playerVisibility))
|
||||
{
|
||||
|
||||
@@ -37,15 +37,17 @@ namespace Content.Server.Pointing.EntitySystems
|
||||
if (!Resolve(uid, ref component, ref transform))
|
||||
return null;
|
||||
|
||||
var players = Filter.Empty()
|
||||
.AddPlayersByPvs(transform.MapPosition)
|
||||
.RemoveWhereAttachedEntity(euid => !EntityManager.TryGetComponent(euid, out MobStateComponent? mobStateComponent) || mobStateComponent.IsDead())
|
||||
.Recipients
|
||||
.ToArray();
|
||||
var targets = EntityQuery<PointingArrowAngeringComponent>().ToList();
|
||||
|
||||
return players.Length != 0
|
||||
? _random.Pick(players).AttachedEntity
|
||||
: null;
|
||||
if (targets.Count == 0)
|
||||
return null;
|
||||
|
||||
var angering = _random.Pick(targets);
|
||||
angering.RemainingAnger -= 1;
|
||||
if (angering.RemainingAnger <= 0)
|
||||
RemComp<PointingArrowAngeringComponent>(uid);
|
||||
|
||||
return angering.Owner;
|
||||
}
|
||||
|
||||
private void UpdateAppearance(EntityUid uid, RoguePointingArrowComponent? component = null, TransformComponent? transform = null, AppearanceComponent? appearance = null)
|
||||
@@ -56,6 +58,14 @@ namespace Content.Server.Pointing.EntitySystems
|
||||
appearance.SetData(RoguePointingArrowVisuals.Rotation, transform.LocalRotation.Degrees);
|
||||
}
|
||||
|
||||
public void SetTarget(EntityUid arrow, EntityUid target, RoguePointingArrowComponent? component = null)
|
||||
{
|
||||
if (!Resolve(arrow, ref component))
|
||||
throw new ArgumentException("Input was not a rogue pointing arrow!", nameof(arrow));
|
||||
|
||||
component.Chasing = target;
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var (component, transform) in EntityManager.EntityQuery<RoguePointingArrowComponent, TransformComponent>())
|
||||
@@ -63,7 +73,7 @@ namespace Content.Server.Pointing.EntitySystems
|
||||
var uid = component.Owner;
|
||||
component.Chasing ??= RandomNearbyPlayer(uid, component, transform);
|
||||
|
||||
if (component.Chasing is not {Valid: true} chasing)
|
||||
if (component.Chasing is not {Valid: true} chasing || Deleted(chasing))
|
||||
{
|
||||
EntityManager.QueueDeleteEntity(uid);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user