diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index 0061b16e47c..c26f2447467 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Effects; using Content.Server.Weapons.Ranged.Systems; using Content.Shared.Camera; +using Content.Shared.Corvax.Penetration; using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.Projectiles; @@ -18,9 +19,12 @@ public sealed class ProjectileSystem : SharedProjectileSystem [Dependency] private readonly GunSystem _guns = default!; [Dependency] private readonly SharedCameraRecoilSystem _sharedCameraRecoil = default!; + private EntityQuery _penetratableQuery; + public override void Initialize() { base.Initialize(); + _penetratableQuery = GetEntityQuery(); SubscribeLocalEvent(OnStartCollide); } @@ -67,9 +71,16 @@ private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref St _sharedCameraRecoil.KickCamera(target, direction); } - component.DamagedEntity = true; + if (component.PenetrationScore > 0 && _penetratableQuery.TryGetComponent(target, out var penetratable)) + { + component.DamagedEntity = component.PenetrationScore < penetratable.StoppingPower; + + component.PenetrationScore -= penetratable.StoppingPower; + } + else + component.DamagedEntity = true; - if (component.DeleteOnCollide) + if (component.DeleteOnCollide && component.DamagedEntity) QueueDel(uid); if (component.ImpactEffect != null && TryComp(uid, out var xform)) diff --git a/Content.Server/Salvage/SalvageSystem.ExpeditionConsole.cs b/Content.Server/Salvage/SalvageSystem.ExpeditionConsole.cs index d04aae04cc0..319ee1ef629 100644 --- a/Content.Server/Salvage/SalvageSystem.ExpeditionConsole.cs +++ b/Content.Server/Salvage/SalvageSystem.ExpeditionConsole.cs @@ -36,7 +36,7 @@ private void OnSalvageClaimMessage(EntityUid uid, SalvageExpeditionConsoleCompon } } - if (activeExpeditionCount >= 2) + if (activeExpeditionCount >= 15) { PlayDenySound(uid, component); _popupSystem.PopupEntity(Loc.GetString("ftl-channel-blocked"), uid, PopupType.MediumCaution); diff --git a/Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs b/Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs index ce7a72581ef..95e99eff2e2 100644 --- a/Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs +++ b/Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs @@ -128,7 +128,7 @@ private void OnStartup(RoundStartingEvent ev) var lpbravoColor = new Color(200, 55, 55); var factionColor = new Color(255, 165, 0); var mapId = GameTicker.DefaultMap; - var depotOffset = _random.NextVector2(10000f, 20000f); // А раньше было 3000 и 5000. Удачи с поисками. + var depotOffset = _random.NextVector2(8000f, 10000f); // А раньше было 3000 и 5000. Удачи с поисками. var tinniaOffset = _random.NextVector2(1100f, 2800f); var caseysOffset = _random.NextVector2(2250f, 4600f); diff --git a/Content.Shared/Buckle/Components/BuckleComponent.cs b/Content.Shared/Buckle/Components/BuckleComponent.cs index 80d3be7db14..623c918ebd3 100644 --- a/Content.Shared/Buckle/Components/BuckleComponent.cs +++ b/Content.Shared/Buckle/Components/BuckleComponent.cs @@ -59,8 +59,8 @@ public sealed partial class BuckleComponent : Component /// /// The strap that this component is buckled to. /// - [ViewVariables] [AutoNetworkedField] + [ViewVariables] public EntityUid? BuckledTo; /// diff --git a/Content.Shared/Corvax/Penetration/PenetratableComponent.cs b/Content.Shared/Corvax/Penetration/PenetratableComponent.cs new file mode 100644 index 00000000000..72d275050a7 --- /dev/null +++ b/Content.Shared/Corvax/Penetration/PenetratableComponent.cs @@ -0,0 +1,10 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Corvax.Penetration; + +[RegisterComponent, NetworkedComponent] +public sealed partial class PenetratableComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadWrite)] + public int StoppingPower; +} diff --git a/Content.Shared/Projectiles/ProjectileComponent.cs b/Content.Shared/Projectiles/ProjectileComponent.cs index c24cf2b5ee5..8cbe54fce3e 100644 --- a/Content.Shared/Projectiles/ProjectileComponent.cs +++ b/Content.Shared/Projectiles/ProjectileComponent.cs @@ -73,4 +73,7 @@ public sealed partial class ProjectileComponent : Component /// [DataField] public bool DamagedEntity; + + [DataField] + public int PenetrationScore; } diff --git a/Resources/Locale/ru-RU/job/job-names.ftl b/Resources/Locale/ru-RU/job/job-names.ftl index cdad76a214c..8bb7614f05c 100644 --- a/Resources/Locale/ru-RU/job/job-names.ftl +++ b/Resources/Locale/ru-RU/job/job-names.ftl @@ -31,7 +31,7 @@ job-name-janitor = уборщик job-name-chaplain = священник job-name-botanist = ботаник job-name-bartender = бармен -job-name-passenger = пассажир +job-name-passenger = авантюрист job-name-salvagespec = утилизатор job-name-qm = квартирмейстер job-name-cargotech = грузчик @@ -77,7 +77,7 @@ JobMedicalDoctor = врач JobMedicalIntern = интерн JobMime = мим JobMusician = музыкант -JobPassenger = пассажир +JobPassenger = авантюрист JobParamedic = парамедик JobPsychologist = психолог JobQuartermaster = квартирмейстер diff --git a/Resources/Prototypes/DeltaV/typing_indicator.yml b/Resources/Prototypes/DeltaV/typing_indicator.yml index a3fc2fbcfb9..f9bc79629ee 100644 --- a/Resources/Prototypes/DeltaV/typing_indicator.yml +++ b/Resources/Prototypes/DeltaV/typing_indicator.yml @@ -2,4 +2,5 @@ id: felinid spritePath: /Textures/DeltaV/Effects/speech.rsi typingState: felinid0 + idleState: felinid1 offset: 0, 0.2 # 0625 diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 2c845e1d0f0..92c18daa31f 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -123,6 +123,8 @@ state: splat0 drawdepth: FloorObjects color: "#FFFFFF80" + - type: TimedDespawn # Оптимизация + lifetime: 400 - type: Physics bodyType: Static - type: Fixtures diff --git a/Resources/Prototypes/Entities/Mobs/base.yml b/Resources/Prototypes/Entities/Mobs/base.yml index 065d62c748d..ce4328c0087 100644 --- a/Resources/Prototypes/Entities/Mobs/base.yml +++ b/Resources/Prototypes/Entities/Mobs/base.yml @@ -52,6 +52,8 @@ components: - type: Damageable damageContainer: Biological + - type: Penetratable + stoppingPower: 1 - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml b/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml index a17c892169d..3938ea96b53 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml @@ -26,6 +26,8 @@ - type: Physics - type: Damageable damageContainer: Inorganic + - type: Penetratable + stoppingPower: 1 - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml index 31d7b65fe8b..be73011e777 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml @@ -9,5 +9,6 @@ types: Piercing: 40 Structural: 30 + penetrationScore: 3 - type: StaminaDamageOnCollide damage: 35 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/heavy_rifle.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/heavy_rifle.yml index be6a07e486d..921cbc8d4ad 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/heavy_rifle.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/heavy_rifle.yml @@ -8,6 +8,7 @@ damage: types: Piercing: 19 + penetrationScore: 1 - type: entity id: BulletMinigun @@ -19,3 +20,4 @@ damage: types: Piercing: 5 + penetrationScore: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml index 3a0df2ac6c7..b69efdb1aa6 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml @@ -8,6 +8,7 @@ damage: types: Piercing: 19 + penetrationScore: 1 - type: entity id: BulletLightRiflePractice @@ -54,3 +55,4 @@ types: Radiation: 9 Piercing: 10 + penetrationScore: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/magnum.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/magnum.yml index dd72b497d1d..a3ab5769dd0 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/magnum.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/magnum.yml @@ -8,6 +8,7 @@ damage: types: Piercing: 35 + penetrationScore: 1 - type: entity id: BulletMagnumPractice @@ -55,6 +56,7 @@ damage: types: Piercing: 26 # 20% decrease + penetrationScore: 2 ignoreResistances: true - type: entity @@ -68,3 +70,4 @@ types: Radiation: 15 Piercing: 20 + penetrationScore: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/rifle.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/rifle.yml index 2113916cf52..adb9c4d8dc5 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/rifle.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/rifle.yml @@ -8,6 +8,7 @@ damage: types: Piercing: 17 + penetrationScore: 1 - type: entity id: BulletRiflePractice @@ -54,4 +55,5 @@ types: Radiation: 7 Piercing: 8 + penetrationScore: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml index cd9d4580367..fff384c2144 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml @@ -11,6 +11,7 @@ damage: types: Piercing: 28 + penetrationScore: 2 - type: entity id: PelletShotgunBeanbag @@ -41,6 +42,7 @@ damage: types: Piercing: 10 + penetrationScore: 1 - type: entity id: PelletShotgunIncendiary @@ -177,6 +179,7 @@ types: Radiation: 5 Piercing: 5 + penetrationScore: 1 - type: entity id: PelletGrapeshot #tally fucking ho diff --git a/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml b/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml index 458b05d09cf..46b68ddfcab 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml @@ -65,7 +65,8 @@ damageContainer: Inorganic damageModifierSet: Metallic - type: Physics - bodyType: Dynamic + bodyType: KinematicController + canCollide: false - type: Fixtures fixtures: fix1: diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml index 95580292d9f..cced68a8f01 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml @@ -26,6 +26,8 @@ map: ["enum.PaperLabelVisuals.Layer"] - type: InteractionOutline - type: Physics + bodyType: KinematicController + canCollide: false - type: Fixtures fixtures: fix1: diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 0a1aea23cd7..0978b71a572 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -30,6 +30,8 @@ - type: Damageable damageContainer: StructuralInorganic damageModifierSet: StructuralMetallic + - type: Penetratable + stoppingPower: 2 - type: Physics bodyType: Static - type: Fixtures @@ -530,6 +532,8 @@ - type: Damageable damageContainer: StructuralInorganic damageModifierSet: StructuralMetallicStrong + - type: Penetratable + stoppingPower: 3 - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml index 71804fdab41..7dea327e2ae 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml @@ -14,6 +14,8 @@ - type: Damageable damageContainer: StructuralInorganic damageModifierSet: RGlass + - type: Penetratable + stoppingPower: 2 - type: RCDDeconstructable cost: 6 delay: 6 @@ -103,6 +105,8 @@ sprite: Structures/Windows/cracks_directional.rsi - type: Damageable damageModifierSet: RGlass + - type: Penetratable + stoppingPower: 2 - type: RCDDeconstructable cost: 4 delay: 4 diff --git a/Resources/Prototypes/Entities/Structures/base_structure.yml b/Resources/Prototypes/Entities/Structures/base_structure.yml index 71971a66243..963775b1549 100644 --- a/Resources/Prototypes/Entities/Structures/base_structure.yml +++ b/Resources/Prototypes/Entities/Structures/base_structure.yml @@ -9,6 +9,8 @@ - type: Clickable - type: Physics bodyType: Static + - type: Penetratable + stoppingPower: 1 - type: Fixtures fixtures: fix1: diff --git a/Resources/Prototypes/_NF/Entities/Structures/Storage/Crates/base_structurecrates.yml b/Resources/Prototypes/_NF/Entities/Structures/Storage/Crates/base_structurecrates.yml index 6eb022d947e..01389542691 100644 --- a/Resources/Prototypes/_NF/Entities/Structures/Storage/Crates/base_structurecrates.yml +++ b/Resources/Prototypes/_NF/Entities/Structures/Storage/Crates/base_structurecrates.yml @@ -25,6 +25,9 @@ - type: Construction graph: CrateSecure node: cratesecure + - type: Physics + bodyType: KinematicController + canCollide: false - type: Reflect reflects: - Energy