Blood (#507)
* - tweak: Nerf spear. * - tweak: Blood bolt barrage. * - add: Cult stuff. * - fix: Cult fixes. * - remove: Garbage. * - fix: Multiple pylons. * - fix: Pylon placement fix. * - add: Lots of cult stuff.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using Content.Shared._White.Chaplain;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Projectiles;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
@@ -15,6 +17,7 @@ public sealed class BloodSpearSystem : EntitySystem
|
||||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly HolyWeaponSystem _holy = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -23,7 +26,8 @@ public sealed class BloodSpearSystem : EntitySystem
|
||||
|
||||
SubscribeLocalEvent<BloodSpearComponent, ComponentRemove>(OnRemove);
|
||||
SubscribeLocalEvent<BloodSpearComponent, GotEquippedHandEvent>(OnEquip);
|
||||
SubscribeLocalEvent<BloodSpearComponent, ThrowDoHitEvent>(OnThrowDoHit);
|
||||
SubscribeLocalEvent<BloodSpearComponent, ThrowDoHitEvent>(OnThrowDoHit,
|
||||
before: new[] {typeof(SharedProjectileSystem)});
|
||||
SubscribeLocalEvent<BloodSpearComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
@@ -34,11 +38,20 @@ public sealed class BloodSpearSystem : EntitySystem
|
||||
|
||||
private void OnThrowDoHit(Entity<BloodSpearComponent> ent, ref ThrowDoHitEvent args)
|
||||
{
|
||||
if (HasComp<CultistComponent>(args.Target) || HasComp<ConstructComponent>(args.Target))
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryComp(args.Target, out StatusEffectsComponent? status))
|
||||
return;
|
||||
|
||||
if(!_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(6), true, status))
|
||||
return;
|
||||
if (!_holy.IsHoldingHolyWeapon(args.Target))
|
||||
{
|
||||
if(!_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(4), true, status))
|
||||
return;
|
||||
}
|
||||
|
||||
if (_net.IsClient)
|
||||
return;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using Content.Shared._White.Cult.Components;
|
||||
|
||||
namespace Content.Shared._White.Cult.Systems;
|
||||
|
||||
/// <summary>
|
||||
@@ -9,16 +11,18 @@ public sealed class CultistSystem : EntitySystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<Components.CultistComponent, ComponentStartup>(OnInit);
|
||||
SubscribeLocalEvent<Components.CultistComponent, ComponentShutdown>(OnRemove);
|
||||
SubscribeLocalEvent<ConstructComponent, ComponentStartup>(OnInit);
|
||||
SubscribeLocalEvent<ConstructComponent, ComponentShutdown>(OnRemove);
|
||||
SubscribeLocalEvent<CultistComponent, ComponentStartup>(OnInit);
|
||||
SubscribeLocalEvent<CultistComponent, ComponentShutdown>(OnRemove);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, Components.CultistComponent component, ComponentStartup args)
|
||||
private void OnInit<T>(EntityUid uid, T component, ComponentStartup args)
|
||||
{
|
||||
RaiseLocalEvent(new EventCultistComponentState(true));
|
||||
}
|
||||
|
||||
private void OnRemove(EntityUid uid, Components.CultistComponent component, ComponentShutdown args)
|
||||
private void OnRemove<T>(EntityUid uid, T component, ComponentShutdown args)
|
||||
{
|
||||
RaiseLocalEvent(new EventCultistComponentState(false));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Examine;
|
||||
|
||||
namespace Content.Shared._White.Cult.Systems;
|
||||
|
||||
public sealed class DeleteOnDropAttemptSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<DeleteOnDropAttemptComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
private void OnExamine(Entity<DeleteOnDropAttemptComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString(ent.Comp.Message));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user