Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into upstream030524
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonsant authored May 3, 2024
2 parents 0b77f5c + f169298 commit ffb49e6
Show file tree
Hide file tree
Showing 23 changed files with 68 additions and 8 deletions.
15 changes: 13 additions & 2 deletions Content.Server/Projectiles/ProjectileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,9 +19,12 @@ public sealed class ProjectileSystem : SharedProjectileSystem
[Dependency] private readonly GunSystem _guns = default!;
[Dependency] private readonly SharedCameraRecoilSystem _sharedCameraRecoil = default!;

private EntityQuery<PenetratableComponent> _penetratableQuery;

public override void Initialize()
{
base.Initialize();
_penetratableQuery = GetEntityQuery<PenetratableComponent>();
SubscribeLocalEvent<ProjectileComponent, StartCollideEvent>(OnStartCollide);
}

Expand Down Expand Up @@ -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<TransformComponent>(uid, out var xform))
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Salvage/SalvageSystem.ExpeditionConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Buckle/Components/BuckleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public sealed partial class BuckleComponent : Component
/// <summary>
/// The strap that this component is buckled to.
/// </summary>
[ViewVariables]
[AutoNetworkedField]
[ViewVariables]
public EntityUid? BuckledTo;

/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/Corvax/Penetration/PenetratableComponent.cs
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions Content.Shared/Projectiles/ProjectileComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ public sealed partial class ProjectileComponent : Component
/// </summary>
[DataField]
public bool DamagedEntity;

[DataField]
public int PenetrationScore;
}
4 changes: 2 additions & 2 deletions Resources/Locale/ru-RU/job/job-names.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = грузчик
Expand Down Expand Up @@ -77,7 +77,7 @@ JobMedicalDoctor = врач
JobMedicalIntern = интерн
JobMime = мим
JobMusician = музыкант
JobPassenger = пассажир
JobPassenger = авантюрист
JobParamedic = парамедик
JobPsychologist = психолог
JobQuartermaster = квартирмейстер
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/DeltaV/typing_indicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
id: felinid
spritePath: /Textures/DeltaV/Effects/speech.rsi
typingState: felinid0
idleState: felinid1
offset: 0, 0.2 # 0625
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Effects/puddle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
state: splat0
drawdepth: FloorObjects
color: "#FFFFFF80"
- type: TimedDespawn # Оптимизация
lifetime: 400
- type: Physics
bodyType: Static
- type: Fixtures
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Mobs/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
components:
- type: Damageable
damageContainer: Biological
- type: Penetratable
stoppingPower: 1
- type: Destructible
thresholds:
- trigger:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
- type: Physics
- type: Damageable
damageContainer: Inorganic
- type: Penetratable
stoppingPower: 1
- type: Destructible
thresholds:
- trigger:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
types:
Piercing: 40
Structural: 30
penetrationScore: 3
- type: StaminaDamageOnCollide
damage: 35
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
damage:
types:
Piercing: 19
penetrationScore: 1

- type: entity
id: BulletMinigun
Expand All @@ -19,3 +20,4 @@
damage:
types:
Piercing: 5
penetrationScore: 1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
damage:
types:
Piercing: 19
penetrationScore: 1

- type: entity
id: BulletLightRiflePractice
Expand Down Expand Up @@ -54,3 +55,4 @@
types:
Radiation: 9
Piercing: 10
penetrationScore: 1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
damage:
types:
Piercing: 35
penetrationScore: 1

- type: entity
id: BulletMagnumPractice
Expand Down Expand Up @@ -55,6 +56,7 @@
damage:
types:
Piercing: 26 # 20% decrease
penetrationScore: 2
ignoreResistances: true

- type: entity
Expand All @@ -68,3 +70,4 @@
types:
Radiation: 15
Piercing: 20
penetrationScore: 1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
damage:
types:
Piercing: 17
penetrationScore: 1

- type: entity
id: BulletRiflePractice
Expand Down Expand Up @@ -54,4 +55,5 @@
types:
Radiation: 7
Piercing: 8
penetrationScore: 1

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
damage:
types:
Piercing: 28
penetrationScore: 2

- type: entity
id: PelletShotgunBeanbag
Expand Down Expand Up @@ -41,6 +42,7 @@
damage:
types:
Piercing: 10
penetrationScore: 1

- type: entity
id: PelletShotgunIncendiary
Expand Down Expand Up @@ -177,6 +179,7 @@
types:
Radiation: 5
Piercing: 5
penetrationScore: 1

- type: entity
id: PelletGrapeshot #tally fucking ho
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Physics
bodyType: Dynamic
bodyType: KinematicController
canCollide: false
- type: Fixtures
fixtures:
fix1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
map: ["enum.PaperLabelVisuals.Layer"]
- type: InteractionOutline
- type: Physics
bodyType: KinematicController
canCollide: false
- type: Fixtures
fixtures:
fix1:
Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Entities/Structures/Walls/walls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallic
- type: Penetratable
stoppingPower: 2
- type: Physics
bodyType: Static
- type: Fixtures
Expand Down Expand Up @@ -530,6 +532,8 @@
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: Penetratable
stoppingPower: 3
- type: Destructible
thresholds:
- trigger:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: RGlass
- type: Penetratable
stoppingPower: 2
- type: RCDDeconstructable
cost: 6
delay: 6
Expand Down Expand Up @@ -103,6 +105,8 @@
sprite: Structures/Windows/cracks_directional.rsi
- type: Damageable
damageModifierSet: RGlass
- type: Penetratable
stoppingPower: 2
- type: RCDDeconstructable
cost: 4
delay: 4
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Structures/base_structure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- type: Clickable
- type: Physics
bodyType: Static
- type: Penetratable
stoppingPower: 1
- type: Fixtures
fixtures:
fix1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
- type: Construction
graph: CrateSecure
node: cratesecure
- type: Physics
bodyType: KinematicController
canCollide: false
- type: Reflect
reflects:
- Energy
Expand Down

0 comments on commit ffb49e6

Please sign in to comment.