Merge a28451fdf7 into fd5b16abb3
This commit is contained in:
commit
a352930dd4
|
|
@ -9,6 +9,7 @@ using Content.Shared.IdentityManagement;
|
|||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Movement.Systems; // DeltaV - Raised Shields slow you down.
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Toggleable;
|
||||
|
|
@ -32,11 +33,13 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly ExamineSystemShared _examine = default!;
|
||||
[Dependency] private readonly TurfSystem _turf = default!;
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; // DeltaV - Raised Shields slow you down.
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
InitializeUser();
|
||||
InitializeDV(); // DeltaV - DeltaV Partial System.
|
||||
|
||||
SubscribeLocalEvent<BlockingComponent, GotEquippedHandEvent>(OnEquip);
|
||||
SubscribeLocalEvent<BlockingComponent, GotUnequippedHandEvent>(OnUnequip);
|
||||
|
|
@ -143,7 +146,7 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
if (component.IsBlocking)
|
||||
return false;
|
||||
|
||||
var xform = Transform(user);
|
||||
//var xform = Transform(user); // DeltaV - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
|
||||
var shieldName = Name(item);
|
||||
|
||||
|
|
@ -151,6 +154,7 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
var msgUser = Loc.GetString("action-popup-blocking-user", ("shield", shieldName));
|
||||
var msgOther = Loc.GetString("action-popup-blocking-other", ("blockerName", blockerName), ("shield", shieldName));
|
||||
|
||||
/** DeltaV Start - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
//Don't allow someone to block if they're not parented to a grid
|
||||
if (xform.GridUid != xform.ParentUid)
|
||||
{
|
||||
|
|
@ -188,9 +192,12 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
CantBlockError(user);
|
||||
return false;
|
||||
}
|
||||
// DeltaV End */
|
||||
|
||||
_actionsSystem.SetToggled(component.BlockingToggleActionEntity, true);
|
||||
_popupSystem.PopupPredicted(msgUser, msgOther, user, user);
|
||||
|
||||
/** DeltaV Start - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
if (TryComp<PhysicsComponent>(user, out var physicsComponent))
|
||||
{
|
||||
_fixtureSystem.TryCreateFixture(user,
|
||||
|
|
@ -200,10 +207,11 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
collisionLayer: (int)CollisionGroup.WallLayer,
|
||||
body: physicsComponent);
|
||||
}
|
||||
// DeltaV End */
|
||||
|
||||
component.IsBlocking = true;
|
||||
Dirty(item, component);
|
||||
|
||||
_movementSpeed.RefreshMovementSpeedModifiers(user); // DeltaV - Raising Shields slows you down.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +239,7 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
if (!component.IsBlocking)
|
||||
return false;
|
||||
|
||||
var xform = Transform(user);
|
||||
//var xform = Transform(user); // DeltaV - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
|
||||
var shieldName = Name(item);
|
||||
|
||||
|
|
@ -239,6 +247,7 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
var msgUser = Loc.GetString("action-popup-blocking-disabling-user", ("shield", shieldName));
|
||||
var msgOther = Loc.GetString("action-popup-blocking-disabling-other", ("blockerName", blockerName), ("shield", shieldName));
|
||||
|
||||
/** DeltaV Start - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
//If the component blocking toggle isn't null, grab the users SharedBlockingUserComponent and PhysicsComponent
|
||||
//then toggle the action to false, unanchor the user, remove the hard fixture
|
||||
//and set the users bodytype back to their original type
|
||||
|
|
@ -249,12 +258,15 @@ public sealed partial class BlockingSystem : EntitySystem
|
|||
|
||||
_actionsSystem.SetToggled(component.BlockingToggleActionEntity, false);
|
||||
_fixtureSystem.DestroyFixture(user, BlockingComponent.BlockFixtureID, body: physicsComponent);
|
||||
_physics.SetBodyType(user, blockingUserComponent.OriginalBodyType, body: physicsComponent);
|
||||
_popupSystem.PopupPredicted(msgUser, msgOther, user, user);
|
||||
}
|
||||
_physics.SetBodyType(user, blockingUserComponent.OriginalBodyType, body: physicsComponent);
|
||||
} */
|
||||
_popupSystem.PopupPredicted(msgUser, msgOther, user, user);
|
||||
// DeltaV End - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
|
||||
component.IsBlocking = false;
|
||||
Dirty(item, component);
|
||||
_movementSpeed.RefreshMovementSpeedModifiers(user); // DeltaV - Raising shields slows you down.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,12 +68,38 @@ public sealed partial class BlockingComponent : Component
|
|||
/// when not blocking
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float PassiveBlockFraction = 0.5f;
|
||||
public float PassiveBlockFraction = 0.25f; // DeltaV - Was 0.5
|
||||
|
||||
/// <summary>
|
||||
/// Fraction of original damage shield will take instead of user
|
||||
/// when blocking
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float ActiveBlockFraction = 1.0f;
|
||||
public float ActiveBlockFraction = 0.9f; // DeltaV - Was 0.9
|
||||
|
||||
// DeltaV Start - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
/// <summary>
|
||||
/// The slow applied to the entity's walking speed when holding the shield.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float WalkModifier = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The slow applied to the entity's running speed when holding the shield.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float SprintModifier = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The slow applied to the entity's walking speed when raising the shield.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float RaisedWalkModifier = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The slow applied to the entity's running speed when raising the shield.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float RaisedSprintModifier = 0.75f;
|
||||
// DeltaV End - Blocking no longer blocks entities from moving through the blocking entity.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
using Content.Shared.Hands;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Wieldable;
|
||||
|
||||
namespace Content.Shared.Blocking;
|
||||
|
||||
/// <summary>
|
||||
/// Extends upstream's BlockingSystem.
|
||||
/// </summary>
|
||||
public sealed partial class BlockingSystem
|
||||
{
|
||||
[Dependency] private readonly SharedWieldableSystem _wieldable = default!;
|
||||
|
||||
private void InitializeDV()
|
||||
{
|
||||
SubscribeLocalEvent<BlockingComponent, HeldRelayedEvent<RefreshMovementSpeedModifiersEvent>>(OnMovementRefresh);
|
||||
}
|
||||
|
||||
private void OnMovementRefresh(Entity<BlockingComponent> shield, ref HeldRelayedEvent<RefreshMovementSpeedModifiersEvent> args)
|
||||
{
|
||||
if (shield.Comp.IsBlocking)
|
||||
args.Args.ModifySpeed(shield.Comp.RaisedWalkModifier, shield.Comp.RaisedSprintModifier);
|
||||
else
|
||||
args.Args.ModifySpeed(shield.Comp.WalkModifier, shield.Comp.SprintModifier);
|
||||
}
|
||||
}
|
||||
|
|
@ -18,9 +18,9 @@
|
|||
ClothingBeltSecurity: 5 # DeltaV - added security belt to SecTech
|
||||
CombatKnife: 3
|
||||
Zipties: 12
|
||||
RiotShield: 2
|
||||
RiotLaserShield: 2
|
||||
RiotBulletShield: 2
|
||||
RiotShield: 3 # DeltaV - Was 2
|
||||
RiotLaserShield: 3 # DeltaV - Was 2
|
||||
RiotBulletShield: 3 # DeltaV - Was 2
|
||||
RadioHandheldSecurity: 5
|
||||
Bola: 6
|
||||
ClothingHeadHelmetInsulated: 2 # Nyanotrasen - Insulative headgear
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
acts: [ "Destruction" ]
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 100 #This is probably enough damage before it breaks
|
||||
damage: 50 #This is probably enough damage before it breaks # DeltaV - Specialize Shields, was 100.
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
|
|
@ -120,8 +120,8 @@
|
|||
Slash: 0.7
|
||||
activeBlockModifier:
|
||||
coefficients:
|
||||
Blunt: 0.5
|
||||
Slash: 0.5
|
||||
Blunt: 0.25 # DeltaV - Was 0.5
|
||||
Slash: 0.25 # DeltaV - Was 0.5
|
||||
flatReductions:
|
||||
Blunt: 1
|
||||
Slash: 1
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
Heat: 0.7
|
||||
activeBlockModifier:
|
||||
coefficients:
|
||||
Heat: 0.5
|
||||
Heat: 0.25 # DeltaV - Was 0.5
|
||||
flatReductions:
|
||||
Heat: 1
|
||||
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
Piercing: 0.7
|
||||
activeBlockModifier:
|
||||
coefficients:
|
||||
Piercing: 0.5
|
||||
Piercing: 0.25 # DeltaV - Was 0.5
|
||||
flatReductions:
|
||||
Piercing: 1
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
- ClothingBeltBandolier
|
||||
- ClothingMaskGasSecurityDV #Sec Gas Mask
|
||||
- ClothingMaskGasSecurity #Sec Breath Mask
|
||||
- RiotBulletShield
|
||||
- RiotLaserShield
|
||||
|
||||
- type: latheRecipePack
|
||||
id: SecurityPracticeStaticDeltaV
|
||||
|
|
|
|||
|
|
@ -429,3 +429,18 @@
|
|||
materials:
|
||||
Steel: 1000
|
||||
Uranium: 250
|
||||
|
||||
# Shields
|
||||
|
||||
- type: latheRecipe
|
||||
parent: RiotShield
|
||||
id: RiotBulletShield
|
||||
result: RiotBulletShield
|
||||
|
||||
- type: latheRecipe
|
||||
parent: BaseShieldRecipe
|
||||
id: RiotLaserShield
|
||||
result: RiotLaserShield
|
||||
materials:
|
||||
Plasma: 400
|
||||
Glass: 400
|
||||
|
|
|
|||
Loading…
Reference in New Issue