diff --git a/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs b/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs index a92176faa0..c658b810f5 100644 --- a/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs +++ b/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs @@ -42,11 +42,6 @@ namespace Content.Client.Kitchen.UI SendMessage(new MicrowaveEjectSolidIndexedMessage(_solids[args.ItemIndex])); }; - _menu.IngredientsListReagents.OnItemSelected += args => - { - SendMessage(new MicrowaveVaporizeReagentIndexedMessage(_reagents[args.ItemIndex])); - }; - _menu.OnCookTimeSelected += (args,buttonIndex) => { var actualButton = (MicrowaveMenu.MicrowaveCookTimeButton) args.Button ; @@ -77,7 +72,7 @@ namespace Content.Client.Kitchen.UI } _menu?.ToggleBusyDisableOverlayPanel(cState.IsMicrowaveBusy); - RefreshContentsDisplay(cState.ReagentQuantities, cState.ContainedSolids); + RefreshContentsDisplay(cState.ContainedSolids); if (_menu == null) return; @@ -90,22 +85,12 @@ namespace Content.Client.Kitchen.UI ("time", cookTime)); } - private void RefreshContentsDisplay(Solution.ReagentQuantity[] reagents, EntityUid[] containedSolids) + private void RefreshContentsDisplay(EntityUid[] containedSolids) { _reagents.Clear(); if (_menu == null) return; - _menu.IngredientsListReagents.Clear(); - for (var i = 0; i < reagents.Length; i++) - { - if (!_prototypeManager.TryIndex(reagents[i].ReagentId, out ReagentPrototype? proto)) continue; - - var reagentAdded = _menu.IngredientsListReagents.AddItem($"{reagents[i].Quantity} {proto.Name}"); - var reagentIndex = _menu.IngredientsListReagents.IndexOf(reagentAdded); - _reagents.Add(reagentIndex, reagents[i]); - } - _solids.Clear(); _menu.IngredientsList.Clear(); foreach (var entity in containedSolids) diff --git a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml index a75beace74..c0418088da 100644 --- a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml +++ b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml @@ -4,16 +4,6 @@ SetSize="512 256" MinSize="512 256"> - - - - ().SetTemperature(beaker, component, reactionPrototype.MinimumTemperature); }); await server.WaitIdleAsync(); diff --git a/Content.Server/Access/Systems/IdCardSystem.cs b/Content.Server/Access/Systems/IdCardSystem.cs index 9bdb08ddb4..2dab8f2259 100644 --- a/Content.Server/Access/Systems/IdCardSystem.cs +++ b/Content.Server/Access/Systems/IdCardSystem.cs @@ -3,21 +3,32 @@ using Content.Shared.Inventory; using Robust.Shared.GameObjects; using Robust.Shared.Localization; using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Content.Server.Kitchen.Components; +using Content.Server.Popups; +using Content.Shared.Access; using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.PDA; using Robust.Shared.IoC; +using Robust.Shared.Player; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; namespace Content.Server.Access.Systems { public class IdCardSystem : SharedIdCardSystem { [Dependency] private readonly InventorySystem _inventorySystem = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnInit); + SubscribeLocalEvent(OnMicrowaved); } private void OnInit(EntityUid uid, IdCardComponent id, ComponentInit args) @@ -26,6 +37,29 @@ namespace Content.Server.Access.Systems UpdateEntityName(uid, id); } + private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowavedEvent args) + { + if (TryComp(uid, out var access)) + { + // If they're unlucky, brick their ID + if (_random.Prob(0.25f)) + { + _popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-bricked", ("id", uid)), + uid, Filter.Pvs(uid)); + access.Tags.Clear(); + } + else + { + _popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-safe", ("id", uid)), + uid, Filter.Pvs(uid)); + } + + // Give them a wonderful new access to compensate for everything + var random = _random.Pick(_prototypeManager.EnumeratePrototypes().ToArray()); + access.Tags.Add(random.ID); + } + } + public bool TryChangeJobTitle(EntityUid uid, string jobTitle, IdCardComponent? id = null) { if (!Resolve(uid, ref id)) diff --git a/Content.Server/Kitchen/Components/MicrowaveComponent.cs b/Content.Server/Kitchen/Components/MicrowaveComponent.cs index 22dd00a87d..1c681e11a3 100644 --- a/Content.Server/Kitchen/Components/MicrowaveComponent.cs +++ b/Content.Server/Kitchen/Components/MicrowaveComponent.cs @@ -1,18 +1,18 @@ -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Content.Server.Act; using Content.Server.Chat.Managers; -using Content.Server.Chemistry.Components; +using Content.Server.Chemistry.Components.SolutionManager; using Content.Server.Chemistry.EntitySystems; using Content.Server.Hands.Components; using Content.Server.Popups; using Content.Server.Power.Components; +using Content.Server.Temperature.Components; +using Content.Server.Temperature.Systems; using Content.Server.UserInterface; using Content.Shared.Acts; using Content.Shared.Body.Components; using Content.Shared.Body.Part; -using Content.Shared.Chemistry.Components; using Content.Shared.FixedPoint; using Content.Shared.Interaction; using Content.Shared.Item; @@ -21,15 +21,11 @@ using Content.Shared.Kitchen.Components; using Content.Shared.Popups; using Content.Shared.Power; using Content.Shared.Sound; +using Content.Shared.Tag; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Containers; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Localization; using Robust.Shared.Player; -using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.ViewVariables; namespace Content.Server.Kitchen.Components { @@ -56,6 +52,8 @@ namespace Content.Server.Kitchen.Components [DataField("clickSound")] private SoundSpecifier _clickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg"); + public SoundSpecifier ItemBreakSound = new SoundPathSpecifier("/Audio/Effects/clang.ogg"); + #endregion YAMLSERIALIZE [ViewVariables] private bool _busy = false; @@ -68,11 +66,15 @@ namespace Content.Server.Kitchen.Components /// [ViewVariables] private uint _currentCookTimerTime = 1; + /// + /// The max temperature that this microwave can heat objects to. + /// + [DataField("temperatureUpperThreshold")] + public float TemperatureUpperThreshold = 373.15f; + private bool Powered => !_entities.TryGetComponent(Owner, out ApcPowerReceiverComponent? receiver) || receiver.Powered; - private bool HasContents => EntitySystem.Get() - .TryGetSolution(Owner, SolutionName, out var solution) && - (solution.Contents.Count > 0 || _storage.ContainedEntities.Count > 0); + private bool HasContents => _storage.ContainedEntities.Count > 0; private bool _uiDirty = true; private bool _lostPower; @@ -84,7 +86,6 @@ namespace Content.Server.Kitchen.Components } private Container _storage = default!; - private const string SolutionName = "microwave"; [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(MicrowaveUiKey.Key); @@ -94,8 +95,6 @@ namespace Content.Server.Kitchen.Components _currentCookTimerTime = _cookTimeDefault; - EntitySystem.Get().EnsureSolution(Owner, SolutionName); - _storage = ContainerHelpers.EnsureContainer(Owner, "microwave_entity_container", out _); @@ -120,7 +119,6 @@ namespace Content.Server.Kitchen.Components case MicrowaveEjectMessage: if (HasContents) { - VaporizeReagents(); EjectSolids(); ClickSound(); _uiDirty = true; @@ -134,17 +132,8 @@ namespace Content.Server.Kitchen.Components ClickSound(); _uiDirty = true; } - break; - case MicrowaveVaporizeReagentIndexedMessage msg: - if (HasContents) - { - VaporizeReagentQuantity(msg.ReagentQuantity); - ClickSound(); - _uiDirty = true; - } - break; case MicrowaveSelectCookTimeMessage msg: _currentCookTimeButtonIndex = msg.ButtonIndex; _currentCookTimerTime = msg.NewCookTime; @@ -166,7 +155,6 @@ namespace Content.Server.Kitchen.Components { //we lost power while we were cooking/busy! _lostPower = true; - VaporizeReagents(); EjectSolids(); _busy = false; _uiDirty = true; @@ -177,18 +165,15 @@ namespace Content.Server.Kitchen.Components SetAppearance(MicrowaveVisualState.Broken); //we broke while we were cooking/busy! _lostPower = true; - VaporizeReagents(); EjectSolids(); _busy = false; _uiDirty = true; } - if (_uiDirty && EntitySystem.Get() - .TryGetSolution(Owner, SolutionName, out var solution)) + if (_uiDirty) { UserInterface?.SetState(new MicrowaveUpdateUserInterfaceState ( - solution.Contents.ToArray(), _storage.ContainedEntities.Select(item => item).ToArray(), _busy, _currentCookTimeButtonIndex, @@ -249,41 +234,6 @@ namespace Content.Server.Kitchen.Components return false; } - if (_entities.TryGetComponent(itemEntity, out var attackPourable)) - { - var solutionsSystem = EntitySystem.Get(); - if (!solutionsSystem.TryGetDrainableSolution(itemEntity, out var attackSolution)) - { - return false; - } - - if (!solutionsSystem.TryGetSolution(Owner, SolutionName, out var solution)) - { - return false; - } - - //Get transfer amount. May be smaller than _transferAmount if not enough room - var realTransferAmount = FixedPoint2.Min(attackPourable.TransferAmount, solution.AvailableVolume); - if (realTransferAmount <= 0) //Special message if container is full - { - Owner.PopupMessage(eventArgs.User, - Loc.GetString("microwave-component-interact-using-container-full")); - return false; - } - - //Move units from attackSolution to targetSolution - var removedSolution = EntitySystem.Get() - .Drain(itemEntity, attackSolution, realTransferAmount); - if (!EntitySystem.Get().TryAddSolution(Owner, solution, removedSolution)) - { - return false; - } - - Owner.PopupMessage(eventArgs.User, Loc.GetString("microwave-component-interact-using-transfer-success", - ("amount", removedSolution.TotalVolume))); - return true; - } - if (!_entities.TryGetComponent(itemEntity, typeof(SharedItemComponent), out var food)) { Owner.PopupMessage(eventArgs.User, "microwave-component-interact-using-transfer-fail"); @@ -308,8 +258,36 @@ namespace Content.Server.Kitchen.Components _busy = true; // Convert storage into Dictionary of ingredients var solidsDict = new Dictionary(); + var reagentDict = new Dictionary(); foreach (var item in _storage.ContainedEntities) { + // special behavior when being microwaved ;) + var ev = new BeingMicrowavedEvent(Owner); + _entities.EventBus.RaiseLocalEvent(item, ev, false); + + if (ev.Handled) + return; + + var tagSys = EntitySystem.Get(); + + if (tagSys.HasTag(item, "MicrowaveMachineUnsafe") + || tagSys.HasTag(item, "Metal")) + { + // destroy microwave + _broken = true; + SetAppearance(MicrowaveVisualState.Broken); + SoundSystem.Play(Filter.Pvs(Owner), ItemBreakSound.GetSound(), Owner); + return; + } + + if (tagSys.HasTag(item, "MicrowaveSelfUnsafe") + || tagSys.HasTag(item, "Plastic")) + { + _entities.SpawnEntity(_badRecipeName, + _entities.GetComponent(Owner).Coordinates); + _entities.QueueDeleteEntity(item); + } + var metaData = _entities.GetComponent(item); if (metaData.EntityPrototype == null) { @@ -324,29 +302,32 @@ namespace Content.Server.Kitchen.Components { solidsDict.Add(metaData.EntityPrototype.ID, 1); } - } - var failState = MicrowaveSuccessState.RecipeFail; - foreach (var id in solidsDict.Keys) - { - if (_recipeManager.SolidAppears(id)) - { + if (!_entities.TryGetComponent(item, out var solMan)) continue; - } - failState = MicrowaveSuccessState.UnwantedForeignObject; - break; + foreach (var (_, solution) in solMan.Solutions) + { + foreach (var reagent in solution.Contents) + { + if (reagentDict.ContainsKey(reagent.ReagentId)) + reagentDict[reagent.ReagentId] += reagent.Quantity; + else + reagentDict.Add(reagent.ReagentId, reagent.Quantity); + } + } } // Check recipes FoodRecipePrototype? recipeToCook = null; foreach (var r in _recipeManager.Recipes.Where(r => - CanSatisfyRecipe(r, solidsDict) == MicrowaveSuccessState.RecipePass)) + CanSatisfyRecipe(r, solidsDict, reagentDict))) { recipeToCook = r; } SetAppearance(MicrowaveVisualState.Cooking); + var time = _currentCookTimerTime * _cookTimeMultiplier; SoundSystem.Play(Filter.Pvs(Owner), _startCookingSound.GetSound(), Owner, AudioParams.Default); Owner.SpawnTimer((int) (_currentCookTimerTime * _cookTimeMultiplier), () => { @@ -355,26 +336,17 @@ namespace Content.Server.Kitchen.Components return; } - if (failState == MicrowaveSuccessState.UnwantedForeignObject) + AddTemperature(time); + + if (recipeToCook != null) { - VaporizeReagents(); - EjectSolids(); - } - else - { - if (recipeToCook != null) - { - SubtractContents(recipeToCook); - _entities.SpawnEntity(recipeToCook.Result, _entities.GetComponent(Owner).Coordinates); - } - else - { - VaporizeReagents(); - VaporizeSolids(); - _entities.SpawnEntity(_badRecipeName, _entities.GetComponent(Owner).Coordinates); - } + SubtractContents(recipeToCook); + _entities.SpawnEntity(recipeToCook.Result, + _entities.GetComponent(Owner).Coordinates); } + EjectSolids(); + SoundSystem.Play(Filter.Pvs(Owner), _cookingCompleteSound.GetSound(), Owner, AudioParams.Default.WithVolume(-1f)); @@ -387,30 +359,31 @@ namespace Content.Server.Kitchen.Components _uiDirty = true; } - private void VaporizeReagents() + /// + /// Adds temperature to every item in the microwave, + /// based on the time it took to microwave. + /// + /// The time on the microwave, in seconds. + public void AddTemperature(float time) { - if (EntitySystem.Get().TryGetSolution(Owner, SolutionName, out var solution)) + var solutionContainerSystem = EntitySystem.Get(); + foreach (var entity in _storage.ContainedEntities) { - EntitySystem.Get().RemoveAllSolution(Owner, solution); - } - } + if (_entities.TryGetComponent(entity, out TemperatureComponent? temp)) + { + EntitySystem.Get().ChangeHeat(entity, time / 10, false, temp); + } - private void VaporizeReagentQuantity(Solution.ReagentQuantity reagentQuantity) - { - if (EntitySystem.Get().TryGetSolution(Owner, SolutionName, out var solution)) - { - EntitySystem.Get() - .TryRemoveReagent(Owner, solution, reagentQuantity.ReagentId, reagentQuantity.Quantity); - } - } + if (_entities.TryGetComponent(entity, out SolutionContainerManagerComponent? solutions)) + { + foreach (var (_, solution) in solutions.Solutions) + { + if (solution.Temperature > TemperatureUpperThreshold) + continue; - private void VaporizeSolids() - { - for (var i = _storage.ContainedEntities.Count - 1; i >= 0; i--) - { - var item = _storage.ContainedEntities.ElementAt(i); - _storage.Remove(item); - _entities.DeleteEntity(item); + solutionContainerSystem.AddThermalEnergy(entity, solution, time / 10); + } + } } } @@ -432,16 +405,42 @@ namespace Content.Server.Kitchen.Components private void SubtractContents(FoodRecipePrototype recipe) { - var solutionUid = Owner; - if (!EntitySystem.Get().TryGetSolution(Owner, SolutionName, out var solution)) - { - return; - } + var totalReagentsToRemove = new Dictionary(recipe.IngredientsReagents); + var solutionContainerSystem = EntitySystem.Get(); - foreach (var recipeReagent in recipe.IngredientsReagents) + // this is spaghetti ngl + foreach (var item in _storage.ContainedEntities) { - EntitySystem.Get() - .TryRemoveReagent(solutionUid, solution, recipeReagent.Key, FixedPoint2.New(recipeReagent.Value)); + if (!_entities.TryGetComponent(item, out var solMan)) + continue; + + // go over every solution + foreach (var (_, solution) in solMan.Solutions) + { + foreach (var (reagent, _) in recipe.IngredientsReagents) + { + // removed everything + if (!totalReagentsToRemove.ContainsKey(reagent)) + continue; + + if (!solution.ContainsReagent(reagent)) + continue; + + var quant = solution.GetReagentQuantity(reagent); + + if (quant >= totalReagentsToRemove[reagent]) + { + quant = totalReagentsToRemove[reagent]; + totalReagentsToRemove.Remove(reagent); + } + else + { + totalReagentsToRemove[reagent] -= quant; + } + + solutionContainerSystem.TryRemoveReagent(item, solution, reagent, quant); + } + } } foreach (var recipeSolid in recipe.IngredientsSolids) @@ -467,45 +466,32 @@ namespace Content.Server.Kitchen.Components } } - private MicrowaveSuccessState CanSatisfyRecipe(FoodRecipePrototype recipe, Dictionary solids) + private bool CanSatisfyRecipe(FoodRecipePrototype recipe, Dictionary solids, Dictionary reagents) { if (_currentCookTimerTime != recipe.CookTime) { - return MicrowaveSuccessState.RecipeFail; - } - - if (!EntitySystem.Get().TryGetSolution(Owner, SolutionName, out var solution)) - { - return MicrowaveSuccessState.RecipeFail; - } - - foreach (var reagent in recipe.IngredientsReagents) - { - if (!solution.ContainsReagent(reagent.Key, out var amount)) - { - return MicrowaveSuccessState.RecipeFail; - } - - if (amount.Int() < reagent.Value) - { - return MicrowaveSuccessState.RecipeFail; - } + return false; } foreach (var solid in recipe.IngredientsSolids) { if (!solids.ContainsKey(solid.Key)) - { - return MicrowaveSuccessState.RecipeFail; - } + return false; if (solids[solid.Key] < solid.Value) - { - return MicrowaveSuccessState.RecipeFail; - } + return false; } - return MicrowaveSuccessState.RecipePass; + foreach (var reagent in recipe.IngredientsReagents) + { + if (!reagents.ContainsKey(reagent.Key)) + return false; + + if (reagents[reagent.Key] < reagent.Value) + return false; + } + + return true; } private void ClickSound() @@ -563,4 +549,14 @@ namespace Content.Server.Kitchen.Components return SuicideKind.Heat; } } + + public class BeingMicrowavedEvent : HandledEntityEventArgs + { + public EntityUid Microwave; + + public BeingMicrowavedEvent(EntityUid microwave) + { + Microwave = microwave; + } + } } diff --git a/Content.Server/Kitchen/Components/MicrowaveSuccessState.cs b/Content.Server/Kitchen/Components/MicrowaveSuccessState.cs deleted file mode 100644 index 011b2215af..0000000000 --- a/Content.Server/Kitchen/Components/MicrowaveSuccessState.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Content.Server.Kitchen.Components -{ - public enum MicrowaveSuccessState - { - RecipePass, - RecipeFail, - UnwantedForeignObject - - } -} diff --git a/Content.Server/PowerCell/PowerCellSystem.cs b/Content.Server/PowerCell/PowerCellSystem.cs index ecfcb2070b..fc16785d70 100644 --- a/Content.Server/PowerCell/PowerCellSystem.cs +++ b/Content.Server/PowerCell/PowerCellSystem.cs @@ -13,6 +13,7 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using System; using System.Diagnostics.CodeAnalysis; +using Content.Server.Kitchen.Components; namespace Content.Server.PowerCell; @@ -31,6 +32,26 @@ public class PowerCellSystem : SharedPowerCellSystem SubscribeLocalEvent(OnSolutionChange); SubscribeLocalEvent(OnCellExamined); + + // funny + SubscribeLocalEvent(OnSlotMicrowaved); + SubscribeLocalEvent(OnMicrowaved); + } + + private void OnSlotMicrowaved(EntityUid uid, PowerCellSlotComponent component, BeingMicrowavedEvent args) + { + if (component.CellSlot.Item == null) + return; + + RaiseLocalEvent(component.CellSlot.Item.Value, args, false); + } + + private void OnMicrowaved(EntityUid uid, BatteryComponent component, BeingMicrowavedEvent args) + { + args.Handled = true; + + // What the fuck are you doing??? + Explode(uid, component); } private void OnChargeChanged(EntityUid uid, PowerCellComponent component, ChargeChangedEvent args) diff --git a/Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs b/Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs index 483be06f10..44188697d0 100644 --- a/Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs +++ b/Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs @@ -63,16 +63,14 @@ namespace Content.Shared.Kitchen.Components [NetSerializable, Serializable] public class MicrowaveUpdateUserInterfaceState : BoundUserInterfaceState { - public Solution.ReagentQuantity[] ReagentQuantities; public EntityUid[] ContainedSolids; public bool IsMicrowaveBusy; public int ActiveButtonIndex; public uint CurrentCookTime; - public MicrowaveUpdateUserInterfaceState(Solution.ReagentQuantity[] reagents, EntityUid[] containedSolids, + public MicrowaveUpdateUserInterfaceState(EntityUid[] containedSolids, bool isMicrowaveBusy, int activeButtonIndex, uint currentCookTime) { - ReagentQuantities = reagents; ContainedSolids = containedSolids; IsMicrowaveBusy = isMicrowaveBusy; ActiveButtonIndex = activeButtonIndex; diff --git a/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs b/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs index 051e6c698b..71ca6cfb53 100644 --- a/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs +++ b/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Content.Shared.Chemistry.Reagent; +using Content.Shared.FixedPoint; using Robust.Shared.Localization; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; @@ -22,11 +23,11 @@ namespace Content.Shared.Kitchen [DataField("name")] private string _name = string.Empty; - [DataField("reagents", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] - private readonly Dictionary _ingsReagents = new(); + [DataField("reagents", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] + private readonly Dictionary _ingsReagents = new(); - [DataField("solids", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))] - private readonly Dictionary _ingsSolids = new (); + [DataField("solids", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))] + private readonly Dictionary _ingsSolids = new (); [DataField("result", customTypeSerializer: typeof(PrototypeIdSerializer))] public string Result { get; } = string.Empty; @@ -36,7 +37,7 @@ namespace Content.Shared.Kitchen public string Name => Loc.GetString(_name); - public IReadOnlyDictionary IngredientsReagents => _ingsReagents; - public IReadOnlyDictionary IngredientsSolids => _ingsSolids; + public IReadOnlyDictionary IngredientsReagents => _ingsReagents; + public IReadOnlyDictionary IngredientsSolids => _ingsSolids; } } diff --git a/Resources/Locale/en-US/access/components/id-card-component.ftl b/Resources/Locale/en-US/access/components/id-card-component.ftl index ce1981b30d..13e3e40252 100644 --- a/Resources/Locale/en-US/access/components/id-card-component.ftl +++ b/Resources/Locale/en-US/access/components/id-card-component.ftl @@ -3,3 +3,5 @@ access-id-card-component-owner-name-job-title-text = {$originalOwnerName}{$jobSuffix} access-id-card-component-owner-full-name-job-title-text = {$fullName}'s ID card{$jobSuffix} +id-card-component-microwave-bricked = {$id}'s circuits sizzle! +id-card-component-microwave-safe = {$id}'s circuits make a weird noise. diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml index b4aed666b1..b1258ac2ff 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml @@ -13,6 +13,7 @@ - type: Tag tags: - Sheet + - Metal - type: entity parent: SheetMetalBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml index 83f137ed4f..e51ab62374 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml @@ -121,6 +121,9 @@ name: plastic suffix: Full components: + - type: Tag + tags: + - Plastic - type: Material materials: - Plastic diff --git a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml index 904d4f849f..20d97242f0 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml @@ -20,6 +20,7 @@ - type: Tag tags: - Hoe + - Metal - type: Sprite state: fork - type: Utensil @@ -40,6 +41,8 @@ types: - Fork breakChance: 0.20 + - type: Tag + tags: [ Plastic ] - type: entity parent: UtensilBase @@ -47,6 +50,9 @@ name: spoon description: There is no spoon. components: + - type: Tag + tags: + - Metal - type: Sprite state: spoon - type: Item @@ -61,6 +67,9 @@ name: plastic spoon description: There is no spoon. components: + - type: Tag + tags: + - Plastic - type: Sprite state: plastic_spoon - type: Item @@ -77,6 +86,9 @@ name: plastic knife description: That's not a knife. This is a knife. components: + - type: Tag + tags: + - Plastic - type: Sprite state: plastic_knife - type: Item diff --git a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml index c3348b20d5..9b1aa8196c 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml @@ -26,10 +26,9 @@ bounds: "-0.3,-0.16,0.3,0.16" mass: 25 layer: - - MobMask - - Opaque + - SmallImpassable mask: - - MobMask + - VaultImpassable - type: Sprite netsync: false sprite: Structures/Machines/microwave.rsi diff --git a/Resources/Prototypes/Recipes/Reactions/drinks.yml b/Resources/Prototypes/Recipes/Reactions/drinks.yml index fee7e89744..9f2e82d685 100644 --- a/Resources/Prototypes/Recipes/Reactions/drinks.yml +++ b/Resources/Prototypes/Recipes/Reactions/drinks.yml @@ -554,6 +554,7 @@ - type: reaction id: HotRamen + minTemp: 323.15 reactants: DryRamen: amount: 3 @@ -570,4 +571,4 @@ Milk: amount: 1 products: - Pilk: 2 \ No newline at end of file + Pilk: 2 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 8bdfad2188..8a43625186 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -189,6 +189,15 @@ - type: Tag id: Matchstick +- type: Tag + id: Metal + +- type: Tag + id: MicrowaveMachineUnsafe + +- type: Tag + id: MicrowaveSelfUnsafe + - type: Tag id: MonkeyCube @@ -207,6 +216,9 @@ - type: Tag id: PercussionInstrument +- type: Tag + id: Plastic + - type: Tag id: Pill