Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -110,6 +110,11 @@ public sealed partial class ExplosionPrototype : IPrototype
|
||||
[DataField("fireStates")]
|
||||
public int FireStates = 3;
|
||||
|
||||
// WD START
|
||||
[DataField]
|
||||
public bool IgnoreResistances = true;
|
||||
// WD END
|
||||
|
||||
/// <summary>
|
||||
/// Basic function for linear interpolation of the _tileBreakChance and _tileBreakIntensity arrays
|
||||
/// </summary>
|
||||
|
||||
@@ -540,6 +540,10 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
gun.UseKey = useKey;
|
||||
}
|
||||
|
||||
public void SetClumsyProof(GunComponent gun, bool clumsyProof)
|
||||
{
|
||||
gun.ClumsyProof = clumsyProof;
|
||||
}
|
||||
public void SetProjectileSpeed(EntityUid weapon, float projectileSpeed)
|
||||
{
|
||||
if(!TryComp<GunComponent>(weapon, out var gunComponent))
|
||||
|
||||
@@ -27,7 +27,7 @@ public sealed class BoltBarrageSystem : EntitySystem
|
||||
SubscribeLocalEvent<BoltBarrageComponent, AttemptShootEvent>(OnShootAttempt);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, GunShotEvent>(OnGunShot);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, DroppedEvent>(OnDrop);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, UnequippedHandEvent>(OnUnequipHand);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, GotUnequippedHandEvent>(OnUnequipHand);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, ContainerGettingRemovedAttemptEvent>(OnRemoveAttempt);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, OnEmptyGunShotEvent>(OnEmptyShot);
|
||||
SubscribeLocalEvent<BoltBarrageComponent, ExaminedEvent>(OnExamine);
|
||||
@@ -38,7 +38,7 @@ public sealed class BoltBarrageSystem : EntitySystem
|
||||
args.PushMarkup(Loc.GetString("bolt-barrage-component-extra-desc"));
|
||||
}
|
||||
|
||||
private void OnUnequipHand(Entity<BoltBarrageComponent> ent, ref UnequippedHandEvent args)
|
||||
private void OnUnequipHand(Entity<BoltBarrageComponent> ent, ref GotUnequippedHandEvent args)
|
||||
{
|
||||
if (_net.IsServer && ent.Comp.Unremoveable)
|
||||
QueueDel(ent);
|
||||
@@ -82,12 +82,12 @@ public sealed class BoltBarrageSystem : EntitySystem
|
||||
|
||||
private void OnShootAttempt(Entity<BoltBarrageComponent> ent, ref AttemptShootEvent args)
|
||||
{
|
||||
if (!HasComp<CultistComponent>(args.User) && !HasComp<GhostComponent>(args.User))
|
||||
/*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;
|
||||
|
||||
@@ -102,6 +102,7 @@ public abstract class SharedSpellBladeSystem : EntitySystem
|
||||
{
|
||||
var gun = EnsureComp<GunComponent>(uid);
|
||||
_gun.SetUseKey(gun, false);
|
||||
_gun.SetClumsyProof(gun, true);
|
||||
_gun.SetSound(uid, new SoundPathSpecifier("/Audio/Weapons/Guns/Gunshots/Magic/staff_healing.ogg"));
|
||||
_gun.SetFireRate(uid, 1.2f);
|
||||
var ammoProvider = EnsureComp<BasicEntityAmmoProviderComponent>(uid);
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Movement.Events;
|
||||
using Content.Shared.Speech;
|
||||
using Content.Shared.Standing.Systems;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Physics;
|
||||
@@ -30,11 +31,14 @@ public sealed class FreezeContactsSystem : EntitySystem
|
||||
|
||||
SubscribeLocalEvent<FreezeContactsComponent, StartCollideEvent>(OnEntityEnter);
|
||||
SubscribeLocalEvent<FreezeContactsComponent, EndCollideEvent>(OnEntityExit);
|
||||
|
||||
SubscribeLocalEvent<FrozenComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<FrozenComponent, ComponentRemove>(OnRemove);
|
||||
SubscribeLocalEvent<FrozenComponent, PreventCollideEvent>(OnPreventCollide);
|
||||
SubscribeLocalEvent<FrozenComponent, EntGotInsertedIntoContainerMessage>(OnGetInserted);
|
||||
|
||||
SubscribeLocalEvent<FrozenComponent, StandAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<FrozenComponent, DownAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<FrozenComponent, SpeakAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<FrozenComponent, EmoteAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<FrozenComponent, ChangeDirectionAttemptEvent>(OnAttempt);
|
||||
@@ -152,21 +156,25 @@ public sealed class FreezeContactsSystem : EntitySystem
|
||||
|
||||
private void OnEntityEnter(Entity<FreezeContactsComponent> ent, ref StartCollideEvent args)
|
||||
{
|
||||
var hadFrozen = HasComp<FrozenComponent>(args.OtherEntity);
|
||||
var frozen = EnsureComp<FrozenComponent>(args.OtherEntity);
|
||||
FreezeEm(args.OtherEntity, ent);
|
||||
}
|
||||
|
||||
if (!TryComp(ent, out TimedDespawnComponent? timedDespawn))
|
||||
private void FreezeEm(EntityUid uid, EntityUid freezeContact)
|
||||
{
|
||||
if (HasComp<FrozenComponent>(uid))
|
||||
return;
|
||||
|
||||
var frozen = EnsureComp<FrozenComponent>(uid);
|
||||
|
||||
if (!TryComp(freezeContact, out TimedDespawnComponent? timedDespawn))
|
||||
return;
|
||||
|
||||
frozen.Lifetime = timedDespawn.Lifetime;
|
||||
|
||||
if (TryComp(args.OtherEntity, out TimedDespawnComponent? otherTimedDespawn))
|
||||
if (TryComp(uid, out TimedDespawnComponent? otherTimedDespawn))
|
||||
otherTimedDespawn.Lifetime += timedDespawn.Lifetime;
|
||||
|
||||
if (hadFrozen)
|
||||
return;
|
||||
|
||||
if (!TryComp(args.OtherEntity, out ThrownItemComponent? thrownItem))
|
||||
if (!TryComp(uid, out ThrownItemComponent? thrownItem))
|
||||
return;
|
||||
|
||||
if (thrownItem.LandTime != null)
|
||||
|
||||
@@ -193,4 +193,13 @@ public sealed partial class StopTimeSpellEvent : InstantActionEvent, ISpeakSpell
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class ArcaneBarrageSpellEvent : InstantActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Prototype = default!;
|
||||
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user