Remove server-side sprite references from chem master (#15888)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Leon Friedrich
2023-04-29 21:27:14 +12:00
committed by GitHub
parent 83c9e2bb50
commit a372daadb2
4 changed files with 45 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ namespace Content.Server.Chemistry.EntitySystems
[Dependency] private readonly StorageSystem _storageSystem = default!;
[Dependency] private readonly LabelSystem _labelSystem = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly AppearanceSystem _appearance = default!;
private const string PillPrototypeId = "Pill";
@@ -206,8 +207,9 @@ namespace Content.Server.Chemistry.EntitySystems
_solutionContainerSystem.TryAddSolution(
item, itemSolution, withdrawal.SplitSolution(message.Dosage));
if (TryComp<SpriteComponent>(item, out var spriteComp))
spriteComp.LayerSetState(0, "pill" + (chemMaster.PillType + 1));
var pill = EnsureComp<PillComponent>(item);
pill.PillType = chemMaster.PillType;
Dirty(pill);
if (user.HasValue)
{