From 40d88bf79e253688ccf9cae3fa02597516599746 Mon Sep 17 00:00:00 2001 From: Telos Date: Sat, 18 Jan 2025 19:13:51 -0600 Subject: [PATCH 1/5] use unused filled chemmaster sprite --- Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs | 2 ++ Content.Shared/Chemistry/SharedChemMaster.cs | 6 ++++++ .../Prototypes/Entities/Structures/Machines/chem_master.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs b/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs index c733c7215ee..82396864ce1 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs @@ -32,6 +32,7 @@ public sealed class ChemMasterSystem : EntitySystem { [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly AudioSystem _audioSystem = default!; + [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; //Frontier [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; @@ -70,6 +71,7 @@ private void UpdateUiState(Entity ent, bool updateLabel = f if (!_solutionContainerSystem.TryGetSolution(owner, SharedChemMaster.BufferSolutionName, out _, out var bufferSolution)) return; var inputContainer = _itemSlotsSystem.GetItemOrNull(owner, SharedChemMaster.InputSlotName); + _appearanceSystem.SetData(owner, ChemMasterVisualState.BeakerInserted, inputContainer.HasValue); //Frontier var outputContainer = _itemSlotsSystem.GetItemOrNull(owner, SharedChemMaster.OutputSlotName); var bufferReagents = bufferSolution.Contents; diff --git a/Content.Shared/Chemistry/SharedChemMaster.cs b/Content.Shared/Chemistry/SharedChemMaster.cs index 762131d7612..ba42d81822a 100644 --- a/Content.Shared/Chemistry/SharedChemMaster.cs +++ b/Content.Shared/Chemistry/SharedChemMaster.cs @@ -40,6 +40,12 @@ public ChemMasterSetPillTypeMessage(uint pillType) } } + [Serializable, NetSerializable] + public enum ChemMasterVisualState : byte //Frontier + { + BeakerInserted + } + [Serializable, NetSerializable] public sealed class ChemMasterReagentAmountButtonMessage : BoundUserInterfaceMessage { diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml index d78ed1182cd..b3af4f1a9ad 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml @@ -61,6 +61,10 @@ enum.PowerDeviceVisualLayers.Powered: True: { visible: true } False: { visible: false } + enum.ChemMasterVisualState.BeakerInserted: #Frontier + BeakerInserted: #Frontier + True: {state: "mixer_loaded"} #Frontier + False: {state: "mixer_empty"} #Frontier # Machine / Construction stuff - type: WiresPanel - type: Machine From 6cbef3baa97fb33873291cdcc064b302e22fd908 Mon Sep 17 00:00:00 2001 From: Whatstone Date: Sat, 18 Jan 2025 23:26:01 -0500 Subject: [PATCH 2/5] map BeakerInserted layer --- .../Prototypes/Entities/Structures/Machines/chem_master.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml index b3af4f1a9ad..144f054556c 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml @@ -11,6 +11,7 @@ snapCardinals: true layers: - state: mixer_empty + map: ["BeakerInserted"] # Frontier - state: mixer_screens shader: unshaded map: ["enum.PowerDeviceVisualLayers.Powered"] From d313142dc93ee275d194d676748aca8ad34ea69d Mon Sep 17 00:00:00 2001 From: Telos <96640118+Temoffy@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:09:51 -0600 Subject: [PATCH 3/5] Update Resources/Prototypes/Entities/Structures/Machines/chem_master.yml Co-authored-by: Dvir <39403717+dvir001@users.noreply.github.com> --- .../Prototypes/Entities/Structures/Machines/chem_master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml index 144f054556c..246c693a3ba 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml @@ -62,7 +62,7 @@ enum.PowerDeviceVisualLayers.Powered: True: { visible: true } False: { visible: false } - enum.ChemMasterVisualState.BeakerInserted: #Frontier + enum.ChemMasterVisualState.BeakerInserted: # Frontier BeakerInserted: #Frontier True: {state: "mixer_loaded"} #Frontier False: {state: "mixer_empty"} #Frontier From 7a4fe68b461e68a9dbe817341db7d72492c594f4 Mon Sep 17 00:00:00 2001 From: Telos <96640118+Temoffy@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:10:01 -0600 Subject: [PATCH 4/5] Update Resources/Prototypes/Entities/Structures/Machines/chem_master.yml Co-authored-by: Dvir <39403717+dvir001@users.noreply.github.com> --- .../Prototypes/Entities/Structures/Machines/chem_master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml index 246c693a3ba..3543e87fedc 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml @@ -63,7 +63,7 @@ True: { visible: true } False: { visible: false } enum.ChemMasterVisualState.BeakerInserted: # Frontier - BeakerInserted: #Frontier + BeakerInserted: # Frontier True: {state: "mixer_loaded"} #Frontier False: {state: "mixer_empty"} #Frontier # Machine / Construction stuff From 2ba411641352a25344fadc22cba7a97c909c4ac3 Mon Sep 17 00:00:00 2001 From: Telos <96640118+Temoffy@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:13:30 -0600 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Dvir <39403717+dvir001@users.noreply.github.com> --- Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs | 4 ++-- Content.Shared/Chemistry/SharedChemMaster.cs | 2 +- .../Prototypes/Entities/Structures/Machines/chem_master.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs b/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs index 82396864ce1..448f5375560 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs @@ -32,7 +32,7 @@ public sealed class ChemMasterSystem : EntitySystem { [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly AudioSystem _audioSystem = default!; - [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; //Frontier + [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; // Frontier [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; @@ -71,7 +71,7 @@ private void UpdateUiState(Entity ent, bool updateLabel = f if (!_solutionContainerSystem.TryGetSolution(owner, SharedChemMaster.BufferSolutionName, out _, out var bufferSolution)) return; var inputContainer = _itemSlotsSystem.GetItemOrNull(owner, SharedChemMaster.InputSlotName); - _appearanceSystem.SetData(owner, ChemMasterVisualState.BeakerInserted, inputContainer.HasValue); //Frontier + _appearanceSystem.SetData(owner, ChemMasterVisualState.BeakerInserted, inputContainer.HasValue); // Frontier var outputContainer = _itemSlotsSystem.GetItemOrNull(owner, SharedChemMaster.OutputSlotName); var bufferReagents = bufferSolution.Contents; diff --git a/Content.Shared/Chemistry/SharedChemMaster.cs b/Content.Shared/Chemistry/SharedChemMaster.cs index ba42d81822a..8901308d9c3 100644 --- a/Content.Shared/Chemistry/SharedChemMaster.cs +++ b/Content.Shared/Chemistry/SharedChemMaster.cs @@ -41,7 +41,7 @@ public ChemMasterSetPillTypeMessage(uint pillType) } [Serializable, NetSerializable] - public enum ChemMasterVisualState : byte //Frontier + public enum ChemMasterVisualState : byte // Frontier { BeakerInserted } diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml index 3543e87fedc..6855be7a8d2 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml @@ -64,8 +64,8 @@ False: { visible: false } enum.ChemMasterVisualState.BeakerInserted: # Frontier BeakerInserted: # Frontier - True: {state: "mixer_loaded"} #Frontier - False: {state: "mixer_empty"} #Frontier + True: {state: "mixer_loaded"} # Frontier + False: {state: "mixer_empty"} # Frontier # Machine / Construction stuff - type: WiresPanel - type: Machine