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:
@@ -101,7 +101,7 @@ public abstract partial class SharedHandsSystem : EntitySystem
|
||||
if (TryComp(session?.AttachedEntity, out HandsComponent? hands) && hands.ActiveHand != null)
|
||||
// WD EDIT START
|
||||
{
|
||||
if (HasComp<BoltBarrageComponent>(hands.ActiveHandEntity))
|
||||
if (HasComp<DeleteOnDropAttemptComponent>(hands.ActiveHandEntity))
|
||||
{
|
||||
if (_net.IsServer)
|
||||
QueueDel(hands.ActiveHandEntity.Value);
|
||||
|
||||
@@ -116,6 +116,9 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
||||
return;
|
||||
|
||||
// WD START
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
if (component is {Penetrate: true, PenetratedUid: null} &&
|
||||
TryComp(args.Target, out PenetratedComponent? penetrated) &&
|
||||
penetrated is {ProjectileUid: null, IsPinned: false} &&
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -62,19 +63,31 @@ public sealed partial class MeleeWeaponComponent : Component
|
||||
public bool Attacking = false;
|
||||
|
||||
// WD START
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public bool CanHeavyAttack = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public bool CanAttackSelf = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public bool CanMiss = true;
|
||||
|
||||
[DataField]
|
||||
public EntityWhitelist? AttackWhitelist;
|
||||
|
||||
[DataField]
|
||||
public EntityWhitelist? AttackBlacklist;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public bool IgnoreResistances;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public float HeavyAttackStaminaCost = 8;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public EntProtoId MissAnimation = "WeaponArcPunch";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public EntProtoId DisarmAnimation = "WeaponArcDisarm";
|
||||
// WD END
|
||||
|
||||
|
||||
@@ -365,6 +365,30 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
if (weaponUid == lightTarget)
|
||||
return false;
|
||||
|
||||
// WD START
|
||||
if (user == lightTarget && !weapon.CanAttackSelf)
|
||||
return false;
|
||||
|
||||
if (lightTarget == null)
|
||||
{
|
||||
if (weapon.CanMiss)
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (weapon.AttackWhitelist != null)
|
||||
{
|
||||
if (!weapon.AttackWhitelist.IsValid(lightTarget.Value, EntityManager))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (weapon.AttackBlacklist != null)
|
||||
{
|
||||
if (weapon.AttackBlacklist.IsValid(lightTarget.Value, EntityManager))
|
||||
return false;
|
||||
}
|
||||
// WD END
|
||||
|
||||
break;
|
||||
case DisarmAttackEvent disarm:
|
||||
var disarmTarget = GetEntity(disarm.Target);
|
||||
|
||||
@@ -1,29 +1,40 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Magic;
|
||||
|
||||
namespace Content.Shared._White.Cult.Actions;
|
||||
|
||||
public sealed partial class CultTwistedConstructionActionEvent : EntityTargetActionEvent
|
||||
public sealed partial class CultTwistedConstructionActionEvent : EntityTargetActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultSummonDaggerActionEvent : InstantActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultStunActionEvent : InstantActionEvent
|
||||
{
|
||||
}
|
||||
|
||||
public sealed partial class CultSummonDaggerActionEvent : InstantActionEvent
|
||||
public sealed partial class CultTeleportTargetActionEvent : EntityTargetActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultStunTargetActionEvent : EntityTargetActionEvent
|
||||
public sealed partial class CultElectromagneticPulseInstantActionEvent : InstantActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultTeleportTargetActionEvent : EntityTargetActionEvent
|
||||
{
|
||||
}
|
||||
|
||||
public sealed partial class CultElectromagneticPulseInstantActionEvent : InstantActionEvent
|
||||
{
|
||||
}
|
||||
|
||||
public sealed partial class CultShadowShacklesTargetActionEvent : EntityTargetActionEvent
|
||||
public sealed partial class CultShadowShacklesTargetActionEvent : EntityTargetActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultSummonCombatEquipmentTargetActionEvent : EntityTargetActionEvent
|
||||
@@ -31,8 +42,10 @@ public sealed partial class CultSummonCombatEquipmentTargetActionEvent : EntityT
|
||||
}
|
||||
|
||||
[Virtual]
|
||||
public partial class CultConcealPresenceInstantActionEvent : InstantActionEvent
|
||||
public partial class CultConcealPresenceInstantActionEvent : InstantActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultConcealInstantActionEvent : CultConcealPresenceInstantActionEvent
|
||||
@@ -43,8 +56,10 @@ public sealed partial class CultRevealInstantActionEvent : CultConcealPresenceIn
|
||||
{
|
||||
}
|
||||
|
||||
public sealed partial class CultBloodRitesInstantActionEvent : InstantActionEvent
|
||||
public sealed partial class CultBloodRitesInstantActionEvent : InstantActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class CultBloodSpearRecallInstantActionEvent : InstantActionEvent
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Shared._White.Cult.Components;
|
||||
/// This is used for tagging a mob as a cultist.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class CultistComponent : ShowCultHudComponent
|
||||
public sealed partial class CultistComponent : Component
|
||||
{
|
||||
[DataField("greetSound", customTypeSerializer: typeof(SoundSpecifierTypeSerializer))]
|
||||
public SoundSpecifier? CultistGreetSound = new SoundPathSpecifier("/Audio/CultSounds/fart.ogg");
|
||||
@@ -41,7 +41,7 @@ public sealed partial class CultistComponent : ShowCultHudComponent
|
||||
|
||||
public static string CultSummonCombatEquipmentAction = "ActionCultSummonCombatEquipment";
|
||||
|
||||
public static string CultStunAction = "ActionCultStun";
|
||||
public static string CultStunAction = "InstantActionCultStun";
|
||||
|
||||
public static string CultShadowShacklesAction = "ActionCultShadowShackles";
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Content.Shared._White.Cult.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class DeleteOnDropAttemptComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public string Message = string.Empty;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.Cult.Pylon;
|
||||
@@ -64,6 +65,25 @@ public sealed partial class SharedPylonComponent : Component
|
||||
|
||||
[DataField("wallConvertEffect")]
|
||||
public string WallConvertEffect = "CultWallGlow";
|
||||
|
||||
public static bool CheckForStructure(EntityCoordinates coordinates, IEntityManager entMan, float range, EntityUid? pylon = null)
|
||||
{
|
||||
var lookupSystem = entMan.System<EntityLookupSystem>();
|
||||
var entities = lookupSystem.GetEntitiesInRange(coordinates, range);
|
||||
foreach (var ent in entities)
|
||||
{
|
||||
if (ent == pylon)
|
||||
continue;
|
||||
|
||||
if (!entMan.TryGetComponent<MetaDataComponent>(ent, out var metadata))
|
||||
continue;
|
||||
|
||||
if (metadata.EntityPrototype?.ID is "CultPylon")
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
@@ -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