diff --git a/Content.Server/Vampire/VampireSystem.Abilities.cs b/Content.Server/Vampire/VampireSystem.Abilities.cs index 14ddcca497..56c14c0150 100644 --- a/Content.Server/Vampire/VampireSystem.Abilities.cs +++ b/Content.Server/Vampire/VampireSystem.Abilities.cs @@ -31,6 +31,7 @@ using System.Collections.Frozen; using System.Diagnostics.CodeAnalysis; using Content.Shared.Flash; using Content.Shared.Flash.Components; +using Content.Shared.Storage.Components; namespace Content.Server.Vampire; diff --git a/Content.Server/_Sunrise/AssaultOps/AssaultOpsRuleSystem.cs b/Content.Server/_Sunrise/AssaultOps/AssaultOpsRuleSystem.cs index 83f8dca764..8a03055d23 100644 --- a/Content.Server/_Sunrise/AssaultOps/AssaultOpsRuleSystem.cs +++ b/Content.Server/_Sunrise/AssaultOps/AssaultOpsRuleSystem.cs @@ -207,7 +207,7 @@ public sealed class AssaultOpsRuleSystem : GameRuleSystem(implant, out var implantComp)) return false; - _subdermalImplant.ForceImplant(uid, implant, implantComp); + _subdermalImplant.ForceImplant(uid, (implant, implantComp)); return true; } diff --git a/Content.Server/_Sunrise/EvilTwin/EvilTwinSystem.cs b/Content.Server/_Sunrise/EvilTwin/EvilTwinSystem.cs index 5a48374563..3973bf24bb 100644 --- a/Content.Server/_Sunrise/EvilTwin/EvilTwinSystem.cs +++ b/Content.Server/_Sunrise/EvilTwin/EvilTwinSystem.cs @@ -218,7 +218,7 @@ public sealed class EvilTwinSystem : EntitySystem var implantEnt = Spawn(MindShield, coords); if (TryComp(implantEnt, out var implantComp)) - _subdermalImplant.ForceImplant(twinUid, implantEnt, implantComp); + _subdermalImplant.ForceImplant(twinUid, (implantEnt, implantComp)); } EnsureComp(twinUid).TargetMindId = mindId; diff --git a/Content.Server/_Sunrise/Execution/ExecutionSystem.cs b/Content.Server/_Sunrise/Execution/ExecutionSystem.cs index ec518d055c..e424cdcce5 100644 --- a/Content.Server/_Sunrise/Execution/ExecutionSystem.cs +++ b/Content.Server/_Sunrise/Execution/ExecutionSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared._Sunrise.Execution; +using Content.Shared.Kitchen.Components; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; diff --git a/Content.Server/_Sunrise/Fugitive/FugitiveSpawner.cs b/Content.Server/_Sunrise/Fugitive/FugitiveSpawner.cs index f5b085d5d3..9080aa632a 100644 --- a/Content.Server/_Sunrise/Fugitive/FugitiveSpawner.cs +++ b/Content.Server/_Sunrise/Fugitive/FugitiveSpawner.cs @@ -81,7 +81,7 @@ namespace Content.Server._Sunrise.Fugitive if (!TryComp(implantEnt, out var implantComp)) return; - _subdermalImplant.ForceImplant(fugitive, implantEnt, implantComp); + _subdermalImplant.ForceImplant(fugitive, (implantEnt, implantComp)); } if (TryComp(fugitive, out var containerManagerComponent)) diff --git a/Content.Shared/Clothing/MagbootsSystem.cs b/Content.Shared/Clothing/MagbootsSystem.cs index 58bc2f0796..61170a6986 100644 --- a/Content.Shared/Clothing/MagbootsSystem.cs +++ b/Content.Shared/Clothing/MagbootsSystem.cs @@ -1,3 +1,4 @@ +using Content.Shared._Sunrise.Abilities; using Content.Shared.Actions; using Content.Shared.Alert; using Content.Shared.Atmos.Components; @@ -27,6 +28,7 @@ public sealed class SharedMagbootsSystem : EntitySystem SubscribeLocalEvent(OnGotEquipped); SubscribeLocalEvent(OnGotUnequipped); SubscribeLocalEvent(OnIsWeightless); + SubscribeLocalEvent(OnIsWeightless); SubscribeLocalEvent>(OnIsWeightless); } @@ -73,6 +75,19 @@ public sealed class SharedMagbootsSystem : EntitySystem args.Handled = true; } + private void OnIsWeightless(Entity ent, ref IsWeightlessEvent args) + { + if (args.Handled || !_toggle.IsActivated(ent.Owner)) + return; + + // do not cancel weightlessness if the person is in off-grid. + if (ent.Comp.RequiresGrid && !_gravity.EntityOnGravitySupportingGridOrMap(ent.Owner)) + return; + + args.IsWeightless = false; + args.Handled = true; + } + private void OnIsWeightless(Entity ent, ref InventoryRelayedEvent args) { OnIsWeightless(ent, ref args.Args); diff --git a/Content.Shared/Gravity/SharedGravitySystem.cs b/Content.Shared/Gravity/SharedGravitySystem.cs index 5c28d99d7d..4d152e72fd 100644 --- a/Content.Shared/Gravity/SharedGravitySystem.cs +++ b/Content.Shared/Gravity/SharedGravitySystem.cs @@ -70,14 +70,6 @@ public abstract partial class SharedGravitySystem : EntitySystem if (entity.Comp2.BodyType is BodyType.Static or BodyType.Kinematic) return false; - - // Sunrise-Start - if (TryComp(entity, out var borgMagbootsComponent) && borgMagbootsComponent.On) - { - return borgMagbootsComponent.RequiresGrid && !EntityOnGravitySupportingGridOrMap(entity); - } - // Sunrise-End - // Check if something other than the grid or map is overriding our gravity var ev = new IsWeightlessEvent(); RaiseLocalEvent(entity, ref ev); diff --git a/Content.Shared/_Starlight/Combat/Effects/EntitySystems/ArmorSparkEffectSystem.cs b/Content.Shared/_Starlight/Combat/Effects/EntitySystems/ArmorSparkEffectSystem.cs index 8c63687a77..5de61d8db6 100644 --- a/Content.Shared/_Starlight/Combat/Effects/EntitySystems/ArmorSparkEffectSystem.cs +++ b/Content.Shared/_Starlight/Combat/Effects/EntitySystems/ArmorSparkEffectSystem.cs @@ -80,9 +80,9 @@ public abstract class SharedArmorSparkEffectSystem : EntitySystem if (HasComp(armorUid)) { var coeffQuery = new CoefficientQueryEvent(SlotFlags.OUTERCLOTHING); - var relayedEvent = new InventoryRelayedEvent(coeffQuery); + var relayedEvent = new InventoryRelayedEvent(coeffQuery, armorUid); RaiseLocalEvent(armorUid, relayedEvent); - + if (coeffQuery.DamageModifiers.Coefficients.TryGetValue("Piercing", out var pierceCoeff)) { // Coefficient of 0.2 or less means 80%+ damage reduction @@ -98,20 +98,20 @@ public abstract class SharedArmorSparkEffectSystem : EntitySystem // Find the entity wearing the armor (the target of the damage) var armorTransform = Transform(armorUid); var wearer = armorTransform.ParentUid; - + if (!Exists(wearer)) return; var wearerTransform = Transform(wearer); - + // Calculate random offset within the tile var offsetX = _random.NextFloat(-component.MaxOffset, component.MaxOffset); var offsetY = _random.NextFloat(-component.MaxOffset, component.MaxOffset); var offset = new Vector2(offsetX, offsetY); - + // Spawn the effect at the wearer's position with offset var effectCoords = wearerTransform.Coordinates.Offset(offset); - + SparkEffectAt(effectCoords, component.SparkEffectPrototype, component.RicochetSoundCollection); } @@ -132,15 +132,15 @@ public abstract class SharedArmorSparkEffectSystem : EntitySystem private void SpawnCyborgSparkEffect(EntityUid cyborgUid, CyborgSparkEffectComponent component) { var cyborgTransform = Transform(cyborgUid); - + // Calculate random offset within the tile var offsetX = _random.NextFloat(-component.MaxOffset, component.MaxOffset); var offsetY = _random.NextFloat(-component.MaxOffset, component.MaxOffset); var offset = new Vector2(offsetX, offsetY); - + // Spawn the effect at the cyborg's position with offset var effectCoords = cyborgTransform.Coordinates.Offset(offset); - + SparkEffectAt(effectCoords, component.SparkEffectPrototype, component.RicochetSoundCollection); } diff --git a/Content.Shared/_Sunrise/Clothing/EntitySystems/EmitSoundOnWearerMoveSystem.cs b/Content.Shared/_Sunrise/Clothing/EntitySystems/EmitSoundOnWearerMoveSystem.cs index ca5cf3a2b8..c34ecb1dc4 100644 --- a/Content.Shared/_Sunrise/Clothing/EntitySystems/EmitSoundOnWearerMoveSystem.cs +++ b/Content.Shared/_Sunrise/Clothing/EntitySystems/EmitSoundOnWearerMoveSystem.cs @@ -32,13 +32,13 @@ public sealed class EmitSoundOnWearerMoveSystem : EntitySystem { base.Update(frameTime); - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var emitSoundOnMoveComponent, out var physics, out var xform, out var clothing)) + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var emitSoundOnMoveComponent, out var xform, out var clothing)) { if (xform.GridUid == null) continue; - if (emitSoundOnMoveComponent.RequiresGravity && _gravity.IsWeightless(uid, physics, xform)) + if (emitSoundOnMoveComponent.RequiresGravity && _gravity.IsWeightless(uid)) continue; var wearer = xform.ParentUid; diff --git a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml index 10c1146c66..8a980d2093 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml @@ -58,7 +58,7 @@ tags: - SubdermalImplant - Flashlight - - type: UnpoweredFlashlight + - type: UnpoweredFlashlight - type: entity parent: BaseSubdermalImplant diff --git a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml index 718790e56b..f0736df962 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml @@ -129,13 +129,11 @@ - type: Pullable - type: Physics bodyType: KinematicController + angularDamping: 10 # sunrise-edit + linearDamping: 10 # sunrise-edit - type: GravityAffected - type: Clickable - type: WiresPanel - - type: Physics - bodyType: Dynamic - angularDamping: 10 # sunrise-edit - linearDamping: 10 # sunrise-edit - type: Fixtures fixtures: fix1: diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/airlocks.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/airlocks.yml index 0ff120628f..eeb15d4bc5 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/airlocks.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/airlocks.yml @@ -163,16 +163,6 @@ # group: null #- type: entity - parent: Airlock - id: AirlockXenoborg - name: xenoborg airlock - components: - - type: Sprite - sprite: Structures/Doors/Airlocks/Standard/xenoborg.rsi - - type: Paintable - group: null - -- type: entity # parent: Airlock # id: AirlockHatchMaintenance # name: maintenance hatch @@ -184,6 +174,16 @@ # #end +- type: entity + parent: Airlock + id: AirlockXenoborg + name: xenoborg airlock + components: + - type: Sprite + sprite: Structures/Doors/Airlocks/Standard/xenoborg.rsi + - type: Paintable + group: null + # Glass - type: entity parent: AirlockGlass