Merge branch 'master' into replace-sounds-with-sound-specifier

# Conflicts:
#	Content.Server/Actions/Actions/DisarmAction.cs
#	Content.Server/Actions/Actions/ScreamAction.cs
#	Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs
#	Content.Server/Damage/Components/DamageOnHighSpeedImpactComponent.cs
#	Content.Server/Explosion/Components/FlashExplosiveComponent.cs
#	Content.Server/Physics/Controllers/MoverController.cs
#	Content.Server/Portal/Components/PortalComponent.cs
#	Content.Server/Portal/Components/TeleporterComponent.cs
#	Content.Server/Projectiles/Components/ProjectileComponent.cs
#	Content.Server/Singularity/Components/EmitterComponent.cs
#	Content.Server/Sound/EmitSoundSystem.cs
#	Content.Server/Stunnable/Components/StunbatonComponent.cs
#	Content.Server/Tools/Components/MultitoolComponent.cs
#	Content.Server/Weapon/Ranged/Barrels/Components/ServerBatteryBarrelComponent.cs
#	Content.Shared/Gravity/GravityComponent.cs
#	Content.Shared/Light/Component/SharedExpendableLightComponent.cs
#	Content.Shared/Maps/ContentTileDefinition.cs
#	Content.Shared/Slippery/SlipperyComponent.cs
#	Content.Shared/Standing/StandingStateComponent.cs
#	Resources/Prototypes/Entities/Objects/Fun/bike_horn.yml
This commit is contained in:
Galactic Chimp
2021-07-25 14:12:00 +02:00
4171 changed files with 15603 additions and 14404 deletions

View File

@@ -1,4 +1,3 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -1,4 +1,3 @@
#nullable enable
using Content.Server.Hands.Components;
using Content.Server.Items;
using Content.Shared.Acts;

View File

@@ -1,4 +1,3 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -1,5 +1,5 @@
#nullable enable
using System;
using System.Collections.Generic;
using Content.Shared.Stacks;
using Content.Shared.Tag;
@@ -22,6 +22,7 @@ namespace Content.Server.Storage.Components
/// amount: 6 # Note: this field can be omitted
/// countTag: Cigarette # Note: field doesn't point to entity Id, but its tag
/// </code>
[Obsolete("Should be deprecated in favor of SharedItemCounterSystem")]
[RegisterComponent]
public class StorageCounterComponent : Component, ISerializationHooks
{

View File

@@ -1,6 +1,6 @@
#nullable enable
using System;
using System.Collections.Generic;
using Content.Shared.Storage;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
@@ -17,8 +17,7 @@ namespace Content.Server.Storage.Components
{
public override string Name => "StorageFill";
[DataField("contents")]
private List<StorageFillEntry> _contents = new();
[DataField("contents")] private List<StorageFillEntry> _contents = new();
public IReadOnlyList<StorageFillEntry> Contents => _contents;
@@ -41,7 +40,8 @@ namespace Content.Server.Storage.Components
foreach (var storageItem in _contents)
{
if (string.IsNullOrEmpty(storageItem.PrototypeId)) continue;
if (!string.IsNullOrEmpty(storageItem.GroupId) && alreadySpawnedGroups.Contains(storageItem.GroupId)) continue;
if (!string.IsNullOrEmpty(storageItem.GroupId) &&
alreadySpawnedGroups.Contains(storageItem.GroupId)) continue;
if (storageItem.SpawnProbability != 1f &&
!random.Prob(storageItem.SpawnProbability))
@@ -51,8 +51,10 @@ namespace Content.Server.Storage.Components
for (var i = 0; i < storageItem.Amount; i++)
{
storage.Insert(Owner.EntityManager.SpawnEntity(storageItem.PrototypeId, Owner.Transform.Coordinates));
storage.Insert(
Owner.EntityManager.SpawnEntity(storageItem.PrototypeId, Owner.Transform.Coordinates));
}
if (!string.IsNullOrEmpty(storageItem.GroupId)) alreadySpawnedGroups.Add(storageItem.GroupId);
}
}
@@ -64,13 +66,13 @@ namespace Content.Server.Storage.Components
[DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? PrototypeId;
[DataField("prob")]
public float SpawnProbability;
[DataField("prob")] public float SpawnProbability;
/// <summary>
/// The probability that an item will spawn. Takes decimal form so 0.05 is 5%, 0.50 is 50% etc.
/// </summary>
[DataField("orGroup")]
public string GroupId;
[DataField("orGroup")] public string GroupId;
/// <summary>
/// orGroup signifies to pick between entities designated with an ID.
///
@@ -93,8 +95,7 @@ namespace Content.Server.Storage.Components
/// </code>
/// </example>
/// </summary>
[DataField("amount")]
public int Amount;
[DataField("amount")] public int Amount;
public void PopulateDefaultValues()
{