diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs index 06f1b6b154..a739d6bfad 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs @@ -51,7 +51,7 @@ public sealed partial class ParticleAcceleratorSystem ParticleAcceleratorPowerState.Level2 => 3, ParticleAcceleratorPowerState.Level3 => 10, _ => 0, - } * 10; + } * 3.3f; } if (TryComp(emitted, out var particle)) diff --git a/Content.Server/Singularity/Components/GravityWellComponent.cs b/Content.Server/Singularity/Components/GravityWellComponent.cs index 58a314fa8b..98c7982f79 100644 --- a/Content.Server/Singularity/Components/GravityWellComponent.cs +++ b/Content.Server/Singularity/Components/GravityWellComponent.cs @@ -1,4 +1,3 @@ -using Content.Shared.Singularity.Components; using Content.Server.Singularity.EntitySystems; namespace Content.Server.Singularity.Components; @@ -13,7 +12,7 @@ public sealed partial class GravityWellComponent : Component /// /// The maximum range at which the gravity well can push/pull entities. /// - [DataField("maxRange")] + [DataField] [ViewVariables(VVAccess.ReadWrite)] public float MaxRange; @@ -21,27 +20,27 @@ public sealed partial class GravityWellComponent : Component /// The minimum range at which the gravity well can push/pull entities. /// This is effectively hardfloored at . /// - [DataField("minRange")] + [DataField] [ViewVariables(VVAccess.ReadWrite)] - public float MinRange = 0f; + public float MinRange; /// /// The acceleration entities will experience towards the gravity well at a distance of 1m. /// Negative values accelerate entities away from the gravity well. /// Actual acceleration scales with the inverse of the distance to the singularity. /// - [DataField("baseRadialAcceleration")] + [DataField] [ViewVariables(VVAccess.ReadWrite)] - public float BaseRadialAcceleration = 0.0f; + public float BaseRadialAcceleration; /// /// The acceleration entities will experience tangent to the gravity well at a distance of 1m. /// Positive tangential acceleration is counter-clockwise. /// Actual acceleration scales with the inverse of the distance to the singularity. /// - [DataField("baseTangentialAcceleration")] + [DataField] [ViewVariables(VVAccess.ReadWrite)] - public float BaseTangentialAcceleration = 0.0f; + public float BaseTangentialAcceleration; #region Update Timing diff --git a/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs b/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs index d66d78abfd..6dba0de758 100644 --- a/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs +++ b/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs @@ -1,7 +1,9 @@ +using Content.Server._White.Other; using Content.Server.Atmos.Components; using Content.Server.Singularity.Components; using Content.Server.Stunnable; using Content.Shared.Ghost; +using Content.Shared.Singularity.Components; using Content.Shared.Singularity.EntitySystems; using Robust.Shared.Map; using Robust.Shared.Map.Components; @@ -37,6 +39,7 @@ public sealed class GravityWellSystem : SharedGravityWellSystem public override void Initialize() { base.Initialize(); + SubscribeLocalEvent(OnGravityWellStartup); var vvHandle = _vvManager.GetTypeHandler(); @@ -47,6 +50,7 @@ public sealed class GravityWellSystem : SharedGravityWellSystem { var vvHandle = _vvManager.GetTypeHandler(); vvHandle.RemovePath(nameof(GravityWellComponent.TargetPulsePeriod)); + base.Shutdown(); } @@ -57,7 +61,7 @@ public sealed class GravityWellSystem : SharedGravityWellSystem /// The time elapsed since the last set of updates. public override void Update(float frameTime) { - if(!_timing.IsFirstTimePredicted) + if (!_timing.IsFirstTimePredicted) return; var query = EntityQueryEnumerator(); @@ -91,15 +95,16 @@ public sealed class GravityWellSystem : SharedGravityWellSystem /// The transform of the gravity well to make pulse. private void Update(EntityUid uid, TimeSpan frameTime, GravityWellComponent? gravWell = null, TransformComponent? xform = null) { - if(!Resolve(uid, ref gravWell)) + if (!Resolve(uid, ref gravWell)) return; gravWell.LastPulseTime = _timing.CurTime; gravWell.NextPulseTime = gravWell.LastPulseTime + gravWell.TargetPulsePeriod; + if (gravWell.MaxRange < 0.0f || !Resolve(uid, ref xform)) return; - var scale = (float)frameTime.TotalSeconds; + var scale = (float) frameTime.TotalSeconds; GravPulse(uid, gravWell.MaxRange, gravWell.MinRange, gravWell.BaseRadialAcceleration * scale, gravWell.BaseTangentialAcceleration * scale, xform); } @@ -113,10 +118,10 @@ public sealed class GravityWellSystem : SharedGravityWellSystem private bool CanGravPulseAffect(EntityUid entity) { return !( - EntityManager.HasComponent(entity) || - EntityManager.HasComponent(entity) || - EntityManager.HasComponent(entity) || - EntityManager.HasComponent(entity) + HasComp(entity) || + HasComp(entity) || + HasComp(entity) || + HasComp(entity) ); } @@ -184,33 +189,46 @@ public sealed class GravityWellSystem : SharedGravityWellSystem var epicenter = mapPos.Position; var minRange2 = MathF.Max(minRange * minRange, MinGravPulseRange); // Cache square value for speed. Also apply a sane minimum value to the minimum value so that div/0s don't happen. + var bodyQuery = GetEntityQuery(); var xformQuery = GetEntityQuery(); - foreach(var entity in _lookup.GetEntitiesInRange(mapPos.MapId, epicenter, maxRange, flags: LookupFlags.Dynamic | LookupFlags.Sundries)) + foreach(var entity in _lookup.GetEntitiesInRange(mapPos.MapId, epicenter, maxRange, flags: LookupFlags.Dynamic | LookupFlags.Static | LookupFlags.Sundries)) { if (ignore?.Contains(entity) is true) continue; - if (!bodyQuery.TryGetComponent(entity, out var physics) - || physics.BodyType == BodyType.Static) - { - continue; - } - - if (TryComp(entity, out var movedPressure) && !movedPressure.Enabled) //Ignore magboots users + if (!bodyQuery.TryGetComponent(entity, out var physics)) // WD edit continue; - if(!CanGravPulseAffect(entity)) + // WD added start + var xform = Transform(entity); + + if (HasComp(entity)) continue; + if (xform.Anchored && HasComp(entity)) + continue; + // WD added end + + if (TryComp(entity, out var movedPressure) && !movedPressure.Enabled) // Ignore magboots users + continue; + + if (!CanGravPulseAffect(entity)) + continue; + + if (xform.Anchored) // WD added + _transform.Unanchor(entity, xform); + var displacement = epicenter - _transform.GetWorldPosition(entity, xformQuery); var distance2 = displacement.LengthSquared(); + if (distance2 < minRange2) continue; var scaling = (1f / distance2) * physics.Mass; // TODO: Variable falloff gradiants. _physics.ApplyLinearImpulse(entity, (displacement * baseMatrixDeltaV) * scaling, body: physics); + if (stunTime > 0f) _stun.TryParalyze(entity, TimeSpan.FromSeconds(stunTime), true); } @@ -244,7 +262,7 @@ public sealed class GravityWellSystem : SharedGravityWellSystem /// The state of the gravity well to set the pulse period for. public void SetPulsePeriod(EntityUid uid, TimeSpan value, GravityWellComponent? gravWell = null) { - if(!Resolve(uid, ref gravWell)) + if (!Resolve(uid, ref gravWell)) return; if (MathHelper.CloseTo(gravWell.TargetPulsePeriod.TotalSeconds, value.TotalSeconds)) @@ -254,6 +272,7 @@ public sealed class GravityWellSystem : SharedGravityWellSystem gravWell.NextPulseTime = gravWell.LastPulseTime + gravWell.TargetPulsePeriod; var curTime = _timing.CurTime; + if (gravWell.NextPulseTime <= curTime) Update(uid, curTime - gravWell.LastPulseTime, gravWell); } diff --git a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs index de7df32374..7a962a33cf 100644 --- a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs +++ b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs @@ -122,11 +122,7 @@ public sealed class SingularitySystem : SharedSingularitySystem /// The state of the singularity to set the energy of. public void SetEnergy(EntityUid uid, float value, SingularityComponent? singularity = null) { - if(!Resolve(uid, ref singularity)) - return; - - var oldValue = singularity.Energy; - if (oldValue == value) + if (!Resolve(uid, ref singularity)) return; singularity.Energy = value; @@ -154,13 +150,14 @@ public sealed class SingularitySystem : SharedSingularitySystem /// The state of the singularity to adjust the energy of. public void AdjustEnergy(EntityUid uid, float delta, float min = float.MinValue, float max = float.MaxValue, bool snapMin = true, bool snapMax = true, SingularityComponent? singularity = null) { - if(!Resolve(uid, ref singularity)) + if (!Resolve(uid, ref singularity)) return; var newValue = singularity.Energy + delta; - if((!snapMin && newValue < min) - || (!snapMax && newValue > max)) + + if ((!snapMin && newValue < min) || (!snapMax && newValue > max)) return; + SetEnergy(uid, MathHelper.Clamp(newValue, min, max), singularity); } diff --git a/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs b/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs index e6ca452da5..ccee6e59c2 100644 --- a/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs +++ b/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs @@ -27,7 +27,7 @@ public sealed partial class EmbeddableProjectileComponent : Component /// How long it takes to remove the embedded object. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] - public float? RemovalTime = 3f; + public float? RemovalTime = 1f; /// /// Whether this entity will embed when thrown, or only when shot as a projectile. diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml b/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml index 961e0b01ad..0b92fd70ba 100644 --- a/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml +++ b/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml @@ -250,7 +250,7 @@ sprintModifier: 0.8 - type: entity - parent: ClothingShoesBaseButcherable + parent: ClothingShoesBase id: ClothingShoesSkates name: roller skates description: "Get your skates on!" @@ -266,8 +266,8 @@ - type: Item sprite: Clothing/Shoes/Specific/skates.rsi - type: ClothingSpeedModifier - walkModifier: 1.1 - sprintModifier: 1.1 + walkModifier: 1.3 + sprintModifier: 1.3 - type: Skates - type: FootstepModifier footstepSoundCollection: diff --git a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml index 4f7a8aa9b0..b822f7b19a 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml @@ -24,7 +24,7 @@ - type: NavMapBeacon defaultText: station-beacon-general color: "#D4D4D496" - - type: WarpPoint +# - type: WarpPoint WD edit - type: SpawnTeleportLocation - type: GiftIgnore - type: ActivatableUI diff --git a/Resources/Prototypes/Entities/Objects/Misc/land_mine.yml b/Resources/Prototypes/Entities/Objects/Misc/land_mine.yml index e7d5e8a219..3297f61fb1 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/land_mine.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/land_mine.yml @@ -70,9 +70,9 @@ - type: ExplodeOnTrigger - type: Explosive explosionType: Default - maxIntensity: 10 + maxIntensity: 40 intensitySlope: 3 - totalIntensity: 120 # about a ~4 tile radius + totalIntensity: 70 # about a ~4 tile radius canCreateVacuum: false - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index 6f5cf28e45..a72b6acfbd 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -409,6 +409,10 @@ state: icon - type: Item size: Normal + storedRotation: -90 + shape: # WD + - 0, 1, 0, 1 + - 0, 0, 1, 0 - type: Clothing sprite: Objects/Tools/rcd.rsi quickEquip: false diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml index a9fd713e4d..ab891f8731 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml @@ -16,7 +16,7 @@ - type: Wieldable - type: GunWieldBonus minAngle: -20 - maxAngle: -20 + maxAngle: -35 # WD - type: Gun minAngle: 24 maxAngle: 45 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml index d982243dfe..e1cc85bd28 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml @@ -46,7 +46,7 @@ - type: DamageOtherOnHit damage: types: - Piercing: 15 + Piercing: 30 # WD - type: Item storedRotation: 44 # It just works size: Huge diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml index 25d219ab94..aae5096a44 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml @@ -19,8 +19,8 @@ colliderFixtureId: EventHorizonCollider consumerFixtureId: EventHorizonConsumer - type: GravityWell # To make the singularity attract things. - baseRadialAcceleration: 10 - maxRange: 4 + baseRadialAcceleration: 20 + maxRange: 10 - type: Fixtures fixtures: EventHorizonCollider: