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

Commit

Permalink
Merge pull request #94 from Corvax-Frontier/Zekins3366-patch-1
Browse files Browse the repository at this point in the history
Оптимизация made by Zekins
  • Loading branch information
Zekins3366 authored Apr 30, 2024
2 parents 090fcd3 + ccef700 commit 0cac50a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Content.Client/Weapons/Ranged/Systems/GunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ public override void Shoot(EntityUid gunUid, GunComponent gun, List<(EntityUid?
// TODO: Can't predict entity deletions.
//if (cartridge.DeleteOnSpawn)
// Del(cartridge.Owner);
// Добавляем компонент TimedDespawnComponent на сущность патрона - Корвакс
var despawnComponent = EnsureComp<TimedDespawnComponent>(ent.Value);
despawnComponent.Lifetime = 300;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Weapons/Ranged/Components/AmmoComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public sealed partial class CartridgeAmmoComponent : AmmoComponent
/// Caseless ammunition.
/// </summary>
[DataField("deleteOnSpawn")]
public bool DeleteOnSpawn;
public bool DeleteOnSpawn = true; // Corvax-Frontier-Optimization

[DataField("soundEject")]
public SoundSpecifier? EjectSound = new SoundCollectionSpecifier("CasingEject");
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@
- SheetGlass1
- type: StaticPrice
price: 1
- type: TimedDespawn # Corvax-Frontier-Optimization
lifetime: 600
6 changes: 6 additions & 0 deletions Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@
- type: PhysicalComposition
materialComposition:
Plastic: 25
- type: TimedDespawn # Corvax-Frontier-Optimization
lifetime: 300
- type: StaticPrice
price: 1

Expand All @@ -128,6 +130,8 @@
- type: Sprite
sprite: Objects/Misc/zipties.rsi
state: cuff-broken
- type: TimedDespawn # Corvax-Frontier-Optimization
lifetime: 300

- type: entity
name: broken cables
Expand All @@ -147,6 +151,8 @@
right:
- state: inhand-right
color: forestgreen
- type: TimedDespawn # Corvax-Frontier-Optimization
lifetime: 300

- type: entity
parent: Handcuffs
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Objects/Misc/paper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@
contentMargin: 16.0, 16.0, 16.0, 16.0
headerImagePath: "/Textures/Interface/Paper/paper_heading_cargo_invoice.svg.96dpi.png"
headerMargin: 0.0, 12.0, 0.0, 0.0
- type: TimedDespawn
lifetime: 450

- type: entity
id: PaperCargoBountyManifest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
solution: food
- type: Extractable
grindableSolutionName: food
- type: TimedDespawn
lifetime: 300

- type: entity
parent: Ash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
reagents:
- ReagentId: Nothing
Quantity: 1
- type: TimedDespawn # Corvax-Frontier-Optimization
lifetime: 1500

# This empty parcel is allowed to exist and evade the tests for the admin
# mailto command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
tags:
- Recyclable
- Trash
- type: TimedDespawn # Corvax-Frontier-Optimisation
lifetime: 300

0 comments on commit 0cac50a

Please sign in to comment.