Fix 3000 errors

This commit is contained in:
DrSmugleaf
2021-12-05 18:09:01 +01:00
parent 2bfec7ec62
commit 2a3b7d809d
569 changed files with 2979 additions and 3280 deletions

View File

@@ -1,4 +1,3 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
@@ -6,22 +5,22 @@ using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Player;
namespace Content.Server.Chemistry.EntitySystems
{
public class ChemicalReactionSystem : SharedChemicalReactionSystem
{
protected override void OnReaction(Solution solution, ReactionPrototype reaction, ReagentPrototype randomReagent, EntityUid ownerUid, FixedPoint2 unitReactions)
protected override void OnReaction(Solution solution, ReactionPrototype reaction, ReagentPrototype randomReagent, EntityUid Owner, FixedPoint2 unitReactions)
{
base.OnReaction(solution, reaction, randomReagent, ownerUid, unitReactions);
base.OnReaction(solution, reaction, randomReagent, Owner, unitReactions);
var coordinates = EntityManager.GetComponent<TransformComponent>(Owner);
var entity = EntityManager.GetEntity(ownerUid);
_logSystem.Add(LogType.ChemicalReaction, reaction.Impact,
$"Chemical reaction {reaction.ID} occurred with strength {unitReactions:strength} on entity {entity} at {IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity).Coordinates}");
$"Chemical reaction {reaction.ID} occurred with strength {unitReactions:strength} on entity {Owner} at {coordinates}");
SoundSystem.Play(Filter.Pvs(ownerUid, entityManager:EntityManager), reaction.Sound.GetSound(), ownerUid);
SoundSystem.Play(Filter.Pvs(Owner, entityManager:EntityManager), reaction.Sound.GetSound(), Owner);
}
}
}

View File

@@ -1,6 +1,5 @@
using Content.Server.Chemistry.Components;
using Content.Server.Popups;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
@@ -29,7 +28,7 @@ namespace Content.Server.Chemistry.EntitySystems
}
// Try not to make this public if you can help it.
private void Expand(RehydratableComponent component, IEntity owner)
private void Expand(RehydratableComponent component, EntityUid owner)
{
if (component.Expanding)
{

View File

@@ -13,9 +13,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Server.Chemistry.EntitySystems
@@ -290,10 +288,10 @@ namespace Content.Server.Chemistry.EntitySystems
UpdateChemicals(uid, solution);
}
public FixedPoint2 GetReagentQuantity(EntityUid ownerUid, string reagentId)
public FixedPoint2 GetReagentQuantity(EntityUid Owner, string reagentId)
{
var reagentQuantity = FixedPoint2.New(0);
if (EntityManager.TryGetEntity(ownerUid, out var owner)
if (EntityManager.EntityExists(Owner)
&& IoCManager.Resolve<IEntityManager>().TryGetComponent(owner, out SolutionContainerManagerComponent? managerComponent))
{
foreach (var solution in managerComponent.Solutions.Values)

View File

@@ -50,7 +50,7 @@ namespace Content.Server.Chemistry.EntitySystems
var spriteSpec =
new SpriteSpecifier.Rsi(
new ResourcePath("Objects/Consumable/Drinks/" + proto.SpriteReplacementPath), "icon");
var ownerEntity = EntityManager.GetEntity(uid);
var Owner
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(ownerEntity, out SpriteComponent? sprite))
{
sprite?.LayerSetSprite(0, spriteSpec);

View File

@@ -123,7 +123,7 @@ namespace Content.Server.Chemistry.EntitySystems
if (contents.CurrentVolume == 0 || vapor.Timer > vapor.AliveTime)
{
// Delete this
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity((EntityUid) entity);
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(entity);
}
}
}