Cult update (#220)

* - tweak: Cult door not bump openable.

* - tweak: Better summoning and Narsie

* - tweak: Construct update.

* - tweak: Eldrich blade fits in suit storage.

* - tweak: More spell limit.

* - fix: Fix pylon desc.

* - tweak: Teleport works on cuffed targets.

* - tweak: More popups if target is holy.

* - fix: No rune drawing using fingers.

* - tweak: Better pylon placement & less pylon healing range.

* - tweak: More blood rites charge.

* - fix: Fix max spell amount.

* - tweak: Less cult door and wall health.

* - fix: Constructs are dead IC.

* - add: Revive rune now notifies player.

* - add: Narsie summon rune eui.

* - fix: Fix narsie summon sound not playing for reapers.

* - tweak: Whatever.

* - add: Conceal presence spell.

* - tweak: Tweakz.

* - add: Blood spear.

* - add: Blood boil barrage.

* - tweak: Artificer flies.

* - tweak: Blood bolt color tweaks.

* - tweak: Runic door is bump openable again.

* - fix: Fix concealed door outline.

* - add: Update concealable name and desc.

* - tweak: Remove the unremoveable.

* - tweak: Gift ignore.

* - add: Organs regenerate on rejuvenate.

* - tweak: Brainless cultist is fine.

* - add: Added more fun.

* - add: Add rune descriptions.

* - fix: Fixes.

* - tweak: Blood rites now uses verb.

* - tweak: Bring it back.
This commit is contained in:
Aviu00
2024-03-22 17:23:33 +09:00
committed by GitHub
parent 1337e4d26e
commit 74ef19d6a6
109 changed files with 1831 additions and 182 deletions

View File

@@ -0,0 +1,80 @@
using Content.Shared._White.Cult.Components;
using Content.Shared.Actions;
using Content.Shared.Hands;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;
using Content.Shared.Throwing;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Network;
namespace Content.Shared._White.Cult.Systems;
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 INetManager _net = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<BloodSpearComponent, ComponentRemove>(OnRemove);
SubscribeLocalEvent<BloodSpearComponent, GotEquippedHandEvent>(OnEquip);
SubscribeLocalEvent<BloodSpearComponent, ThrowDoHitEvent>(OnThrowDoHit);
}
private void OnThrowDoHit(Entity<BloodSpearComponent> ent, ref ThrowDoHitEvent args)
{
if (!TryComp(args.Target, out StatusEffectsComponent? status))
return;
if(!_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(6), true, status))
return;
if (_net.IsClient)
return;
_audio.PlayPvs(ent.Comp.ShatterSound, Transform(ent).Coordinates);
QueueDel(ent);
}
private void OnEquip(Entity<BloodSpearComponent> ent, ref GotEquippedHandEvent args)
{
if (!TryComp(args.User, out CultistComponent? cultist))
return;
Entity<CultistComponent> user = (args.User, cultist);
if (cultist.BloodSpear == ent && ent.Comp.User == user)
return;
if (ent.Comp.User != null)
DetachSpearFromUser(ent.Comp.User.Value);
DetachSpearFromUser(user);
AttachSpearToUser(user, ent);
}
public void DetachSpearFromUser(Entity<CultistComponent> user)
{
_actionsSystem.RemoveAction(user, user.Comp.BloodSpearActionEntity);
user.Comp.BloodSpearActionEntity = null;
if (user.Comp.BloodSpear != null)
user.Comp.BloodSpear.Value.Comp.User = null;
user.Comp.BloodSpear = null;
}
public void AttachSpearToUser(Entity<CultistComponent> user, Entity<BloodSpearComponent> spear)
{
_actionsSystem.AddAction(user, ref user.Comp.BloodSpearActionEntity, spear.Comp.Action);
user.Comp.BloodSpear = spear;
spear.Comp.User = user;
}
private void OnRemove(Entity<BloodSpearComponent> ent, ref ComponentRemove args)
{
if (ent.Comp.User != null)
DetachSpearFromUser(ent.Comp.User.Value);
}
}

View File

@@ -0,0 +1,91 @@
using System.Linq;
using Content.Shared._White.Cult.Components;
using Content.Shared.Ghost;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction.Events;
using Content.Shared.Weapons.Ranged.Events;
using Content.Shared.Weapons.Ranged.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Network;
using Robust.Shared.Timing;
namespace Content.Shared._White.Cult.Systems;
public sealed class BoltBarrageSystem : EntitySystem
{
[Dependency] private readonly SharedHandsSystem _hands = default!;
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly IGameTiming _timing = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<BoltBarrageComponent, AttemptShootEvent>(OnShootAttempt);
SubscribeLocalEvent<BoltBarrageComponent, GunShotEvent>(OnGunShot);
SubscribeLocalEvent<BoltBarrageComponent, DroppedEvent>(OnDrop);
SubscribeLocalEvent<BoltBarrageComponent, UnequippedHandEvent>(OnUnequipHand);
SubscribeLocalEvent<BoltBarrageComponent, ContainerGettingRemovedAttemptEvent>(OnRemoveAttempt);
SubscribeLocalEvent<BoltBarrageComponent, OnEmptyGunShotEvent>(OnEmptyShot);
}
private void OnUnequipHand(Entity<BoltBarrageComponent> ent, ref UnequippedHandEvent args)
{
if (_net.IsServer && ent.Comp.Unremoveable)
QueueDel(ent);
}
private void OnRemoveAttempt(Entity<BoltBarrageComponent> ent, ref ContainerGettingRemovedAttemptEvent args)
{
if (!_timing.ApplyingState && ent.Comp.Unremoveable)
args.Cancel();
}
private void OnEmptyShot(Entity<BoltBarrageComponent> ent, ref OnEmptyGunShotEvent args)
{
if (_net.IsServer)
QueueDel(ent);
}
private void OnDrop(Entity<BoltBarrageComponent> ent, ref DroppedEvent args)
{
if (_net.IsServer)
QueueDel(ent);
}
private void OnGunShot(Entity<BoltBarrageComponent> ent, ref GunShotEvent args)
{
if (!TryComp(args.User, out HandsComponent? hands))
return;
foreach (var hand in _hands.EnumerateHands(args.User, hands))
{
if (!hand.IsEmpty)
continue;
ent.Comp.Unremoveable = false;
_hands.SetActiveHand(args.User, hand, hands);
_hands.TryPickup(args.User, ent, hand, false, false, hands);
ent.Comp.Unremoveable = true;
return;
}
}
private void OnShootAttempt(Entity<BoltBarrageComponent> ent, ref AttemptShootEvent args)
{
if (!HasComp<CultistComponent>(args.User) && !HasComp<GhostComponent>(args.User))
{
args.Cancelled = true;
args.Message = Loc.GetString("bolt-barrage-component-not-cultist");
return;
}
if (_hands.EnumerateHands(args.User).Any(hand => hand.IsEmpty))
return;
args.Cancelled = true;
args.Message = Loc.GetString("bolt-barrage-component-no-empty-hand");
}
}

View File

@@ -0,0 +1,38 @@
using Content.Shared._White.Cult.Components;
using Content.Shared.Examine;
using Content.Shared.Interaction.Events;
namespace Content.Shared._White.Cult.Systems;
public sealed class ConcealableSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ConcealableComponent, ExamineAttemptEvent>(OnExamine);
SubscribeLocalEvent<ConcealableComponent, InteractionAttemptEvent>(OnInteract);
}
private void OnInteract(Entity<ConcealableComponent> ent, ref InteractionAttemptEvent args)
{
if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false})
args.Cancel();
}
private void OnExamine(Entity<ConcealableComponent> ent, ref ExamineAttemptEvent args)
{
if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false})
args.Cancel();
}
}
public sealed class ConcealEvent : EntityEventArgs
{
public bool Conceal;
public ConcealEvent(bool conceal)
{
Conceal = conceal;
}
}

View File

@@ -49,6 +49,15 @@ public sealed class CultItemSystem : EntitySystem
_popupSystem.PopupClient(Loc.GetString("cult-item-component-pickup-fail", ("name", Name(uid))), uid, args.User);
}
public bool CanThrow(EntityUid player, EntityUid throwEnt)
{
if (!HasComp<CultItemComponent>(throwEnt) || CanUse(player))
return true;
_popupSystem.PopupEntity(Loc.GetString("cult-item-component-throw-fail"), player, player);
return false;
}
private bool CanUse(EntityUid? uid)
{
return HasComp<CultistComponent>(uid) || HasComp<GhostComponent>(uid);