Fix 3000 errors
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -27,7 +26,7 @@ namespace Content.Server.Botany.Components
|
||||
plank.RandomOffset(0.25f);
|
||||
}
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity((EntityUid) Owner);
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -419,7 +418,7 @@ namespace Content.Server.Botany.Components
|
||||
MutationMod = MathHelper.Clamp(MutationMod, 0f, 3f);
|
||||
}
|
||||
|
||||
public bool DoHarvest(IEntity user)
|
||||
public bool DoHarvest(EntityUid user)
|
||||
{
|
||||
if (Seed == null || (!IoCManager.Resolve<IEntityManager>().EntityExists(user) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(user).EntityLifeStage) >= EntityLifeStage.Deleted || !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
|
||||
return false;
|
||||
@@ -661,7 +660,7 @@ namespace Content.Server.Botany.Components
|
||||
if (seeds.Seed == null)
|
||||
{
|
||||
user.PopupMessageCursor(Loc.GetString("plant-holder-component-empty-seed-packet-message"));
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity((EntityUid) usingItem);
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(usingItem);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -675,7 +674,7 @@ namespace Content.Server.Botany.Components
|
||||
Health = Seed.Endurance;
|
||||
_lastCycle = _gameTiming.CurTime;
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity((EntityUid) usingItem);
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(usingItem);
|
||||
|
||||
CheckLevelSanity();
|
||||
UpdateSprite();
|
||||
@@ -731,8 +730,8 @@ namespace Content.Server.Botany.Components
|
||||
{
|
||||
var amount = FixedPoint2.New(5);
|
||||
var sprayed = false;
|
||||
var targetEntity = (EntityUid) Owner;
|
||||
var solutionEntity = (EntityUid) usingItem;
|
||||
var targetEntity = Owner;
|
||||
var solutionEntity = usingItem;
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(usingItem, out SprayComponent? spray))
|
||||
{
|
||||
@@ -823,7 +822,7 @@ namespace Content.Server.Botany.Components
|
||||
ForceUpdateByExternalCause();
|
||||
}
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity((EntityUid) usingItem);
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(usingItem);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Content.Server.Botany.Components
|
||||
{
|
||||
eventArgs.User.PopupMessageCursor(Loc.GetString("seed-extractor-component-interact-message",("name", Name: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(eventArgs.Using).EntityName)));
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity((EntityUid) eventArgs.Using);
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(eventArgs.Using);
|
||||
|
||||
var random = _random.Next(_minSeeds, _maxSeeds);
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace Content.Server.Botany
|
||||
return newSeed;
|
||||
}
|
||||
|
||||
public IEntity SpawnSeedPacket(EntityCoordinates transformCoordinates, IEntityManager? entityManager = null)
|
||||
public EntityUid SpawnSeedPacket(EntityCoordinates transformCoordinates, IEntityManager? entityManager = null)
|
||||
{
|
||||
entityManager ??= IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
@@ -278,33 +278,33 @@ namespace Content.Server.Botany
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IEntity> AutoHarvest(EntityCoordinates position, int yieldMod = 1)
|
||||
public IEnumerable<EntityUid> AutoHarvest(EntityCoordinates position, int yieldMod = 1)
|
||||
{
|
||||
if (position.IsValid(IoCManager.Resolve<IEntityManager>()) && ProductPrototypes != null &&
|
||||
ProductPrototypes.Count > 0)
|
||||
return GenerateProduct(position, yieldMod);
|
||||
|
||||
return Enumerable.Empty<IEntity>();
|
||||
return Enumerable.Empty<EntityUid>();
|
||||
}
|
||||
|
||||
public IEnumerable<IEntity> Harvest(IEntity user, int yieldMod = 1)
|
||||
public IEnumerable<EntityUid> Harvest(EntityUid user, int yieldMod = 1)
|
||||
{
|
||||
AddToDatabase();
|
||||
|
||||
if (user == null)
|
||||
return Enumerable.Empty<IEntity>();
|
||||
return Enumerable.Empty<EntityUid>();
|
||||
|
||||
if (ProductPrototypes == null || ProductPrototypes.Count == 0 || Yield <= 0)
|
||||
{
|
||||
user.PopupMessageCursor(Loc.GetString("botany-harvest-fail-message"));
|
||||
return Enumerable.Empty<IEntity>();
|
||||
return Enumerable.Empty<EntityUid>();
|
||||
}
|
||||
|
||||
user.PopupMessageCursor(Loc.GetString("botany-harvest-success-message", ("name", DisplayName)));
|
||||
return GenerateProduct(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(user).Coordinates, yieldMod);
|
||||
}
|
||||
|
||||
public IEnumerable<IEntity> GenerateProduct(EntityCoordinates position, int yieldMod = 1)
|
||||
public IEnumerable<EntityUid> GenerateProduct(EntityCoordinates position, int yieldMod = 1)
|
||||
{
|
||||
var totalYield = 0;
|
||||
if (Yield > -1)
|
||||
@@ -325,7 +325,7 @@ namespace Content.Server.Botany
|
||||
var random = IoCManager.Resolve<IRobustRandom>();
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
var products = new List<IEntity>();
|
||||
var products = new List<EntityUid>();
|
||||
|
||||
for (var i = 0; i < totalYield; i++)
|
||||
{
|
||||
@@ -357,9 +357,9 @@ namespace Content.Server.Botany
|
||||
return Clone();
|
||||
}
|
||||
|
||||
public bool CheckHarvest(IEntity user, IEntity? held = null)
|
||||
public bool CheckHarvest(EntityUid user, EntityUid? held = null)
|
||||
{
|
||||
return (!Ligneous || (Ligneous && held != null && held.HasTag("BotanySharp")));
|
||||
return !Ligneous || (Ligneous && held != null && held.Value.HasTag("BotanySharp"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user