mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 08:07:28 +00:00
* Initial port of goobstation factorio, missing disposals integration and faxing. Also ports impstations modification for robotic arms to have static power draw. Also adds automation slots to silos and advanced microwave. * Ports goobstation factorio fax automation, adds to the guidebook entry info about gas canisters. * Ported Goob Disposals. Removed part about taking mats out of storage silo cuz it ain't implemented yet. Seems to work. * Adds constructor circuitboard to research cuz I forgor
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
|
|
// SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
using Content.Client.Guidebook.Controls;
|
|
using Content.Client.Guidebook.Richtext;
|
|
using Content.Shared._Goobstation.Factory;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Content.Client._Goobstation.Guidebook.Controls;
|
|
|
|
/// <summary>
|
|
/// Lists all entities with <see cref="AutomationSlotsComponent"/>.
|
|
/// </summary>
|
|
public sealed partial class GuideAutomationSlotsEmbed : IDocumentTag
|
|
{
|
|
[Dependency] private readonly IEntityManager _entMan = default!;
|
|
private readonly AutomationSystem _automation;
|
|
|
|
public GuideAutomationSlotsEmbed()
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
_automation = _entMan.System<AutomationSystem>();
|
|
}
|
|
|
|
bool IDocumentTag.TryParseTag(Dictionary<string, string> args, [NotNullWhen(true)] out Control? control)
|
|
{
|
|
var scroll = new ScrollContainer()
|
|
{
|
|
MinHeight = 200f,
|
|
MaxHeight = 400f
|
|
};
|
|
var box = new BoxContainer()
|
|
{
|
|
Orientation = BoxContainer.LayoutOrientation.Vertical,
|
|
HorizontalExpand = true,
|
|
VerticalExpand = true
|
|
};
|
|
foreach (var id in _automation.Automatable)
|
|
{
|
|
box.AddChild(new GuideEntityEmbed(id, false, true));
|
|
}
|
|
scroll.AddChild(box);
|
|
|
|
control = scroll;
|
|
return true;
|
|
}
|
|
}
|