Skip to content

Commit

Permalink
use unused filled chemmaster sprite (#2729)
Browse files Browse the repository at this point in the history
* use unused filled chemmaster sprite

* map BeakerInserted layer

* Update Resources/Prototypes/Entities/Structures/Machines/chem_master.yml

Co-authored-by: Dvir <[email protected]>

* Update Resources/Prototypes/Entities/Structures/Machines/chem_master.yml

Co-authored-by: Dvir <[email protected]>

* Apply suggestions from code review

Co-authored-by: Dvir <[email protected]>

---------

Co-authored-by: Whatstone <[email protected]>
Co-authored-by: Dvir <[email protected]>
  • Loading branch information
3 people authored Jan 19, 2025
1 parent 86f1fa3 commit 84f6940
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!;
Expand Down Expand Up @@ -70,6 +71,7 @@ private void UpdateUiState(Entity<ChemMasterComponent> 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;
Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/Chemistry/SharedChemMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public ChemMasterSetPillTypeMessage(uint pillType)
}
}

[Serializable, NetSerializable]
public enum ChemMasterVisualState : byte // Frontier
{
BeakerInserted
}

[Serializable, NetSerializable]
public sealed class ChemMasterReagentAmountButtonMessage : BoundUserInterfaceMessage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
snapCardinals: true
layers:
- state: mixer_empty
map: ["BeakerInserted"] # Frontier
- state: mixer_screens
shader: unshaded
map: ["enum.PowerDeviceVisualLayers.Powered"]
Expand Down Expand Up @@ -61,6 +62,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
Expand Down

0 comments on commit 84f6940

Please sign in to comment.