From d400f77129d07c480d3e6ce1c40368ad369ac079 Mon Sep 17 00:00:00 2001 From: Injazz Date: Wed, 8 Apr 2020 15:53:15 +0500 Subject: [PATCH 01/14] Chemistry revamp and bartending features -Ability to mix drinks to create cocktails with shiny icons -New Chemistry System which can relay chemistry events to corresponding components -moved some solution logic from Shared to Server -fixed some weird stuff with DrinkComponent --- Content.Client/EntryPoint.cs | 3 +- .../Components/Chemistry/InjectorComponent.cs | 14 +- .../Chemistry/ReagentDispenserComponent.cs | 13 +- .../Components/Chemistry/SolutionComponent.cs | 216 ++++- .../TransformableContainerComponent.cs | 80 ++ .../Metabolism/BloodstreamComponent.cs | 11 +- .../Components/Nutrition/DrinkComponent.cs | 70 +- .../Components/Nutrition/StomachComponent.cs | 15 +- .../EntitySystems/ChemistrySystem.cs | 42 + Content.Shared/Chemistry/ReagentPrototype.cs | 4 + .../Chemistry/SharedSolutionComponent.cs | 46 + .../Components/Chemistry/SolutionComponent.cs | 238 ----- .../Entities/buildings/booze_dispenser.yml | 4 + .../Entities/buildings/chem_dispenser.yml | 1 + .../Entities/buildings/soda_dispenser.yml | 1 + .../Entities/items/Consumables/drinks.yml | 889 +++--------------- .../items/Consumables/drinks_bottles.yml | 112 +-- .../items/Consumables/drinks_cans.yml | 35 +- .../items/Consumables/drinks_cups.yml | 53 +- .../items/Consumables/trash_drinks.yml | 22 +- Resources/Prototypes/Entities/mobs/human.yml | 11 +- Resources/Prototypes/Reactions/drinks.yml | 103 ++ Resources/Prototypes/Reagents/drinks.yml | 103 ++ Resources/Prototypes/Reagents/elements.yml | 6 + 24 files changed, 822 insertions(+), 1270 deletions(-) create mode 100644 Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs create mode 100644 Content.Server/GameObjects/EntitySystems/ChemistrySystem.cs create mode 100644 Content.Shared/GameObjects/Components/Chemistry/SharedSolutionComponent.cs delete mode 100644 Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs create mode 100644 Resources/Prototypes/Reactions/drinks.yml diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index e1b50b11e8..1cc3c720a0 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -134,6 +134,7 @@ namespace Content.Client "Paper", "Write", "Bloodstream", + "TransformableContainer", "Mind", "MovementSpeedModifier", "StorageFill" @@ -148,7 +149,7 @@ namespace Content.Client factory.Register(); factory.Register(); - factory.Register(); + factory.Register(); factory.Register(); factory.Register(); diff --git a/Content.Server/GameObjects/Components/Chemistry/InjectorComponent.cs b/Content.Server/GameObjects/Components/Chemistry/InjectorComponent.cs index d4140d31f4..b0126dbd10 100644 --- a/Content.Server/GameObjects/Components/Chemistry/InjectorComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/InjectorComponent.cs @@ -65,19 +65,11 @@ namespace Content.Server.GameObjects.Components.Chemistry serializer.DataField(ref _initialMaxVolume, "initialMaxVolume", 15); serializer.DataField(ref _transferAmount, "transferAmount", 5); } - - public override void Initialize() + protected override void Startup() { - base.Initialize(); - - //Create and setup internal storage - _internalContents = new SolutionComponent(); - _internalContents.InitializeFromPrototype(); - _internalContents.Init(); - _internalContents.MaxVolume = _initialMaxVolume; - _internalContents.Owner = Owner; //Manually set owner to avoid crash when VV'ing this + base.Startup(); + _internalContents = Owner.GetComponent(); _internalContents.Capabilities |= SolutionCaps.Injector; - //Set _toggleState based on prototype _toggleState = _injectOnly ? InjectorToggleMode.Inject : InjectorToggleMode.Draw; } diff --git a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs index 6fb12aa337..ab39fcad69 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs @@ -30,7 +30,7 @@ namespace Content.Server.GameObjects.Components.Chemistry [RegisterComponent] [ComponentReference(typeof(IActivate))] [ComponentReference(typeof(IAttackBy))] - public class ReagentDispenserComponent : SharedReagentDispenserComponent, IActivate, IAttackBy + public class ReagentDispenserComponent : SharedReagentDispenserComponent, IActivate, IAttackBy, ISolutionChange { #pragma warning disable 649 [Dependency] private readonly IServerNotifyManager _notifyManager; @@ -161,7 +161,7 @@ namespace Content.Server.GameObjects.Components.Chemistry private bool PlayerCanUseDispenser(IEntity playerEntity) { //Need player entity to check if they are still able to use the dispenser - if (playerEntity == null) + if (playerEntity == null) return false; //Check if player can interact in their current state if (!ActionBlockerSystem.CanInteract(playerEntity) || !ActionBlockerSystem.CanUse(playerEntity)) @@ -207,7 +207,6 @@ namespace Content.Server.GameObjects.Components.Chemistry return; var beaker = _beakerContainer.ContainedEntity; - Solution.SolutionChanged -= HandleSolutionChangedEvent; _beakerContainer.Remove(_beakerContainer.ContainedEntity); UpdateUserInterface(); @@ -304,7 +303,6 @@ namespace Content.Server.GameObjects.Components.Chemistry else { _beakerContainer.Insert(activeHandEntity); - Solution.SolutionChanged += HandleSolutionChangedEvent; UpdateUserInterface(); } } @@ -317,10 +315,7 @@ namespace Content.Server.GameObjects.Components.Chemistry return true; } - private void HandleSolutionChangedEvent() - { - UpdateUserInterface(); - } + void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) => UpdateUserInterface(); private void ClickSound() { @@ -329,5 +324,7 @@ namespace Content.Server.GameObjects.Components.Chemistry sound.Play("/Audio/machines/machine_switch.ogg", AudioParams.Default.WithVolume(-2f)); } } + + } } diff --git a/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs b/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs index 98b064bfc2..87c15bd061 100644 --- a/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.ComponentModel.Design; +using System.Linq; using Content.Server.Chemistry; +using Content.Shared.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.Nutrition; using Content.Server.GameObjects.EntitySystems; using Content.Server.Interfaces; @@ -12,16 +14,19 @@ using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; +using Robust.Shared.Maths; using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Chemistry { /// - /// Shared ECS component that manages a liquid solution of reagents. + /// ECS component that manages a liquid solution of reagents. /// [RegisterComponent] - internal class SolutionComponent : Shared.GameObjects.Components.Chemistry.SolutionComponent, IExamine + internal class SolutionComponent : SharedSolutionComponent, IExamine { #pragma warning disable 649 [Dependency] private readonly IPrototypeManager _prototypeManager; @@ -31,17 +36,93 @@ namespace Content.Server.GameObjects.Components.Chemistry private IEnumerable _reactions; private AudioSystem _audioSystem; + private ChemistrySystem _chemistrySystem; + + [ViewVariables] + protected Solution _containedSolution = new Solution(); + protected int _maxVolume; + private SolutionCaps _capabilities; + + /// + /// The maximum volume of the container. + /// + [ViewVariables(VVAccess.ReadWrite)] + public int MaxVolume + { + get => _maxVolume; + set => _maxVolume = value; // Note that the contents won't spill out if the capacity is reduced. + } + + /// + /// The total volume of all the of the reagents in the container. + /// + [ViewVariables] + public int CurrentVolume => _containedSolution.TotalVolume; + + /// + /// The volume without reagents remaining in the container. + /// + [ViewVariables] + public int EmptyVolume => MaxVolume - CurrentVolume; + + /// + /// The current blended color of all the reagents in the container. + /// + [ViewVariables(VVAccess.ReadWrite)] + public Color SubstanceColor { get; private set; } + + /// + /// The current capabilities of this container (is the top open to pour? can I inject it into another object?). + /// + [ViewVariables(VVAccess.ReadWrite)] + public SolutionCaps Capabilities + { + get => _capabilities; + set => _capabilities = value; + } + + public IReadOnlyList ReagentList => _containedSolution.Contents; + + /// + /// Shortcut for Capabilities PourIn flag to avoid binary operators. + /// + public bool CanPourIn => (Capabilities & SolutionCaps.PourIn) != 0; + /// + /// Shortcut for Capabilities PourOut flag to avoid binary operators. + /// + public bool CanPourOut => (Capabilities & SolutionCaps.PourOut) != 0; + /// + /// Shortcut for Capabilities Injectable flag + /// + public bool Injectable => (Capabilities & SolutionCaps.Injectable) != 0; + /// + /// Shortcut for Capabilities Injector flag + /// + public bool Injector => (Capabilities & SolutionCaps.Injector) != 0; + + /// + public override void ExposeData(ObjectSerializer serializer) + { + base.ExposeData(serializer); + + serializer.DataField(ref _maxVolume, "maxVol", 0); + serializer.DataField(ref _containedSolution, "contents", _containedSolution); + serializer.DataField(ref _capabilities, "caps", SolutionCaps.None); + } + + public override void Initialize() + { + base.Initialize(); + _audioSystem = _entitySystemManager.GetEntitySystem(); + _chemistrySystem = _entitySystemManager.GetEntitySystem(); + _reactions = _prototypeManager.EnumeratePrototypes(); + + } protected override void Startup() { base.Startup(); - Init(); - } - - public void Init() - { - _reactions = _prototypeManager.EnumeratePrototypes(); - _audioSystem = _entitySystemManager.GetEntitySystem(); + RecalculateColor(); } /// @@ -54,6 +135,85 @@ namespace Content.Server.GameObjects.Components.Chemistry _reactions = _prototypeManager.EnumeratePrototypes(); } + /// + protected override void Shutdown() + { + base.Shutdown(); + + _containedSolution.RemoveAllSolution(); + _containedSolution = new Solution(); + } + + public void RemoveAllSolution() + { + _containedSolution.RemoveAllSolution(); + OnSolutionChanged(); + } + + public bool TryRemoveReagent(string reagentId, int quantity) + { + if (!ContainsReagent(reagentId, out var currentQuantity)) return false; + + _containedSolution.RemoveReagent(reagentId, quantity); + OnSolutionChanged(); + return true; + } + + /// + /// Attempt to remove the specified quantity from this solution + /// + /// Quantity of this solution to remove + /// Whether or not the solution was successfully removed + public bool TryRemoveSolution(int quantity) + { + if (CurrentVolume == 0) + return false; + + _containedSolution.RemoveSolution(quantity); + OnSolutionChanged(); + return true; + } + + public Solution SplitSolution(int quantity) + { + var solutionSplit = _containedSolution.SplitSolution(quantity); + OnSolutionChanged(); + return solutionSplit; + } + + protected void RecalculateColor() + { + if(_containedSolution.TotalVolume == 0) + SubstanceColor = Color.White; + + Color mixColor = default; + float runningTotalQuantity = 0; + + foreach (var reagent in _containedSolution) + { + runningTotalQuantity += reagent.Quantity; + + if(!_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype proto)) + continue; + + if (mixColor == default) + mixColor = proto.SubstanceColor; + + mixColor = BlendRGB(mixColor, proto.SubstanceColor, reagent.Quantity / runningTotalQuantity); + } + } + + private Color BlendRGB(Color rgb1, Color rgb2, float amount) + { + var r = (float)Math.Round(rgb1.R + (rgb2.R - rgb1.R) * amount, 1); + var g = (float)Math.Round(rgb1.G + (rgb2.G - rgb1.G) * amount, 1); + var b = (float)Math.Round(rgb1.B + (rgb2.B - rgb1.B) * amount, 1); + var alpha = (float)Math.Round(rgb1.A + (rgb2.A - rgb1.A) * amount, 1); + + return new Color(r, g, b, alpha); + } + + /// /// Transfers solution from the held container to the target container. /// @@ -121,6 +281,10 @@ namespace Content.Server.GameObjects.Components.Chemistry void IExamine.Examine(FormattedMessage message) { message.AddText(_loc.GetString("Contains:\n")); + if (ReagentList.Count == 0) + { + message.AddText("Nothing.\n"); + } foreach (var reagent in ReagentList) { if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype proto)) @@ -256,7 +420,7 @@ namespace Content.Server.GameObjects.Components.Chemistry } if(!skipReactionCheck) CheckForReaction(); - OnSolutionChanged(); + _chemistrySystem.HandleSolutionChange(Owner); return true; } @@ -324,5 +488,37 @@ namespace Content.Server.GameObjects.Components.Chemistry //Play reaction sound client-side _audioSystem.Play("/Audio/effects/chemistry/bubbles.ogg", Owner.Transform.GridPosition); } + + /// + /// Check if the solution contains the specified reagent. + /// + /// The reagent to check for. + /// Output the quantity of the reagent if it is contained, 0 if it isn't. + /// Return true if the solution contains the reagent. + public bool ContainsReagent(string reagentId, out int quantity) + { + foreach (var reagent in _containedSolution.Contents) + { + if (reagent.ReagentId == reagentId) + { + quantity = reagent.Quantity; + return true; + } + } + quantity = 0; + return false; + } + + public string GetMajorReagentId() + { + if (_containedSolution.Contents.Count == 0) + { + return ""; + } + var majorReagent = _containedSolution.Contents.OrderByDescending(reagent => reagent.Quantity).First();; + return majorReagent.ReagentId; + } + + protected virtual void OnSolutionChanged() => _chemistrySystem.HandleSolutionChange(Owner); } } diff --git a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs new file mode 100644 index 0000000000..f08dba169b --- /dev/null +++ b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs @@ -0,0 +1,80 @@ +using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Chemistry; +using ICSharpCode.SharpZipLib.Zip.Compression; +using Robust.Server.GameObjects; +using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.GameObjects.Components; +using Robust.Shared.IoC; +using Robust.Shared.Prototypes; +using Robust.Shared.Utility; + +namespace Content.Server.GameObjects.Components.Chemistry +{ + [RegisterComponent] + public class TransformableContainerComponent : Component, ISolutionChange + { +#pragma warning disable 649 + [Dependency] private readonly IPrototypeManager _prototypeManager; +#pragma warning restore 649 + + public override string Name => "TransformableContainer"; + + private SpriteSpecifier _initialSprite; + private string _initialName; + private string _initialDescription; + private SpriteComponent _sprite; + + private ReagentPrototype _currentReagent; + + public override void Initialize() + { + base.Initialize(); + + _sprite = Owner.GetComponent(); + _initialSprite = new SpriteSpecifier.Rsi(new ResourcePath(_sprite.BaseRSIPath), "icon"); + _initialName = Owner.Name; + _initialDescription = Owner.Description; + } + + public void CancelTransformation() + { + _currentReagent = null; + _sprite.LayerSetSprite(0, _initialSprite); + Owner.Name = _initialName; + Owner.Description = _initialDescription; + } + + void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) + { + var solution = eventArgs.Owner.GetComponent(); + + //Transform container into initial state when emptied + if (_currentReagent != null && solution.ReagentList.Count == 0) + { + CancelTransformation(); + } + + //the biggest reagent in the solution decides the appearance + var reagentId = solution.GetMajorReagentId(); + + //If biggest reagent didn't changed - don't change anything at all + if (_currentReagent != null && _currentReagent.ID == reagentId) + { + return; + } + + //Only reagents with spritePath property can change appearance of transformable containers! + if (!string.IsNullOrWhiteSpace(reagentId) && + _prototypeManager.TryIndex(reagentId, out ReagentPrototype proto) && + !string.IsNullOrWhiteSpace(proto.SpriteReplacementPath)) + { + var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Drinks/" + proto.SpriteReplacementPath),"icon"); + _sprite.LayerSetSprite(0, spriteSpec); + Owner.Name = proto.Name; + Owner.Description = proto.Description; + _currentReagent = proto; + } + } + } +} diff --git a/Content.Server/GameObjects/Components/Metabolism/BloodstreamComponent.cs b/Content.Server/GameObjects/Components/Metabolism/BloodstreamComponent.cs index 0fa862ce82..9ce1dffacb 100644 --- a/Content.Server/GameObjects/Components/Metabolism/BloodstreamComponent.cs +++ b/Content.Server/GameObjects/Components/Metabolism/BloodstreamComponent.cs @@ -47,16 +47,11 @@ namespace Content.Server.GameObjects.Components.Metabolism serializer.DataField(ref _initialMaxVolume, "maxVolume", 250); } - public override void Initialize() + protected override void Startup() { - base.Initialize(); - - //Create and setup internal solution storage - _internalSolution = new SolutionComponent(); - _internalSolution.InitializeFromPrototype(); - _internalSolution.Init(); + base.Startup(); + _internalSolution = Owner.GetComponent(); _internalSolution.MaxVolume = _initialMaxVolume; - _internalSolution.Owner = Owner; //Manually set owner to avoid crash when VV'ing this } /// diff --git a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs index ab6f259b24..51be393f2c 100644 --- a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs @@ -16,7 +16,7 @@ using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Nutrition { [RegisterComponent] - public class DrinkComponent : Component, IAfterAttack, IUse + public class DrinkComponent : Component, IAfterAttack, IUse, ISolutionChange { #pragma warning disable 649 [Dependency] private readonly ILocalizationManager _localizationManager; @@ -42,9 +42,6 @@ namespace Content.Server.GameObjects.Components.Nutrition set => _contents.MaxVolume = value; } - private Solution _initialContents; // This is just for loading from yaml - private int _maxVolume; - private bool _despawnOnFinish; private bool _drinking; @@ -63,53 +60,21 @@ namespace Content.Server.GameObjects.Components.Nutrition public override void ExposeData(ObjectSerializer serializer) { base.ExposeData(serializer); - serializer.DataField(ref _initialContents, "contents", null); - serializer.DataField(ref _maxVolume, "max_volume", 0); serializer.DataField(ref _useSound, "use_sound", "/Audio/items/drink.ogg"); // E.g. cola can when done or clear bottle, whatever - // Currently this will enforce it has the same volume but this may change. - serializer.DataField(ref _despawnOnFinish, "despawn_empty", true); + // Currently this will enforce it has the same volume but this may change. - TODO: this should be implemented in a separate component + serializer.DataField(ref _despawnOnFinish, "despawn_empty", false); serializer.DataField(ref _finishPrototype, "spawn_on_finish", null); } - public override void Initialize() - { - base.Initialize(); - if (_contents == null) - { - if (Owner.TryGetComponent(out SolutionComponent solutionComponent)) - { - _contents = solutionComponent; - } - else - { - _contents = Owner.AddComponent(); - //Ensure SolutionComponent supports click transferring if custom one not set - _contents.Capabilities = SolutionCaps.PourIn - | SolutionCaps.PourOut - | SolutionCaps.Injectable; - - var pourable = Owner.AddComponent(); - pourable.TransferAmount = 5; - } - } - - _drinking = false; - if (_maxVolume != 0) - _contents.MaxVolume = _maxVolume; - else - _contents.MaxVolume = _initialContents.TotalVolume; - _contents.SolutionChanged += HandleSolutionChangedEvent; - } - protected override void Startup() { base.Startup(); - if (_initialContents != null) - { - _contents.TryAddSolution(_initialContents, true, true); - } - _initialContents = null; + _contents = Owner.GetComponent(); + _contents.Capabilities = SolutionCaps.PourIn + | SolutionCaps.PourOut + | SolutionCaps.Injectable; + _drinking = false; Owner.TryGetComponent(out AppearanceComponent appearance); _appearanceComponent = appearance; _appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.MaxUses, MaxVolume); @@ -168,7 +133,7 @@ namespace Content.Server.GameObjects.Components.Nutrition _drinking = false; } - Finish(user); + //Finish(user); } /// @@ -177,14 +142,15 @@ namespace Content.Server.GameObjects.Components.Nutrition /// or convert it to another entity, like an empty variant. /// /// The entity that is using the drink - public void Finish(IEntity user) + /* + public void Finish(IEntity user) { // Drink containers are mostly transient. + // are you sure about that if (_drinking || !_despawnOnFinish || UsesLeft() > 0) return; var gridPos = Owner.Transform.GridPosition; - _contents.SolutionChanged -= HandleSolutionChangedEvent; Owner.Delete(); if (_finishPrototype == null || user == null) @@ -205,16 +171,8 @@ namespace Content.Server.GameObjects.Components.Nutrition { drinkComponent.MaxVolume = MaxVolume; } - } + }*/ - /// - /// Updates drink state when the solution is changed by something other - /// than this component. Without this some drinks won't properly delete - /// themselves without additional clicks/uses after them being emptied. - /// - private void HandleSolutionChangedEvent() - { - Finish(null); - } + void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) { } //Finish(null); } } diff --git a/Content.Server/GameObjects/Components/Nutrition/StomachComponent.cs b/Content.Server/GameObjects/Components/Nutrition/StomachComponent.cs index 95353351f9..d8eb1a899c 100644 --- a/Content.Server/GameObjects/Components/Nutrition/StomachComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/StomachComponent.cs @@ -68,22 +68,15 @@ namespace Content.Server.GameObjects.Components.Nutrition serializer.DataField(ref _digestionDelay, "digestionDelay", 20); } - - public override void Initialize() + protected override void Startup() { - base.Initialize(); - //Doesn't use Owner.AddComponent<>() to avoid cross-contamination (e.g. with blood or whatever they holds other solutions) - _stomachContents = new SolutionComponent(); - _stomachContents.InitializeFromPrototype(); + _stomachContents = Owner.GetComponent(); _stomachContents.MaxVolume = _initialMaxVolume; - _stomachContents.Owner = Owner; //Manually set owner to avoid crash when VV'ing this - - //Ensure bloodstream in present if (!Owner.TryGetComponent(out _bloodstream)) { Logger.Warning(_localizationManager.GetString( - "StomachComponent entity does not have a BloodstreamComponent, which is required for it to function. Owner entity name: {0}", - Owner.Name)); + "StomachComponent entity does not have a BloodstreamComponent, which is required for it to function. Owner entity name: {0}", + Owner.Name)); } } diff --git a/Content.Server/GameObjects/EntitySystems/ChemistrySystem.cs b/Content.Server/GameObjects/EntitySystems/ChemistrySystem.cs new file mode 100644 index 0000000000..69bd555460 --- /dev/null +++ b/Content.Server/GameObjects/EntitySystems/ChemistrySystem.cs @@ -0,0 +1,42 @@ +using System; +using System.Linq; +using JetBrains.Annotations; +using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.GameObjects; + +namespace Content.Server.GameObjects.EntitySystems +{ + /// + /// This interface gives components behavior on whether entities solution (implying SolutionComponent is in place) is changed + /// + public interface ISolutionChange + { + /// + /// Called when solution is mixed with some other solution, or when some part of the solution is removed + /// + void SolutionChanged(SolutionChangeEventArgs eventArgs); + } + + public class SolutionChangeEventArgs : EventArgs + { + public IEntity Owner { get; set; } + } + + [UsedImplicitly] + public class ChemistrySystem : EntitySystem + { + public void HandleSolutionChange(IEntity owner) + { + var eventArgs = new SolutionChangeEventArgs + { + Owner = owner, + }; + var solutionChangeArgs = owner.GetAllComponents().ToList(); + + foreach (var solutionChangeArg in solutionChangeArgs) + { + solutionChangeArg.SolutionChanged(eventArgs); + } + } + } +} diff --git a/Content.Shared/Chemistry/ReagentPrototype.cs b/Content.Shared/Chemistry/ReagentPrototype.cs index 65b4756047..2840ca4855 100644 --- a/Content.Shared/Chemistry/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/ReagentPrototype.cs @@ -21,6 +21,7 @@ namespace Content.Shared.Chemistry private string _description; private Color _substanceColor; private List _metabolism; + private string _spritePath; public string ID => _id; public string Name => _name; @@ -29,6 +30,8 @@ namespace Content.Shared.Chemistry //List of metabolism effects this reagent has, should really only be used server-side. public List Metabolism => _metabolism; + public string SpriteReplacementPath => _spritePath; + public ReagentPrototype() { IoCManager.InjectDependencies(this); @@ -42,6 +45,7 @@ namespace Content.Shared.Chemistry serializer.DataField(ref _name, "name", string.Empty); serializer.DataField(ref _description, "desc", string.Empty); serializer.DataField(ref _substanceColor, "color", Color.White); + serializer.DataField(ref _spritePath, "spritePath", string.Empty); if (_moduleManager.IsServerModule) serializer.DataField(ref _metabolism, "metabolism", new List {new DefaultMetabolizable()}); diff --git a/Content.Shared/GameObjects/Components/Chemistry/SharedSolutionComponent.cs b/Content.Shared/GameObjects/Components/Chemistry/SharedSolutionComponent.cs new file mode 100644 index 0000000000..232bea635e --- /dev/null +++ b/Content.Shared/GameObjects/Components/Chemistry/SharedSolutionComponent.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Content.Shared.Chemistry; +using Robust.Shared.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Maths; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; + +namespace Content.Shared.GameObjects.Components.Chemistry +{ + public class SharedSolutionComponent : Component + { + public override string Name => "Solution"; + + /// + public sealed override uint? NetID => ContentNetIDs.SOLUTION; + + [Serializable, NetSerializable] + public class SolutionComponentState : ComponentState + { + public SolutionComponentState() : base(ContentNetIDs.SOLUTION) { } + } + + /// + public override ComponentState GetComponentState() + { + return new SolutionComponentState(); + } + + /// + public override void HandleComponentState(ComponentState curState, ComponentState nextState) + { + base.HandleComponentState(curState, nextState); + + if(curState == null) + return; + + var compState = (SolutionComponentState)curState; + + //TODO: Make me work! + } + + } +} diff --git a/Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs b/Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs deleted file mode 100644 index 426daa0639..0000000000 --- a/Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using System.Collections.Generic; -using Content.Shared.Chemistry; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Maths; -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization; -using Robust.Shared.ViewVariables; - -namespace Content.Shared.GameObjects.Components.Chemistry -{ - public class SolutionComponent : Component - { -#pragma warning disable 649 - [Dependency] private readonly IPrototypeManager _prototypeManager; -#pragma warning restore 649 - - [ViewVariables] - protected Solution _containedSolution = new Solution(); - protected int _maxVolume; - private SolutionCaps _capabilities; - - /// - /// Triggered when the solution contents change. - /// - public event Action SolutionChanged; - - /// - /// The maximum volume of the container. - /// - [ViewVariables(VVAccess.ReadWrite)] - public int MaxVolume - { - get => _maxVolume; - set => _maxVolume = value; // Note that the contents won't spill out if the capacity is reduced. - } - - /// - /// The total volume of all the of the reagents in the container. - /// - [ViewVariables] - public int CurrentVolume => _containedSolution.TotalVolume; - - /// - /// The volume without reagents remaining in the container. - /// - [ViewVariables] - public int EmptyVolume => MaxVolume - CurrentVolume; - - /// - /// The current blended color of all the reagents in the container. - /// - [ViewVariables(VVAccess.ReadWrite)] - public Color SubstanceColor { get; private set; } - - /// - /// The current capabilities of this container (is the top open to pour? can I inject it into another object?). - /// - [ViewVariables(VVAccess.ReadWrite)] - public SolutionCaps Capabilities - { - get => _capabilities; - set => _capabilities = value; - } - - public IReadOnlyList ReagentList => _containedSolution.Contents; - - /// - /// Shortcut for Capabilities PourIn flag to avoid binary operators. - /// - public bool CanPourIn => (Capabilities & SolutionCaps.PourIn) != 0; - /// - /// Shortcut for Capabilities PourOut flag to avoid binary operators. - /// - public bool CanPourOut => (Capabilities & SolutionCaps.PourOut) != 0; - /// - /// Shortcut for Capabilities Injectable flag - /// - public bool Injectable => (Capabilities & SolutionCaps.Injectable) != 0; - /// - /// Shortcut for Capabilities Injector flag - /// - public bool Injector => (Capabilities & SolutionCaps.Injector) != 0; - - /// - public override string Name => "Solution"; - - /// - public sealed override uint? NetID => ContentNetIDs.SOLUTION; - - /// - public override void ExposeData(ObjectSerializer serializer) - { - base.ExposeData(serializer); - - serializer.DataField(ref _maxVolume, "maxVol", 0); - serializer.DataField(ref _containedSolution, "contents", _containedSolution); - serializer.DataField(ref _capabilities, "caps", SolutionCaps.None); - } - - /// - protected override void Startup() - { - base.Startup(); - - RecalculateColor(); - } - - /// - protected override void Shutdown() - { - base.Shutdown(); - - _containedSolution.RemoveAllSolution(); - _containedSolution = new Solution(); - } - - public void RemoveAllSolution() - { - _containedSolution.RemoveAllSolution(); - OnSolutionChanged(); - } - - public bool TryRemoveReagent(string reagentId, int quantity) - { - if (!ContainsReagent(reagentId, out var currentQuantity)) return false; - - _containedSolution.RemoveReagent(reagentId, quantity); - OnSolutionChanged(); - return true; - } - - /// - /// Attempt to remove the specified quantity from this solution - /// - /// Quantity of this solution to remove - /// Whether or not the solution was successfully removed - public bool TryRemoveSolution(int quantity) - { - if (CurrentVolume == 0) - return false; - - _containedSolution.RemoveSolution(quantity); - OnSolutionChanged(); - return true; - } - - public Solution SplitSolution(int quantity) - { - var solutionSplit = _containedSolution.SplitSolution(quantity); - OnSolutionChanged(); - return solutionSplit; - } - - protected void RecalculateColor() - { - if(_containedSolution.TotalVolume == 0) - SubstanceColor = Color.White; - - Color mixColor = default; - float runningTotalQuantity = 0; - - foreach (var reagent in _containedSolution) - { - runningTotalQuantity += reagent.Quantity; - - if(!_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype proto)) - continue; - - if (mixColor == default) - mixColor = proto.SubstanceColor; - - mixColor = BlendRGB(mixColor, proto.SubstanceColor, reagent.Quantity / runningTotalQuantity); - } - } - - private Color BlendRGB(Color rgb1, Color rgb2, float amount) - { - var r = (float)Math.Round(rgb1.R + (rgb2.R - rgb1.R) * amount, 1); - var g = (float)Math.Round(rgb1.G + (rgb2.G - rgb1.G) * amount, 1); - var b = (float)Math.Round(rgb1.B + (rgb2.B - rgb1.B) * amount, 1); - var alpha = (float)Math.Round(rgb1.A + (rgb2.A - rgb1.A) * amount, 1); - - return new Color(r, g, b, alpha); - } - - /// - public override ComponentState GetComponentState() - { - return new SolutionComponentState(); - } - - /// - public override void HandleComponentState(ComponentState curState, ComponentState nextState) - { - base.HandleComponentState(curState, nextState); - - if(curState == null) - return; - - var compState = (SolutionComponentState)curState; - - //TODO: Make me work! - } - - [Serializable, NetSerializable] - public class SolutionComponentState : ComponentState - { - public SolutionComponentState() : base(ContentNetIDs.SOLUTION) { } - } - - /// - /// Check if the solution contains the specified reagent. - /// - /// The reagent to check for. - /// Output the quantity of the reagent if it is contained, 0 if it isn't. - /// Return true if the solution contains the reagent. - public bool ContainsReagent(string reagentId, out int quantity) - { - foreach (var reagent in _containedSolution.Contents) - { - if (reagent.ReagentId == reagentId) - { - quantity = reagent.Quantity; - return true; - } - } - quantity = 0; - return false; - } - - protected virtual void OnSolutionChanged() - { - SolutionChanged?.Invoke(); - } - } -} diff --git a/Resources/Prototypes/Entities/buildings/booze_dispenser.yml b/Resources/Prototypes/Entities/buildings/booze_dispenser.yml index 28010fe2b4..8e7f3ae2e8 100644 --- a/Resources/Prototypes/Entities/buildings/booze_dispenser.yml +++ b/Resources/Prototypes/Entities/buildings/booze_dispenser.yml @@ -18,3 +18,7 @@ - chem.Ale - chem.Wine - chem.Ice + - chem.Beer + - chem.Vodka + - chem.Cognac + - chem.Kahlua diff --git a/Resources/Prototypes/Entities/buildings/chem_dispenser.yml b/Resources/Prototypes/Entities/buildings/chem_dispenser.yml index a72263b277..21ba174a64 100644 --- a/Resources/Prototypes/Entities/buildings/chem_dispenser.yml +++ b/Resources/Prototypes/Entities/buildings/chem_dispenser.yml @@ -37,3 +37,4 @@ - chem.K - chem.Ra - chem.Na + - chem.U diff --git a/Resources/Prototypes/Entities/buildings/soda_dispenser.yml b/Resources/Prototypes/Entities/buildings/soda_dispenser.yml index e52868a841..ce0bcebb75 100644 --- a/Resources/Prototypes/Entities/buildings/soda_dispenser.yml +++ b/Resources/Prototypes/Entities/buildings/soda_dispenser.yml @@ -19,3 +19,4 @@ - chem.Tea - chem.Ice - chem.H2O + - chem.Cream diff --git a/Resources/Prototypes/Entities/items/Consumables/drinks.yml b/Resources/Prototypes/Entities/items/Consumables/drinks.yml index cbae0e107f..6451742780 100644 --- a/Resources/Prototypes/Entities/items/Consumables/drinks.yml +++ b/Resources/Prototypes/Entities/items/Consumables/drinks.yml @@ -6,93 +6,36 @@ id: DrinkBase abstract: true components: + - type: Solution + maxVol: 50 + - type: Pourable + transferAmount: 5 - type: Drink - despawn_empty: true + despawn_empty: false - type: Sound - type: Sprite state: icon - netsync: false - type: Icon state: icon -# Drinks below here +# Transformable container - normal glass - type: entity + name: Drinking glass parent: DrinkBase - id: DrinkAbsintheglass - name: Absinthe glass - description: A anise-flavoured spirit derived from botanicals. + id: DrinkGlass components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite - sprite: Objects/Drinks/absintheglass.rsi + sprite: Objects/Drinks/glass_clear.rsi - type: Icon - sprite: Objects/Drinks/absintheglass.rsi - -- type: entity - parent: DrinkBase - id: DrinkAcidspitGlass - name: Acidspit glass - description: A drink for the daring, can be deadly if incorrectly prepared! - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/acidspitglass.rsi - - type: Icon - sprite: Objects/Drinks/acidspitglass.rsi - -- type: entity - parent: DrinkBase - id: DrinkAlco-blue - name: Miss Blue Curacao - description: A fruity, exceptionally azure drink. Does not allow the imbiber to use the fifth magic. - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - spawn_on_finish: TrashAlcoClear - - type: Sprite - sprite: Objects/Drinks/alco-blue.rsi - - type: Icon - sprite: Objects/Drinks/alco-blue.rsi - -#- type: entity -# parent: DrinkBase -# id: DrinkAlco-red -# name: Alco-red -# description: '' -# components: -# - type: Drink# -# contents: -# - water: 1 -# spawn_on_finish: TrashAlcoClear -# - type: Sprite -# sprite: Objects/Drinks/alco-red.rsi -# - type: Icon -# sprite: Objects/Drinks/alco-red.rsi -# -#- type: entity -# parent: DrinkBase -# id: DrinkAlco-white -# name: Alco-white -# description: '' -# components: -# - type: Drink# -# contents: -# - water: 1 -# - type: Sprite -# sprite: Objects/Drinks/alco-white.rsi -# - type: Icon -# sprite: Objects/Drinks/alco-white.rsi + sprite: Objects/Drinks/glass_clear.rsi + - type: Solution + maxVol: 50 + caps: 16 + - type: Drink + despawn_empty: false + - type: Pourable + transferAmount: 5 + - type: TransformableContainer - type: entity parent: DrinkBase @@ -100,91 +43,30 @@ name: Ale description: A dark alchoholic beverage made by malted barley and yeast. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Ale + Quantity: 20 - type: Sprite sprite: Objects/Drinks/aleglass.rsi - type: Icon sprite: Objects/Drinks/aleglass.rsi -- type: entity - parent: DrinkBase - id: DrinkAlliescocktail - name: Allies cocktail - description: A drink made from your allies, not as sweet as when made from your enemies. - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/alliescocktail.rsi - - type: Icon - sprite: Objects/Drinks/alliescocktail.rsi - -- type: entity - parent: DrinkBase - id: DrinkAloe - name: Aloe - description: So very, very, very good. - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/aloe.rsi - - type: Icon - sprite: Objects/Drinks/aloe.rsi - -- type: entity - parent: DrinkBase - id: DrinkAmasecglass - name: Amasec glass - description: Official drink of the Gun Club! - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/amasecglass.rsi - - type: Icon - sprite: Objects/Drinks/amasecglass.rsi - -- type: entity - parent: DrinkBase - id: DrinkAndalusia - name: Andalusia - description: A nice, strangely named drink. - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/andalusia.rsi - - type: Icon - sprite: Objects/Drinks/andalusia.rsi - - type: entity parent: DrinkBase id: DrinkAntifreeze name: Anti-freeze description: Ultimate refreshment. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Antifreeze + Quantity: 20 + - type: Drink - type: Sprite sprite: Objects/Drinks/antifreeze.rsi - type: Icon @@ -196,80 +78,36 @@ name: Atomic bomb glass description: Nuclear proliferation never tasted so good. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.AtomicBomb + Quantity: 20 + - type: Drink - type: Sprite sprite: Objects/Drinks/atomicbombglass.rsi - type: Icon sprite: Objects/Drinks/atomicbombglass.rsi -- type: entity - parent: DrinkBase - id: DrinkBarefootAndPregnant - name: Barefoot - description: Barefoot and pregnant - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/b&p.rsi - - type: Icon - sprite: Objects/Drinks/b&p.rsi - - type: entity parent: DrinkBase id: DrinkB52Glass name: B-52 glass description: Coffee, Irish Cream, and cognac. You will get bombed. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.B52 + Quantity: 20 + - type: Drink - type: Sprite sprite: Objects/Drinks/b52glass.rsi - type: Icon sprite: Objects/Drinks/b52glass.rsi -- type: entity - parent: DrinkBase - id: DrinkBahamaMama - name: Bahama mama - description: Tropical cocktail. - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/bahama_mama.rsi - - type: Icon - sprite: Objects/Drinks/bahama_mama.rsi - -- type: entity - parent: DrinkBase - id: DrinkBananaJuice - name: Banana juice - description: The raw essence of a banana. - components: - - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - - type: Sprite - sprite: Objects/Drinks/banana.rsi - - type: Icon - sprite: Objects/Drinks/banana.rsi - - type: entity parent: DrinkBase id: DrinkBananahonkglass @@ -277,10 +115,6 @@ description: A drink from Clown Heaven. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/bananahonkglass.rsi - type: Icon @@ -307,10 +141,6 @@ description: Deny drinking this and prepare for THE LAW. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/beepskysmashglass.rsi - type: Icon @@ -322,11 +152,12 @@ name: Beer # Beer it is. Coffee. Beer? COFF-EE? BE-ER? C-O... B-E description: An alcoholic beverage made from malted grains, hops, yeast, and water. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Beer + Quantity: 20 - type: Sprite sprite: Objects/Drinks/beer.rsi - type: Icon @@ -338,11 +169,12 @@ name: Beer glass description: An alcoholic beverage made from malted grains, hops, yeast, and water. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Beer + Quantity: 20 - type: Sprite sprite: Objects/Drinks/beerglass.rsi - type: Icon @@ -355,10 +187,6 @@ description: A delicious blend of several different kinds of berries. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/berryjuice.rsi - type: Icon @@ -385,10 +213,6 @@ description: For the lactose-intolerant. Still as classy as a White Russian. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/blackrussianglass.rsi - type: Icon @@ -401,10 +225,6 @@ description: A strange yet pleasurable mixture made of vodka, tomato and lime juice. Tastes like liquid murder components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/bloodymaryglass.rsi - type: Icon @@ -417,10 +237,6 @@ description: Ewww... components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/booger.rsi - type: Icon @@ -433,10 +249,6 @@ description: It's just as effective as Dutch-Courage! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/bravebullglass.rsi - type: Icon @@ -463,10 +275,6 @@ description: It's not what it sounds like... components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/brownstar.rsi - type: Icon @@ -479,10 +287,6 @@ description: A nice, strong and tasty beverage while you are reading. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/cafe_latte.rsi - type: Icon @@ -495,10 +299,6 @@ description: A handled glass pitcher. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/carafe.rsi state: icon-10 @@ -517,10 +317,6 @@ description: Has a uniquely sweet flavour of concentrated carrots. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/carrotjuice.rsi - type: Icon @@ -533,10 +329,6 @@ description: You take a tiny sip and feel a burning sensation... components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/changelingsting.rsi - type: Icon @@ -549,10 +341,6 @@ description: A heated drink consisting melted chocolate and heated milk. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/chocolateglass.rsi - type: Icon @@ -564,11 +352,12 @@ name: Coffee description: Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Coffee + Quantity: 20 - type: Sprite sprite: Objects/Drinks/coffee.rsi - type: Icon @@ -580,11 +369,12 @@ name: Cognac glass description: A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Cognac + Quantity: 20 - type: Sprite sprite: Objects/Drinks/cognacglass.rsi - type: Icon @@ -596,11 +386,12 @@ name: Space cola bottle description: Cola. in space components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Cola + Quantity: 20 - type: Sprite sprite: Objects/Drinks/colabottle.rsi - type: Icon @@ -612,11 +403,12 @@ name: Cream description: Dairy product composed of the higher-fat layer skimmed from the top of milk before homogenization. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Cream + Quantity: 20 - type: Sprite sprite: Objects/Drinks/cream.rsi - type: Icon @@ -628,11 +420,12 @@ name: Cuba libre glass description: Rum, mixed with cola. Viva la revolucion. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.CubaLibre + Quantity: 20 - type: Sprite sprite: Objects/Drinks/cubalibreglass.rsi - type: Icon @@ -645,10 +438,6 @@ description: Exotically blue, fruity drink, distilled from oranges. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/curacaoglass.rsi - type: Icon @@ -661,10 +450,6 @@ description: AHHHH!!!! # AAHHHHHH components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/demonsblood.rsi - type: Icon @@ -677,10 +462,6 @@ description: A metal flask with a leather band and golden badge belonging to the inspector. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/detflask.rsi - type: Icon @@ -693,10 +474,6 @@ description: Creepy time! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/devilskiss.rsi - type: Icon @@ -709,10 +486,6 @@ description: A gulp a day keeps the MediBot away. That's probably for the best. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/doctorsdelightglass.rsi - type: Icon @@ -725,10 +498,6 @@ description: Only for the experienced. You think you see sand floating in the glass. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/driestmartiniglass.rsi - type: Icon @@ -741,10 +510,6 @@ description: A delicious blend of 42 different flavours components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/dr_gibb.rsi - type: Icon @@ -757,10 +522,6 @@ description: A delicious blend of 42 different flavours components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/dr_gibb_glass.rsi - type: Icon @@ -773,10 +534,6 @@ description: A relatively sweet and fruity 46 proof liquor. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/emeraldglass.rsi - type: Icon @@ -789,10 +546,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/energy_drink.rsi - type: Icon @@ -805,10 +558,6 @@ description: The surprise is, it's green! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/erikasurprise.rsi - type: Icon @@ -821,10 +570,6 @@ description: A metal flask belonging to the captain components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/flask.rsi - type: Icon @@ -837,10 +582,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/flask_old.rsi - type: Icon @@ -853,10 +594,6 @@ description: Whoah, this stuff looks volatile! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/gargleblasterglass.rsi - type: Icon @@ -869,10 +606,6 @@ description: Refreshingly lemony, deliciously dry. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/ginfizzglass.rsi - type: Icon @@ -885,10 +618,6 @@ description: An all time classic, mild cocktail. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/gintonicglass.rsi - type: Icon @@ -901,10 +630,6 @@ description: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/ginvodkaglass.rsi - type: Icon @@ -917,10 +642,6 @@ description: This appears to be beer mixed with milk. Disgusting. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_brown.rsi - type: Icon @@ -933,10 +654,6 @@ description: Either someone's failure at cocktail making or attempt in alchohol production. In any case, do you really want to drink that? components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_brown2.rsi - type: Icon @@ -949,10 +666,6 @@ description: You've really hit rock bottom now... your liver packed its bags and left last night. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_clear.rsi - type: Icon @@ -965,10 +678,6 @@ description: The sweet-sour juice of limes. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_green.rsi - type: Icon @@ -981,10 +690,6 @@ description: Liquid extract of the orange tree fruit, produced by squeezing or reaming oranges. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_orange.rsi - type: Icon @@ -997,10 +702,6 @@ description: Juice made from tomatoes, usually used as a beverage, either plain or in cocktails components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_red.rsi - type: Icon @@ -1012,11 +713,12 @@ name: Milk description: An opaque white liquid produced by the mammary glands of mammals. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Milk + Quantity: 20 - type: Sprite sprite: Objects/Drinks/glass_white.rsi - type: Icon @@ -1030,10 +732,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/glass_yellow.rsi - type: Icon @@ -1046,10 +744,6 @@ description: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/goldschlagerglass.rsi - type: Icon @@ -1062,10 +756,6 @@ description: The juice is often sold in stores or fermented and made into wine, brandy, or vinegar. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/grapejuice.rsi - type: Icon @@ -1078,10 +768,6 @@ description: Sweetened drink with a grape flavor and a deep purple color. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/grapesoda.rsi - type: Icon @@ -1094,10 +780,6 @@ description: Sweet and tangy, a bar syrup used to add color or flavor to drinks. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/grenadinebottle.rsi - type: Icon @@ -1110,10 +792,6 @@ description: Made in the modern day with proper pomegranate substitute. Who uses real fruit, anyways? components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/grenadineglass.rsi - type: Icon @@ -1126,10 +804,6 @@ description: Watered-down rum, pirate approved! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/grogglass.rsi - type: Icon @@ -1142,10 +816,6 @@ description: Sweetened drink with a grape flavor and a deep purple color. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/gsodaglass.rsi - type: Icon @@ -1158,10 +828,6 @@ description: The noodles are boiled, the flavors are artificial, just like being back in school. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/hell.rsi - type: Icon @@ -1174,10 +840,6 @@ description: You just don't get it maaaan. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/hippiesdelightglass.rsi - type: Icon @@ -1190,10 +852,6 @@ description: A heated drink consisting melted chocolate and heated milk. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/hot_coco.rsi - type: Icon @@ -1205,11 +863,12 @@ name: Coffee description: Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Coffee + Quantity: 20 - type: Sprite sprite: Objects/Drinks/hot_coffee.rsi - type: Icon @@ -1222,10 +881,6 @@ description: Coffee and ice, refreshing and cool. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/icedcoffeeglass.rsi - type: Icon @@ -1238,10 +893,6 @@ description: The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/icedteaglass.rsi - type: Icon @@ -1254,10 +905,6 @@ description: A beer which is so cold the air around it freezes. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/iced_beerglass.rsi - type: Icon @@ -1269,11 +916,12 @@ name: Ice glass description: Water frozen into a solid state. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 1 + - ReagentId: chem.Ice + Quantity: 20 - type: Sprite sprite: Objects/Drinks/iceglass.rsi - type: Icon @@ -1285,11 +933,12 @@ name: Irish car bomb description: Mmm, tastes like chocolate cake... components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.IrishCarBomb + Quantity: 20 - type: Sprite sprite: Objects/Drinks/irishcarbomb.rsi - type: Icon @@ -1301,11 +950,12 @@ name: Irish coffee glass description: Coffee, and alcohol. More fun than a Mimosa to drink in the morning. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.IrishCoffee + Quantity: 20 - type: Sprite sprite: Objects/Drinks/irishcoffeeglass.rsi - type: Icon @@ -1317,11 +967,12 @@ name: Irish cream glass description: Whiskey-imbued cream, what else would you expect from the Irish. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.IrishCream + Quantity: 20 - type: Sprite sprite: Objects/Drinks/irishcreamglass.rsi - type: Icon @@ -1334,10 +985,6 @@ description: The hipster's cup components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/jar.rsi - type: Icon @@ -1350,10 +997,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/jar_metroid.rsi - type: Icon @@ -1366,10 +1009,6 @@ description: You can't really tell what this is. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/jar_what.rsi - type: Icon @@ -1381,11 +1020,12 @@ name: Kahlua glass description: A widely known, Mexican coffee-flavoured liqueur. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Kahlua + Quantity: 20 - type: Sprite sprite: Objects/Drinks/kahluaglass.rsi - type: Icon @@ -1398,10 +1038,6 @@ description: Long live the guy who everyone had mistaken for a girl. Baka! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/kiraspecial.rsi - type: Icon @@ -1414,10 +1050,6 @@ description: Drink using lemon juice, water, and a sweetener such as cane sugar or honey. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lemonade.rsi - type: Icon @@ -1430,10 +1062,6 @@ description: Drink using lemon juice, water, and a sweetener such as cane sugar or honey. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lemonadeglass.rsi - type: Icon @@ -1446,10 +1074,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lemonglass.rsi - type: Icon @@ -1462,10 +1086,6 @@ description: Used to make lemonade, soft drinks, and cocktails. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lemonjuice.rsi - type: Icon @@ -1478,10 +1098,6 @@ description: A tangy substance made of lime and lemon. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lemonlime.rsi - type: Icon @@ -1494,10 +1110,6 @@ description: The sweet-sour juice of limes. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/limejuice.rsi - type: Icon @@ -1510,10 +1122,6 @@ description: A flask with a Lithium Atom symbol on it. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lithiumflask.rsi - type: Icon @@ -1526,10 +1134,6 @@ description: The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/longislandicedteaglass.rsi - type: Icon @@ -1542,10 +1146,6 @@ description: The Detective's undercover drink of choice. He never could stomach gin... components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/manhattanglass.rsi - type: Icon @@ -1557,11 +1157,12 @@ name: The manly dorf glass description: Beer and Ale, brought together in a delicious mix. Intended for true men only. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.ManlyDorf + Quantity: 20 - type: Sprite sprite: Objects/Drinks/manlydorfglass.rsi - type: Icon @@ -1574,10 +1175,6 @@ description: On the rocks with salt on the rim. Arriba~! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/margaritaglass.rsi - type: Icon @@ -1590,10 +1187,6 @@ description: Vodka with Gin. Not quite how 007 enjoyed it, but still delicious. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/martiniglass.rsi - type: Icon @@ -1606,10 +1199,6 @@ description: A Viking's drink, though a cheap one. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/meadglass.rsi - type: Icon @@ -1621,11 +1210,12 @@ name: Milk jug description: An opaque white liquid produced by the mammary glands of mammals. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Milk + Quantity: 20 - type: Sprite sprite: Objects/Drinks/milk.rsi - type: Icon @@ -1638,10 +1228,6 @@ description: Sweet, cold beverage that is usually made from milk components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/milkshake.rsi - type: Icon @@ -1654,10 +1240,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/mojito.rsi - type: Icon @@ -1670,10 +1252,6 @@ description: A strong neurotoxin that puts the subject into a death-like state. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/neurotoxinglass.rsi - type: Icon @@ -1686,10 +1264,6 @@ description: Absolutely nothing. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/nothing.rsi - type: Icon @@ -1702,10 +1276,6 @@ description: Fortified dessert wine made from cabernet sauvignon, saperavi and other grapes. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/ntcahors.rsi - type: Icon @@ -1718,10 +1288,6 @@ description: Cola, cola never changes. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/nuka_colaglass.rsi - type: Icon @@ -1734,10 +1300,6 @@ description: Liquid extract of the orange tree fruit, produced by squeezing or reaming oranges. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/orangejuice.rsi - type: Icon @@ -1750,10 +1312,6 @@ description: Tequila with silver in it, a favorite of alcoholic women in the club scene. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/patronglass.rsi - type: Icon @@ -1766,10 +1324,6 @@ description: A tasty juice blended from various kinds of very deadly and toxic berries. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/poisonberryjuice.rsi - type: Icon @@ -1782,10 +1336,6 @@ description: A scientist's drink of choice, for pondering ways to blow up the station. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/proj_manhattanglass.rsi - type: Icon @@ -1798,10 +1348,6 @@ description: Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/pwineglass.rsi - type: Icon @@ -1814,10 +1360,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/rag.rsi - type: Icon @@ -1830,10 +1372,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/rag_lit.rsi - type: Icon @@ -1846,10 +1384,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/rag_small.rsi - type: Icon @@ -1862,10 +1396,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/rag_small_lit.rsi - type: Icon @@ -1878,10 +1408,6 @@ description: Just add 10ml water, self heats! A taste that reminds you of your school years. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/ramen.rsi - type: Icon @@ -1894,10 +1420,6 @@ description: The true Viking's drink! Even though it has a strange red color. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/red_meadglass.rsi - type: Icon @@ -1910,10 +1432,6 @@ description: The secret of the sanctuary of the Libarian... components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/rewriter.rsi - type: Icon @@ -1926,10 +1444,6 @@ description: Distilled alcoholic drink made from saltwater. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/rumglass.rsi - type: Icon @@ -1942,10 +1456,6 @@ description: A spicy Vodka! Might be a little hot for the little guys! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/sbitenglass.rsi - type: Icon @@ -1958,10 +1468,6 @@ description: Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/screwdriverglass.rsi - type: Icon @@ -1974,10 +1480,6 @@ description: 'Comprised of: White soda, blue curacao, melon liquor.' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/sdreamglass.rsi - type: Icon @@ -1990,10 +1492,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shake-blue.rsi - type: Icon @@ -2007,10 +1505,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shake-empty.rsi - type: Icon @@ -2023,10 +1517,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shake-meat.rsi - type: Icon @@ -2039,10 +1529,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shake-robo.rsi - type: Icon @@ -2055,10 +1541,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shake-white.rsi - type: Icon @@ -2072,10 +1554,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shaker.rsi - type: Icon @@ -2088,10 +1566,6 @@ description: A shiny metal flask. It appears to have a Greek symbol inscribed on it. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shinyflask.rsi - type: Icon @@ -2104,10 +1578,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/shotglass.rsi - type: Icon @@ -2120,10 +1590,6 @@ description: A drink from Mime Heaven. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/silencerglass.rsi - type: Icon @@ -2136,10 +1602,6 @@ description: A blue-space beverage! components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/singulo.rsi - type: Icon @@ -2152,10 +1614,6 @@ description: A cold refreshment components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/snowwhite.rsi - type: Icon @@ -2168,10 +1626,6 @@ description: Water containing dissolved carbon dioxide gas. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/sodawater.rsi - type: Icon @@ -2184,10 +1638,6 @@ description: An opaque white liquid made from soybeans. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/soymilk.rsi - type: Icon @@ -2200,10 +1650,6 @@ description: A coffee drink made with espresso and steamed soy milk. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/soy_latte.rsi - type: Icon @@ -2216,10 +1662,6 @@ description: Tastes like a hull breach in your mouth. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/space-up_bottle.rsi - type: Icon @@ -2232,10 +1674,6 @@ description: Tastes like a hull breach in your mouth. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/space-up_glass.rsi - type: Icon @@ -2248,10 +1686,6 @@ description: Blows right through you like a space wind. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/space_mountain_wind_bottle.rsi - type: Icon @@ -2264,10 +1698,6 @@ description: Blows right through you like a space wind. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/space_mountain_wind_glass.rsi - type: Icon @@ -2279,11 +1709,12 @@ name: Syndicate bomb description: Tastes like terrorism! components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.SyndicateBomb + Quantity: 20 - type: Sprite sprite: Objects/Drinks/syndicatebomb.rsi - type: Icon @@ -2295,11 +1726,12 @@ name: Teacup description: A plain white porcelain teacup. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Tea + Quantity: 20 - type: Sprite sprite: Objects/Drinks/teacup.rsi state: icon-1 @@ -2317,11 +1749,12 @@ name: Tea glass description: Tasty black tea. Contains caffeine. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Tea + Quantity: 20 - type: Sprite sprite: Objects/Drinks/teaglass.rsi - type: Icon @@ -2333,11 +1766,12 @@ name: Teapot # Short and stout description: An elegant teapot. It simply oozes class. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Tea + Quantity: 20 - type: Sprite sprite: Objects/Drinks/teapot.rsi - type: Icon @@ -2350,10 +1784,6 @@ description: A strong and mildly flavoured, mexican produced spirit. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/tequillaglass.rsi - type: Icon @@ -2366,10 +1796,6 @@ description: Tequila and orange juice. Much like a Screwdriver, only Mexican~ components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/tequillasunriseglass.rsi - type: Icon @@ -2382,10 +1808,6 @@ description: A potent mixture of caffeine and alcohol. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/thirteen_loko_glass.rsi - type: Icon @@ -2398,10 +1820,6 @@ description: Made for a woman, strong enough for a man. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/threemileislandglass.rsi - type: Icon @@ -2414,10 +1832,6 @@ description: Juice made from tomatoes, usually used as a beverage, either plain or in cocktails components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/tomatojuice.rsi - type: Icon @@ -2430,10 +1844,6 @@ description: A carbonated soft drink in which quinine is dissolved. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/tonic.rsi - type: Icon @@ -2446,10 +1856,6 @@ description: This thing is ON FIRE! CALL THE DAMN SHUTTLE!" components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/toxinsspecialglass.rsi - type: Icon @@ -2462,10 +1868,6 @@ description: Keeping your drinks at the perfect temperature since 1892. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/vacuumflask.rsi - type: Icon @@ -2478,10 +1880,6 @@ description: Aromatized, fortified white wine flavored with various botanicals. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/vermouthglass.rsi - type: Icon @@ -2494,10 +1892,6 @@ description: For when a gin and tonic isn't russian enough. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/vodkatonicglass.rsi - type: Icon @@ -2510,10 +1904,6 @@ description: Stay hydrated components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/water.rsi - type: Icon @@ -2526,10 +1916,6 @@ description: Simple clean water of unknown origin. You think that maybe you dont want to know it. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/waterbottle.rsi - type: Icon @@ -2542,10 +1928,6 @@ description: Delicious juice made from watermelon. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/watermelon.rsi - type: Icon @@ -2558,10 +1940,6 @@ description: A paper water cup. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/water_cup.rsi state: icon-1 @@ -2579,11 +1957,12 @@ name: Whiskey cola glass description: Whiskey, mixed with cola. Surprisingly refreshing. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.WhiskeyCola + Quantity: 20 - type: Sprite sprite: Objects/Drinks/whiskeycolaglass.rsi - type: Icon @@ -2595,11 +1974,12 @@ name: Special blend whiskey glass description: Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Whiskey + Quantity: 20 - type: Sprite sprite: Objects/Drinks/whiskeyglass.rsi - type: Icon @@ -2612,10 +1992,6 @@ description: For the more refined griffon. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/whiskeysodaglass.rsi - type: Icon @@ -2628,10 +2004,6 @@ description: For the more refined griffon. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/whiskeysodaglass2.rsi - type: Icon @@ -2644,10 +2016,6 @@ description: That's just, like, your opinion, man... components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/whiterussianglass.rsi - type: Icon @@ -2659,11 +2027,12 @@ name: Wine glass description: An premium alchoholic beverage made from distilled grape juice. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Wine + Quantity: 20 - type: Sprite sprite: Objects/Drinks/wineglass.rsi - type: Icon diff --git a/Resources/Prototypes/Entities/items/Consumables/drinks_bottles.yml b/Resources/Prototypes/Entities/items/Consumables/drinks_bottles.yml index bfc997e01b..c719d7e7f5 100644 --- a/Resources/Prototypes/Entities/items/Consumables/drinks_bottles.yml +++ b/Resources/Prototypes/Entities/items/Consumables/drinks_bottles.yml @@ -5,12 +5,6 @@ description: One sip of this and you just know you're gonna have a good time. components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleAbsinthe - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/absinthebottle.rsi - type: Icon @@ -23,12 +17,6 @@ description: A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light. components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleAlcoClear - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/alco-green.rsi - type: Icon @@ -40,13 +28,12 @@ name: Magm-Ale description: A true dorf's drink of choice. components: - - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleAle + - type: Solution + maxVol: 80 contents: reagents: - - ReagentId: chem.H2O - Quantity: 10 + - ReagentId: chem.Ale + Quantity: 80 - type: Sprite sprite: Objects/Drinks/alebottle.rsi - type: Icon @@ -59,12 +46,6 @@ description: A bottle filled with nothing components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleAlcoClear - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/bottleofnothing.rsi - type: Icon @@ -76,13 +57,12 @@ name: Cognac bottle description: A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time. components: - - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleCognac + - type: Solution + maxVol: 80 contents: reagents: - - ReagentId: chem.H2O - Quantity: 10 + - ReagentId: chem.Cognac + Quantity: 80 - type: Sprite sprite: Objects/Drinks/cognacbottle.rsi - type: Icon @@ -95,12 +75,6 @@ description: A bottle of high quality gin, produced in the New London Space Station. components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleGin - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/ginbottle.rsi - type: Icon @@ -113,12 +87,6 @@ description: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break. components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleGoldschlager - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/goldschlagerbottle.rsi - type: Icon @@ -130,13 +98,12 @@ name: Kahlua bottle description: A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK components: - - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleKahlua + - type: Solution + maxVol: 80 contents: reagents: - ReagentId: chem.H2O - Quantity: 10 + Quantity: 80 - type: Sprite sprite: Objects/Drinks/kahluabottle.rsi - type: Icon @@ -149,12 +116,6 @@ description: Silver laced tequilla, served in space night clubs across the galaxy. components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottlePatron - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/patronbottle.rsi - type: Icon @@ -167,12 +128,6 @@ description: What a delightful packaging for a surely high quality wine! The vintage must be amazing! components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottlePoisonWine - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/pwinebottle.rsi - type: Icon @@ -185,12 +140,6 @@ description: This isn't just rum, oh no. It's practically GRIFF in a bottle. components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleRum - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/rumbottle.rsi - type: Icon @@ -203,12 +152,6 @@ description: Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients! components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleTequila - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/tequillabottle.rsi - type: Icon @@ -221,12 +164,6 @@ description: Sweet, sweet dryness~ components: - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleVermouth - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 10 - type: Sprite sprite: Objects/Drinks/vermouthbottle.rsi - type: Icon @@ -238,13 +175,12 @@ name: Vodka bottle description: Aah, vodka. Prime choice of drink AND fuel by Russians worldwide. components: - - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleVodka + - type: Solution + maxVol: 80 contents: reagents: - - ReagentId: chem.H2O - Quantity: 10 + - ReagentId: chem.Vodka + Quantity: 80 - type: Sprite sprite: Objects/Drinks/vodkabottle.rsi - type: Icon @@ -256,13 +192,12 @@ name: Uncle Git's special reserve description: A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES. components: - - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleWhiskey + - type: Solution + maxVol: 80 contents: reagents: - - ReagentId: chem.H2O - Quantity: 10 + - ReagentId: chem.Whiskey + Quantity: 80 - type: Sprite sprite: Objects/Drinks/whiskeybottle.rsi - type: Icon @@ -274,13 +209,12 @@ name: Doublebearded bearded special wine bottle description: A faint aura of unease and asspainery surrounds the bottle. components: - - type: Drink - max_volume: 10 - spawn_on_finish: DrinkBottleWine + - type: Solution + maxVol: 80 contents: reagents: - - ReagentId: chem.H2O - Quantity: 10 + - ReagentId: chem.Wine + Quantity: 80 - type: Sprite sprite: Objects/Drinks/winebottle.rsi - type: Icon diff --git a/Resources/Prototypes/Entities/items/Consumables/drinks_cans.yml b/Resources/Prototypes/Entities/items/Consumables/drinks_cans.yml index 4d776b2446..ba497f7751 100644 --- a/Resources/Prototypes/Entities/items/Consumables/drinks_cans.yml +++ b/Resources/Prototypes/Entities/items/Consumables/drinks_cans.yml @@ -30,11 +30,12 @@ name: Space cola description: A refreshing beverage. components: - - type: Drink + - type: Solution + maxVol: 20 contents: reagents: - - ReagentId: chem.H2O - Quantity: 4 + - ReagentId: chem.Cola + Quantity: 20 - type: Sprite sprite: Objects/Drinks/cola.rsi - type: Icon @@ -62,10 +63,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/ice_tea_can.rsi - type: Icon @@ -93,10 +90,6 @@ description: You wanted ORANGE. It gave you Lemon Lime. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/lemon-lime.rsi - type: Icon @@ -124,10 +117,6 @@ description: '' components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/purple_can.rsi - type: Icon @@ -155,10 +144,6 @@ description: Blows right through you like a space wind. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/space_mountain_wind.rsi - type: Icon @@ -186,10 +171,6 @@ description: Tastes like a hull breach in your mouth. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/space-up.rsi - type: Icon @@ -217,10 +198,6 @@ description: The taste of a star in liquid form. And, a bit of tuna...? components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/starkist.rsi - type: Icon @@ -248,10 +225,6 @@ description: The MBO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly. components: - type: Drink - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 4 - type: Sprite sprite: Objects/Drinks/thirteen_loko.rsi - type: Icon diff --git a/Resources/Prototypes/Entities/items/Consumables/drinks_cups.yml b/Resources/Prototypes/Entities/items/Consumables/drinks_cups.yml index 904dd9dc1d..0b29b551fa 100644 --- a/Resources/Prototypes/Entities/items/Consumables/drinks_cups.yml +++ b/Resources/Prototypes/Entities/items/Consumables/drinks_cups.yml @@ -5,8 +5,11 @@ name: Base cup abstract: true components: + - type: Solution + maxVol: 20 + - type: Pourable + transferAmount: 5 - type: Drink - max_volume: 4 despawn_empty: false - type: Sound - type: Sprite @@ -20,8 +23,8 @@ name: Golden cup description: A golden cup components: - - type: Drink - max_volume: 10 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/golden_cup.rsi - type: Icon @@ -33,8 +36,8 @@ name: Insulated pitcher description: A stainless steel insulated pitcher. Everyone's best friend in the morning. components: - - type: Drink - max_volume: 15 + - type: Solution + maxVol: 15 - type: Sprite sprite: Objects/Drinks/pitcher.rsi state: icon-6 @@ -52,8 +55,8 @@ name: Mug description: A plain white mug. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug.rsi state: icon-3 @@ -71,8 +74,8 @@ name: Mug Black description: A sleek black mug. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_black.rsi state: icon-3 @@ -90,8 +93,8 @@ name: Mug Blue description: A blue and black mug. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_blue.rsi state: icon-3 @@ -109,8 +112,8 @@ name: Mug Green description: A pale green and pink mug. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_green.rsi state: icon-3 @@ -128,8 +131,8 @@ name: Mug Heart description: A white mug, it prominently features a red heart. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_heart.rsi state: icon-3 @@ -147,8 +150,8 @@ name: Mug Metal description: A metal mug. You're not sure which metal. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_metal.rsi state: icon-3 @@ -166,8 +169,8 @@ name: Mug Moebius description: A mug with a Moebius Laboratories logo on it. Not even your morning coffee is safe from corporate advertising. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_moebius.rsi state: icon-3 @@ -185,8 +188,8 @@ name: "#1 mug" description: "A white mug, it prominently features a #1." components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_one.rsi state: icon-3 @@ -204,8 +207,8 @@ name: Mug Rainbow description: A rainbow mug. The colors are almost as blinding as a welder. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_rainbow.rsi state: icon-3 @@ -223,8 +226,8 @@ name: Mug Red description: A red and black mug. components: - - type: Drink - max_volume: 4 + - type: Solution + maxVol: 10 - type: Sprite sprite: Objects/Drinks/mug_red.rsi state: icon-3 diff --git a/Resources/Prototypes/Entities/items/Consumables/trash_drinks.yml b/Resources/Prototypes/Entities/items/Consumables/trash_drinks.yml index e180de55d2..cdba3d3ad6 100644 --- a/Resources/Prototypes/Entities/items/Consumables/trash_drinks.yml +++ b/Resources/Prototypes/Entities/items/Consumables/trash_drinks.yml @@ -10,13 +10,12 @@ state: icon - type: Icon state: icon + - type: Solution + maxVol: 10 + - type: Pourable + transferAmount: 5 - type: Drink despawn_empty: false - max_volume: 10 - contents: - reagents: - - ReagentId: chem.H2O - Quantity: 0 # Containers - type: entity @@ -89,19 +88,6 @@ - type: Icon sprite: Objects/TrashDrinks/ginbottle_empty.rsi -# Couldn't think of a nice place to put this -- type: entity - name: Empty glass - parent: DrinkBottleBase - id: DrinkEmptyGlass - components: - - type: Sprite - sprite: Objects/TrashDrinks/alebottle_empty.rsi - - type: Icon - sprite: Objects/TrashDrinks/alebottle_empty.rsi - - type: Solution - max_volume: 4 - - type: entity name: Goldschlager bottle parent: DrinkBottleBase diff --git a/Resources/Prototypes/Entities/mobs/human.yml b/Resources/Prototypes/Entities/mobs/human.yml index 50f789e8e0..1b49e65c8a 100644 --- a/Resources/Prototypes/Entities/mobs/human.yml +++ b/Resources/Prototypes/Entities/mobs/human.yml @@ -14,11 +14,14 @@ - type: Hunger - type: Thirst # Organs - - type: Stomach - maxVolume: 100 - digestionDelay: 20 + - type: Solution + maxVol: 250 - type: Bloodstream - maxVolume: 250 + max_volume: 100 + - type: Stomach + max_volume: 250 + digestionDelay: 20 + - type: Inventory - type: Constructor diff --git a/Resources/Prototypes/Reactions/drinks.yml b/Resources/Prototypes/Reactions/drinks.yml new file mode 100644 index 0000000000..d3dda3f121 --- /dev/null +++ b/Resources/Prototypes/Reactions/drinks.yml @@ -0,0 +1,103 @@ +- type: reaction + id: react.ManlyDorf + reactants: + chem.Beer: + amount: 1 + chem.Ale: + amount: 2 + products: + chem.ManlyDorf: 3 + +- type: reaction + id: react.CubaLibre + reactants: + chem.Cola: + amount: 1 + chem.Rum: + amount: 2 + products: + chem.CubaLibre: 3 + +- type: reaction + id: react.IrishCream + reactants: + chem.Cream: + amount: 1 + chem.Whiskey: + amount: 2 + products: + chem.IrishCream: 3 + +- type: reaction + id: react.IrishCoffee + reactants: + chem.IrishCream: + amount: 2 + chem.Coffee: + amount: 2 + products: + chem.IrishCoffee: 4 + +- type: reaction + id: react.IrishCarBomb + reactants: + chem.IrishCream: + amount: 1 + chem.Ale: + amount: 1 + products: + chem.IrishCarBomb: 2 + +- type: reaction + id: react.B52 + reactants: + chem.IrishCarBomb: + amount: 1 + chem.Kahlua: + amount: 1 + chem.Cognac: + amount: 1 + products: + chem.B52: 3 + +- type: reaction + id: react.AtomicBomb + reactants: + chem.B52: + amount: 10 + chem.U: + amount: 1 + products: + chem.AtomicBomb: 11 + +- type: reaction + id: react.WhiskeyCola + reactants: + chem.Whiskey: + amount: 2 + chem.Cola: + amount: 1 + products: + chem.WhiskeyCola: 3 + +- type: reaction + id: react.SyndicateBomb + reactants: + chem.WhiskeyCola: + amount: 1 + chem.Beer: + amount: 1 + products: + chem.SyndicateBomb: 2 + +- type: reaction + id: react.Antifreeze + reactants: + chem.Vodka: + amount: 2 + chem.Cream: + amount: 1 + chem.Ice: + amount: 1 + products: + chem.Antifreeze: 4 \ No newline at end of file diff --git a/Resources/Prototypes/Reagents/drinks.yml b/Resources/Prototypes/Reagents/drinks.yml index eb804d8d8a..7c79af86b5 100644 --- a/Resources/Prototypes/Reagents/drinks.yml +++ b/Resources/Prototypes/Reagents/drinks.yml @@ -2,16 +2,103 @@ id: chem.Whiskey name: Whiskey desc: An alcoholic beverage made from fermented grain mash + spritePath: whiskeyglass.rsi - type: reagent id: chem.Ale name: Ale desc: A type of beer brewed using a warm fermentation method, resulting in a sweet, full-bodied and fruity taste. + spritePath: aleglass.rsi - type: reagent id: chem.Wine name: Wine desc: An alcoholic drink made from fermented grapes + spritePath: wineglass.rsi + +- type: reagent + id: chem.Beer + name: Beer + desc: A cold pint of pale lager. + spritePath: beerglass.rsi + +- type: reagent + id: chem.Vodka + name: Vodka + desc: The glass contain wodka. Xynta. + +- type: reagent + id: chem.Kahlua + name: Kahlua + desc: A widely known, Mexican coffee-flavoured liqueur. In production since 1936! + spritePath: kahluaglass.rsi + +- type: reagent + id: chem.Cognac + name: Cognac + desc: A sweet and strongly alcoholic drink, twice distilled and left to mature for several years. Classy as fornication. + spritePath: cognacglass.rsi + +- type: reagent + id: chem.ManlyDorf + name: Manly Dorf + desc: A dwarfy concoction made from ale and beer. Intended for stout dwarves only. + spritePath: manlydorfglass.rsi + +- type: reagent + id: chem.CubaLibre + name: Cuba Libre + desc: A classic mix of rum and cola. + spritePath: cubalibreglass.rsi + +- type: reagent + id: chem.IrishCarBomb + name: Irish Car Bomb + desc: A troubling mixture of irish cream and ale. + spritePath: irishcarbomb.rsi + +- type: reagent + id: chem.IrishCoffee + name: Irish Coffee + desc: Coffee served with irish cream. Regular cream just isn't the same! + spritePath: irishcoffeeglass.rsi + +- type: reagent + id: chem.IrishCream + name: Irish Cream + desc: Whiskey-imbued cream. What else could you expect from the Irish. + spritePath: irishcreamglass.rsi + +- type: reagent + id: chem.B52 + name: B-52 + desc: Coffee, irish cream, and cognac. You will get bombed. + spritePath: b52glass.rsi + +- type: reagent + id: chem.AtomicBomb + name: Atomic Bomb + desc: Nuclear proliferation never tasted so good. + spritePath: atomicbombglass.rsi + +- type: reagent + id: chem.WhiskeyCola + name: Whiskey Cola + desc: An innocent-looking mixture of cola and whiskey. Delicious. + spritePath: whiskeycolaglass.rsi + +- type: reagent + id: chem.SyndicateBomb + name: Syndicate Bomb + desc: Somebody set us up the bomb! + spritePath: syndicatebomb.rsi + +- type: reagent + id: chem.Antifreeze + name: Antifreeze + desc: The ultimate refreshment. + spritePath: antifreeze.rsi + - type: reagent id: chem.Cola @@ -36,3 +123,19 @@ metabolism: - !type:DefaultDrink rate: 1 + +- type: reagent + id: chem.Cream + name: Cream + desc: The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh? + metabolism: + - !type:DefaultDrink + rate: 1 + +- type: reagent + id: chem.Milk + name: Milk + desc: An opaque white liquid produced by the mammary glands of mammals. + metabolism: + - !type:DefaultDrink + rate: 1 \ No newline at end of file diff --git a/Resources/Prototypes/Reagents/elements.yml b/Resources/Prototypes/Reagents/elements.yml index 938a27a4c7..0465c71cc1 100644 --- a/Resources/Prototypes/Reagents/elements.yml +++ b/Resources/Prototypes/Reagents/elements.yml @@ -95,3 +95,9 @@ name: Sodium desc: A silvery-white alkali metal. Highly reactive in it's pure form. color: "#c6c8cc" + +- type: reagent + id: chem.U + name: Uranium + desc: A silvery-white metallic chemical element in the actinide series, weakly radioactive. + color: "#00ff06" \ No newline at end of file From 1b8215ee4981a59a9dd93aaa8b90f8c71303374f Mon Sep 17 00:00:00 2001 From: Injazz Date: Wed, 8 Apr 2020 16:06:24 +0500 Subject: [PATCH 02/14] commented out description setter --- .../Components/Chemistry/TransformableContainerComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs index f08dba169b..532f404629 100644 --- a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs @@ -42,7 +42,7 @@ namespace Content.Server.GameObjects.Components.Chemistry _currentReagent = null; _sprite.LayerSetSprite(0, _initialSprite); Owner.Name = _initialName; - Owner.Description = _initialDescription; + //Owner.Description = _initialDescription; } void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) @@ -72,7 +72,7 @@ namespace Content.Server.GameObjects.Components.Chemistry var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Drinks/" + proto.SpriteReplacementPath),"icon"); _sprite.LayerSetSprite(0, spriteSpec); Owner.Name = proto.Name; - Owner.Description = proto.Description; + //Owner.Description = proto.Description; _currentReagent = proto; } } From 4174891c8701c837d66059a45b1be7a1ee3f09a7 Mon Sep 17 00:00:00 2001 From: Injazz Date: Wed, 8 Apr 2020 17:12:00 +0500 Subject: [PATCH 03/14] some fixes removes unused interface from DrinkComponent adds capability to fit inside dispensers for TransformableContainer removes stomach component from character setup dummy --- .../TransformableContainerComponent.cs | 9 +++- .../Components/Nutrition/DrinkComponent.cs | 43 +------------------ Resources/Prototypes/Entities/mobs/human.yml | 2 - 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs index 532f404629..27e2d338bc 100644 --- a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs @@ -37,6 +37,12 @@ namespace Content.Server.GameObjects.Components.Chemistry _initialDescription = Owner.Description; } + protected override void Startup() + { + base.Startup(); + Owner.GetComponent().Capabilities |= SolutionCaps.FitsInDispenser;; + } + public void CancelTransformation() { _currentReagent = null; @@ -48,7 +54,6 @@ namespace Content.Server.GameObjects.Components.Chemistry void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) { var solution = eventArgs.Owner.GetComponent(); - //Transform container into initial state when emptied if (_currentReagent != null && solution.ReagentList.Count == 0) { @@ -71,7 +76,7 @@ namespace Content.Server.GameObjects.Components.Chemistry { var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Drinks/" + proto.SpriteReplacementPath),"icon"); _sprite.LayerSetSprite(0, spriteSpec); - Owner.Name = proto.Name; + Owner.Name = proto.Name + " glass"; //Owner.Description = proto.Description; _currentReagent = proto; } diff --git a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs index 51be393f2c..14356f8cea 100644 --- a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs @@ -16,7 +16,7 @@ using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Nutrition { [RegisterComponent] - public class DrinkComponent : Component, IAfterAttack, IUse, ISolutionChange + public class DrinkComponent : Component, IAfterAttack, IUse { #pragma warning disable 649 [Dependency] private readonly ILocalizationManager _localizationManager; @@ -132,47 +132,6 @@ namespace Content.Server.GameObjects.Components.Nutrition } _drinking = false; } - - //Finish(user); } - - /// - /// Trigger finish behavior in the drink if applicable. - /// Depending on the drink this will either delete it, - /// or convert it to another entity, like an empty variant. - /// - /// The entity that is using the drink - /* - public void Finish(IEntity user) - { - // Drink containers are mostly transient. - // are you sure about that - if (_drinking || !_despawnOnFinish || UsesLeft() > 0) - return; - - var gridPos = Owner.Transform.GridPosition; - Owner.Delete(); - - if (_finishPrototype == null || user == null) - return; - - var finisher = Owner.EntityManager.SpawnEntity(_finishPrototype, Owner.Transform.GridPosition); - if (user.TryGetComponent(out HandsComponent handsComponent) && finisher.TryGetComponent(out ItemComponent itemComponent)) - { - if (handsComponent.CanPutInHand(itemComponent)) - { - handsComponent.PutInHand(itemComponent); - return; - } - } - - finisher.Transform.GridPosition = gridPos; - if (finisher.TryGetComponent(out DrinkComponent drinkComponent)) - { - drinkComponent.MaxVolume = MaxVolume; - } - }*/ - - void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) { } //Finish(null); } } diff --git a/Resources/Prototypes/Entities/mobs/human.yml b/Resources/Prototypes/Entities/mobs/human.yml index 1b49e65c8a..fbe6939007 100644 --- a/Resources/Prototypes/Entities/mobs/human.yml +++ b/Resources/Prototypes/Entities/mobs/human.yml @@ -150,8 +150,6 @@ hands: - left - right - # Organs - - type: Stomach - type: Inventory - type: Sprite From 64eafde0c3c8cbc3d33ba233dc14a8e2041823a2 Mon Sep 17 00:00:00 2001 From: zumorica Date: Thu, 9 Apr 2020 00:28:56 +0200 Subject: [PATCH 04/14] Adds working communications console that ends the round --- .../Command/CommunicationsConsoleMenu.cs | 78 +++++++++++++++++++ ...CommunicationsConsoleBoundUserInterface.cs | 66 ++++++++++++++++ .../Research/LatheBoundUserInterface.cs | 36 ++++----- .../Command/CommunicationsConsoleComponent.cs | 72 +++++++++++++++++ .../EntitySystems/RoundEndSystem.cs | 58 ++++++++++++++ Content.Server/GameTicking/GameTicker.cs | 15 ++++ .../SharedCommunicationsConsoleComponent.cs | 41 ++++++++++ .../Entities/buildings/computers.yml | 5 ++ 8 files changed, 353 insertions(+), 18 deletions(-) create mode 100644 Content.Client/Command/CommunicationsConsoleMenu.cs create mode 100644 Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs create mode 100644 Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs create mode 100644 Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs create mode 100644 Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs diff --git a/Content.Client/Command/CommunicationsConsoleMenu.cs b/Content.Client/Command/CommunicationsConsoleMenu.cs new file mode 100644 index 0000000000..2213c84dbb --- /dev/null +++ b/Content.Client/Command/CommunicationsConsoleMenu.cs @@ -0,0 +1,78 @@ +using System.Threading; +using Content.Client.GameObjects.Components.Command; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.CustomControls; +using Robust.Shared.IoC; +using Robust.Shared.Localization; +using Robust.Shared.Maths; +using Timer = Robust.Shared.Timers.Timer; + +namespace Content.Client.Command +{ + public class CommunicationsConsoleMenu : SS14Window + { +#pragma warning disable 649 + [Dependency] private readonly ILocalizationManager _localizationManager; +#pragma warning restore 649 + + protected override Vector2? CustomSize => new Vector2(600, 400); + + private CommunicationsConsoleBoundUserInterface Owner { get; set; } + private readonly CancellationTokenSource _timerCancelTokenSource = new CancellationTokenSource(); + + private readonly RichTextLabel _countdownLabel; + + public CommunicationsConsoleMenu(CommunicationsConsoleBoundUserInterface owner) + { + IoCManager.InjectDependencies(this); + + Title = _localizationManager.GetString("Communications Console"); + Owner = owner; + + _countdownLabel = new RichTextLabel(){CustomMinimumSize = new Vector2(0, 200)}; + var emergencyShuttleButton = new Button() {Text = _localizationManager.GetString("Call emergency shuttle")}; + + emergencyShuttleButton.OnPressed += (e) => Owner.CallShuttle(); + + var vbox = new VBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.FillExpand}; + + vbox.AddChild(_countdownLabel); + vbox.AddChild(emergencyShuttleButton); + + var hbox = new HBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.FillExpand}; + hbox.AddChild(new Control(){CustomMinimumSize = new Vector2(100,0), SizeFlagsHorizontal = SizeFlags.FillExpand}); + hbox.AddChild(vbox); + hbox.AddChild(new Control(){CustomMinimumSize = new Vector2(100,0), SizeFlagsHorizontal = SizeFlags.FillExpand}); + + Contents.AddChild(hbox); + + UpdateCountdown(); + Timer.SpawnRepeating(1000, UpdateCountdown, _timerCancelTokenSource.Token); + } + + private void UpdateCountdown() + { + if (!Owner.CountdownStarted) + { + _countdownLabel.SetMessage(""); + return; + } + + _countdownLabel.SetMessage($"Time remaining\n{Owner.Countdown.ToString()}s"); + } + + public override void Close() + { + base.Close(); + + _timerCancelTokenSource.Cancel(); + } + + protected override void Dispose(bool disposing) + { + if(disposing) + _timerCancelTokenSource.Cancel(); + } + } +} diff --git a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs new file mode 100644 index 0000000000..e123e5ac4d --- /dev/null +++ b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs @@ -0,0 +1,66 @@ +using System; +using Content.Client.Command; +using Content.Shared.GameObjects.Components.Command; +using Robust.Client.GameObjects.Components.UserInterface; +using Robust.Shared.GameObjects.Components.UserInterface; +using Robust.Shared.ViewVariables; + +namespace Content.Client.GameObjects.Components.Command +{ + public class CommunicationsConsoleBoundUserInterface : BoundUserInterface + { + [ViewVariables] + private CommunicationsConsoleMenu _menu; + + public bool CountdownStarted { get; private set; } + + public int Countdown => _expectedCountdownTime == null + ? 0 : Math.Max((int)(_expectedCountdownTime.Value.Subtract(DateTime.Now)).TotalSeconds, 0); + private DateTime? _expectedCountdownTime; + + public CommunicationsConsoleBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _menu = new CommunicationsConsoleMenu(this); + + _menu.OnClose += Close; + + _menu.OpenCentered(); + } + + public void CallShuttle() + { + SendMessage(new CommunicationsConsoleCallEmergencyShuttleMessage()); + } + + protected override void ReceiveMessage(BoundUserInterfaceMessage message) + { + switch (message) + { + } + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + if (!(state is CommunicationsConsoleInterfaceState commsState)) + return; + + _expectedCountdownTime = commsState.ExpectedCountdownEnd; + CountdownStarted = commsState.CountdownStarted; + + + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) return; + _menu?.Dispose(); + } + } +} diff --git a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs index 3273cb79f3..9e318f04a6 100644 --- a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs @@ -17,9 +17,9 @@ namespace Content.Client.GameObjects.Components.Research private IPrototypeManager _prototypeManager; #pragma warning restore [ViewVariables] - private LatheMenu menu; + private LatheMenu _menu; [ViewVariables] - private LatheQueueMenu queueMenu; + private LatheQueueMenu _queueMenu; public MaterialStorageComponent Storage { get; private set; } public SharedLatheComponent Lathe { get; private set; } @@ -48,30 +48,30 @@ namespace Content.Client.GameObjects.Components.Research Lathe = lathe; Database = database; - menu = new LatheMenu(this); - queueMenu = new LatheQueueMenu { Owner = this }; + _menu = new LatheMenu(this); + _queueMenu = new LatheQueueMenu { Owner = this }; - menu.OnClose += Close; + _menu.OnClose += Close; - menu.Populate(); - menu.PopulateMaterials(); + _menu.Populate(); + _menu.PopulateMaterials(); - menu.QueueButton.OnPressed += (args) => { queueMenu.OpenCentered(); }; + _menu.QueueButton.OnPressed += (args) => { _queueMenu.OpenCentered(); }; - menu.ServerConnectButton.OnPressed += (args) => + _menu.ServerConnectButton.OnPressed += (args) => { SendMessage(new SharedLatheComponent.LatheServerSelectionMessage()); }; - menu.ServerSyncButton.OnPressed += (args) => + _menu.ServerSyncButton.OnPressed += (args) => { SendMessage(new SharedLatheComponent.LatheServerSyncMessage()); }; - storage.OnMaterialStorageChanged += menu.PopulateDisabled; - storage.OnMaterialStorageChanged += menu.PopulateMaterials; + storage.OnMaterialStorageChanged += _menu.PopulateDisabled; + storage.OnMaterialStorageChanged += _menu.PopulateMaterials; - menu.OpenCentered(); + _menu.OpenCentered(); } public void Queue(LatheRecipePrototype recipe, int quantity = 1) @@ -85,10 +85,10 @@ namespace Content.Client.GameObjects.Components.Research { case SharedLatheComponent.LatheProducingRecipeMessage msg: if (!_prototypeManager.TryIndex(msg.ID, out LatheRecipePrototype recipe)) break; - queueMenu?.SetInfo(recipe); + _queueMenu?.SetInfo(recipe); break; case SharedLatheComponent.LatheStoppedProducingRecipeMessage _: - queueMenu?.ClearInfo(); + _queueMenu?.ClearInfo(); break; case SharedLatheComponent.LatheFullQueueMessage msg: _queuedRecipes.Clear(); @@ -97,7 +97,7 @@ namespace Content.Client.GameObjects.Components.Research if (!_prototypeManager.TryIndex(id, out LatheRecipePrototype recipePrototype)) break; _queuedRecipes.Enqueue(recipePrototype); } - queueMenu?.PopulateList(); + _queueMenu?.PopulateList(); break; } } @@ -106,8 +106,8 @@ namespace Content.Client.GameObjects.Components.Research { base.Dispose(disposing); if (!disposing) return; - menu?.Dispose(); - queueMenu?.Dispose(); + _menu?.Dispose(); + _queueMenu?.Dispose(); } } } diff --git a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs new file mode 100644 index 0000000000..4ce6a83883 --- /dev/null +++ b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs @@ -0,0 +1,72 @@ +using Content.Server.GameObjects.Components.Power; +using Content.Server.GameObjects.EntitySystems; +using Content.Server.Interfaces.GameTicking; +using Content.Shared.GameObjects.Components.Command; +using Robust.Server.GameObjects.Components.UserInterface; +using Robust.Server.Interfaces.GameObjects; +using Robust.Server.Interfaces.Player; +using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.IoC; + +namespace Content.Server.GameObjects.Components.Command +{ + [RegisterComponent] + [ComponentReference(typeof(IActivate))] + public class CommunicationsConsoleComponent : SharedCommunicationsConsoleComponent, IActivate + { +#pragma warning disable 649 + [Dependency] private IEntitySystemManager _entitySystemManager; +#pragma warning restore 649 + + private BoundUserInterface _userInterface; + private PowerDeviceComponent _powerDevice; + private bool Powered => _powerDevice.Powered; + private RoundEndSystem RoundEndSystem => _entitySystemManager.GetEntitySystem(); + + public override void Initialize() + { + base.Initialize(); + + _userInterface = Owner.GetComponent().GetBoundUserInterface(CommunicationsConsoleUiKey.Key); + _userInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage; + _powerDevice = Owner.GetComponent(); + + RoundEndSystem.OnRoundEndCountdownStarted += UpdateBoundInterface; + RoundEndSystem.OnRoundEndCountdownCancelled += UpdateBoundInterface; + RoundEndSystem.OnRoundEndCountdownFinished += UpdateBoundInterface; + } + + private void UpdateBoundInterface() + { + _userInterface.SetState(new CommunicationsConsoleInterfaceState(RoundEndSystem.ExpectedCountdownEnd)); + } + + private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage obj) + { + switch (obj.Message) + { + case CommunicationsConsoleCallEmergencyShuttleMessage _: + RoundEndSystem.RequestRoundEnd(); + break; + } + } + + public void OpenUserInterface(IPlayerSession session) + { + _userInterface.Open(session); + } + + void IActivate.Activate(ActivateEventArgs eventArgs) + { + if (!eventArgs.User.TryGetComponent(out IActorComponent actor)) + return; + + if (!Powered) + { + return; + } + OpenUserInterface(actor.playerSession); + } + } +} diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs new file mode 100644 index 0000000000..90bb676f16 --- /dev/null +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -0,0 +1,58 @@ +using System; +using System.Threading; +using Content.Server.Interfaces.GameTicking; +using Robust.Shared.GameObjects.Systems; +using Robust.Shared.IoC; +using Timer = Robust.Shared.Timers.Timer; + +namespace Content.Server.GameObjects.EntitySystems +{ + public class RoundEndSystem : EntitySystem + { +#pragma warning disable 649 + [Dependency] private IGameTicker _gameTicker; +#pragma warning restore 649 + + private CancellationTokenSource _roundEndCancellationTokenSource = new CancellationTokenSource(); + public bool IsRoundEndCountdownStarted { get; private set; } + public int RoundEndCountdownTime { get; set; } = 5000; + public DateTime? ExpectedCountdownEnd = null; + + public delegate void RoundEndCountdownStarted(); + public event RoundEndCountdownStarted OnRoundEndCountdownStarted; + + public delegate void RoundEndCountdownCancelled(); + public event RoundEndCountdownCancelled OnRoundEndCountdownCancelled; + + public delegate void RoundEndCountdownFinished(); + public event RoundEndCountdownFinished OnRoundEndCountdownFinished; + + public void RequestRoundEnd() + { + if (IsRoundEndCountdownStarted) + return; + + IsRoundEndCountdownStarted = true; + + ExpectedCountdownEnd = DateTime.Now.AddMilliseconds(RoundEndCountdownTime); + Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token); + OnRoundEndCountdownStarted?.Invoke(); + } + + public void CancelRoundEndCountdown() + { + _roundEndCancellationTokenSource.Cancel(); + _roundEndCancellationTokenSource = new CancellationTokenSource(); + + ExpectedCountdownEnd = null; + + OnRoundEndCountdownCancelled?.Invoke(); + } + + private void EndRound() + { + OnRoundEndCountdownFinished?.Invoke(); + _gameTicker.EndRound(); + } + } +} diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index e8c654b2c3..39905c6737 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -13,6 +13,7 @@ using Content.Server.Mobs; using Content.Server.Mobs.Roles; using Content.Server.Players; using Content.Shared; +using Content.Shared.Chat; using Content.Shared.Jobs; using Content.Shared.Preferences; using Robust.Server.Interfaces.Maps; @@ -123,6 +124,8 @@ namespace Content.Server.GameTicking { Logger.InfoS("ticker", "Restarting round!"); + SendServerMessage("Restarting round..."); + RunLevel = GameRunLevel.PreRoundLobby; _resettingCleanup(); _preRoundSetup(); @@ -147,6 +150,8 @@ namespace Content.Server.GameTicking DebugTools.Assert(RunLevel == GameRunLevel.PreRoundLobby); Logger.InfoS("ticker", "Starting round!"); + SendServerMessage("The round is starting now..."); + RunLevel = GameRunLevel.InRound; var preset = MakeGamePreset(); @@ -191,6 +196,14 @@ namespace Content.Server.GameTicking _sendStatusToAll(); } + private void SendServerMessage(string message) + { + var msg = _netManager.CreateNetMessage(); + msg.Channel = ChatChannel.Server; + msg.Message = message; + IoCManager.Resolve().ServerSendToAll(msg); + } + private HumanoidCharacterProfile GetPlayerProfile(IPlayerSession p) => (HumanoidCharacterProfile) _prefsManager.GetPreferences(p.SessionId.Username).SelectedCharacter; @@ -200,6 +213,8 @@ namespace Content.Server.GameTicking Logger.InfoS("ticker", "Ending round!"); RunLevel = GameRunLevel.PostRound; + + SendServerMessage("The round has ended!"); } public void Respawn(IPlayerSession targetPlayer) diff --git a/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs b/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs new file mode 100644 index 0000000000..b5ad45c115 --- /dev/null +++ b/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs @@ -0,0 +1,41 @@ +using System; +using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components.UserInterface; +using Robust.Shared.Serialization; + +namespace Content.Shared.GameObjects.Components.Command +{ + public class SharedCommunicationsConsoleComponent : Component + { + public override string Name => "CommunicationsConsole"; + + } + + [Serializable, NetSerializable] + public class CommunicationsConsoleInterfaceState : BoundUserInterfaceState + { + public readonly DateTime? ExpectedCountdownEnd; + public readonly bool CountdownStarted; + + public CommunicationsConsoleInterfaceState(DateTime? expectedCountdownEnd = null) + { + ExpectedCountdownEnd = expectedCountdownEnd; + CountdownStarted = expectedCountdownEnd != null; + + } + } + + [Serializable, NetSerializable] + public class CommunicationsConsoleCallEmergencyShuttleMessage : BoundUserInterfaceMessage + { + public CommunicationsConsoleCallEmergencyShuttleMessage() + { + } + } + + [Serializable, NetSerializable] + public enum CommunicationsConsoleUiKey + { + Key + } +} diff --git a/Resources/Prototypes/Entities/buildings/computers.yml b/Resources/Prototypes/Entities/buildings/computers.yml index fff70844a8..bc8dbf9fe4 100644 --- a/Resources/Prototypes/Entities/buildings/computers.yml +++ b/Resources/Prototypes/Entities/buildings/computers.yml @@ -176,3 +176,8 @@ - type: ComputerVisualizer2D key: generic_key screen: comm + - type: CommunicationsConsole + - type: UserInterface + interfaces: + - key: enum.CommunicationsConsoleUiKey.Key + type: CommunicationsConsoleBoundUserInterface From 83e96881339b93856a6d436233bb2f166ea9a3ac Mon Sep 17 00:00:00 2001 From: zumorica Date: Thu, 9 Apr 2020 01:43:28 +0200 Subject: [PATCH 05/14] You can now cancel the timer (recall) --- Content.Client/Command/CommunicationsConsoleMenu.cs | 11 ++++++----- .../CommunicationsConsoleBoundUserInterface.cs | 13 +++++++++++++ .../Command/CommunicationsConsoleComponent.cs | 4 ++++ .../GameObjects/EntitySystems/RoundEndSystem.cs | 5 +++++ .../Command/SharedCommunicationsConsoleComponent.cs | 8 ++++++++ 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/Content.Client/Command/CommunicationsConsoleMenu.cs b/Content.Client/Command/CommunicationsConsoleMenu.cs index 2213c84dbb..426ae84977 100644 --- a/Content.Client/Command/CommunicationsConsoleMenu.cs +++ b/Content.Client/Command/CommunicationsConsoleMenu.cs @@ -20,7 +20,7 @@ namespace Content.Client.Command private CommunicationsConsoleBoundUserInterface Owner { get; set; } private readonly CancellationTokenSource _timerCancelTokenSource = new CancellationTokenSource(); - + private readonly Button _emergencyShuttleButton; private readonly RichTextLabel _countdownLabel; public CommunicationsConsoleMenu(CommunicationsConsoleBoundUserInterface owner) @@ -31,14 +31,13 @@ namespace Content.Client.Command Owner = owner; _countdownLabel = new RichTextLabel(){CustomMinimumSize = new Vector2(0, 200)}; - var emergencyShuttleButton = new Button() {Text = _localizationManager.GetString("Call emergency shuttle")}; - - emergencyShuttleButton.OnPressed += (e) => Owner.CallShuttle(); + _emergencyShuttleButton = new Button(); + _emergencyShuttleButton.OnPressed += (e) => Owner.EmergencyShuttleButtonPressed(); var vbox = new VBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.FillExpand}; vbox.AddChild(_countdownLabel); - vbox.AddChild(emergencyShuttleButton); + vbox.AddChild(_emergencyShuttleButton); var hbox = new HBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.FillExpand}; hbox.AddChild(new Control(){CustomMinimumSize = new Vector2(100,0), SizeFlagsHorizontal = SizeFlags.FillExpand}); @@ -56,9 +55,11 @@ namespace Content.Client.Command if (!Owner.CountdownStarted) { _countdownLabel.SetMessage(""); + _emergencyShuttleButton.Text = _localizationManager.GetString("Call emergency shuttle"); return; } + _emergencyShuttleButton.Text = _localizationManager.GetString("Recall emergency shuttle"); _countdownLabel.SetMessage($"Time remaining\n{Owner.Countdown.ToString()}s"); } diff --git a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs index e123e5ac4d..5401ac8537 100644 --- a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs @@ -33,11 +33,24 @@ namespace Content.Client.GameObjects.Components.Command _menu.OpenCentered(); } + public void EmergencyShuttleButtonPressed() + { + if(CountdownStarted) + RecallShuttle(); + else + CallShuttle(); + } + public void CallShuttle() { SendMessage(new CommunicationsConsoleCallEmergencyShuttleMessage()); } + public void RecallShuttle() + { + SendMessage(new CommunicationsConsoleRecallEmergencyShuttleMessage()); + } + protected override void ReceiveMessage(BoundUserInterfaceMessage message) { switch (message) diff --git a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs index 4ce6a83883..a3ce594242 100644 --- a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs @@ -49,6 +49,10 @@ namespace Content.Server.GameObjects.Components.Command case CommunicationsConsoleCallEmergencyShuttleMessage _: RoundEndSystem.RequestRoundEnd(); break; + + case CommunicationsConsoleRecallEmergencyShuttleMessage _: + RoundEndSystem.CancelRoundEndCountdown(); + break; } } diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs index 90bb676f16..e1b75529c6 100644 --- a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -41,6 +41,11 @@ namespace Content.Server.GameObjects.EntitySystems public void CancelRoundEndCountdown() { + if (!IsRoundEndCountdownStarted) + return; + + IsRoundEndCountdownStarted = false; + _roundEndCancellationTokenSource.Cancel(); _roundEndCancellationTokenSource = new CancellationTokenSource(); diff --git a/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs b/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs index b5ad45c115..00d73272b1 100644 --- a/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs +++ b/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs @@ -33,6 +33,14 @@ namespace Content.Shared.GameObjects.Components.Command } } + [Serializable, NetSerializable] + public class CommunicationsConsoleRecallEmergencyShuttleMessage : BoundUserInterfaceMessage + { + public CommunicationsConsoleRecallEmergencyShuttleMessage() + { + } + } + [Serializable, NetSerializable] public enum CommunicationsConsoleUiKey { From 8f580ecc1bcf7acab88c66514a82544363b23b37 Mon Sep 17 00:00:00 2001 From: Injazz Date: Thu, 9 Apr 2020 16:43:56 +0500 Subject: [PATCH 06/14] Visually updates contents of the beaker also adds new syringe sprite from eris also adds colors to ALL reagents --- .../Components/Chemistry/SolutionComponent.cs | 102 +++++++++++------- .../TransformableContainerComponent.cs | 5 + .../Entities/items/Consumables/drinks.yml | 1 + .../Prototypes/Entities/items/chemistry.yml | 10 +- Resources/Prototypes/Reagents/chemicals.yml | 4 + Resources/Prototypes/Reagents/drinks.yml | 22 ++++ Resources/Prototypes/Reagents/elements.yml | 4 + .../Chemistry/fillings.rsi/backpack1.png | Bin 0 -> 127 bytes .../Chemistry/fillings.rsi/backpack2.png | Bin 0 -> 149 bytes .../Chemistry/fillings.rsi/backpackmob1.png | Bin 0 -> 164 bytes .../Chemistry/fillings.rsi/backpackmob2.png | Bin 0 -> 173 bytes .../Chemistry/fillings.rsi/beaker1.png | Bin 0 -> 137 bytes .../Chemistry/fillings.rsi/beaker2.png | Bin 0 -> 145 bytes .../Chemistry/fillings.rsi/beaker3.png | Bin 0 -> 151 bytes .../Chemistry/fillings.rsi/beaker4.png | Bin 0 -> 162 bytes .../Chemistry/fillings.rsi/beaker5.png | Bin 0 -> 160 bytes .../Chemistry/fillings.rsi/beaker6.png | Bin 0 -> 167 bytes .../Chemistry/fillings.rsi/beakerlarge1.png | Bin 0 -> 129 bytes .../Chemistry/fillings.rsi/beakerlarge2.png | Bin 0 -> 146 bytes .../Chemistry/fillings.rsi/beakerlarge3.png | Bin 0 -> 166 bytes .../Chemistry/fillings.rsi/beakerlarge4.png | Bin 0 -> 164 bytes .../Chemistry/fillings.rsi/beakerlarge5.png | Bin 0 -> 171 bytes .../Chemistry/fillings.rsi/beakerlarge6.png | Bin 0 -> 164 bytes .../Chemistry/fillings.rsi/bottle-1-1.png | Bin 0 -> 109 bytes .../Chemistry/fillings.rsi/bottle-1-2.png | Bin 0 -> 121 bytes .../Chemistry/fillings.rsi/bottle-1-3.png | Bin 0 -> 134 bytes .../Chemistry/fillings.rsi/bottle-1-4.png | Bin 0 -> 136 bytes .../Chemistry/fillings.rsi/bottle-1-5.png | Bin 0 -> 136 bytes .../Chemistry/fillings.rsi/bottle-1-6.png | Bin 0 -> 142 bytes .../Chemistry/fillings.rsi/bottle-2-1.png | Bin 0 -> 109 bytes .../Chemistry/fillings.rsi/bottle-2-2.png | Bin 0 -> 126 bytes .../Chemistry/fillings.rsi/bottle-2-3.png | Bin 0 -> 126 bytes .../Chemistry/fillings.rsi/bottle-2-4.png | Bin 0 -> 134 bytes .../Chemistry/fillings.rsi/bottle-2-5.png | Bin 0 -> 153 bytes .../Chemistry/fillings.rsi/bottle-2-6.png | Bin 0 -> 151 bytes .../Chemistry/fillings.rsi/bottle-3-1.png | Bin 0 -> 109 bytes .../Chemistry/fillings.rsi/bottle-3-2.png | Bin 0 -> 101 bytes .../Chemistry/fillings.rsi/bottle-3-3.png | Bin 0 -> 109 bytes .../Chemistry/fillings.rsi/bottle-3-4.png | Bin 0 -> 112 bytes .../Chemistry/fillings.rsi/bottle-3-5.png | Bin 0 -> 127 bytes .../Chemistry/fillings.rsi/bottle-3-6.png | Bin 0 -> 124 bytes .../Chemistry/fillings.rsi/bottle-4-1.png | Bin 0 -> 109 bytes .../Chemistry/fillings.rsi/bottle-4-2.png | Bin 0 -> 125 bytes .../Chemistry/fillings.rsi/bottle-4-3.png | Bin 0 -> 142 bytes .../Chemistry/fillings.rsi/bottle-4-4.png | Bin 0 -> 147 bytes .../Chemistry/fillings.rsi/bottle-4-5.png | Bin 0 -> 146 bytes .../Chemistry/fillings.rsi/bottle-4-6.png | Bin 0 -> 155 bytes .../Chemistry/fillings.rsi/dropper1.png | Bin 0 -> 113 bytes .../Objects/Chemistry/fillings.rsi/glass1.png | Bin 0 -> 131 bytes .../Objects/Chemistry/fillings.rsi/glass2.png | Bin 0 -> 152 bytes .../Objects/Chemistry/fillings.rsi/glass3.png | Bin 0 -> 152 bytes .../Objects/Chemistry/fillings.rsi/glass4.png | Bin 0 -> 164 bytes .../Objects/Chemistry/fillings.rsi/glass5.png | Bin 0 -> 155 bytes .../Objects/Chemistry/fillings.rsi/glass6.png | Bin 0 -> 154 bytes .../Chemistry/fillings.rsi/largebottle1.png | Bin 0 -> 141 bytes .../Chemistry/fillings.rsi/largebottle2.png | Bin 0 -> 168 bytes .../Chemistry/fillings.rsi/largebottle3.png | Bin 0 -> 177 bytes .../Chemistry/fillings.rsi/largebottle4.png | Bin 0 -> 180 bytes .../Chemistry/fillings.rsi/largebottle5.png | Bin 0 -> 193 bytes .../Chemistry/fillings.rsi/largebottle6.png | Bin 0 -> 213 bytes .../Objects/Chemistry/fillings.rsi/meta.json | 1 + .../Chemistry/fillings.rsi/smallbottle1.png | Bin 0 -> 123 bytes .../Chemistry/fillings.rsi/smallbottle2.png | Bin 0 -> 144 bytes .../Chemistry/fillings.rsi/smallbottle3.png | Bin 0 -> 163 bytes .../Chemistry/fillings.rsi/smallbottle4.png | Bin 0 -> 165 bytes .../Chemistry/fillings.rsi/smallbottle5.png | Bin 0 -> 160 bytes .../Chemistry/fillings.rsi/smallbottle6.png | Bin 0 -> 163 bytes .../Chemistry/fillings.rsi/syringe1.png | Bin 0 -> 131 bytes .../Chemistry/fillings.rsi/syringe2.png | Bin 0 -> 131 bytes .../Chemistry/fillings.rsi/syringe3.png | Bin 0 -> 131 bytes .../Chemistry/fillings.rsi/syringe4.png | Bin 0 -> 153 bytes .../Objects/Chemistry/fillings.rsi/vial1.png | Bin 0 -> 102 bytes .../Objects/Chemistry/fillings.rsi/vial2.png | Bin 0 -> 104 bytes .../Objects/Chemistry/fillings.rsi/vial3.png | Bin 0 -> 105 bytes .../Objects/Chemistry/fillings.rsi/vial4.png | Bin 0 -> 106 bytes .../Objects/Chemistry/fillings.rsi/vial5.png | Bin 0 -> 105 bytes .../Objects/Chemistry/fillings.rsi/vial6.png | Bin 0 -> 106 bytes .../Objects/Chemistry/syringe.rsi/0.png | Bin 0 -> 331 bytes .../Objects/Chemistry/syringe.rsi/1.png | Bin 0 -> 331 bytes .../Objects/Chemistry/syringe.rsi/10.png | Bin 0 -> 330 bytes .../Objects/Chemistry/syringe.rsi/15.png | Bin 0 -> 284 bytes .../Objects/Chemistry/syringe.rsi/5.png | Bin 0 -> 338 bytes .../Chemistry/syringe.rsi/autoinjector.png | Bin 0 -> 301 bytes .../Chemistry/syringe.rsi/autoinjector0.png | Bin 0 -> 381 bytes .../syringe.rsi/autoinjector_black.png | Bin 0 -> 304 bytes .../syringe.rsi/autoinjector_black0.png | Bin 0 -> 370 bytes .../syringe.rsi/autoinjector_red.png | Bin 0 -> 304 bytes .../syringe.rsi/autoinjector_red0.png | Bin 0 -> 376 bytes .../Chemistry/syringe.rsi/borghypo.png | Bin 0 -> 587 bytes .../Chemistry/syringe.rsi/borghypo_s.png | Bin 0 -> 517 bytes .../Objects/Chemistry/syringe.rsi/broken.png | Bin 0 -> 341 bytes .../Chemistry/syringe.rsi/combat_hypo.png | Bin 0 -> 665 bytes .../Objects/Chemistry/syringe.rsi/draw.png | Bin 0 -> 181 bytes .../Objects/Chemistry/syringe.rsi/hypo.png | Bin 0 -> 429 bytes .../Objects/Chemistry/syringe.rsi/inject.png | Bin 0 -> 175 bytes .../Objects/Chemistry/syringe.rsi/meta.json | 1 + 96 files changed, 107 insertions(+), 43 deletions(-) create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/backpack1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/backpack2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/backpackmob1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/backpackmob2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beaker1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beaker2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beaker3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beaker4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beaker5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beaker6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/dropper1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/glass1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/glass2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/glass3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/glass4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/glass5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/glass6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/meta.json create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle6.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/syringe1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/syringe2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/syringe3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/syringe4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/vial1.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/vial2.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/vial3.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/vial4.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/vial5.png create mode 100644 Resources/Textures/Objects/Chemistry/fillings.rsi/vial6.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/0.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/1.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/10.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/15.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/5.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector0.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_black.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_black0.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_red.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_red0.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/borghypo.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/borghypo_s.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/broken.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/combat_hypo.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/draw.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/hypo.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/inject.png create mode 100644 Resources/Textures/Objects/Chemistry/syringe.rsi/meta.json diff --git a/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs b/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs index 87c15bd061..66843b3b54 100644 --- a/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs @@ -9,6 +9,8 @@ using Content.Server.GameObjects.EntitySystems; using Content.Server.Interfaces; using Content.Shared.Chemistry; using Content.Shared.GameObjects; +using Content.Shared.Utility; +using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -38,11 +40,17 @@ namespace Content.Server.GameObjects.Components.Chemistry private AudioSystem _audioSystem; private ChemistrySystem _chemistrySystem; + private SpriteComponent _spriteComponent; + [ViewVariables] protected Solution _containedSolution = new Solution(); protected int _maxVolume; private SolutionCaps _capabilities; - + private string _fillInitState; + private int _fillInitSteps; + private string _fillPathString = "Objects/Chemistry/fillings.rsi"; + private ResourcePath _fillPath; + private SpriteSpecifier _fillSprite; /// /// The maximum volume of the container. /// @@ -108,6 +116,8 @@ namespace Content.Server.GameObjects.Components.Chemistry serializer.DataField(ref _maxVolume, "maxVol", 0); serializer.DataField(ref _containedSolution, "contents", _containedSolution); serializer.DataField(ref _capabilities, "caps", SolutionCaps.None); + serializer.DataField(ref _fillInitState, "fillingState", ""); + serializer.DataField(ref _fillInitSteps, "fillingSteps", 7); } public override void Initialize() @@ -116,23 +126,20 @@ namespace Content.Server.GameObjects.Components.Chemistry _audioSystem = _entitySystemManager.GetEntitySystem(); _chemistrySystem = _entitySystemManager.GetEntitySystem(); _reactions = _prototypeManager.EnumeratePrototypes(); - } protected override void Startup() { base.Startup(); RecalculateColor(); - } - - /// - /// Initializes the SolutionComponent if it doesn't have an owner - /// - public void InitializeFromPrototype() - { - // Because Initialize needs an Owner, Startup isn't called, etc. - IoCManager.InjectDependencies(this); - _reactions = _prototypeManager.EnumeratePrototypes(); + if (!string.IsNullOrEmpty(_fillInitState)) + { + _spriteComponent = Owner.GetComponent(); + _fillPath = new ResourcePath(_fillPathString); + _fillSprite = new SpriteSpecifier.Rsi(_fillPath, _fillInitState + (_fillInitSteps - 1)); + _spriteComponent.AddLayerWithSprite(_fillSprite); + UpdateFillIcon(); + } } /// @@ -147,7 +154,7 @@ namespace Content.Server.GameObjects.Components.Chemistry public void RemoveAllSolution() { _containedSolution.RemoveAllSolution(); - OnSolutionChanged(); + OnSolutionChanged(false); } public bool TryRemoveReagent(string reagentId, int quantity) @@ -155,7 +162,7 @@ namespace Content.Server.GameObjects.Components.Chemistry if (!ContainsReagent(reagentId, out var currentQuantity)) return false; _containedSolution.RemoveReagent(reagentId, quantity); - OnSolutionChanged(); + OnSolutionChanged(false); return true; } @@ -170,21 +177,24 @@ namespace Content.Server.GameObjects.Components.Chemistry return false; _containedSolution.RemoveSolution(quantity); - OnSolutionChanged(); + OnSolutionChanged(false); return true; } public Solution SplitSolution(int quantity) { var solutionSplit = _containedSolution.SplitSolution(quantity); - OnSolutionChanged(); + OnSolutionChanged(false); return solutionSplit; } protected void RecalculateColor() { - if(_containedSolution.TotalVolume == 0) - SubstanceColor = Color.White; + if (_containedSolution.TotalVolume == 0) + { + SubstanceColor = Color.Transparent; + return; + } Color mixColor = default; float runningTotalQuantity = 0; @@ -195,25 +205,15 @@ namespace Content.Server.GameObjects.Components.Chemistry if(!_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype proto)) continue; - if (mixColor == default) mixColor = proto.SubstanceColor; - - mixColor = BlendRGB(mixColor, proto.SubstanceColor, reagent.Quantity / runningTotalQuantity); + mixColor = Color.InterpolateBetween(mixColor, proto.SubstanceColor, + (1 / runningTotalQuantity) * reagent.Quantity); } + + SubstanceColor = mixColor; } - private Color BlendRGB(Color rgb1, Color rgb2, float amount) - { - var r = (float)Math.Round(rgb1.R + (rgb2.R - rgb1.R) * amount, 1); - var g = (float)Math.Round(rgb1.G + (rgb2.G - rgb1.G) * amount, 1); - var b = (float)Math.Round(rgb1.B + (rgb2.B - rgb1.B) * amount, 1); - var alpha = (float)Math.Round(rgb1.A + (rgb2.A - rgb1.A) * amount, 1); - - return new Color(r, g, b, alpha); - } - - /// /// Transfers solution from the held container to the target container. /// @@ -400,12 +400,9 @@ namespace Content.Server.GameObjects.Components.Chemistry } _containedSolution.AddReagent(reagentId, acceptedQuantity); - if (!skipColor) { - RecalculateColor(); - } if(!skipReactionCheck) CheckForReaction(); - OnSolutionChanged(); + OnSolutionChanged(skipColor); return true; } @@ -415,12 +412,9 @@ namespace Content.Server.GameObjects.Components.Chemistry return false; _containedSolution.AddSolution(solution); - if (!skipColor) { - RecalculateColor(); - } if(!skipReactionCheck) CheckForReaction(); - _chemistrySystem.HandleSolutionChange(Owner); + OnSolutionChanged(skipColor); return true; } @@ -519,6 +513,32 @@ namespace Content.Server.GameObjects.Components.Chemistry return majorReagent.ReagentId; } - protected virtual void OnSolutionChanged() => _chemistrySystem.HandleSolutionChange(Owner); + protected void UpdateFillIcon() + { + if (string.IsNullOrEmpty(_fillInitState)) return; + + var percentage = (double)CurrentVolume / MaxVolume; + var level = ContentHelpers.RoundToLevels(percentage * 100, 100, _fillInitSteps); + + //Transformed glass uses special fancy sprites so we don't bother + if (level == 0 || Owner.TryGetComponent(out var transformableContainerComponent) + && transformableContainerComponent.Transformed) + { + _spriteComponent.LayerSetColor(1, Color.Transparent); + return; + } + _fillSprite = new SpriteSpecifier.Rsi(_fillPath, _fillInitState+level); + _spriteComponent.LayerSetSprite(1, _fillSprite); + _spriteComponent.LayerSetColor(1,SubstanceColor); + } + + protected virtual void OnSolutionChanged(bool skipColor) + { + if (!skipColor) + RecalculateColor(); + + UpdateFillIcon(); + _chemistrySystem.HandleSolutionChange(Owner); + } } } diff --git a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs index 27e2d338bc..380ac24bff 100644 --- a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs @@ -20,6 +20,9 @@ namespace Content.Server.GameObjects.Components.Chemistry public override string Name => "TransformableContainer"; + private bool _transformed = false; + public bool Transformed { get => _transformed; } + private SpriteSpecifier _initialSprite; private string _initialName; private string _initialDescription; @@ -46,6 +49,7 @@ namespace Content.Server.GameObjects.Components.Chemistry public void CancelTransformation() { _currentReagent = null; + _transformed = false; _sprite.LayerSetSprite(0, _initialSprite); Owner.Name = _initialName; //Owner.Description = _initialDescription; @@ -79,6 +83,7 @@ namespace Content.Server.GameObjects.Components.Chemistry Owner.Name = proto.Name + " glass"; //Owner.Description = proto.Description; _currentReagent = proto; + _transformed = true; } } } diff --git a/Resources/Prototypes/Entities/items/Consumables/drinks.yml b/Resources/Prototypes/Entities/items/Consumables/drinks.yml index 6451742780..bb5562b769 100644 --- a/Resources/Prototypes/Entities/items/Consumables/drinks.yml +++ b/Resources/Prototypes/Entities/items/Consumables/drinks.yml @@ -29,6 +29,7 @@ - type: Icon sprite: Objects/Drinks/glass_clear.rsi - type: Solution + fillingState: glass maxVol: 50 caps: 16 - type: Drink diff --git a/Resources/Prototypes/Entities/items/chemistry.yml b/Resources/Prototypes/Entities/items/chemistry.yml index cca0065844..be043ad008 100644 --- a/Resources/Prototypes/Entities/items/chemistry.yml +++ b/Resources/Prototypes/Entities/items/chemistry.yml @@ -9,6 +9,7 @@ - type: Icon texture: Objects/Chemistry/chemicals.rsi/beaker.png - type: Solution + fillingState: beaker maxVol: 50 caps: 27 - type: Pourable @@ -25,6 +26,7 @@ - type: Icon texture: Objects/Chemistry/chemicals.rsi/beakerlarge.png - type: Solution + fillingState: beakerlarge maxVol: 100 caps: 27 - type: Pourable @@ -41,6 +43,8 @@ - type: Icon texture: Objects/Chemistry/chemicals.rsi/dropper.png - type: Solution + fillingState: dropper + fillingSteps: 2 maxVol: 5 caps: 19 - type: Pourable @@ -53,10 +57,12 @@ id: Syringe components: - type: Sprite - texture: Objects/Chemistry/chemicals.rsi/syringeproj.png + texture: Objects/Chemistry/syringe.rsi/0.png - type: Icon - texture: Objects/Chemistry/chemicals.rsi/syringeproj.png + texture: Objects/Chemistry/syringe.rsi/0.png - type: Solution + fillingState: syringe + fillingSteps: 5 maxVol: 15 caps: 19 - type: Injector diff --git a/Resources/Prototypes/Reagents/chemicals.yml b/Resources/Prototypes/Reagents/chemicals.yml index a5e29b8487..e8d0b18dd3 100644 --- a/Resources/Prototypes/Reagents/chemicals.yml +++ b/Resources/Prototypes/Reagents/chemicals.yml @@ -2,6 +2,7 @@ id: chem.Nutriment name: Nutriment desc: Generic nutrition + color: "#664330" metabolism: - !type:DefaultFood rate: 1 @@ -10,11 +11,13 @@ id: chem.H2SO4 name: Sulfuric Acid desc: A highly corrosive, oily, colorless liquid. + color: "#BF8C00" - type: reagent id: chem.H2O name: Water desc: A tasty colorless liquid. + color: "#808080" metabolism: - !type:DefaultDrink rate: 1 @@ -29,6 +32,7 @@ id: chem.Plasma name: Plasma desc: Funky, space-magic pixie dust. You probably shouldn't eat this, but we both know you will anyways. + color: "#500064" - type: reagent id: chem.Ethanol diff --git a/Resources/Prototypes/Reagents/drinks.yml b/Resources/Prototypes/Reagents/drinks.yml index 7c79af86b5..4cffd3be62 100644 --- a/Resources/Prototypes/Reagents/drinks.yml +++ b/Resources/Prototypes/Reagents/drinks.yml @@ -2,101 +2,118 @@ id: chem.Whiskey name: Whiskey desc: An alcoholic beverage made from fermented grain mash + color: "#664300" spritePath: whiskeyglass.rsi - type: reagent id: chem.Ale name: Ale desc: A type of beer brewed using a warm fermentation method, resulting in a sweet, full-bodied and fruity taste. + color: "#664300" spritePath: aleglass.rsi - type: reagent id: chem.Wine name: Wine desc: An alcoholic drink made from fermented grapes + color: "#7E4043" spritePath: wineglass.rsi - type: reagent id: chem.Beer name: Beer desc: A cold pint of pale lager. + color: "#664300" spritePath: beerglass.rsi - type: reagent id: chem.Vodka name: Vodka desc: The glass contain wodka. Xynta. + color: "#664300" - type: reagent id: chem.Kahlua name: Kahlua desc: A widely known, Mexican coffee-flavoured liqueur. In production since 1936! + color: "#664300" spritePath: kahluaglass.rsi - type: reagent id: chem.Cognac name: Cognac desc: A sweet and strongly alcoholic drink, twice distilled and left to mature for several years. Classy as fornication. + color: "#AB3C05" spritePath: cognacglass.rsi - type: reagent id: chem.ManlyDorf name: Manly Dorf desc: A dwarfy concoction made from ale and beer. Intended for stout dwarves only. + color: "#664300" spritePath: manlydorfglass.rsi - type: reagent id: chem.CubaLibre name: Cuba Libre desc: A classic mix of rum and cola. + color: "#3E1B00" spritePath: cubalibreglass.rsi - type: reagent id: chem.IrishCarBomb name: Irish Car Bomb desc: A troubling mixture of irish cream and ale. + color: "#2E6671" spritePath: irishcarbomb.rsi - type: reagent id: chem.IrishCoffee name: Irish Coffee desc: Coffee served with irish cream. Regular cream just isn't the same! + color: "#664300" spritePath: irishcoffeeglass.rsi - type: reagent id: chem.IrishCream name: Irish Cream desc: Whiskey-imbued cream. What else could you expect from the Irish. + color: "#664300" spritePath: irishcreamglass.rsi - type: reagent id: chem.B52 name: B-52 desc: Coffee, irish cream, and cognac. You will get bombed. + color: "#664300" spritePath: b52glass.rsi - type: reagent id: chem.AtomicBomb name: Atomic Bomb desc: Nuclear proliferation never tasted so good. + color: "#666300" spritePath: atomicbombglass.rsi - type: reagent id: chem.WhiskeyCola name: Whiskey Cola desc: An innocent-looking mixture of cola and whiskey. Delicious. + color: "#3E1B00" spritePath: whiskeycolaglass.rsi - type: reagent id: chem.SyndicateBomb name: Syndicate Bomb desc: Somebody set us up the bomb! + color: "#2E6671" spritePath: syndicatebomb.rsi - type: reagent id: chem.Antifreeze name: Antifreeze desc: The ultimate refreshment. + color: "#664300" spritePath: antifreeze.rsi @@ -104,6 +121,7 @@ id: chem.Cola name: Cola desc: A sweet, carbonated soft drink. Caffeine free. + color: "#100800" metabolism: - !type:DefaultDrink rate: 1 @@ -112,6 +130,7 @@ id: chem.Coffee name: Coffee desc: A drink made from brewed coffee beans. Contains a moderate amount of caffeine. + color: "#664300" metabolism: - !type:DefaultDrink rate: 1 @@ -120,6 +139,7 @@ id: chem.Tea name: Tea desc: A made by boiling leaves of the tea tree, Camellia sinensis. + color: "#101000" metabolism: - !type:DefaultDrink rate: 1 @@ -128,6 +148,7 @@ id: chem.Cream name: Cream desc: The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh? + color: "#DFD7AF" metabolism: - !type:DefaultDrink rate: 1 @@ -136,6 +157,7 @@ id: chem.Milk name: Milk desc: An opaque white liquid produced by the mammary glands of mammals. + color: "#DFDFDF" metabolism: - !type:DefaultDrink rate: 1 \ No newline at end of file diff --git a/Resources/Prototypes/Reagents/elements.yml b/Resources/Prototypes/Reagents/elements.yml index 0465c71cc1..f60bb120d0 100644 --- a/Resources/Prototypes/Reagents/elements.yml +++ b/Resources/Prototypes/Reagents/elements.yml @@ -2,11 +2,13 @@ id: chem.H name: Hydrogen desc: A light, flammable gas. + color: "#808080" - type: reagent id: chem.O name: Oxygen desc: An oxidizing, colorless gas. + color: "#808080" - type: reagent id: chem.S @@ -36,6 +38,7 @@ id: chem.N name: Nitrogen desc: A colorless, odorless unreactive gas. Highly stable. + color: "#808080" - type: reagent id: chem.Fe @@ -47,6 +50,7 @@ id: chem.F name: Fluorine desc: A highly toxic pale yellow gas. Extremely reactive. + color: "#808080" - type: reagent id: chem.Si diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/backpack1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/backpack1.png new file mode 100644 index 0000000000000000000000000000000000000000..87af9277bb94955ea26ce84437bcc8a785ae9e39 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}Zk{fVAr*7pp4-UFpupi0 zXgZDO$-k-1229L58dw*#9{YdFn@>-bf#Jh$8O@oI^PehR3d^5*qG9qqnFXuXomt!# gCC$&sa9#3i2#>(l%dFcO7#J8lUHx3vIVCg!047Z;WB>pF literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/backpack2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/backpack2.png new file mode 100644 index 0000000000000000000000000000000000000000..b77569d5ed307778d7c061d70afecd181c699dc8 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}F`h1tAr*6y6C_v{Cy4Yk z1sYspRJNRzcV|Z-)9f8>ZEdV8(>6|c%)rLR#wIB#De`Z!y8j8I_D-p3kA)V`WM0AP zCTn0K+n{@N@@(!C=h~h`S#Y@>)BqWFfsuiAKmVcNA8P^_7#J8lUHx3vIVCg!07K_5 AFaQ7m literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/backpackmob1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/backpackmob1.png new file mode 100644 index 0000000000000000000000000000000000000000..1cc753cd78155e4702ce9e446d8fbec896c0e10e GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hEp|1L)(C$=_W$GSH>hP~U|={c)10??hU|n+EHu_m}(S8NlF=%aOvef9c`3;{TfeU|~*SPl>JrNhH|DAO0^E TQhw&h6cE?b)z4*}Q$iB}|DQkj literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker1.png new file mode 100644 index 0000000000000000000000000000000000000000..ceb623570e707dceab4d6f80bf7602b6a8d7db5a GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}0iG_7Ar*7pUf9Taz=6j( zkTs}^<-Pr7-UWhptV0!8CLOwauzsndQv?$O14CJGXl&@;eQUS=(*FE>PD{>fxy0yg qQ)f=rl3hGy$#Zd~q&v(E;;+xh2i~yFT*kn_z~JfX=d#Wzp$PyU8ZX8G literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker2.png new file mode 100644 index 0000000000000000000000000000000000000000..40209c2f669e0275956f906aefc600b6b2a7517a GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}5uPrNAr*7pUf9UnkigM$ z@p8mJ`2W??!mkVr3=E#GelF{r5}E+D1UB;k literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker3.png new file mode 100644 index 0000000000000000000000000000000000000000..62c4528ae1e6cd2147e1a9b4d9ea41479208dd6e GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}ah@)YAr*7pUf9Taz<|f) zqPNFOL7Rr}^N%s#;dnRqRKg{dFa?1h>xG!+wx}>LF#Pe&UVA<2ckKI>kIyPjN{QY! zwV3Z|&c&nQ+d{n}&)p7ZKelP-zc0*(|8!0XvS4TM`|wG7&8wA1{xL8xFnGH9xvXcAuI3`n1wd z{smW;?>$ibVb12M_NyB2u4L?3HSPD@s|Tc}-Dmi>`@kf9!($oW6_s`|?wY2(VF^>p RD+UGz22WQ%mvv4FO#tS3K}!Gt literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker5.png new file mode 100644 index 0000000000000000000000000000000000000000..ca719e883afb18d9c3bd5913c33b4154f8494eb5 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}>7Fi*Ar*7pURua|z<|f) z;{8?gZ(x9Xhx*w}csoZ)%pv`zDBZ!<73 OFnGH9xvXO3I; literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker6.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beaker6.png new file mode 100644 index 0000000000000000000000000000000000000000..581a50d15f04c9945cc35596421a670105b69038 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}d7dtgAr*7pUOLEmK!Jz# z!u?ChZUqeA=c_UQ5!`covVyDTMg@_7)|m>1H7qVJE-wF;O$l-@EtkJ`KSta4U0kpi z1H&YShO+yc9NzCd@r`w#T7ipnT782`(Yc3}>01`sUYqav&U?Yj$p)LBS}G}-?_R3D V%riW}oPmLX!PC{xWt~$(695#}J@Ehl literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge1.png new file mode 100644 index 0000000000000000000000000000000000000000..5ecf243047eee8867aa6b4dc67383c2204a8aa9a GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}9-c0aAr*7pp4-TKKtaGc zP}%SpZ^7^LPXyQbYk8?OWd!_Nt$SODfq|i5@~SGoXDTb-&)KlHV@6tz{`alx*^hPJ hOi0TsW%{vReC<~WXV(V5dkhQ=44$rjF6*2UngH!WE$#pS literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge2.png new file mode 100644 index 0000000000000000000000000000000000000000..05e647f11037bf045f8834c7592d1e0dad72bca7 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k)AG&Ar*7pUf9Taz=5MR zky-LEZ>o~DbP0l+XkK0>(3? literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge3.png new file mode 100644 index 0000000000000000000000000000000000000000..0a464113d713948437448631bc2cac1272120f8c GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}xt=bLAr*7pUfjsrV8Fw2 zzd2qPzAFLfF| V?~k5+#=yY9;OXk;vd$@?2>?SgL3RKD literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge4.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge4.png new file mode 100644 index 0000000000000000000000000000000000000000..c16054a21ac87e9683dc4342f96067a837643148 GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}*`6+rAr*7pUUKAWFyLW1 zAZqiCv)19?|7A9c<+hwcIi5{ikIq@99NxwtC@6Sw`iz@p&t(|aOjQmM-TVDv&#JcX zOZhuk&h=G4VUVAZnQ)S&_ujWvjn|?w%2zV}XOGK%@L;wDdzVM1y5QgId=s;^0~Y*y S#lgV9z~JfX=d#Wzp$Py+i#>Ay literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/beakerlarge5.png new file mode 100644 index 0000000000000000000000000000000000000000..363e3a1bfc02caba22ec6151120c13a83587119b GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}MV>B>Ar*7pUOLFxV8FwA zLBHY+hor)9|I3UV|ZyHs=KKXAVyp?d~2}>^~#cR6(h9zCrxKY+jR{oplf2{1g;4RX>=bC2`Hv SK8b;Wfx*+&&t;ucLK6TUOg&Ek literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-1.png new file mode 100644 index 0000000000000000000000000000000000000000..aaed076693827a751d2ee7294c4553cbc1c3362b GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}CY~;iAr*7po?FPvpuppD z@sYK_Z*8_$3_1bM0vz`y+wXj$#K7=iW1-cGRad{Bne)Azp>7Lffg1~xDDSlx1_lNO MPgg&ebxsLQ04>QOhX4Qo literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-2.png new file mode 100644 index 0000000000000000000000000000000000000000..2243651f0dfb6b6ef9155f2d0ea563bdf4662bbd GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}4xTQKAr*7po--6=FyL?w zjFRPWaQf>n+Qh=LVe{12$Lf>cP3q=gU|?7ly}q?$hiP%S;pWSh8?2Xlh1Q>8I1s?u YlfxeI?sJhY0|Nttr>mdKI;Vst0J1qIFaQ7m literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-3.png new file mode 100644 index 0000000000000000000000000000000000000000..a58b538a8125d9e118af76bb1f36a4601981be0a GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}zMd|QAr*7pp4-UVV8FwA zkvXuch3C*e(dG&keh1dB7mwPW#bv%c%|1!R^ViL7Rx4I%8#78I@A=+gVa@2CZeq_? m(PZ`QThS-pNh)i1FmCqXin%16dXRyEfx*+&&t;ucLK6UvhAp%J literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-4.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-4.png new file mode 100644 index 0000000000000000000000000000000000000000..a71c865d5835e4ca8cae70fa9372c93ba3ec1e16 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}{+=$5Ar*7pUf9Un;K1X2 zkw2-2r$Bi_eQ9$_3y(u7udJXD>;JFQbemN?FWt}eXAU(r7H;TZP%xHEo->!RTD@d@ nTZv4*$U1i`yLyL7C5-D+c{jafJkY_wz`)??>gTe~DWM4f>&q#z literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-5.png new file mode 100644 index 0000000000000000000000000000000000000000..971eadab5f8106977a2a593e32807c5721052baa GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}{+=$5Ar*7pUO33v;K1W@ zaZQB}r{W~BwInYxOm%G|W+ pp$}HAdh_Prv4ipT3=A6>dM@$rm>kVs#lXP8;OXk;vd$@?2>>pzFNy#F literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-6.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-1-6.png new file mode 100644 index 0000000000000000000000000000000000000000..21e86f3d5fb2efe81d0aff8f3c05e6c56fc62e21 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}p`I>|Ar*7pUR*8M;K1X0 zvDI-|i-^akyYsl~6MHrWh8t7gW>&AeW@+6PS@_5I$1N+Rcc&PZ va(hTkiYp8~&26-KPIaltonK504eTDi;!G_q(?uB=7#KWV{an^LB{Ts5Tw*Z? literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-1.png new file mode 100644 index 0000000000000000000000000000000000000000..ac1ecd5cffc02b42a52c371bfdb2688f3bd876f6 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}CY~;iAr*7po--6=P~c%c z!1v>N>jbYA3?g5u3VQx08>t8~Fcd6YRW`l+ZpvS)i8J+oGaO<3w?)t~HS5120|Ntt Mr>mdKI;Vst06{Av%>V!Z literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-2.png new file mode 100644 index 0000000000000000000000000000000000000000..c937cccb3af9b502087c2b24abe0c0a0ceeba696 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}uAVNAAr*7pUf9UVpuppD zQK4_*-}J&3o(Y0R4NH3+d!~MfuYCBRgM)#Ap-xCp`SjVGYU|AW$zq|pUw`E){%+bm dosEG(EpeZqb2=AaGXnzygQu&X%Q~loCIHpbC%ymx literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-3.png new file mode 100644 index 0000000000000000000000000000000000000000..116ffb9bd36eab05c872b85300fa013246949388 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}uAVNAAr*7pUO33hpupiA zm?X3K_xVQ(JqH-%Yz3LC{=DbNymWx=xu!wo@OQ#aFKVb4`%C(!x7inbN*( nbNIrPYHskm`2{Nj1FyW5h7#KWV{an^LB{Ts5jE*fX literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-5.png new file mode 100644 index 0000000000000000000000000000000000000000..6764263d74ac6845b43e0a9c6064bd31ea508c46 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}37#&FAr*7pUfRfeK!L|4 zP-y8F4mp+I;XMx+B@Qw#@qOH+EO@qF)1&UQ8i1~cm^0cqd9-#(MK^}tT6J->dt znrawVyLhNBGY=>%*ZdyYXn5=%(<`=hHyujZU$HST@X!4yKZ${73CKzYPgg&ebxsLQ E06-x$YXATM literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-6.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-2-6.png new file mode 100644 index 0000000000000000000000000000000000000000..d82ea80c1f4acef86f631112c8547d57ac8a3213 GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}ah@)YAr*7pUfRgpV8G*Y zk;Aa<`+Qa93Wojy=75Vco0PfE)`yCm{CM)51OvkXl}xW$@%Jt7JiA-z-LURqm*7Lffg1~xDDSlx1_lNO MPgg&ebxsLQ04>QOhX4Qo literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-2.png new file mode 100644 index 0000000000000000000000000000000000000000..3704a1363d492ec199155f1c7012a722666cb086 GIT binary patch literal 101 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}I-V|$Ar*7po--6=FyJ|| zf#+fW>IOLnjU{{gF1mdKI;Vst E0AcYUdjJ3c literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-3.png new file mode 100644 index 0000000000000000000000000000000000000000..4e36539ba7aba907425f53e3e41dde5e7f5972e8 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}CY~;iAr*7pp5MsHV8Fw? zA>h~lSX&MDlJ_E$Rx0$eHOn$G9LP8N9I|PZ>1^Ze)=N(&GsKC{*w6Jj`1qe{1_lNO MPgg&ebxsLQ05W_cga7~l literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-4.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-4.png new file mode 100644 index 0000000000000000000000000000000000000000..ee9ef2c432b496290fa6f55c57bfc4521f488da5 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}=AJH&Ar*7pUNGchP~c%c zp!Dy5tlbL!g7Q^m1v{mg8z*ouFzBT|Ta^;J*nIi>-wi*5Ud8Yo$Yc(T<@&naGI2fw P0|SGntDnm{r-UW|p++Or literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-3-5.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb238455c40322d6c4242090d960ff1c597aa97 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}Zk{fVAr*7pUNGchP~d1y z>~`b7@^?Ak6UHcI4ky;>|8I-P*@-YRFlbz}Q8bQzzGjv2^1jDEvcIoB{_4n7afx{W gPo6R~+-BQ$pYPj}^C52-7#J8lUHx3vIVCg!0Q#XU8vp7Lffg1~xDDSlx1_lNO MPgg&ebxsLQ04>QOhX4Qo literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-2.png new file mode 100644 index 0000000000000000000000000000000000000000..6e62bae22cada2937cf1f82e86d121327feea7c5 GIT binary patch literal 125 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}E}kxqAr*7pUf3wepupjL zG2^VmyLd|uWrGIc6R|lt|FRX!1vnWP80Pb)?_5=8-rw<5&fu;?+OCPyt~Qk9KYUuv d(4Zna&5LVe{h>9x7#J8BJYD@<);T3K0RV~%DEj~a literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-3.png new file mode 100644 index 0000000000000000000000000000000000000000..dd1a77ce62c0d632cfd8d138b35e5206720e7eb1 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}p`I>|Ar*7pUfj*wV8Fw0 zkvTAph5yjMP_~mCat%y@6OTC@-+M{^<|fBUDlgwp^D0dHX2`}MSa^E-wQsMOqPHfR v{pj6#t04A)_EPZ!KieYzocyWk$-o}FiH|e9t^Xwh0|SGntDnm{r-UW|jCM3! literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-4.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-4.png new file mode 100644 index 0000000000000000000000000000000000000000..379c84c5bdbc29c471eaee71651bcc7a2c88a354 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}QJyZ2Ar*7pUfRgp;K1Q< zas9?Uf)YpmYO^P{NFO*Q;j6PFCh2oLHw#mPisz;C)4Yn_|7AGg!=Us?Fn{gatBlvO z4u*dYjNY0M_W1M%wlvMZ40q~3m=)D~3LW6A5*OtDb>8eN0|Nttr>mdKI;Vst0JLZ} AC;$Ke literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/bottle-4-5.png new file mode 100644 index 0000000000000000000000000000000000000000..fb06bd67c854a1e394fb6a4495465e24aa8a9d5e GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k)AG&Ar*7pUfRgp5Wvy$ z@N$F^Q}d4cuWX4dY#XYkirG0OJ^Vja<%u2(Cj-NuyW4h6nE5y}FD-rPfjG{74%Z{A zlh(4P?NHfSt@{31MC=Q$d8fo*eEKQO#GuDES88qW)-*Q;1_lOCS3j3^P6$Hl_!F{bt3wO(fjOHeeK**|9D8u#o<_a>@(VjU?&S3=e&_je{VM|l1B0il KpUXO@geCy`vp_rm literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/dropper1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/dropper1.png new file mode 100644 index 0000000000000000000000000000000000000000..999d333ab8435e12d73dd3a080706d31c840719a GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}7M?DSAr*7po;4I?P~c&9 zC Q0|Nttr>mdKI;Vst0JfSWq5uE@ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/glass1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/glass1.png new file mode 100644 index 0000000000000000000000000000000000000000..d9ee584491978f604a738640c9685cbb7204c090 GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}UY;(FAr*7pp4-TKz<|Rg za6*g`Q**`tQ_=`$NvP j44!H)Js22bzB9bz;@r@5O8Ec-0|SGntDnm{r-UW|1$ivQ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/glass2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/glass2.png new file mode 100644 index 0000000000000000000000000000000000000000..6d5dc6152c0e6879dedbd2bc50fa3b6dd6230148 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}@t!V@Ar*7pUNGcqaNuA$ zaMdHTl-K^@|9*q(A36Rse9e6NOo+SO%AZ%%p4@U!uZjZtwFhu}p2*xWGQk2bdPXBik67(8A5T-G@y GGywpmvpX69 literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/glass3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/glass3.png new file mode 100644 index 0000000000000000000000000000000000000000..229015775568a4103757e776f905ebdaed5e1939 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}@t!V@Ar*7pUNGcqaNuBZ zFxeJnVzQ_Czxj9O!}cGTuVp>0;ymkDuChHxKv79aDQla;e5226R$aGI`nEn&I>^Dr zB{V|7J67Cht&ir8cFT+IW?*1o@O1TaS?83{ F1OO@vHZ=eM literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/glass4.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/glass4.png new file mode 100644 index 0000000000000000000000000000000000000000..f6d616da8a6e026055c3b8a513b733cbc4d182de GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}*`6+rAr*7pURua|z<|f) zVs>bhNYW%utA_9D_Y_Xay<}2Mb+mOg+R3i_^ot{dprD{dOD_|oxG6#sfo{O^Sp2UO;U1kaWT2s#1ne;=H2zbJ8tZMcWVNJ zpkV0Uxo3H9HM7aQX!d_SL6_%;^?|$XtPb-HjN4fS1bxdH$&S3C#^>bP0 Hl+XkKV7)m& literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/glass6.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/glass6.png new file mode 100644 index 0000000000000000000000000000000000000000..384795d0b876b600dc8f0a8d642e18a8ee63b1eb GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}iJmTwAr*7pUf#%iz<|T$ zqW2UBA&Gi2mgP`EWr07%)rFCa&?#{mXv-El(Cj*0E z<($y1Tb9cN)D~>po|DMH{Etr}c?;{5eG7MQXB80CEoTl`%e8r5HkUU80|SGntDnm{ Hr-UW|PB1hl literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle1.png new file mode 100644 index 0000000000000000000000000000000000000000..c00df70a5990d540ff77473c40de1250479f6286 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}A)YRdAr*7pUf9Tcz<|T$ zqW3H5Bgz&3PbnKPC>uD4ZBV}Gda7QPgGHT@fq~(`{n)#WtD<)AdK(#f`rDf~yLYpv uJo~sI_`R<+qi0t~E?08TweLS#*cX+HGCtC(lVD(AVDNPHb6Mw<&;$S|+%l#B literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle2.png new file mode 100644 index 0000000000000000000000000000000000000000..33d921d8f2a282d0925fed864fe1b8c20f325be8 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}`JOJ0Ar*7pUOLEmK!Jz# z!u?ChZUqePFaD{!7c}%tV64(=UF78Ctp8uu_lP`?g9`}Q-?lls_j{OEh1 z8mw6udYUTa`3*OVtvo9e-zqTi!js+Kn^y6iKfC5^mi9YYhIzIX-v8@Q6);NHsQF!U Ttv<@Yz`)??>gTe~DWM4f40Jtv literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle3.png new file mode 100644 index 0000000000000000000000000000000000000000..1f964fe37acbb8c5106d8184379aad3ceba9e79a GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}6`n4RAr*7pUOLEmK!Jz# z!u?ChZUqeP1^*{2TR6C#V6YX*m+A=ddbmHEsqQPYi;IiPmyODs?nJHDR4sQ8omi|F z&Gbcp!GKH1wx)CD)u}hnd=29ejNJ88GVrgP@isW;Dj4dW1u-1Sp3^4dtZ+Je_{mhzkY4Zx$ j8!9hu`)~iYfO&mTe95C%va=W%7#KWV{an^LB{Ts5Unxa| literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle5.png new file mode 100644 index 0000000000000000000000000000000000000000..7ef3ec2c2d4608eb95088f11628e553870236612 GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}9iA?ZAr*7pUfRvuV8Fu? z(5zwW#CC$?=KfP0k_yUq7(_TYJ8MdWL^`Tf`8reQ&+Ofp=els(x%TE3eY7|-uR$qmdKI;Vst01KT-SO5S3 literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle6.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/largebottle6.png new file mode 100644 index 0000000000000000000000000000000000000000..414c770679289befb23c89c54a310f430c2ad550 GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}b39!fLn`LHopze{u!4Y# z`LzCMCe{F^zwxz{Go;mSJ2m56NcJ}?0W%!hl)Al;hN+|dD-^sEzj6PzMX1||d SWX!<8z~JfX=d#Wzp$P!R(^NkI literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/meta.json b/Resources/Textures/Objects/Chemistry/fillings.rsi/meta.json new file mode 100644 index 0000000000..6c606829b1 --- /dev/null +++ b/Resources/Textures/Objects/Chemistry/fillings.rsi/meta.json @@ -0,0 +1 @@ +{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "backpack1", "directions": 1, "delays": [[1.0]]}, {"name": "backpack2", "directions": 1, "delays": [[1.0]]}, {"name": "backpackmob1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "backpackmob2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "beaker1", "directions": 1, "delays": [[1.0]]}, {"name": "beaker2", "directions": 1, "delays": [[1.0]]}, {"name": "beaker3", "directions": 1, "delays": [[1.0]]}, {"name": "beaker4", "directions": 1, "delays": [[1.0]]}, {"name": "beaker5", "directions": 1, "delays": [[1.0]]}, {"name": "beaker6", "directions": 1, "delays": [[1.0]]}, {"name": "beakerlarge1", "directions": 1, "delays": [[1.0]]}, {"name": "beakerlarge2", "directions": 1, "delays": [[1.0]]}, {"name": "beakerlarge3", "directions": 1, "delays": [[1.0]]}, {"name": "beakerlarge4", "directions": 1, "delays": [[1.0]]}, {"name": "beakerlarge5", "directions": 1, "delays": [[1.0]]}, {"name": "beakerlarge6", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-1-1", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-1-2", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-1-3", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-1-4", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-1-5", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-1-6", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-2-1", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-2-2", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-2-3", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-2-4", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-2-5", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-2-6", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-3-1", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-3-2", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-3-3", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-3-4", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-3-5", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-3-6", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-4-1", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-4-2", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-4-3", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-4-4", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-4-5", "directions": 1, "delays": [[1.0]]}, {"name": "bottle-4-6", "directions": 1, "delays": [[1.0]]}, {"name": "dropper1", "directions": 1, "delays": [[1.0]]}, {"name": "glass1", "directions": 1, "delays": [[1.0]]}, {"name": "glass2", "directions": 1, "delays": [[1.0]]}, {"name": "glass3", "directions": 1, "delays": [[1.0]]}, {"name": "glass4", "directions": 1, "delays": [[1.0]]}, {"name": "glass5", "directions": 1, "delays": [[1.0]]}, {"name": "glass6", "directions": 1, "delays": [[1.0]]}, {"name": "largebottle1", "directions": 1, "delays": [[1.0]]}, {"name": "largebottle2", "directions": 1, "delays": [[1.0]]}, {"name": "largebottle3", "directions": 1, "delays": [[1.0]]}, {"name": "largebottle4", "directions": 1, "delays": [[1.0]]}, {"name": "largebottle5", "directions": 1, "delays": [[1.0]]}, {"name": "largebottle6", "directions": 1, "delays": [[1.0]]}, {"name": "smallbottle1", "directions": 1, "delays": [[1.0]]}, {"name": "smallbottle2", "directions": 1, "delays": [[1.0]]}, {"name": "smallbottle3", "directions": 1, "delays": [[1.0]]}, {"name": "smallbottle4", "directions": 1, "delays": [[1.0]]}, {"name": "smallbottle5", "directions": 1, "delays": [[1.0]]}, {"name": "smallbottle6", "directions": 1, "delays": [[1.0]]}, {"name": "syringe1", "directions": 1, "delays": [[1.0]]}, {"name": "syringe2", "directions": 1, "delays": [[1.0]]}, {"name": "syringe3", "directions": 1, "delays": [[1.0]]}, {"name": "syringe4", "directions": 1, "delays": [[1.0]]}, {"name": "vial1", "directions": 1, "delays": [[1.0]]}, {"name": "vial2", "directions": 1, "delays": [[1.0]]}, {"name": "vial3", "directions": 1, "delays": [[1.0]]}, {"name": "vial4", "directions": 1, "delays": [[1.0]]}, {"name": "vial5", "directions": 1, "delays": [[1.0]]}, {"name": "vial6", "directions": 1, "delays": [[1.0]]}]} \ No newline at end of file diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle1.png new file mode 100644 index 0000000000000000000000000000000000000000..bafddb3bdd054507c881d08bb03dd551bb0ab2f2 GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}PM$7~Ar*7pp4-TKz<`JO zVEKASlcw+MjhfglGOT3YQOITfPn%Of#bc6+=XU9Oue*QOeCn9t&c_gP^|?!0Uca}{ b0qzO<9L#bP0l+XkKbY3VI literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle2.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle2.png new file mode 100644 index 0000000000000000000000000000000000000000..344e45c81d1fd07a3f0b8be1695dc7056c102712 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL};hrvzAr*7pUfjvs;K1W@ z(Q#3aW`g&E{~bax2Sl744hgR1{HecLReqBy0|UdKyO%Uqt-AY7ce+b*Pwuwsw;~U0 xo3y7$b}j2Zo|>$^4p#RIdaa+cGk97tcpLC-wiYVwVPIfj@O1TaS?83{1OU$sGBp4I literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle3.png new file mode 100644 index 0000000000000000000000000000000000000000..7c6941e780ccb710295e02d7aa60f0178d36540c GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}S)MMAAr*7pUOLFzV8Fq8 zVg1Jw96Sd&-qpVXQ9KV$9?A02G5q+Te*2^VE>;C4C8b}xS5BHTQ&(x%j8#r9*Dmg! zc8d91Q~nHX&*$&nC;3lNTd-<+)78$Jf2>PYSs2Rmk8hsItFIs^$dI#ll1Qrh_5?Ks P1_lOCS3j3^P6E=&vz_Op#V1p}+!FP|}U<&;f* z_qL|UZ4m!+XpZNufB!VUxvgSOE7P9wmP0v#Wu>ix=i04RHoJd+;A3F$yv6WKKsKMt Tt|^v*fq}u()z4*}Q$iB}wCg-2 literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle5.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle5.png new file mode 100644 index 0000000000000000000000000000000000000000..78ebfcc3a44c89ba50ea42dd6d0406eff9e994aa GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}>7Fi*Ar*7pUfIaoU?9Nk z&@6G7IfdohdWnbZ9~4AP1X@^@EjV!f=~92YObT#nr5^$QNwRpB@F%vgKY|NX2v zj2=#xRzBOnR`EF@zhu_0`|(%bd9ZXo_{_1!l_lqNMt#||02da9HKrdGjvq+1tYBbZ OVDNPHb6Mw<&;$TLi8~Dd literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle6.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/smallbottle6.png new file mode 100644 index 0000000000000000000000000000000000000000..4f392a2288b20f85e6c9a9a667202155b2848de3 GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}S)MMAAr*7pUfs*v;K0H9 zVEM)r7PbVI@9Sk686_GS*L>A^cOk>)UihRBllL$+badF6h0Zc6-o2{(gq2nHI++hk z>g5CkW4FqAFZB$a-MZ@6J;rjed4^1G2ROX;Gcerw`+@&V&JTV8LB<1o-rmZpT><7N R85kHCJYD@<);T3K0RZGuIe`EG literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/syringe1.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/syringe1.png new file mode 100644 index 0000000000000000000000000000000000000000..74cfa72ab4831e7514d2eeb8180dae0d69d6f858 GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}UY;(FAr*7pUa;mmV8Fu? zsJ;A4dvX38uuj#c5w1lRYM>tmO2VG-qD)-3P^$p<937i@EzC>h-zdvX38uuj#c5w1lRYM>tmO2VG-qD)-3P^$p<937i@EzC>h-zW1v(0fZ0ieuPFby_r1Yqt;r6$zKT*BRY-w(HD(V@%XGvbrpKc<({@1?) j6?^(4y4_uDUNh(&&Yk?}nO`~s0|SGntDnm{r-UW|9<(kH literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/syringe4.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/syringe4.png new file mode 100644 index 0000000000000000000000000000000000000000..d8b7e8a701b086365b192639d62dc4ce25b167f9 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}37#&FAr*7pUOC8nK!JzZ zVfF4*_VcrNrte!3FwfO@$*J#+^JQ5Wl$4a(@7Q`ii}-OVE{We>vv4o3xv>iigM!k$ zzt3MiQQ7=f?n*)Vd;a^^uZbI!y*Yj3$<`w;jw>sD@-}xbUwF{w`*t4&1_lOCS3j3^ HP67bp1_n=8KbLh* G2~7Y{TpiK? literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/fillings.rsi/vial3.png b/Resources/Textures/Objects/Chemistry/fillings.rsi/vial3.png new file mode 100644 index 0000000000000000000000000000000000000000..997d2dae2f9271d4b600f0ea413ba74155328149 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}2A(dCAr*7po^#}7FyJ|| zA?r`0s8gd%L*os*sW}XRs~8w=XnCIZ*JAL z{?TNQi^5kH1{D-c>5Jsb)3a^d(Y^c1)q~PIEV%A+g^Emn#5m=VHjdZnjzrHP0w)C_l)+llhSTJ`6Ydc$5`?b z&xa4;={0-VO%5;di#}dpa4uxh9n;5)-+Y(Y^HuKnhdDdti_#Y?yvD#FoX(QJ*M0d~ z^bP0l+XkKb&ZZU literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/1.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/1.png new file mode 100644 index 0000000000000000000000000000000000000000..2d455682f40660b7f1c31e2b33ec407c2f74203f GIT binary patch literal 331 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfLY^*;Ar*7pPT9}Z6d-Zb z|50+w4dELB9K5}cUMOwZ`h(@7+}nlO&iNNEN$lX%a`pbg;P^!@-Z^e#(55$WOtuQ) zj_=;r)Hk}7hIgAgT=q?RfBfz=>-7TjzVk9nvatR+X?5I(?V8(i+W#1+`I=vLpV6rE z=dP^%dq!XLOp6zZRx_t-c|M($x>%-Phvg#U^V3^P>_g5uxMwmmh`r-+EICkc!MnF` zWp&uJw*v1RJ!a)idaWD3;Es>Y;hR5KHm?8HkZQdpa(xufge%c!f=+kOkxcwwF#9jl zjw5?-O5FK6Epx5#4jrCzeh()yJ8aLldGljW;bSfP9?k4W(?0|ySKN|cxQdIRIV6-( m+EGzx)+@Gq2c)kCncJF7wn^Pn+sVMdz~JfX=d#Wzp$PzbqK{Mn literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/10.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/10.png new file mode 100644 index 0000000000000000000000000000000000000000..35e22c64542f76398d4c4148f9e54714b041cfa3 GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNff}SppAr*6y6C_xbWeqOf zVyZ3f|8MZ^=w$1RJbAy<8$U`)NJz|h@m%IjLu(K-Tdn|m%d$WBYrp)cuPx@cST>t^ zg06ZB+tter`*t3$x7HSJo3zMn(V~_|7S7*NYg`x(FHBCCcxPYbR8qCTf<@$MiUbH$ z{dy(ICu@B;Aw89;T*CK}tRzdzvOnn!ElP{`?L7W}-#;e$Xd>+ zp!LzF;zLK+H(~ZNdE0;Y4_xV0Tj&sCwx{NmQgc(23^Q}{?Rr*L%LuV0{1O*L?6Q8I g*jyvhmdKI;Vst02OJ2`v3p{ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/15.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/15.png new file mode 100644 index 0000000000000000000000000000000000000000..834ae95f9f67cc4e4216a6bbb38dab01db3a127d GIT binary patch literal 284 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k3C%+Ln`JZCrGd=%Nks| z#Z+6||KH%-(aF{sdGdazH-40qkdT=1;=rdHffRDqD3u_ES$fk*0?YnUYMLN@y@==sibN_)S{cUUw-^w zDg4anM&wKbotTY`dVbeiZeF)%R=&r%lzG*%#zlvCCe>O$U={RzlmdKI;Vst06__L6951J literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/5.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/5.png new file mode 100644 index 0000000000000000000000000000000000000000..b898840c308b1475ade399d2d90ac0873d02b1f4 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNflAbP(Ar*6y6C_xbWeqOf zVyZ3f|8MZ^=w$1RJbAy<8$U`)NJz|h@m%IjLu(K-Tdn|m%d$WBYrp)cuPx@cST>t^ zg06ZB+tter`*t3$x7HSJo3zMn(V~_|7S7*NYg`x(FHBCCcxPYbR8qCTf<@$MiUbH$ z{dy(ICu@B;Aw89;T*CK}tRzdzvOnn!6-}P^?>w%L|IfqYo%xKTU7MCZm>TX#NEYr1#%;92e+r7Pd^vbdXjPj5;%Xy3v2NRp>ipnHeuM5P(q zmrjV^UsK6qB6W8E?&iAzN_)xs{em2!|_^`s|_U#=SwFAm+!JYQ^dMC-JgNhT*GnH0uX#;~EAA1_n=8KbLh* G2~7Yl>$xL zKck)RoU4k$#sq;k{Zb{s@;@=b-d#-&?d;>Fw{54+n;s;XkeWM7 zm%SnG0W(LWpcfO{-wAOKE?Zj9yy8Fc3y&(}W}o?w{#9yR-EQ!{b!L(4nQP5;Gv+YQ zEOOPEttRHpaOD;6u6g__PaNvL95Q=f$gq3f{58xBXQvta+C?u-+A}|bt*Y^ST3*q{ zF6Lrx1`8`21~tBjNa^gWK4A`P?*(MCtL#rw->O#BEkEU3ZkBmd>E;u$PmX6VPk69X z@t}q8@6QjzH!pRT=(+r$&89D|_f=ddL(UUlJ^eo3_hqgukGH(>Fg>?^-O=;Q_ql5_ m*EhY$UGb#BZSln##;wJL?9qqYn-~}v7(8A5T-G@yGywpW=cNPy literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_black.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_black.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c55e28ca5729a71f26dcf3be6c9372598a0046 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}-#uL%Ln`JZCrGd^P7vuS zIpEQm7B0Q`f7hv31^?Exp7u2BZw)#vJo&N&2&{{ZQ)%Q=+FqswCdo*Ens8OlfDZYH&R|_xO5`OUGSw+3)PHp1ejt;WndoxK8tL zD;uRQ$H2(Bj)8G)b$kwf4a@!Jt6H<1@MG>gnYm%g`GmAA9`WVTQVxE9r?fD*c5Ya? zc6wtYqYzVxKQj-{hePd34q;Lif9Lln{++1J0|Nf?_6a}!{L?*rH+#CI#0iaCC)aZS wla8=9FfcGsi1zEO1bMJ2(144LkAdM{e&n%z{JTpS7#J8lUHx3vIVCg!06UR$+W-In literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_black0.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_black0.png new file mode 100644 index 0000000000000000000000000000000000000000..700d31bfcd20fe074785b415982079861033b546 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfmYyz-Ar*7pPOVR)nu;#%lpkS=Tx81nQpExF2Z%R-hFbWoxL?z>EWK&uV?SR@;NM(ylHPvH##e-xrRxHlLbapFmuF3H(c zyo>Y9>ABYJjIB-|-ycaa3)g0iKmV-xYk>)$t-j*#&t=QG51cAx__IN=g(*avb^pbj z#F=c`*AE);GVmQQei3d^MS9$kpn!@CUElgYOaRETk`PVPIfj@O1Ta JS?83{1OOFJdV~M~ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_red0.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/autoinjector_red0.png new file mode 100644 index 0000000000000000000000000000000000000000..cc36291fbafb30aabcc1664f28ada8c14402d9dc GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNf_MR?|Ar*7pPO|6!T!Os2mB|WJv#n`zu@JQ3ueuYe7eWBMF?71 zhO&CgcsYq*{Ng0A=X{an^f|?G_x8jDXo&om^LXu+Lvc8+P5`S{MqTL1v}-~{(g}; zF3j;LvF&qlZU)d`^&5D76fx*+&&t;ucLK6Usf2wBy literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/borghypo.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/borghypo.png new file mode 100644 index 0000000000000000000000000000000000000000..e96d92d7936308f2b3287c1e5ba1d04b59085710 GIT binary patch literal 587 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANM!LY^*;Ar*7pPPNat?I3c@ zzMYNBw&OLQtF!mANA{;n4Mq4S-f%uR+ptkj@#KWH^K7@MNbIWk7BXjPws)8_+v5ja zH%fxoy|cF-c{}OGG0jGv>qo0joQo`quDqPTvwqk2+V^)mnU%m`+JdWDCqs|MasP7g z(%jv)QR{C4^M1DGsh!LYXYxNfZ`Cpv;(Rm3>&0!ev(eL9ORRj?cGcLum%jb9vHU^# zwV5GZzhVzN=uKaI?P#=azK*@|mJgNR1DG1(RxirGZQR6Aa4BQK-IqFNQlhVaeD~tT zJV6GDIZHo$N?2mzC|a@Uf7_;)x6S5d-SXK`w!GPCp~2=#8@b^BuaB~R-CNC`u37V| zt|7{I@>H*<^Eiz@6nXd z>=9~;5}lSBxIadZ{XV1U*Q!{i1AZ%8^p`I;vEQ}pkeia@S}yyGOL-X%oImYdc`4(; z-;aen3>MFeD#Vw6{qaj+S*D)qvLs)Qi@#^{F3UXj=(Y2o7xRzb`MAGJcusM=@aJ-8 z4n;pv2<&xsW3>XYH9bI%qea+ tY&)6K^f30%&%^Hhh1JEq8@&Is%U!>AT;j~n`wR>W44$rjF6*2UngFjg6~q7l literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/borghypo_s.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/borghypo_s.png new file mode 100644 index 0000000000000000000000000000000000000000..4adc13c448a40cf02e1cbe10c87b518aee3c501b GIT binary patch literal 517 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfXFOdTLn`LHoq9TNwu4BU zeNA9MZ%WqE(vOQayKbzI^YgW#8i&5dr7Iey*`HPIGEz`>`ov z!MESxO$?rsCS1MJWGwZu&g$=BjstJ2dP|jVFJrU&X%~NZ!odQL0|^!;xeYq!f6h#; zIlbxBjQ3?}xs~tVR-N7bI@{*_>N9z(C1?1kO)V~!tT3&3_j}*z;(I-AYGDhf7`=U4 zb~}bS^h}yD?}NVMOZxlM{(S#zytnTD5v^A)=gk;CRBpWBIqAdWfA^RKoHERP&(^%! zFz|a-hIV(q|7XNe z64Ep$U*W2worx@9B9BtnxnDhJQe4oVvN@X(bI;RURe|a2z`?~@{!IV? literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/broken.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/broken.png new file mode 100644 index 0000000000000000000000000000000000000000..aee78e21a54b12442025cd688b6154d3be0eed0a GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfGM+AuAr*7pPBr8@WFXNx z|7dc@3(i*yL}X-^CQoac?d`Ad?vY+;=?6BwzSg|fFp=qx7%f^ zugR+SPyha};;^zl+||V4YDw4egV)5)Rde~zW^PbA@3(7JrTCAV9WxUrJ4zDcU%xNx@tgTuv7G5_6)%IqX0?L9wpDk_ zl6*YwRvI2wi3wh_VwT^vnvV>kX^-UO{@*wK5Xd8-c wPtwD)uDBkEzn9Rec3}1oPUWRuofla7zfLnE%6$5EW=`sFb7rWy z&;H<}z#|c|dXLH31KV=V%*@uQOj^Ob?loKd{B_0U<-!enrg&)H zd|%=uzf^>Qf7-Mi#`gaE??2!9e52%K2k4;MZn}3CwR3t=-?Typ_BRE|~VQNc*->w3(@)E|pKES=Ug@^`uAfj|71M{;@7|lv zX5hK1(wSq{EzsnnW}LX&j4}3ajMdr4>i#RtrRsCnUu%w5W)QzxZ*QHv{-%rkk>+31 zK5qD;b>*+uQlT|#)?9f1{pQV^o;n{p-4|F3xPB3PajI2f`g3VvgPv}gUCi}|Zf3Lu zy}IASpqKLf^FzhM7c<^?vT2BRAH4L*$V)S7?X?j7oHYWnzwKO)CvFdW9J~6c+5>T} zWEG#wE}EulPTSoa9zS`~lA9n~Q9m=pS<`j*T|XVWK$SY~FI9o3v|C?TolKvR$ks6b YkJo$d={ebY3=9kmp00i_>zopr0G7=zhyVZp literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/draw.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/draw.png new file mode 100644 index 0000000000000000000000000000000000000000..1bc212413e4e6d8542a89e38cd4c136a07a2b7ae GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}HJ&bxAr*6y6C_?X2+m)! zZ|Cv)oJZpR?+&c)7dhbM;piW4%e8;WiiuHW#s(lD7!(k6#iP`_vy4G!MfI;&na?=( z@Le$f{=?t<^hc)J;{N};`{n-gdw2YLCig#a#=B{kMSEgSC-O-coOVB`A;G#hL8PZC f(16SBUB^At`%kMb7a}W~9r-t`$SqEM|sbcIOuE=tExt#3E7am_@J5{HCp2584 zde)J`IWzkwwfuf4(D3kawqCKp3r0nj(%Wj2gc|ZhGOwNzbzEh@v-bPVo{y)yCt5z~ zNC>?9bN+0v?mNYIm-=-tiScEb_j=W`#|3(-zQ-3nt&Esf##Cjy;dUN#fl2(-Q|492 z7{nbNIAquww`~-3;JTP$^1|)nD`kyPt(%)uBi)i$>}7tMC2DZ`KF5RYOL!MdIpud~ zD$^3)^h*_P3?C{*@AI-9Q;1@i?R4S&_nVfx&5W+I?RfiDW4hNJo1U9?dlx;eytQ~i mt)y<=-jk65D=y4`#cX)I(sD-4xor##3=E#GelF{r5}E+#nZqmq literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Chemistry/syringe.rsi/inject.png b/Resources/Textures/Objects/Chemistry/syringe.rsi/inject.png new file mode 100644 index 0000000000000000000000000000000000000000..e03bd1d144af40012c4f254d36c4f68979bc594c GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}Wu7jMAr*6y6C_xjIbY1K z{&U^@`wxF#JpUF}E z>y@Nemz1R5ygLUy%GnR-q$f1AaNU( Date: Thu, 9 Apr 2020 16:49:19 +0500 Subject: [PATCH 07/14] uncomments setter --- .../Components/Chemistry/TransformableContainerComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs index 380ac24bff..dec60171f8 100644 --- a/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/TransformableContainerComponent.cs @@ -52,7 +52,7 @@ namespace Content.Server.GameObjects.Components.Chemistry _transformed = false; _sprite.LayerSetSprite(0, _initialSprite); Owner.Name = _initialName; - //Owner.Description = _initialDescription; + Owner.Description = _initialDescription; } void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) @@ -81,7 +81,7 @@ namespace Content.Server.GameObjects.Components.Chemistry var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Drinks/" + proto.SpriteReplacementPath),"icon"); _sprite.LayerSetSprite(0, spriteSpec); Owner.Name = proto.Name + " glass"; - //Owner.Description = proto.Description; + Owner.Description = proto.Description; _currentReagent = proto; _transformed = true; } From b73b8cf17267f4d5a4c8c1370ba167296e7faf1b Mon Sep 17 00:00:00 2001 From: Injazz Date: Thu, 9 Apr 2020 20:38:31 +0500 Subject: [PATCH 08/14] fixes --- .../Components/Chemistry/SolutionComponent.cs | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs b/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs index 66843b3b54..81f8656a0e 100644 --- a/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/SolutionComponent.cs @@ -42,15 +42,15 @@ namespace Content.Server.GameObjects.Components.Chemistry private SpriteComponent _spriteComponent; - [ViewVariables] - protected Solution _containedSolution = new Solution(); - protected int _maxVolume; + private Solution _containedSolution = new Solution(); + private int _maxVolume; private SolutionCaps _capabilities; private string _fillInitState; private int _fillInitSteps; private string _fillPathString = "Objects/Chemistry/fillings.rsi"; private ResourcePath _fillPath; private SpriteSpecifier _fillSprite; + /// /// The maximum volume of the container. /// @@ -89,6 +89,13 @@ namespace Content.Server.GameObjects.Components.Chemistry set => _capabilities = value; } + [ViewVariables] + public Solution Solution + { + get => _containedSolution; + set => _containedSolution = value; + } + public IReadOnlyList ReagentList => _containedSolution.Contents; /// @@ -142,15 +149,6 @@ namespace Content.Server.GameObjects.Components.Chemistry } } - /// - protected override void Shutdown() - { - base.Shutdown(); - - _containedSolution.RemoveAllSolution(); - _containedSolution = new Solution(); - } - public void RemoveAllSolution() { _containedSolution.RemoveAllSolution(); From 3c795ad283dcadc2328ac4b49975cbabd9466c3f Mon Sep 17 00:00:00 2001 From: zumorica Date: Thu, 9 Apr 2020 20:28:22 +0200 Subject: [PATCH 09/14] Use TimeSpan instead of DateTime in RoundEnd and Comms Console. --- .../Command/CommunicationsConsoleBoundUserInterface.cs | 8 ++++++-- .../GameObjects/EntitySystems/RoundEndSystem.cs | 6 ++++-- .../Command/SharedCommunicationsConsoleComponent.cs | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs index 5401ac8537..9e90200515 100644 --- a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs @@ -3,6 +3,8 @@ using Content.Client.Command; using Content.Shared.GameObjects.Components.Command; using Robust.Client.GameObjects.Components.UserInterface; using Robust.Shared.GameObjects.Components.UserInterface; +using Robust.Shared.Interfaces.Timing; +using Robust.Shared.IoC; using Robust.Shared.ViewVariables; namespace Content.Client.GameObjects.Components.Command @@ -12,11 +14,13 @@ namespace Content.Client.GameObjects.Components.Command [ViewVariables] private CommunicationsConsoleMenu _menu; + [Dependency] private IGameTiming _gameTiming; + public bool CountdownStarted { get; private set; } public int Countdown => _expectedCountdownTime == null - ? 0 : Math.Max((int)(_expectedCountdownTime.Value.Subtract(DateTime.Now)).TotalSeconds, 0); - private DateTime? _expectedCountdownTime; + ? 0 : Math.Max((int)_expectedCountdownTime.Value.Subtract(_gameTiming.CurTime).TotalSeconds, 0); + private TimeSpan? _expectedCountdownTime; public CommunicationsConsoleBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) { diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs index e1b75529c6..62dfc01069 100644 --- a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -2,6 +2,7 @@ using System; using System.Threading; using Content.Server.Interfaces.GameTicking; using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Timer = Robust.Shared.Timers.Timer; @@ -11,12 +12,13 @@ namespace Content.Server.GameObjects.EntitySystems { #pragma warning disable 649 [Dependency] private IGameTicker _gameTicker; + [Dependency] private IGameTiming _gameTiming; #pragma warning restore 649 private CancellationTokenSource _roundEndCancellationTokenSource = new CancellationTokenSource(); public bool IsRoundEndCountdownStarted { get; private set; } public int RoundEndCountdownTime { get; set; } = 5000; - public DateTime? ExpectedCountdownEnd = null; + public TimeSpan? ExpectedCountdownEnd = null; public delegate void RoundEndCountdownStarted(); public event RoundEndCountdownStarted OnRoundEndCountdownStarted; @@ -34,7 +36,7 @@ namespace Content.Server.GameObjects.EntitySystems IsRoundEndCountdownStarted = true; - ExpectedCountdownEnd = DateTime.Now.AddMilliseconds(RoundEndCountdownTime); + ExpectedCountdownEnd = _gameTiming.CurTime.Add(new TimeSpan(0,0,0,0,RoundEndCountdownTime)); Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token); OnRoundEndCountdownStarted?.Invoke(); } diff --git a/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs b/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs index 00d73272b1..88fb0168fc 100644 --- a/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs +++ b/Content.Shared/GameObjects/Components/Command/SharedCommunicationsConsoleComponent.cs @@ -14,10 +14,10 @@ namespace Content.Shared.GameObjects.Components.Command [Serializable, NetSerializable] public class CommunicationsConsoleInterfaceState : BoundUserInterfaceState { - public readonly DateTime? ExpectedCountdownEnd; + public readonly TimeSpan? ExpectedCountdownEnd; public readonly bool CountdownStarted; - public CommunicationsConsoleInterfaceState(DateTime? expectedCountdownEnd = null) + public CommunicationsConsoleInterfaceState(TimeSpan? expectedCountdownEnd = null) { ExpectedCountdownEnd = expectedCountdownEnd; CountdownStarted = expectedCountdownEnd != null; From c55a4ffbf4d4eb29df35fdef71dc27e1f0effaa7 Mon Sep 17 00:00:00 2001 From: zumorica Date: Thu, 9 Apr 2020 20:31:28 +0200 Subject: [PATCH 10/14] Countdown is now 4 minutes --- Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs index 62dfc01069..1a206d5c50 100644 --- a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -17,7 +17,7 @@ namespace Content.Server.GameObjects.EntitySystems private CancellationTokenSource _roundEndCancellationTokenSource = new CancellationTokenSource(); public bool IsRoundEndCountdownStarted { get; private set; } - public int RoundEndCountdownTime { get; set; } = 5000; + public int RoundEndCountdownTime { get; set; } = 240000; public TimeSpan? ExpectedCountdownEnd = null; public delegate void RoundEndCountdownStarted(); From 503a2a8acfbbb348ec8ee8d664bdbeb583086dc1 Mon Sep 17 00:00:00 2001 From: Injazz Date: Fri, 10 Apr 2020 12:08:33 +0500 Subject: [PATCH 11/14] updates submodule --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index ec52102d02..1cdb279319 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit ec52102d0279281a00cc1c6811330a13ddaf975b +Subproject commit 1cdb279319bdb16efdc9671d0d4e0e5947b0493f From 47c3258861e645f2429ec135629ce537e8f68b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= <6766154+Zumorica@users.noreply.github.com> Date: Fri, 10 Apr 2020 13:28:28 +0200 Subject: [PATCH 12/14] Update Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs Co-Authored-By: Pieter-Jan Briers --- Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs index 1a206d5c50..ddbbcde98d 100644 --- a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.EntitySystems IsRoundEndCountdownStarted = true; - ExpectedCountdownEnd = _gameTiming.CurTime.Add(new TimeSpan(0,0,0,0,RoundEndCountdownTime)); + ExpectedCountdownEnd = _gameTiming.CurTime + TimeSpan.FromMilliseconds(RoundEndCountdownTime); Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token); OnRoundEndCountdownStarted?.Invoke(); } From 05e9d39e8928ecebdb5fdad19a049077cb19cd7f Mon Sep 17 00:00:00 2001 From: zumorica Date: Fri, 10 Apr 2020 13:36:30 +0200 Subject: [PATCH 13/14] Fix bug where comms console sometimes took a second to update after a countdown has started --- Content.Client/Command/CommunicationsConsoleMenu.cs | 3 ++- .../Command/CommunicationsConsoleBoundUserInterface.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Client/Command/CommunicationsConsoleMenu.cs b/Content.Client/Command/CommunicationsConsoleMenu.cs index 426ae84977..0a6804264c 100644 --- a/Content.Client/Command/CommunicationsConsoleMenu.cs +++ b/Content.Client/Command/CommunicationsConsoleMenu.cs @@ -5,6 +5,7 @@ using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.IoC; using Robust.Shared.Localization; +using Robust.Shared.Log; using Robust.Shared.Maths; using Timer = Robust.Shared.Timers.Timer; @@ -50,7 +51,7 @@ namespace Content.Client.Command Timer.SpawnRepeating(1000, UpdateCountdown, _timerCancelTokenSource.Token); } - private void UpdateCountdown() + public void UpdateCountdown() { if (!Owner.CountdownStarted) { diff --git a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs index 9e90200515..c82ded4c7a 100644 --- a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs @@ -69,7 +69,7 @@ namespace Content.Client.GameObjects.Components.Command _expectedCountdownTime = commsState.ExpectedCountdownEnd; CountdownStarted = commsState.CountdownStarted; - + _menu?.UpdateCountdown(); } From c19035fccc746e50cbcfc36fbb7d88ed799a9975 Mon Sep 17 00:00:00 2001 From: zumorica Date: Fri, 10 Apr 2020 13:37:13 +0200 Subject: [PATCH 14/14] Use TimeSpan instead of an int for the countdown time --- Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs index ddbbcde98d..9077e94184 100644 --- a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -17,7 +17,7 @@ namespace Content.Server.GameObjects.EntitySystems private CancellationTokenSource _roundEndCancellationTokenSource = new CancellationTokenSource(); public bool IsRoundEndCountdownStarted { get; private set; } - public int RoundEndCountdownTime { get; set; } = 240000; + public TimeSpan RoundEndCountdownTime { get; set; } = TimeSpan.FromMinutes(4); public TimeSpan? ExpectedCountdownEnd = null; public delegate void RoundEndCountdownStarted(); @@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.EntitySystems IsRoundEndCountdownStarted = true; - ExpectedCountdownEnd = _gameTiming.CurTime + TimeSpan.FromMilliseconds(RoundEndCountdownTime); + ExpectedCountdownEnd = _gameTiming.CurTime + RoundEndCountdownTime; Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token); OnRoundEndCountdownStarted?.Invoke(); }