mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Remove discard functionality from the ChemMaster This duplicates other methods of discarding chemicals, including the drain conventionally given to chemistry labs. Any problems it solves are miniscule compared to the severe UI error that is having a destructive action without confirmation attached to a mode, the most common source of user error. * Improve animal cube interactions (#31668) * Working on dehydrate recipes to renew animal cubes * Added remaining cube dehydration recipes * Add OnExamine to RehydratableSystem.cs, need to add functionality to check total volume vs current volume to determine if 'soaked' text needs to be displayed * Added logic to append text to the description when the wrong reagent has been added to a compressed animal cube * Re-adding deleted summary * Update default SolutionName to be correct * Remove cube recipes to prevent infinite nutrient generation * Add OnMicrowaved event to RehydratableSystem.cs in order to clear solution of cube when microwaved. CURRENT ERROR REQUIRES REFACTOR OF MICROWAVECOMPONENT * Subscribe to microwave event * Refactor of MicrowaveComponent.cs to be in shared folder, accessible to RehydratableSystem.cs. Updated imports * Modify cube to only dehydrate in microwave when cooked for at least 5 seconds * now using event to check access to fingerprint * Tweak - Reflective vest and Energy Katana should reflect only in correct slots (#31902) * ReflectComponentLogicFix Added bool InRightPlace and updated relevant system * Using SlotFlags * prevent friendly fire for dragon/carp (#32231) * add NoFriendlyFire * make zombies use NoFriendlyFire * no friendly fire for dragon * let dragon kill naughty fish and validhunting syndies * add button to print logprobe logs (#32255) * add EntityName at the bottom of LogProbe * add button to print logprobe logs * Add camera mod to diagnostic hud (#32254) * ai-glass * weh to protect against bad grammar * transmutation into diagnostic hud * Apply forensics when loading with an ammo box * inaprovaline metabolizes slower * :trollface: --------- Co-authored-by: Janet Blackquill <uhhadd@gmail.com> Co-authored-by: Preston Smith <Blackfoot03@outlook.com> Co-authored-by: YourUsername <you@example.com> Co-authored-by: BIGZi0348 <svalker0348@gmail.com> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: ArZarLordOfMango <arzarchannel@gmail.com> Co-authored-by: themias <themias5@gmail.com> Co-authored-by: Alzore <blackern5000@gmail.com>
129 lines
4.6 KiB
C#
129 lines
4.6 KiB
C#
using Content.Shared.Construction.Prototypes;
|
|
using Content.Shared.DeviceLinking;
|
|
using Content.Shared.Item;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Containers;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Shared.Kitchen.Components
|
|
{
|
|
[RegisterComponent]
|
|
public sealed partial class MicrowaveComponent : Component
|
|
{
|
|
[DataField("cookTimeMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float CookTimeMultiplier = 1;
|
|
|
|
[DataField("baseHeatMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseHeatMultiplier = 100;
|
|
|
|
[DataField("objectHeatMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float ObjectHeatMultiplier = 100;
|
|
|
|
[DataField("failureResult", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string BadRecipeEntityId = "FoodBadRecipe";
|
|
|
|
#region audio
|
|
[DataField("beginCookingSound")]
|
|
public SoundSpecifier StartCookingSound = new SoundPathSpecifier("/Audio/Machines/microwave_start_beep.ogg");
|
|
|
|
[DataField("foodDoneSound")]
|
|
public SoundSpecifier FoodDoneSound = new SoundPathSpecifier("/Audio/Machines/microwave_done_beep.ogg");
|
|
|
|
[DataField("clickSound")]
|
|
public SoundSpecifier ClickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
|
|
|
|
[DataField("ItemBreakSound")]
|
|
public SoundSpecifier ItemBreakSound = new SoundPathSpecifier("/Audio/Effects/clang.ogg");
|
|
|
|
public EntityUid? PlayingStream;
|
|
|
|
[DataField("loopingSound")]
|
|
public SoundSpecifier LoopingSound = new SoundPathSpecifier("/Audio/Machines/microwave_loop.ogg");
|
|
#endregion
|
|
|
|
[ViewVariables]
|
|
public bool Broken;
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public ProtoId<SinkPortPrototype> OnPort = "On";
|
|
|
|
/// <summary>
|
|
/// This is a fixed offset of 5.
|
|
/// The cook times for all recipes should be divisible by 5,with a minimum of 1 second.
|
|
/// For right now, I don't think any recipe cook time should be greater than 60 seconds.
|
|
/// </summary>
|
|
[DataField("currentCookTimerTime"), ViewVariables(VVAccess.ReadWrite)]
|
|
public uint CurrentCookTimerTime = 0;
|
|
|
|
/// <summary>
|
|
/// Tracks the elapsed time of the current cook timer.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public TimeSpan CurrentCookTimeEnd = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// The maximum number of seconds a microwave can be set to.
|
|
/// This is currently only used for validation and the client does not check this.
|
|
/// </summary>
|
|
[DataField("maxCookTime"), ViewVariables(VVAccess.ReadWrite)]
|
|
public uint MaxCookTime = 30;
|
|
|
|
/// <summary>
|
|
/// The max temperature that this microwave can heat objects to.
|
|
/// </summary>
|
|
[DataField("temperatureUpperThreshold")]
|
|
public float TemperatureUpperThreshold = 373.15f;
|
|
|
|
public int CurrentCookTimeButtonIndex;
|
|
|
|
public Container Storage = default!;
|
|
|
|
[DataField]
|
|
public string ContainerId = "microwave_entity_container";
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public int Capacity = 10;
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public ProtoId<ItemSizePrototype> MaxItemSize = "Normal";
|
|
|
|
/// <summary>
|
|
/// How frequently the microwave can malfunction.
|
|
/// </summary>
|
|
[DataField]
|
|
public float MalfunctionInterval = 1.0f;
|
|
|
|
/// <summary>
|
|
/// Chance of an explosion occurring when we microwave a metallic object
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float ExplosionChance = .1f;
|
|
|
|
/// <summary>
|
|
/// Chance of lightning occurring when we microwave a metallic object
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float LightningChance = .75f;
|
|
|
|
/// <summary>
|
|
/// If this microwave can give ids accesses without exploding
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public bool CanMicrowaveIdsSafely = true;
|
|
}
|
|
|
|
public sealed class BeingMicrowavedEvent : HandledEntityEventArgs
|
|
{
|
|
public EntityUid Microwave;
|
|
public EntityUid? User;
|
|
public uint Time;
|
|
|
|
public BeingMicrowavedEvent(EntityUid microwave, EntityUid? user, uint time)
|
|
{
|
|
Microwave = microwave;
|
|
User = user;
|
|
Time = time;
|
|
}
|
|
}
|
|
}
|