ChemMaster/Chemistry Dispenser constructability, fixed edition (#5125)
This commit is contained in:
@@ -73,6 +73,7 @@ namespace Content.Server.Chemistry.Components
|
||||
UserInterface.OnReceiveMessage += OnUiReceiveMessage;
|
||||
}
|
||||
|
||||
// Name relied upon by construction graph machine.yml to ensure beaker doesn't get deleted
|
||||
BeakerContainer =
|
||||
ContainerHelpers.EnsureContainer<ContainerSlot>(Owner, $"{Name}-reagentContainerContainer");
|
||||
|
||||
@@ -434,6 +435,11 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
Owner.PopupMessage(args.User,
|
||||
Loc.GetString("chem-master-component-cannot-put-entity-message", ("entity", activeHandEntity)));
|
||||
// TBD: This is very definitely hax so that Construction & Wires get a chance to handle things.
|
||||
// When this is ECS'd, drop this in favour of proper prioritization.
|
||||
// Since this is a catch-all handler, that means do this last!
|
||||
// Also note ReagentDispenserComponent did something similar before I got here.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace Content.Server.Chemistry.Components
|
||||
UserInterface.OnReceiveMessage += OnUiReceiveMessage;
|
||||
}
|
||||
|
||||
// Name relied upon by construction graph machine.yml to ensure beaker doesn't get deleted
|
||||
BeakerContainer =
|
||||
ContainerHelpers.EnsureContainer<ContainerSlot>(Owner, $"{Name}-reagentContainerContainer");
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Server.Chemistry.Components.SolutionManager;
|
||||
using Content.Server.Construction.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Content.Shared.ActionBlocker;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Server.Chemistry.Components.SolutionManager;
|
||||
using Content.Server.Construction.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Content.Shared.ActionBlocker;
|
||||
@@ -57,12 +59,6 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
!_actionBlockerSystem.CanDrop(args.User))
|
||||
return;
|
||||
|
||||
if (!args.Using.HasComponent<FitsInDispenserComponent>() ||
|
||||
!_solutionContainerSystem.TryGetSolution(args.Using.Uid, "beaker", out _))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Verb verb = new();
|
||||
verb.Act = () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user