Copy machine fix (#2806)

This commit is contained in:
Vigers Ray 2025-08-16 06:20:10 +03:00 committed by GitHub
parent 7747e064b1
commit d1ef2f7fc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
178 changed files with 2472 additions and 2494 deletions

View file

@ -12,6 +12,8 @@
<PanelContainer Name="PaperContent" VerticalExpand="True" HorizontalExpand="True" MaxWidth="600">
<BoxContainer Orientation="Vertical" VerticalAlignment="Stretch">
<TextureButton Name="HeaderImage" HorizontalAlignment="Center" VerticalAlignment="Top" MouseFilter="Ignore"/>
<TextureRect Name="ImageContent" HorizontalAlignment="Stretch" VerticalAlignment="Top"
HorizontalExpand="True" VerticalExpand="True" Stretch="KeepAspectCentered" MouseFilter="Ignore"/>
<Control Name="TextAlignmentPadding" VerticalAlignment="Top"/>
<RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelSecondaryColor" VerticalAlignment="Top" HorizontalAlignment="Center"/>
<RichTextLabel StyleClasses="PaperWrittenText" Name="WrittenTextLabel" VerticalAlignment="Top"/>

View file

@ -11,6 +11,7 @@ using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;
using Robust.Client.UserInterface.RichText;
using Content.Client.UserInterface.RichText;
using Robust.Client.GameObjects;
using Robust.Shared.Input;
namespace Content.Client.Paper.UI
@ -20,6 +21,7 @@ namespace Content.Client.Paper.UI
{
[Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly IResourceCache _resCache = default!;
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
private static Color DefaultTextColor = new(25, 25, 25);
@ -47,8 +49,7 @@ namespace Content.Client.Paper.UI
typeof(HeadingTag),
typeof(ItalicTag),
typeof(MonoTag),
typeof(CenterTag),
typeof(TextureTag) // Не дай бог игроки узнают что можно использовать данный ТЭГ для рофлов.
typeof(CenterTag)
};
public event Action<string>? OnSaved;
@ -288,6 +289,17 @@ namespace Content.Client.Paper.UI
WrittenTextLabel.Visible = !isEditing && state.Text.Length > 0;
BlankPaperIndicator.Visible = !isEditing && state.Text.Length == 0;
// Sunrise-Start
var sprite = _entitySystemManager.GetEntitySystem<SpriteSystem>();
if (state.ImageContent != null)
{
ImageContent.Texture = sprite.Frame0(state.ImageContent);
if (state.ImageScale != null)
ImageContent.TextureScale = state.ImageScale.Value;
BlankPaperIndicator.Visible = false;
}
// Sunrise-End
StampDisplay.RemoveAllChildren();
StampDisplay.RemoveStamps();
foreach(var stamper in state.StampedBy)

View file

@ -0,0 +1,38 @@
using Content.Shared._Sunrise.CopyMachine;
using Robust.Client.UserInterface;
namespace Content.Client._Sunrise.CopyMachine;
public sealed class CopyMachineBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private CopyMachineMenu? _window;
public CopyMachineBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { }
protected override void Open()
{
base.Open();
_window = this.CreateWindow<CopyMachineMenu>();
_window.OnPrintPressed += templateId =>
{
if (templateId != null)
SendMessage(new CopyMachinePrintMessage(templateId));
};
_window.OnCopyPressed += () =>
{
SendMessage(new CopyMachineCopyMessage());
};
}
protected override void UpdateState(BoundUserInterfaceState state)
{
if (state is not CopyMachineBoundUserInterfaceState s || _window == null)
return;
_window.UpdateState(s);
}
}

View file

@ -1,7 +1,7 @@
<DefaultWindow
xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
Title="{Loc 'printerdoc-menu-title'}"
Title="{Loc 'copy-machine-menu-title'}"
MinSize="500 350"
SetSize="750 400">
@ -11,13 +11,13 @@
<BoxContainer Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True" SeparationOverride="5">
<!-- Поиск -->
<LineEdit Name="SearchBar" PlaceHolder="{Loc 'printerdoc-menu-search-placeholder'}" HorizontalExpand="True"/>
<LineEdit Name="SearchBar" PlaceHolder="{Loc 'copy-machine-menu-search-placeholder'}" HorizontalExpand="True"/>
<!-- Фильтр -->
<OptionButton Name="FilterDropdown" HorizontalExpand="True" MinHeight="30" Prefix=""/>
<!-- Заголовок списка -->
<Label Text="{Loc 'printerdoc-menu-templates'}" Margin="0 5 0 0" HorizontalAlignment="Center"/>
<Label Text="{Loc 'copy-machine-menu-templates'}" Margin="0 5 0 0" HorizontalAlignment="Center"/>
<!-- Список шаблонов -->
<PanelContainer VerticalExpand="True">
@ -38,30 +38,30 @@
<!-- Статистика -->
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc 'printerdoc-menu-paper'}"/>
<Label Text="{Loc 'copy-machine-menu-paper'}"/>
<Label Name="PaperCountLabel" Margin="5 0 10 0"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc 'printerdoc-menu-ink'}"/>
<Label Text="{Loc 'copy-machine-menu-ink'}"/>
<Label Name="InkAmountLabel" Margin="5 0 0 0"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc 'printerdoc-menu-copy-status'}"/>
<Label Text="{Loc 'copy-machine-menu-copy-status'}"/>
<Label Name="CopyStatusLabel" Margin="5 0 0 0"/>
</BoxContainer>
<!-- Кнопки -->
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="0 10 0 0">
<Button Name="PrintButton" Text="{Loc 'printerdoc-menu-print'}" HorizontalExpand="True"/>
<Button Name="CopyButton" Text="{Loc 'printerdoc-menu-copy'}" HorizontalExpand="True"/>
<Button Name="PrintButton" Text="{Loc 'copy-machine-menu-print'}" HorizontalExpand="True"/>
<Button Name="CopyButton" Text="{Loc 'copy-machine-menu-copy'}" HorizontalExpand="True"/>
</BoxContainer>
<!-- Текущая задача -->
<Label Text="{Loc 'printerdoc-menu-current-job'}" Margin="0 10 0 0"/>
<Label Text="{Loc 'copy-machine-menu-current-job'}" Margin="0 10 0 0"/>
<Label Name="CurrentJobLabel" Text="..." HorizontalExpand="True"/>
<!-- Очередь -->
<Label Text="{Loc 'printerdoc-menu-queue'}" Margin="10 5 0 0"/>
<Label Text="{Loc 'copy-machine-menu-queue'}" Margin="10 5 0 0"/>
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />

View file

@ -1,17 +1,15 @@
using Content.Shared._Sunrise.PrinterDoc;
using Content.Shared._Sunrise.CopyMachine;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;
using System.Linq;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Maths;
using System.Numerics;
namespace Content.Client._Sunrise.PrinterDoc;
namespace Content.Client._Sunrise.CopyMachine;
[GenerateTypedNameReferences]
public sealed partial class PrinterDocMenu : DefaultWindow
public sealed partial class CopyMachineMenu : DefaultWindow
{
[Dependency] private readonly IPrototypeManager _protoManager = default!;
@ -25,7 +23,7 @@ public sealed partial class PrinterDocMenu : DefaultWindow
private List<string> _allTemplates = new();
private string? _activeComponentFilter = null;
public PrinterDocMenu()
public CopyMachineMenu()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
@ -69,7 +67,7 @@ public sealed partial class PrinterDocMenu : DefaultWindow
PrintButton.Disabled = true;
}
public void UpdateState(PrinterDocBoundUserInterfaceState state)
public void UpdateState(CopyMachineBoundUserInterfaceState state)
{
_canCopy = state.CanCopy;
_incVolume = state.InkAmount;
@ -79,13 +77,13 @@ public sealed partial class PrinterDocMenu : DefaultWindow
InkAmountLabel.Text = _incVolume.ToString("F1");
CopyStatusLabel.Text = _canCopy
? Loc.GetString("printerdoc-menu-copy-available")
: Loc.GetString("printerdoc-menu-copy-unavailable");
? Loc.GetString("copy-machine-menu-copy-available")
: Loc.GetString("copy-machine-menu-copy-unavailable");
PrintButton.Disabled = _currentTemplate == null || _incVolume <= 0.0f;
CopyButton.Disabled = !_canCopy;
CurrentJobLabel.Text = state.CurrentJob?.ToString() ?? Loc.GetString("printerdoc-menu-no-active-job");
CurrentJobLabel.Text = state.CurrentJob?.ToString() ?? Loc.GetString("copy-machine-menu-no-active-job");
QueueList.Clear();
foreach (var job in state.Queue)
@ -116,13 +114,13 @@ public sealed partial class PrinterDocMenu : DefaultWindow
.ToList();
// Добавляем "Все"
FilterDropdown.AddItem(Loc.GetString("printerdoc-filter-all"), 0);
FilterDropdown.AddItem(Loc.GetString("copy-machine-filter-all"), 0);
FilterDropdown.SetItemMetadata(0, string.Empty);
for (var i = 0; i < usedComponents.Count; i++)
{
var component = usedComponents[i];
var localized = Loc.GetString($"printerdoc-component-{component}");
var localized = Loc.GetString($"copy-machine-component-{component}");
var id = i + 1;
FilterDropdown.AddItem(localized, id);
FilterDropdown.SetItemMetadata(id, component);

View file

@ -0,0 +1,8 @@
using Content.Shared._Sunrise.CopyMachine;
namespace Content.Client._Sunrise.CopyMachine;
public sealed class CopyMachineSystem : SharedCopyMachineSystem
{
}

View file

@ -1,38 +0,0 @@
using Content.Shared._Sunrise.PrinterDoc;
using Robust.Client.UserInterface;
namespace Content.Client._Sunrise.PrinterDoc;
public sealed class PrinterDocBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private PrinterDocMenu? _window;
public PrinterDocBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { }
protected override void Open()
{
base.Open();
_window = this.CreateWindow<PrinterDocMenu>();
_window.OnPrintPressed += templateId =>
{
if (templateId != null)
SendMessage(new PrinterDocPrintMessage(templateId));
};
_window.OnCopyPressed += () =>
{
SendMessage(new PrinterDocCopyMessage());
};
}
protected override void UpdateState(BoundUserInterfaceState state)
{
if (state is not PrinterDocBoundUserInterfaceState s || _window == null)
return;
_window.UpdateState(s);
}
}

View file

@ -1,8 +0,0 @@
using Content.Shared._Sunrise.PrinterDoc;
namespace Content.Client._Sunrise.PrinterDoc;
public sealed class PrinterDocSystem : SharedPrinterDocSystem
{
}

View file

@ -30,4 +30,6 @@ public static class FaxConstants
public const string FaxPaperStampedByData = "fax_data_stamped_by";
public const string FaxSyndicateData = "fax_data_i_am_syndicate";
public const string FaxPaperLockedData = "fax_data_locked";
public const string FaxPaperImageData = "fax_data_image";
public const string FaxPaperImageScaleData = "fax_data_imgage_scale";
}

View file

@ -32,10 +32,13 @@ using Robust.Shared.Player;
using Robust.Shared.Prototypes;
// sunrise-start
using System.Linq;
using System.Numerics;
using Content.Shared.Ghost;
using Content.Shared.Inventory;
using Robust.Server.Containers;
using Content.Server.Storage.EntitySystems;
using Robust.Shared.Utility;
// sunrise-end
namespace Content.Server.Fax;
@ -313,8 +316,10 @@ public sealed class FaxSystem : EntitySystem
args.Data.TryGetValue(FaxConstants.FaxPaperStampedByData, out List<StampDisplayInfo>? stampedBy);
args.Data.TryGetValue(FaxConstants.FaxPaperPrototypeData, out string? prototypeId);
args.Data.TryGetValue(FaxConstants.FaxPaperLockedData, out bool? locked);
args.Data.TryGetValue(FaxConstants.FaxPaperImageData, out SpriteSpecifier? imageContent);
args.Data.TryGetValue(FaxConstants.FaxPaperImageScaleData, out Vector2 scaleImage);
var printout = new FaxPrintout(content, name, label, prototypeId, stampState, stampedBy, locked ?? false);
var printout = new FaxPrintout(content, name, label, prototypeId, stampState, stampedBy, locked ?? false, imageContent, scaleImage);
Receive(uid, printout, args.SenderAddress);
break;
@ -442,7 +447,7 @@ public sealed class FaxSystem : EntitySystem
var name = Loc.GetString("fax-machine-printed-paper-name");
var printout = new FaxPrintout(args.Content, name, args.Label, prototype);
var printout = new FaxPrintout(args.Content, name, args.Label, prototype, imageContent: args.ImageContent, imageScale: args.ImageScale);
component.PrintingQueue.Enqueue(printout);
component.SendTimeoutRemaining += component.SendTimeout;
@ -487,7 +492,9 @@ public sealed class FaxSystem : EntitySystem
metadata.EntityPrototype?.ID ?? component.PrintPaperId,
paper.StampState,
paper.StampedBy,
paper.EditingDisabled);
paper.EditingDisabled,
paper.ImageContent,
paper.ImageScale);
component.PrintingQueue.Enqueue(printout);
component.SendTimeoutRemaining += component.SendTimeout;
@ -609,6 +616,10 @@ public sealed class FaxSystem : EntitySystem
if (TryComp<PaperComponent>(printed, out var paper))
{
_paperSystem.SetContent((printed, paper), printout.Content);
// Sunrise-Start
if (printout.ImageContent != null)
_paperSystem.SetImageContent((printed, paper), printout.ImageContent, printout.ImageScale);
// Sunrise-End
// Apply stamps
if (printout.StampState != null)
@ -666,6 +677,10 @@ public sealed class FaxSystem : EntitySystem
if (TryComp<PaperComponent>(printed.Value, out var paper))
{
_paperSystem.SetContent((printed.Value, paper), printout.Content);
// Sunrise-Start
if (printout.ImageContent != null)
_paperSystem.SetImageContent((printed.Value, paper), printout.ImageContent, printout.ImageScale);
// Sunrise-End
// Apply stamps
if (printout.StampState != null)

View file

@ -0,0 +1,374 @@
using System.Linq;
using System.Numerics;
using System.Text.RegularExpressions;
using Content.Server.GameTicking.Events;
using Content.Server.Materials;
using Content.Server.Station.Systems;
using Content.Shared._Sunrise.CopyMachine;
using Content.Shared._Sunrise.SunriseCCVars;
using Content.Shared.Buckle.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.Humanoid;
using Content.Shared.Materials;
using Content.Shared.Paper;
using Content.Shared.Labels.Components;
using Content.Shared.Labels.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Configuration;
using Robust.Shared.Containers;
using Robust.Shared.ContentPack;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
namespace Content.Server._Sunrise.CopyMachine;
public sealed class CopyMachineSystem : EntitySystem
{
[Dependency] private readonly SharedSolutionContainerSystem _solution = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly PaperSystem _paperSystem = default!;
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly MaterialStorageSystem _materialStorage = default!;
[Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IConfigurationManager _configManager = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly EmagSystem _emag = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly LabelSystem _labelSystem = default!;
private TimeSpan _roundStartTime;
private readonly Dictionary<string, string> _docCache = new();
private static readonly Regex DocRegex =
new("<Document>(.*?)</Document>", RegexOptions.Singleline | RegexOptions.Compiled);
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
SubscribeLocalEvent<CopyMachineComponent, BoundUIOpenedEvent>(OnUiOpened);
SubscribeLocalEvent<CopyMachineComponent, CopyMachinePrintMessage>(OnPrintMessage);
SubscribeLocalEvent<CopyMachineComponent, CopyMachineCopyMessage>(OnCopyMessage);
SubscribeLocalEvent<CopyMachineComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<CopyMachineComponent, SolutionContainerChangedEvent>(OnSolutionChanged);
SubscribeLocalEvent<CopyMachineComponent, EntInsertedIntoContainerMessage>(OnItemInserted);
SubscribeLocalEvent<CopyMachineComponent, EntRemovedFromContainerMessage>(OnItemRemoved);
SubscribeLocalEvent<CopyMachineComponent, MaterialAmountChangedEvent>(OnMaterialAmountChanged);
SubscribeLocalEvent<CopyMachineComponent, StrappedEvent>(OnStasisStrapped);
SubscribeLocalEvent<CopyMachineComponent, UnstrappedEvent>(OnStasisUnstrapped);
SubscribeLocalEvent<CopyMachineComponent, GotEmaggedEvent>(OnEmagged);
_configManager.OnValueChanged(SunriseCCVars.CopyMachineTemplatePool, _ =>
{
CacheAllDocuments();
RebuildAllPrinters();
}, false);
CacheAllDocuments();
}
private void OnRoundStart(RoundStartingEvent ev)
{
_roundStartTime = _timing.CurTime;
}
private void CacheAllDocuments()
{
_docCache.Clear();
var pool = _configManager.GetCVar(SunriseCCVars.CopyMachineTemplatePool);
if (!_proto.TryIndex<DocTemplatePoolPrototype>(pool, out var poolProto))
return;
foreach (var template in poolProto.Templates)
{
if (!_proto.TryIndex(template, out var templateProto))
continue;
using var file = _resourceManager.ContentFileReadText(templateProto.Content);
var fileText = file.ReadToEnd();
var match = DocRegex.Match(fileText);
var content = match.Success ? match.Groups[1].Value.Trim() : fileText.Trim();
_docCache[templateProto.ID] = content;
}
}
// Мгновенная смена шаблонов в принтерах при смене CVar-а
private void RebuildAllPrinters()
{
var query = EntityQueryEnumerator<CopyMachineComponent>();
while (query.MoveNext(out var uid, out var comp))
{
UpdatePrinterTemplates(uid, comp);
}
}
private void UpdatePrinterTemplates(EntityUid uid, CopyMachineComponent comp)
{
comp.Templates.Clear();
var isEmagged = HasComp<EmaggedComponent>(uid);
var pool = _configManager.GetCVar(SunriseCCVars.CopyMachineTemplatePool);
if (!_proto.TryIndex<DocTemplatePoolPrototype>(pool, out var poolProto))
return;
foreach (var template in poolProto.Templates)
{
if (!_proto.TryIndex(template, out var templateProto))
continue;
if (templateProto.IsPublic || isEmagged)
comp.Templates.Add(templateProto.ID);
}
UpdateUserInterface(uid, comp);
}
private void OnUiOpened(EntityUid uid, CopyMachineComponent comp, BoundUIOpenedEvent args) => UpdateUserInterface(uid, comp);
private void OnSolutionChanged(EntityUid uid, CopyMachineComponent comp, SolutionContainerChangedEvent args) => UpdateUserInterface(uid, comp);
private void OnItemRemoved(EntityUid uid, CopyMachineComponent comp, EntRemovedFromContainerMessage args) => UpdateUserInterface(uid, comp);
private void OnStasisStrapped(EntityUid uid, CopyMachineComponent comp, ref StrappedEvent args) => UpdateUserInterface(uid, comp);
private void OnStasisUnstrapped(EntityUid uid, CopyMachineComponent comp, ref UnstrappedEvent args) => UpdateUserInterface(uid, comp);
private void OnMaterialAmountChanged(EntityUid uid, CopyMachineComponent comp, ref MaterialAmountChangedEvent args) => UpdateUserInterface(uid, comp);
private void OnItemInserted(EntityUid uid, CopyMachineComponent comp, EntInsertedIntoContainerMessage args)
{
if (args.Container.ID != CopyMachineComponent.CopySlotId)
return;
UpdateUserInterface(uid, comp);
}
private void OnPrintMessage(EntityUid uid, CopyMachineComponent comp, CopyMachinePrintMessage msg)
{
if (comp.JobQueue.Count >= comp.MaxQueueSize)
return;
if (!TryConsumeResources(uid, comp))
return;
comp.JobQueue.Enqueue((CopyMachineJobType.Print, msg.TemplateId));
UpdateUserInterface(uid, comp);
}
private void OnCopyMessage(EntityUid uid, CopyMachineComponent comp, CopyMachineCopyMessage msg)
{
if (comp.JobQueue.Count >= comp.MaxQueueSize)
return;
if (!TryConsumeResources(uid, comp))
return;
comp.JobQueue.Enqueue((CopyMachineJobType.Copy, null));
UpdateUserInterface(uid, comp);
}
private void OnMapInit(EntityUid uid, CopyMachineComponent comp, MapInitEvent args)
{
_itemSlotsSystem.AddItemSlot(uid, CopyMachineComponent.CopySlotId, comp.CopySlot);
UpdatePrinterTemplates(uid, comp);
UpdateUserInterface(uid, comp);
}
public override void Update(float frameTime)
{
base.Update(frameTime);
var enumerator = EntityQueryEnumerator<CopyMachineComponent>();
var curTime = _timing.CurTime;
while (enumerator.MoveNext(out var uid, out var comp))
{
if (!comp.IsProcessing && comp.JobQueue.Count > 0)
{
var (type, templateId) = comp.JobQueue.Dequeue();
comp.IsProcessing = true;
comp.NextPrintTime = curTime + TimeSpan.FromSeconds(comp.JobDuration);
string jobTitle = type == CopyMachineJobType.Print && templateId != null &&
_proto.TryIndex<DocTemplatePrototype>(templateId, out var proto)
? Loc.GetString(proto.Name)
: templateId ?? "Документ";
comp.CurrentJobView = new CopyMachineJobView(jobTitle, type, templateId);
UpdateUserInterface(uid, comp);
_audioSystem.PlayPvs(comp.PrintSound, uid);
}
if (comp.IsProcessing && curTime >= comp.NextPrintTime)
{
var jobView = comp.CurrentJobView;
if (jobView != null)
{
var type = jobView.Type;
var templateId = jobView.TemplateId;
_ = type switch
{
CopyMachineJobType.Print when templateId != null => TryPrintInternal(uid, comp, templateId),
CopyMachineJobType.Copy => TryCopyInternal(uid, comp),
_ => false
};
}
comp.IsProcessing = false;
comp.CurrentJobView = null;
comp.NextPrintTime = TimeSpan.Zero;
UpdateUserInterface(uid, comp);
}
}
}
private bool TryConsumeResources(EntityUid uid, CopyMachineComponent comp)
{
if (!_solution.TryGetSolution(uid, comp.Solution, out _, out var solution))
return false;
if (!solution.TryGetReagentQuantity(new ReagentId(comp.IncReagentProto, null), out var incVolume) || incVolume < comp.IncCost)
return false;
if (!_materialStorage.TryChangeMaterialAmount(uid, comp.PaperMaterial, -comp.PaperCost))
return false;
solution.RemoveReagent(new ReagentId(comp.IncReagentProto, null), comp.IncCost);
return true;
}
private bool TryPrintInternal(EntityUid uid, CopyMachineComponent comp, string templateId)
{
var paper = Spawn(comp.PaperProtoId, Transform(uid).Coordinates);
if (!TryComp<PaperComponent>(paper, out var paperComp) ||
!_docCache.TryGetValue(templateId, out var content) ||
!_proto.TryIndex<DocTemplatePrototype>(templateId, out var templateProto))
return false;
var offsetHours = _configManager.GetCVar(SunriseCCVars.CopyMachineTimeOffsetHours);
var offsetYears = _configManager.GetCVar(SunriseCCVars.CopyMachineYearOffset);
var date = DateTime.UtcNow
.AddHours(offsetHours)
.AddYears(offsetYears)
.ToString("dd.MM.yyyy");
var shift = _timing.CurTime - _roundStartTime;
var timeString = $"{shift:hh\\:mm} {date}";
var station = _stationSystem.GetOwningStation(uid);
var stationName = station is null ? string.Empty : Name(station.Value);
content = content.Replace("{timeString}", timeString);
content = content.Replace("{stationName}", stationName);
_paperSystem.SetContent((paper, paperComp), content);
if (templateProto.Header != null)
_paperSystem.SetImageContent((paper, paperComp), templateProto.Header);
return true;
}
private bool TryCopyInternal(EntityUid uid, CopyMachineComponent comp)
{
var paper = Spawn(comp.PaperProtoId, Transform(uid).Coordinates);
if (!TryComp<PaperComponent>(paper, out var paperComp))
return false;
if (TryComp<StrapComponent>(uid, out var strap) && strap.BuckledEntities.Count != 0)
{
var buckled = strap.BuckledEntities.First();
if (TryComp<HumanoidAppearanceComponent>(buckled, out var humanoidAppearance))
{
var buttTexture = _proto.TryIndex(humanoidAppearance.Species, out var species) ? species.ButtScan : null;
if (buttTexture == null)
return false;
_paperSystem.SetImageContent((paper, paperComp), buttTexture, new Vector2(15, 15));
paperComp.EditingDisabled = true;
return true;
}
}
if (comp.CopySlot.HasItem && TryComp<PaperComponent>(comp.CopySlot.Item, out var srcPaper))
{
_paperSystem.SetContent((paper, paperComp), srcPaper.Content);
if (srcPaper.ImageContent != null)
_paperSystem.SetImageContent((paper, paperComp), srcPaper.ImageContent, srcPaper.ImageScale);
paperComp.EditingDisabled = srcPaper.EditingDisabled;
if (srcPaper.StampState != null && srcPaper.StampedBy != null)
foreach (var stamp in srcPaper.StampedBy)
_paperSystem.TryStamp((paper, paperComp), stamp, srcPaper.StampState);
if (TryComp<LabelComponent>(comp.CopySlot.Item, out var srcLabel) && !string.IsNullOrWhiteSpace(srcLabel.CurrentLabel))
_labelSystem.Label(paper, srcLabel.CurrentLabel);
return true;
}
return false;
}
public void UpdateUserInterface(EntityUid uid, CopyMachineComponent comp)
{
if (!_solution.TryGetSolution(uid, comp.Solution, out _, out var solution))
return;
float incVolume = solution.TryGetReagentQuantity(new ReagentId(comp.IncReagentProto, null), out var inc) ? inc.Value : 0;
var availablePaper = _materialStorage.GetMaterialAmount(uid, comp.PaperMaterial);
var state = new CopyMachineBoundUserInterfaceState(
paperCount: availablePaper / 100,
inkAmount: incVolume / 100,
templates: comp.Templates.Select(t => t.ToString()).ToList(),
canCopy: CanCopy(uid, comp),
currentJob: comp.CurrentJobView,
queue: comp.JobQueue.Select(j =>
{
string title = j.Type == CopyMachineJobType.Print && j.TemplateId != null &&
_proto.TryIndex<DocTemplatePrototype>(j.TemplateId, out var proto)
? Loc.GetString(proto.Name)
: j.TemplateId ?? "Документ";
return new CopyMachineJobView(title, j.Type, j.TemplateId);
}).ToList()
);
_userInterfaceSystem.SetUiState(uid, CopyMachineUiKey.Key, state);
}
public bool CanCopy(EntityUid uid, CopyMachineComponent comp)
{
var hasCopyPaper = comp.CopySlot.HasItem;
var hasBuckleUser = TryComp<StrapComponent>(uid, out var strap) && strap.BuckledEntities.Count != 0 &&
TryComp<HumanoidAppearanceComponent>(strap.BuckledEntities.First(), out _);
return hasBuckleUser || hasCopyPaper;
}
private void OnEmagged(EntityUid uid, CopyMachineComponent component, ref GotEmaggedEvent args)
{
if (!_emag.CompareFlag(args.Type, EmagType.Interaction))
return;
args.Handled = true;
component.Templates.Clear();
foreach (var template in _proto.EnumeratePrototypes<DocTemplatePrototype>())
{
if (!string.IsNullOrEmpty(template.Component))
component.Templates.Add(template.ID);
}
Dirty(uid, component);
UpdateUserInterface(uid, component);
}
}

View file

@ -1,471 +0,0 @@
using System.Linq;
using System.Text.RegularExpressions;
using Content.Server.GameTicking.Events;
using Content.Server.Materials;
using Content.Server.Station.Systems;
using Content.Shared._Sunrise.PrinterDoc;
using Content.Shared._Sunrise.SunriseCCVars;
using Content.Shared.Buckle.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.Humanoid;
using Content.Shared.Materials;
using Content.Shared.Paper;
using Content.Shared.Tag;
using Content.Shared.Labels.Components;
using Content.Shared.Labels.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Configuration;
using Robust.Shared.Containers;
using Robust.Shared.ContentPack;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Server._Sunrise.PrinterDoc;
public sealed class PrinterDocSystem : EntitySystem
{
[Dependency] private readonly SharedSolutionContainerSystem _solution = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly PaperSystem _paperSystem = default!;
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly MaterialStorageSystem _materialStorage = default!;
[Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IConfigurationManager _configManager = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly EmagSystem _emag = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly LabelSystem _labelSystem = default!;
private TimeSpan _roundStartTime;
private readonly Dictionary<string, string> _docCache = new();
private static readonly Regex DocRegex =
new("<Document>(.*?)</Document>", RegexOptions.Singleline | RegexOptions.Compiled);
private const string SunriseRoot = "/ServerInfo/Documents/_Sunrise"; //Стандартные шаблоны
private const string LustRoot = "/ServerInfo/Documents/_Lust"; //Путь к документам Qillu для Lust_Station
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
SubscribeLocalEvent<PrinterDocComponent, BoundUIOpenedEvent>(OnUiOpened);
SubscribeLocalEvent<PrinterDocComponent, PrinterDocPrintMessage>(OnPrintMessage);
SubscribeLocalEvent<PrinterDocComponent, PrinterDocCopyMessage>(OnCopyMessage);
SubscribeLocalEvent<PrinterDocComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<PrinterDocComponent, SolutionContainerChangedEvent>(OnSolutionChanged);
SubscribeLocalEvent<PrinterDocComponent, EntInsertedIntoContainerMessage>(OnItemInserted);
SubscribeLocalEvent<PrinterDocComponent, EntRemovedFromContainerMessage>(OnItemRemoved);
SubscribeLocalEvent<PrinterDocComponent, MaterialAmountChangedEvent>(OnMaterialAmountChanged);
SubscribeLocalEvent<PrinterDocComponent, StrappedEvent>(OnStasisStrapped);
SubscribeLocalEvent<PrinterDocComponent, UnstrappedEvent>(OnStasisUnstrapped);
SubscribeLocalEvent<PrinterDocComponent, GotEmaggedEvent>(OnEmagged);
SubscribeLocalEvent<PrinterDocComponent, ComponentStartup>(OnPrinterStartup);
_configManager.OnValueChanged(SunriseCCVars.PrinterDocTemplatePack, _ =>
{
CacheAllDocuments();
RebuildAllPrinters();
}, false);
CacheAllDocuments();
}
private void OnRoundStart(RoundStartingEvent ev)
{
_roundStartTime = _timing.CurTime;
}
private void CacheAllDocuments()
{
_docCache.Clear();
foreach (var template in _proto.EnumeratePrototypes<DocTemplatePrototype>())
{
if (template.Content == default)
continue;
var resolved = ResolveTemplatePath(template.Content);
if (resolved is null)
continue;
using var file = _resourceManager.ContentFileReadText(resolved.Value);
var fileText = file.ReadToEnd();
var match = DocRegex.Match(fileText);
var content = match.Success ? match.Groups[1].Value.Trim() : fileText.Trim();
_docCache[template.ID] = content;
}
}
// Мгновенная смена шаблонов в принтерах при смене CVar-а
private void RebuildAllPrinters()
{
var query = EntityQueryEnumerator<PrinterDocComponent>();
while (query.MoveNext(out var uid, out var comp))
{
comp.Templates.Clear();
var isEmagged = HasComp<EmaggedComponent>(uid);
foreach (var template in _proto.EnumeratePrototypes<DocTemplatePrototype>())
{
if (string.IsNullOrEmpty(template.Component))
continue;
if (template.Content == default)
continue;
var resolved = ResolveTemplatePath(template.Content);
if (!resolved.HasValue)
continue;
if (template.IsPublic || isEmagged)
comp.Templates.Add(template.ID);
}
UpdateUserInterface(uid, comp);
}
}
private void OnUiOpened(EntityUid uid, PrinterDocComponent comp, BoundUIOpenedEvent args) => UpdateUserInterface(uid, comp);
private void OnSolutionChanged(EntityUid uid, PrinterDocComponent comp, SolutionContainerChangedEvent args) => UpdateUserInterface(uid, comp);
private void OnItemRemoved(EntityUid uid, PrinterDocComponent comp, EntRemovedFromContainerMessage args) => UpdateUserInterface(uid, comp);
private void OnStasisStrapped(EntityUid uid, PrinterDocComponent comp, ref StrappedEvent args) => UpdateUserInterface(uid, comp);
private void OnStasisUnstrapped(EntityUid uid, PrinterDocComponent comp, ref UnstrappedEvent args) => UpdateUserInterface(uid, comp);
private void OnMaterialAmountChanged(EntityUid uid, PrinterDocComponent comp, ref MaterialAmountChangedEvent args) => UpdateUserInterface(uid, comp);
private void OnItemInserted(EntityUid uid, PrinterDocComponent comp, EntInsertedIntoContainerMessage args)
{
if (args.Container.ID != PrinterDocComponent.CopySlotId)
return;
if (!TryComp<PaperComponent>(args.Entity, out var paperComp))
{
UpdateUserInterface(uid, comp);
return;
}
if (string.IsNullOrWhiteSpace(paperComp.Content))
{
Timer.Spawn(TimeSpan.FromMilliseconds(1), () =>
{
if (Deleted(uid) || Deleted(args.Entity))
return;
if (!comp.CopySlot.HasItem || comp.CopySlot.Item != args.Entity)
return;
if (TryComp<TagComponent>(args.Entity, out var tag) && tag.Tags.Contains("Paper"))
{
_materialStorage.TryChangeMaterialAmount(uid, comp.PaperMaterial, 100);
QueueDel(args.Entity);
UpdateUserInterface(uid, comp);
}
});
return;
}
UpdateUserInterface(uid, comp);
}
private void OnPrintMessage(EntityUid uid, PrinterDocComponent comp, PrinterDocPrintMessage msg)
{
if (comp.JobQueue.Count >= comp.MaxQueueSize)
return;
if (!TryConsumeResources(uid, comp))
return;
comp.JobQueue.Enqueue((PrinterJobType.Print, msg.TemplateId));
UpdateUserInterface(uid, comp);
}
private void OnCopyMessage(EntityUid uid, PrinterDocComponent comp, PrinterDocCopyMessage msg)
{
if (comp.JobQueue.Count >= comp.MaxQueueSize)
return;
if (!TryConsumeResources(uid, comp))
return;
comp.JobQueue.Enqueue((PrinterJobType.Copy, null));
UpdateUserInterface(uid, comp);
}
private void OnMapInit(EntityUid uid, PrinterDocComponent comp, MapInitEvent args)
{
_itemSlotsSystem.AddItemSlot(uid, PrinterDocComponent.CopySlotId, comp.CopySlot);
comp.Templates.Clear();
var isEmagged = HasComp<EmaggedComponent>(uid);
foreach (var template in _proto.EnumeratePrototypes<DocTemplatePrototype>())
{
if (string.IsNullOrEmpty(template.Component))
continue;
if (template.Content == default)
continue;
var resolved = ResolveTemplatePath(template.Content);
if (!resolved.HasValue)
continue;
if (template.IsPublic || isEmagged)
comp.Templates.Add(template.ID);
}
UpdateUserInterface(uid, comp);
}
public override void Update(float frameTime)
{
base.Update(frameTime);
var enumerator = EntityQueryEnumerator<PrinterDocComponent>();
while (enumerator.MoveNext(out var uid, out var comp))
{
if (comp.IsProcessing || comp.JobQueue.Count == 0)
continue;
var (type, templateId) = comp.JobQueue.Dequeue();
comp.IsProcessing = true;
string jobTitle = type == PrinterJobType.Print && templateId != null &&
_proto.TryIndex<DocTemplatePrototype>(templateId, out var proto)
? Loc.GetString(proto.Name)
: templateId ?? "Документ";
comp.CurrentJobView = new PrinterJobView(jobTitle, type);
UpdateUserInterface(uid, comp);
_audioSystem.PlayPvs(comp.PrintSound, uid);
Timer.Spawn(TimeSpan.FromSeconds(comp.JobDuration), () =>
{
if (Deleted(uid))
return;
_ = type switch
{
PrinterJobType.Print when templateId != null => TryPrintInternal(uid, comp, templateId),
PrinterJobType.Copy => TryCopyInternal(uid, comp),
_ => false
};
comp.IsProcessing = false;
comp.CurrentJobView = null;
UpdateUserInterface(uid, comp);
});
}
}
private bool TryConsumeResources(EntityUid uid, PrinterDocComponent comp)
{
if (!_solution.TryGetSolution(uid, comp.Solution, out _, out var solution))
return false;
if (!solution.TryGetReagentQuantity(new ReagentId(comp.IncReagentProto, null), out var incVolume) || incVolume < comp.IncCost)
return false;
if (!_materialStorage.TryChangeMaterialAmount(uid, comp.PaperMaterial, -comp.PaperCost))
return false;
solution.RemoveReagent(new ReagentId(comp.IncReagentProto, null), comp.IncCost);
return true;
}
private bool TryPrintInternal(EntityUid uid, PrinterDocComponent comp, string templateId)
{
var paper = Spawn(comp.PaperProtoId, Transform(uid).Coordinates);
if (!TryComp<PaperComponent>(paper, out var paperComp) || !_docCache.TryGetValue(templateId, out var content))
return false;
int offsetHours = 3;
int offsetYears = 1000;
try
{
offsetHours = _configManager.GetCVar(SunriseCCVars.PrinterDocTimeOffsetHours);
offsetYears = _configManager.GetCVar(SunriseCCVars.PrinterDocYearOffset);
}
catch
{
}
var date = DateTime.UtcNow
.AddHours(offsetHours)
.AddYears(offsetYears)
.ToString("dd.MM.yyyy");
var shift = _timing.CurTime - _roundStartTime;
var timeString = $"{shift:hh\\:mm} {date}";
var station = _stationSystem.GetOwningStation(uid);
var stationName = station is null ? string.Empty : Name(station.Value);
content = content.Replace("{timeString}", timeString);
content = content.Replace("{stationName}", stationName);
_paperSystem.SetContent((paper, paperComp), content);
return true;
}
private bool TryCopyInternal(EntityUid uid, PrinterDocComponent comp)
{
var paper = Spawn(comp.PaperProtoId, Transform(uid).Coordinates);
if (!TryComp<PaperComponent>(paper, out var paperComp))
return false;
if (TryComp<StrapComponent>(uid, out var strap) && strap.BuckledEntities.Count != 0)
{
var buckled = strap.BuckledEntities.First();
if (TryComp<HumanoidAppearanceComponent>(buckled, out var humanoidAppearance))
{
var buttTexture = _proto.TryIndex(humanoidAppearance.Species, out var species) ? species.ButtScanTexture : null;
var content = $"[tex path=\"{buttTexture}\" scale=15]";
_paperSystem.SetContent((paper, paperComp), content);
paperComp.EditingDisabled = true;
return true;
}
}
if (comp.CopySlot.HasItem && TryComp<PaperComponent>(comp.CopySlot.Item, out var srcPaper))
{
_paperSystem.SetContent((paper, paperComp), srcPaper.Content);
paperComp.EditingDisabled = srcPaper.EditingDisabled;
if (srcPaper.StampState != null && srcPaper.StampedBy != null)
foreach (var stamp in srcPaper.StampedBy)
_paperSystem.TryStamp((paper, paperComp), stamp, srcPaper.StampState);
if (TryComp<LabelComponent>(comp.CopySlot.Item, out var srcLabel) && !string.IsNullOrWhiteSpace(srcLabel.CurrentLabel))
_labelSystem.Label(paper, srcLabel.CurrentLabel);
return true;
}
return false;
}
public void UpdateUserInterface(EntityUid uid, PrinterDocComponent comp)
{
if (!_solution.TryGetSolution(uid, comp.Solution, out _, out var solution))
return;
float incVolume = solution.TryGetReagentQuantity(new ReagentId(comp.IncReagentProto, null), out var inc) ? inc.Value : 0;
var availablePaper = _materialStorage.GetMaterialAmount(uid, comp.PaperMaterial);
var state = new PrinterDocBoundUserInterfaceState(
paperCount: availablePaper / 100,
inkAmount: incVolume / 100,
templates: comp.Templates.Select(t => t.ToString()).ToList(),
canCopy: CanCopy(uid, comp),
currentJob: comp.CurrentJobView,
queue: comp.JobQueue.Select(j =>
{
string title = j.Type == PrinterJobType.Print && j.TemplateId != null &&
_proto.TryIndex<DocTemplatePrototype>(j.TemplateId, out var proto)
? Loc.GetString(proto.Name)
: j.TemplateId ?? "Документ";
return new PrinterJobView(title, j.Type);
}).ToList()
);
_userInterfaceSystem.SetUiState(uid, PrinterDocUiKey.Key, state);
}
public bool CanCopy(EntityUid uid, PrinterDocComponent comp)
{
var hasCopyPaper = comp.CopySlot.HasItem;
var hasBuckleUser = TryComp<StrapComponent>(uid, out var strap) && strap.BuckledEntities.Count != 0 &&
TryComp<HumanoidAppearanceComponent>(strap.BuckledEntities.First(), out _);
return hasBuckleUser || hasCopyPaper;
}
private void OnEmagged(EntityUid uid, PrinterDocComponent component, ref GotEmaggedEvent args)
{
if (!_emag.CompareFlag(args.Type, EmagType.Interaction))
return;
args.Handled = true;
component.Templates.Clear();
foreach (var template in _proto.EnumeratePrototypes<DocTemplatePrototype>())
{
if (!string.IsNullOrEmpty(template.Component))
component.Templates.Add(template.ID);
}
Dirty(uid, component);
UpdateUserInterface(uid, component);
}
private void OnPrinterStartup(EntityUid uid, PrinterDocComponent comp, ref ComponentStartup args)
{
TryInitPrinterResources(uid, comp);
}
private void TryInitPrinterResources(EntityUid uid, PrinterDocComponent comp)
{
if (Deleted(uid) || comp.Initialized)
return;
if (!_solution.TryGetSolution(uid, comp.Solution, out var solEnt, out var solution))
{
Timer.Spawn(TimeSpan.Zero, () => TryInitPrinterResources(uid, comp));
return;
}
_materialStorage.TryChangeMaterialAmount(uid, comp.PaperMaterial, comp.InitialPaperAmount);
var reagent = new ReagentId(comp.IncReagentProto, null);
solution.AddReagent(reagent, comp.InitialInkAmount);
_solution.UpdateChemicals(solEnt.Value, needsReactionsProcessing: false);
comp.Initialized = true;
UpdateUserInterface(uid, comp);
}
// Система для переключения используемых шаблонов документов через CVar
private string GetTemplateRoot()
{
string pack;
try { pack = _configManager.GetCVar(SunriseCCVars.PrinterDocTemplatePack); }
catch { pack = "sunrise"; }
if (string.IsNullOrWhiteSpace(pack))
pack = "sunrise";
pack = pack.Trim();
return pack.Equals("lust", StringComparison.OrdinalIgnoreCase) ? LustRoot : SunriseRoot;
}
private ResPath? ResolveTemplatePath(ResPath contentPath)
{
var root = GetTemplateRoot();
var content = contentPath.ToString();
if (!content.StartsWith(root, StringComparison.OrdinalIgnoreCase))
return null;
var rp = new ResPath(content);
return _resourceManager.ContentFileExists(rp) ? rp : (ResPath?)null;
}
}

View file

@ -8,6 +8,7 @@ using Robust.Server.Player;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
namespace Content.Server._Sunrise.StationGoal
{
@ -72,6 +73,8 @@ namespace Content.Server._Sunrise.StationGoal
var wasSent = false;
var ntHeader = new SpriteSpecifier.Rsi(new ResPath("/Textures/_Sunrise/CopyMachine/paper_headers.rsi"), "nanotrasen_form_header_centcom");
var printout = new FaxPrintout(
Loc.GetString(goal.Text, ("station", MetaData(ent.Value).EntityName)),
Loc.GetString("station-goal-fax-paper-name"),
@ -81,7 +84,8 @@ namespace Content.Server._Sunrise.StationGoal
new List<StampDisplayInfo>
{
new() { StampedName = Loc.GetString("stamp-component-stamped-name-centcom"), StampedColor = Color.Green },
});
},
imageContent: ntHeader);
var faxQuery = EntityQueryEnumerator<FaxMachineComponent>();
while (faxQuery.MoveNext(out var faxId, out var fax))
@ -119,6 +123,8 @@ namespace Content.Server._Sunrise.StationGoal
return printed;
_paperSystem.SetContent((printed, paper), printout.Content);
if (printout.ImageContent != null)
_paperSystem.SetImageContent((printed, paper), printout.ImageContent, printout.ImageScale);
if (printout.StampState == null)
return printed;

View file

@ -1,9 +1,11 @@
using System.Numerics;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Paper;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Utility;
namespace Content.Shared.Fax.Components;
@ -170,11 +172,18 @@ public sealed partial class FaxPrintout
[DataField]
public bool Locked { get; private set; }
// Sunrise-Start
[DataField]
public SpriteSpecifier? ImageContent { get; set; }
[DataField]
public Vector2? ImageScale { get; set; }
// Sunrise-End
private FaxPrintout()
{
}
public FaxPrintout(string content, string name, string? label = null, string? prototypeId = null, string? stampState = null, List<StampDisplayInfo>? stampedBy = null, bool locked = false)
public FaxPrintout(string content, string name, string? label = null, string? prototypeId = null, string? stampState = null, List<StampDisplayInfo>? stampedBy = null, bool locked = false, SpriteSpecifier? imageContent = null, Vector2? imageScale = null)
{
Content = content;
Name = name;
@ -183,5 +192,9 @@ public sealed partial class FaxPrintout
StampState = stampState;
StampedBy = stampedBy ?? new List<StampDisplayInfo>();
Locked = locked;
// Sunrise-Start
ImageContent = imageContent;
ImageScale = imageScale;
// Sunrise-End
}
}

View file

@ -1,4 +1,6 @@
using System.Numerics;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Shared.Fax;
@ -40,12 +42,20 @@ public sealed class FaxFileMessage : BoundUserInterfaceMessage
public string? Label;
public string Content;
public bool OfficePaper;
// Sunrise-Start
public SpriteSpecifier? ImageContent { get; set; }
public Vector2 ImageScale { get; set; }
// Sunrise-End
public FaxFileMessage(string? label, string content, bool officePaper)
public FaxFileMessage(string? label, string content, bool officePaper, SpriteSpecifier? imageContent = null, Vector2 imageScale = default)
{
Label = label;
Content = content;
OfficePaper = officePaper;
// Sunrise-Start
ImageContent = imageContent;
ImageScale = imageScale;
// Sunrise-End
}
}

View file

@ -210,7 +210,7 @@ public sealed partial class SpeciesPrototype : IPrototype
new SpriteSpecifier.Rsi(new ResPath("/Textures/Mobs/Species/Human/parts.rsi"), "full");
[DataField]
public string ButtScanTexture = "/Textures/_Sunrise/ButtsScans/human.png";
public SpriteSpecifier ButtScan = new SpriteSpecifier.Rsi(new ResPath("/Textures/_Sunrise/CopyMachine/butts_scans.rsi"), "human");
}
public enum SpeciesNaming : byte

View file

@ -1,6 +1,8 @@
using System.Numerics;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Shared.Paper;
@ -37,20 +39,35 @@ public sealed partial class PaperComponent : Component
[DataField("sound")]
public SoundSpecifier? Sound { get; private set; } = new SoundCollectionSpecifier("PaperScribbles", AudioParams.Default.WithVariation(0.1f));
// Sunrise-Start
[DataField, AutoNetworkedField]
public SpriteSpecifier? ImageContent { get; set; }
[DataField, AutoNetworkedField]
public Vector2? ImageScale { get; set; }
// Sunrise-End
[Serializable, NetSerializable]
public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly string Text;
public readonly List<StampDisplayInfo> StampedBy;
public readonly PaperAction Mode;
public readonly Color DefaultColor; // Sunrise-edit
// Sunrise-Start
public readonly Color DefaultColor;
public readonly SpriteSpecifier? ImageContent; // Sunrise-edit
public readonly Vector2? ImageScale; // Sunrise-edit
// Sunrise-End
public PaperBoundUserInterfaceState(string text, Color defaultColor, List<StampDisplayInfo> stampedBy, PaperAction mode = PaperAction.Read) // Sunrise-edit
public PaperBoundUserInterfaceState(string text, Color defaultColor, List<StampDisplayInfo> stampedBy, PaperAction mode = PaperAction.Read, SpriteSpecifier? imageContent = null, Vector2? imageScale = null) // Sunrise-edit
{
Text = text;
StampedBy = stampedBy;
Mode = mode;
DefaultColor = defaultColor; // Sunrise-edit
// Sunrise-Start
DefaultColor = defaultColor;
ImageContent = imageContent;
ImageScale = imageScale;
// Sunrise-End
}
}

View file

@ -1,10 +1,10 @@
using System.Linq;
using System.Numerics;
using Content.Shared.Administration.Logs;
using Content.Shared.UserInterface;
using Content.Shared.Database;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Random.Helpers;
using Content.Shared.Popups;
using Content.Shared.Tag;
using Robust.Shared.Player;
@ -12,6 +12,7 @@ using Robust.Shared.Audio.Systems;
using static Content.Shared.Paper.PaperComponent;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
namespace Content.Shared.Paper;
@ -30,6 +31,7 @@ public sealed class PaperSystem : EntitySystem
private static readonly ProtoId<TagPrototype> WriteIgnoreStampsTag = "WriteIgnoreStamps";
private static readonly ProtoId<TagPrototype> WriteTag = "Write";
private static readonly Vector2 DefaultImageScale = new (1f, 1f);
private EntityQuery<PaperComponent> _paperQuery;
@ -304,9 +306,19 @@ public sealed class PaperSystem : EntitySystem
_appearance.SetData(entity, PaperVisuals.Status, status, appearance);
}
// Sunrise-Start
public void SetImageContent(Entity<PaperComponent> entity, SpriteSpecifier content, Vector2? scale = null)
{
entity.Comp.ImageContent = content;
entity.Comp.ImageScale = scale;
Dirty(entity);
UpdateUserInterface(entity);
}
// Sunrise-End
private void UpdateUserInterface(Entity<PaperComponent> entity)
{
_uiSystem.SetUiState(entity.Owner, PaperUiKey.Key, new PaperBoundUserInterfaceState(entity.Comp.Content, entity.Comp.DefaultColor, entity.Comp.StampedBy, entity.Comp.Mode)); // Sunrise-edit
_uiSystem.SetUiState(entity.Owner, PaperUiKey.Key, new PaperBoundUserInterfaceState(entity.Comp.Content, entity.Comp.DefaultColor, entity.Comp.StampedBy, entity.Comp.Mode, entity.Comp.ImageContent, entity.Comp.ImageScale)); // Sunrise-edit
}
}

View file

@ -0,0 +1,62 @@
using Robust.Shared.Serialization;
namespace Content.Shared._Sunrise.CopyMachine;
[Serializable, NetSerializable]
public sealed class CopyMachineBoundUserInterfaceState : BoundUserInterfaceState
{
public int PaperCount { get; }
public float InkAmount { get; }
public List<string> Templates { get; }
public bool CanCopy { get; }
public CopyMachineJobView? CurrentJob { get; }
public List<CopyMachineJobView> Queue { get; }
public CopyMachineBoundUserInterfaceState(
int paperCount,
float inkAmount,
List<string> templates,
bool canCopy,
CopyMachineJobView? currentJob = null,
List<CopyMachineJobView>? queue = null)
{
PaperCount = paperCount;
InkAmount = inkAmount;
Templates = templates;
CanCopy = canCopy;
CurrentJob = currentJob;
Queue = queue ?? new();
}
}
[Serializable, NetSerializable]
public sealed class CopyMachineJobView
{
public readonly string Title;
public readonly CopyMachineJobType Type;
public readonly string? TemplateId;
public CopyMachineJobView(string title, CopyMachineJobType type, string? templateId = null)
{
Title = title;
Type = type;
TemplateId = templateId;
}
public override string ToString()
{
return Type switch
{
CopyMachineJobType.Print => $"{Loc.GetString("copy-machine-print-job")}: {Title}",
CopyMachineJobType.Copy => $"{Loc.GetString("copy-machine-copy-job")}: {Title}",
_ => Title
};
}
}
[Serializable, NetSerializable]
public enum CopyMachineUiKey : byte
{
Key
}

View file

@ -3,14 +3,14 @@ using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Materials;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared._Sunrise.PrinterDoc;
namespace Content.Shared._Sunrise.CopyMachine;
[RegisterComponent, NetworkedComponent]
public sealed partial class PrinterDocComponent : Component
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class CopyMachineComponent : Component
{
/// <summary>
/// Максимальное количество заданий в очереди принтера
@ -18,8 +18,8 @@ public sealed partial class PrinterDocComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
public int MaxQueueSize = 5;
[DataField]
public Content.Shared._Sunrise.PrinterDoc.PrinterJobView? CurrentJobView;
[DataField, AutoNetworkedField]
public CopyMachineJobView? CurrentJobView;
[DataField]
public SoundSpecifier PrintSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/printer.ogg");
@ -29,21 +29,10 @@ public sealed partial class PrinterDocComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
public float JobDuration = 4f;
/// <summary>
/// Начальные материалы принтера - бумага
/// </summary>
[DataField]
public int InitialPaperAmount = 3000;
/// <summary>
/// Начальные материалы принтера - чернила
/// </summary>
[DataField]
public int InitialInkAmount = 30;
/// <summary>
/// Очередь заданий на печать или копирование
/// </summary>
public Queue<(PrinterJobType Type, string? TemplateId)> JobQueue = new();
public Queue<(CopyMachineJobType Type, string? TemplateId)> JobQueue = new();
/// <summary>
/// Идёт ли сейчас выполнение задания
@ -106,8 +95,11 @@ public sealed partial class PrinterDocComponent : Component
[DataField]
public List<ProtoId<DocTemplatePrototype>> Templates = new();
[DataField]
public bool Initialized = false;
/// <summary>
/// Время, когда можно начать следующий принт (серверное время)
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan NextPrintTime = TimeSpan.Zero;
[Serializable, NetSerializable]
public sealed record PrinterJobView(string Type, string? TemplateId);

View file

@ -0,0 +1,7 @@
namespace Content.Shared._Sunrise.CopyMachine;
public enum CopyMachineJobType
{
Print,
Copy
}

View file

@ -0,0 +1,14 @@
using Robust.Shared.Serialization;
namespace Content.Shared._Sunrise.CopyMachine;
[Serializable, NetSerializable]
public sealed class CopyMachinePrintMessage(string templateId) : BoundUserInterfaceMessage
{
public string TemplateId { get; } = templateId;
}
[Serializable, NetSerializable]
public sealed class CopyMachineCopyMessage() : BoundUserInterfaceMessage
{
}

View file

@ -1,7 +1,7 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._Sunrise.PrinterDoc;
namespace Content.Shared._Sunrise.CopyMachine;
[Prototype]
public sealed partial class DocTemplatePrototype : IPrototype
@ -15,6 +15,9 @@ public sealed partial class DocTemplatePrototype : IPrototype
[DataField(required: true)]
public ResPath Content;
[DataField]
public SpriteSpecifier? Header;
[DataField(required: true)]
public string Component { get; private set; } = default!;
[DataField]

View file

@ -0,0 +1,13 @@
using Robust.Shared.Prototypes;
namespace Content.Shared._Sunrise.CopyMachine;
[Prototype]
public sealed partial class DocTemplatePoolPrototype : IPrototype
{
[IdDataField]
public string ID { get; private set; } = default!;
[DataField(required: true)]
public List<ProtoId<DocTemplatePrototype>> Templates = new ();
}

View file

@ -0,0 +1,5 @@
namespace Content.Shared._Sunrise.CopyMachine;
public abstract class SharedCopyMachineSystem : EntitySystem
{
}

View file

@ -1,56 +0,0 @@
using Robust.Shared.Serialization;
using System;
using System.Collections.Generic;
namespace Content.Shared._Sunrise.PrinterDoc;
[Serializable, NetSerializable]
public sealed class PrinterDocBoundUserInterfaceState : BoundUserInterfaceState
{
public int PaperCount { get; }
public float InkAmount { get; }
public List<string> Templates { get; }
public bool CanCopy { get; }
public PrinterJobView? CurrentJob { get; }
public List<PrinterJobView> Queue { get; }
public PrinterDocBoundUserInterfaceState(
int paperCount,
float inkAmount,
List<string> templates,
bool canCopy,
PrinterJobView? currentJob = null,
List<PrinterJobView>? queue = null)
{
PaperCount = paperCount;
InkAmount = inkAmount;
Templates = templates;
CanCopy = canCopy;
CurrentJob = currentJob;
Queue = queue ?? new();
}
}
[Serializable, NetSerializable]
public sealed class PrinterJobView(string title, PrinterJobType type)
{
public readonly string Title = title;
public readonly PrinterJobType Type = type;
public override string ToString()
{
return Type switch
{
PrinterJobType.Print => $"{Loc.GetString("printerdoc-print-job")}: {Title}",
PrinterJobType.Copy => $"{Loc.GetString("printerdoc-copy-job")}: {Title}",
_ => Title
};
}
}
[Serializable, NetSerializable]
public enum PrinterDocUiKey : byte
{
Key
}

View file

@ -1,14 +0,0 @@
using Robust.Shared.Serialization;
namespace Content.Shared._Sunrise.PrinterDoc;
[Serializable, NetSerializable]
public sealed class PrinterDocPrintMessage(string templateId) : BoundUserInterfaceMessage
{
public string TemplateId { get; } = templateId;
}
[Serializable, NetSerializable]
public sealed class PrinterDocCopyMessage() : BoundUserInterfaceMessage
{
}

View file

@ -1,7 +0,0 @@
namespace Content.Shared._Sunrise.PrinterDoc;
public enum PrinterJobType
{
Print,
Copy
}

View file

@ -1,12 +0,0 @@
using Content.Shared._Sunrise.PrinterDoc;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Lathe.Prototypes;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Buckle.Components;
using Robust.Shared.Prototypes;
namespace Content.Shared._Sunrise.PrinterDoc;
public abstract class SharedPrinterDocSystem : EntitySystem
{
}

View file

@ -526,23 +526,24 @@ public sealed partial class SunriseCCVars : CVars
public static readonly CVarDef<bool> TracesEnabled =
CVarDef.Create("opt.traces_enabled", true, CVar.CLIENTONLY | CVar.ARCHIVE);
/// <summary>
/// Определяет, какие шаблоны будут доступны. (например, "sunrise" или "lust")
/// </summary>
public static readonly CVarDef<string> PrinterDocTemplatePack =
CVarDef.Create("printerdoc.template_pack", "sunrise", CVar.SERVERONLY | CVar.ARCHIVE);
public static readonly CVarDef<string> CopyMachineTemplatePool =
CVarDef.Create("copy_machine.template_pool", "Sunrise", CVar.SERVERONLY | CVar.ARCHIVE);
/// <summary>
/// Смещение автозаполнения времени (в часах)
/// </summary>
public static readonly CVarDef<int> PrinterDocTimeOffsetHours =
CVarDef.Create("printerdoc.time_offset_hours", 3, CVar.SERVERONLY | CVar.ARCHIVE);
public static readonly CVarDef<int> CopyMachineTimeOffsetHours =
CVarDef.Create("copy_machine.time_offset_hours", 3, CVar.SERVERONLY | CVar.ARCHIVE);
/// <summary>
/// Смещение автозаполнения времени (в годах)
/// </summary>
public static readonly CVarDef<int> PrinterDocYearOffset =
CVarDef.Create("printerdoc.year_offset", 1000, CVar.SERVERONLY | CVar.ARCHIVE);
public static readonly CVarDef<int> CopyMachineYearOffset =
CVarDef.Create("copy_machine.year_offset", 1000, CVar.SERVERONLY | CVar.ARCHIVE);
public static readonly CVarDef<bool> HoldLookUp =
CVarDef.Create("scope.hold_look_up", true, CVar.CLIENT | CVar.ARCHIVE);

View file

@ -1,4 +1,4 @@
ent-CrateServicePrinterDoc = printer machine crate
ent-CrateServiceCopyMachine = copy machine crate
.desc = { ent-CrateGenericSteel.desc }
ent-CrateServicePrinterDocRestock = a crate of ink and office papper
ent-CrateServiceCopyMachineRestock = a crate of ink and office papper
.desc = printer paper with ink and office papper

View file

@ -1,4 +1,4 @@
ent-PrinterDocMachineCircuitboard = document printer machine board
ent-CopyMachineMachineCircuitboard = copy machine board
.desc = A machine printed circuit board for an document printer
ent-PacificatorCircuitboard = pacifism generator machine board
.desc = Makes all sentient beings within range pacifists.

View file

@ -1,2 +1,2 @@
ent-PrinterDocFlatpack = document printer flatpack
ent-CopyMachineFlatpack = copy machine flatpack
.desc = A flatpack used for constructing a document printer.

View file

@ -1,2 +1,4 @@
ent-PrinterDoc = document printer
ent-CopyMachine = copy machine
.desc = Bureaucratic perfection. Stores a database of all Nanotrasen documents, and lets you print them as long as you have paper.
ent-CopyMachineFilled = { ent-CopyMachine }
.desc = { ent-CopyMachine.desc }

View file

@ -1,6 +1,6 @@
ent-CrateServicePrinterDoc = ящик с принтером документов
ent-CrateServiceCopyMachine = ящик с принтером документов
.desc = { ent-CrateGenericSteel.desc }
ent-CrateServicePrinterDocRestock = ящик чернил и оффисной бумаги
ent-CrateServiceCopyMachineRestock = ящик чернил и оффисной бумаги
.desc = Стопка офиссной и чернила. О чём ещё можно мечтать?
ent-CrateServiceLoreBooks = ящик космологических книг
.desc = Ящик, содержащий книги по устройству мира, техники, политических тонкостях, ествественных закономерностях и об исторических событиях.

View file

@ -1,5 +1,5 @@
ent-PrinterDocMachineCircuitboard = плата принтера документов
.desc = Машинная печатная плата для принтера документов
ent-CopyMachineMachineCircuitboard = плата копировального аппарата
.desc = Машинная печатная плата для копировального аппарата. Позволяет печатать документы Nanotrasen, пока хватает бумаги и чернил.
ent-PacificatorCircuitboard = плата генератора пацифизма
.desc = Делает всех разумных существ в радиусе действия пацифистами.
ent-ReflectorMachineCircuitboard = плата отражателя

View file

@ -1,2 +1,2 @@
ent-PrinterDocFlatpack = упакованный принтер документов
.desc = Упаковка, при помощи которой можно создать принтер документов.
ent-CopyMachineFlatpack = упакованный копировальный апарат
.desc = Упаковка, при помощи которой можно создать копировальный апарат.

View file

@ -1,2 +1,4 @@
ent-PrinterDoc = принтер документов
ent-CopyMachine = копировальный апарат
.desc = Бюрократическое совершенство. Хранит базу данных всех документов Nanotrasen и позволяет печатать их, пока хватает бумаги.
ent-CopyMachineFilled = { ent-CopyMachine }
.desc = { ent-CopyMachine.desc }

View file

@ -1,31 +1,31 @@
printerdoc-menu-title = Принтер документов
printerdoc-menu-templates = Шаблоны документов
printerdoc-menu-paper = Бумага:
printerdoc-menu-ink = Чернила:
printerdoc-menu-copy-status = Копирование:
printerdoc-menu-print = Печать
printerdoc-menu-copy = Копировать
printerdoc-menu-copy-available = Можно копировать
printerdoc-menu-copy-unavailable = Нечего копировать
printerdoc-menu-search-placeholder = Поиск...
printerdoc-menu-current-job = Текущая задача
printerdoc-menu-queue = Очередь заданий
printerdoc-menu-no-active-job = Нет активной задачи
printerdoc-print-job = Печать документа
printerdoc-copy-job = Копирование
printerdoc-filter-all = Все
printerdoc-component-Centcom = ЦентКом
printerdoc-component-Command = Командование
printerdoc-component-Prison = Тюрьма
printerdoc-component-Engineering = Инженерия
printerdoc-component-General = Общее
printerdoc-component-Justice = Юстиция
printerdoc-component-Medical = Медицина
printerdoc-component-Science = Наука
printerdoc-component-Security = Безопасность
printerdoc-component-Service = Сервис
printerdoc-component-Supply = Снабжение
printerdoc-component-Syndicate = Š!иÐ!К₳₮
copy-machine-menu-title = Принтер документов
copy-machine-menu-templates = Шаблоны документов
copy-machine-menu-paper = Бумага:
copy-machine-menu-ink = Чернила:
copy-machine-menu-copy-status = Копирование:
copy-machine-menu-print = Печать
copy-machine-menu-copy = Копировать
copy-machine-menu-copy-available = Можно копировать
copy-machine-menu-copy-unavailable = Нечего копировать
copy-machine-menu-search-placeholder = Поиск...
copy-machine-menu-current-job = Текущая задача
copy-machine-menu-queue = Очередь заданий
copy-machine-menu-no-active-job = Нет активной задачи
copy-machine-print-job = Печать документа
copy-machine-copy-job = Копирование
copy-machine-filter-all = Все
copy-machine-component-Centcom = ЦентКом
copy-machine-component-Command = Командование
copy-machine-component-Prison = Тюрьма
copy-machine-component-Engineering = Инженерия
copy-machine-component-General = Общее
copy-machine-component-Justice = Юстиция
copy-machine-component-Medical = Медицина
copy-machine-component-Science = Наука
copy-machine-component-Security = Безопасность
copy-machine-component-Service = Сервис
copy-machine-component-Supply = Снабжение
copy-machine-component-Syndicate = Š!иÐ!К₳₮
doc-template-appeal-name = Обращение
doc-template-application-access-name = Заявление на получение доступа
doc-template-application-appointment-interim-name = Заявление о назначении ВРиО

View file

@ -14,7 +14,7 @@
ClothingUniformJumpskirtLibrarian: 3
ClothingShoesBootsLaceup: 2
ClothingHeadsetService: 2
PrinterDocFlatpack: 2
CopyMachineFlatpack: 2
contrabandInventory:
ToyFigurineLibrarian: 1

View file

@ -80,7 +80,7 @@
- id: CrateServiceColorfulLights
- id: CrateServiceReplacementLights
- id: CrateServiceBureaucracy
- id: CrateServicePrinterDocRestock
- id: CrateServiceCopyMachineRestock
- id: PetCarrier
- id: CrateHydroponicsTools
- id: CrateHydroponicsSeeds

View file

@ -14,7 +14,10 @@
femaleFirstNames: NamesArachnidFirst
maleLastNames: NamesArachnidLast
femaleLastNames: NamesArachnidLast
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit SUNRISE-TODO: Спрайт жопы для арахнидов
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # Sunrise-Edit SUNRISE-TODO: Спрайт жопы для арахнидов
- type: bodyType
id: ArachnidNormal

View file

@ -14,7 +14,10 @@
maleLastNames: NamesDionaLast # Russian-LastnameGender
femaleLastNames: NamesDionaLast # Russian-LastnameGender
naming: TheFirstofLast
buttScanTexture: /Textures/_Sunrise/ButtsScans/diona.png # Sunrise-Edit
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: diona
- type: bodyType
id: DionaNormal

View file

@ -16,7 +16,6 @@
markingLimits: MobHumanMarkingLimits
dollPrototype: MobDwarfDummy
skinColoration: HumanToned
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit
defaultHeight: 0.80
defaultWidth: 1
maxHeight: 1
@ -25,3 +24,7 @@
minWidth: 0.90
minHeightCm: 130
maxHeightCm: 200
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human

View file

@ -9,7 +9,10 @@
dollPrototype: MobGingerbreadDummy
skinColoration: HumanToned
defaultSkinTone: "#9a7c5a"
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
- type: bodyType
id: GingerbreadNormal

View file

@ -16,7 +16,10 @@
markingLimits: MobHumanMarkingLimits
dollPrototype: MobHumanDummy
skinColoration: HumanToned
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
# The lack of a layer means that
# this person cannot have round-start anything

View file

@ -14,7 +14,10 @@
femaleFirstNames: NamesMothFirstFemale
maleLastNames: NamesMothLast
femaleLastNames: NamesMothLast
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit SUNRISE-TODO: Спрайт жопы для молей
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
- type: bodyType
id: MothNormal

View file

@ -13,7 +13,10 @@
maleFirstNames: NamesReptilianMale
femaleFirstNames: NamesReptilianFemale
naming: FirstDashFirst
buttScanTexture: /Textures/_Sunrise/ButtsScans/reptilian.png # Sunrise-Edit
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
- type: bodyType
id: ReptilianNormal

View file

@ -11,7 +11,10 @@
femaleFirstNames: NamesSkeletonFirst
dollPrototype: MobSkeletonPersonDummy
skinColoration: TintedHues
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit SUNRISE-TODO: Спрайт жопы скелетов
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # Sunrise-Edit SUNRISE-TODO: Спрайт жопы скелетов
- type: bodyType
id: SkeletonNormal

View file

@ -10,7 +10,10 @@
markingLimits: MobSlimeMarkingLimits
dollPrototype: MobSlimePersonDummy
skinColoration: Hues
buttScanTexture: /Textures/_Sunrise/ButtsScans/slime.png # Sunrise-Edit
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # Sunrise-Edit
- type: bodyType
id: SlimeNormal

View file

@ -11,8 +11,12 @@
femaleFirstNames: NamesSkeletonFirst
dollPrototype: MobSkeletonPersonDummy
skinColoration: TintedHues
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # Sunrise-Edit
# Sunrise-Start
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
stationRecordsHidden: true
# Sunrise-End
- type: bodyType
id: TerminatorNormal

View file

@ -14,7 +14,10 @@
naming: First
sexes:
- Unsexed
buttScanTexture: /Textures/_Sunrise/ButtsScans/vox.png # Sunrise-Edit
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # Sunrise-Edit
- type: bodyType
id: VoxNormal

View file

@ -1,19 +1,19 @@
- type: cargoProduct
id: ServicePrinterDocMachine
id: ServiceCopyMachineMachine
icon:
sprite: _Sunrise/Structures/Machines/printer.rsi
sprite: _Sunrise/Structures/Machines/copy_machine.rsi
state: icon
product: CrateServicePrinterDoc
product: CrateServiceCopyMachine
cost: 2000
category: cargoproduct-category-name-service
group: market
- type: cargoProduct
id: CrateServicePrinterDocRestock
id: CrateServiceCopyMachineRestock
icon:
sprite: Objects/Misc/pens.rsi
state: pen
product: CrateServicePrinterDocRestock
product: CrateServiceCopyMachineRestock
cost: 1000
category: cargoproduct-category-name-service
group: market

View file

@ -1,5 +1,5 @@
- type: entity
id: CrateServicePrinterDoc
id: CrateServiceCopyMachine
parent: CrateGenericSteel
name: printer machine crate
description:
@ -7,10 +7,10 @@
- type: StorageFill
contents:
- id: Screwdriver
- id: PrinterDocFlatpack
- id: CopyMachineFlatpack
- type: entity
id: CrateServicePrinterDocRestock
id: CrateServiceCopyMachineRestock
parent: CrateGenericSteel
name: printer machine restock crate
description: printer paper with ink and office papper

View file

@ -0,0 +1,66 @@
- type: docTemplatePool
id: Sunrise
templates:
- Appeal
- ApplicationAccess
- ApplicationAppointmentInterim
- ApplicationEmployment
- ApplicationEquipment
- Certificate
- CertificateAdvancedTraining
- CertificateOffense
- ClosingIndictment
- ComplaintOffense
- ComplaintViolationLaborRules
- ConditionReport
- ConstructionPermit
- DeathCertificate
- DecisionToStartTrial
- DisposalReport
- DivorceCertificate
- EvacuationShuttleRequest
- ExperimentReport
- InternalAffairsAgentsReport
- Judgment
- LetterResignation
- MarriageCertificate
- OrderDeprivationAccess
- OrderDismissal
- OrderEncouragement
- OrderingSpecialEquipment
- OrderMedicalIntervention
- OrderParolePrisoner
- OrderPurchaseResourcesEquipment
- OrderPurchaseWeapons
- OrderRecognizingSentienceCreature
- PermissionDisposeBody
- PermissionEquipment
- PermissionToCarryWeapons
- PermissionToExtendMarriage
- PermissionToTravelInCaseOfThreat
- PrescriptionDrugAuthorization
- ProductManufacturingOrder
- ReportDepartment
- ReportEmployeePerformance
- ReportOnEliminationOfViolations
- ReportOnTheChaptersMeeting
- ReportStation
- ReportStudyObject
- RequestCallMembersCentralCommitteeDSO
- RequestChangeSalary
- RequestConstructionWork
- RequestDocuments
- RequestEuthanasia
- RequestForNonlistedEmployment
- RequestForPromotion
- RequestModernization
- RequestRequestToEstablishThreatLevel
- SearchPermission
- Sentence
- ShuttleRegistrationRequest
- StatementHealth
- BusinessDeal
- ErrorLoadingFormHeader
- NoticeOfLiquidation
- NoteBeginningMilitaryActions
- ReportAccomplishmentGoals

View file

@ -3,348 +3,522 @@
name: doc-template-appeal-name
content: /ServerInfo/Documents/_Sunrise/General/Appeal.xml
component: General
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ApplicationAccess
name: doc-template-application-access-name
content: /ServerInfo/Documents/_Sunrise/Command/ApplicationAccess.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ApplicationAppointmentInterim
name: doc-template-application-appointment-interim-name
content: /ServerInfo/Documents/_Sunrise/Command/ApplicationAppointmentInterim.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ApplicationEmployment
name: doc-template-application-employment-name
content: /ServerInfo/Documents/_Sunrise/Command/ApplicationEmployment.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ApplicationEquipment
name: doc-template-application-equipment-name
content: /ServerInfo/Documents/_Sunrise/Command/ApplicationEquipment.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: Certificate
name: doc-template-certificate-name
content: /ServerInfo/Documents/_Sunrise/Command/Certificate.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: CertificateAdvancedTraining
name: doc-template-certificate-advanced-training-name
content: /ServerInfo/Documents/_Sunrise/Command/CertificateAdvancedTraining.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: CertificateOffense
name: doc-template-certificate-offense-name
content: /ServerInfo/Documents/_Sunrise/Security/CertificateOffense.xml
component: Security
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ClosingIndictment
name: doc-template-closing-indictment-name
content: /ServerInfo/Documents/_Sunrise/Security/ClosingIndictment.xml
component: Security
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ComplaintOffense
name: doc-template-complaint-offense-name
content: /ServerInfo/Documents/_Sunrise/Security/ComplaintOffense.xml
component: Security
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ComplaintViolationLaborRules
name: doc-template-complaint-violation-labor-rules-name
content: /ServerInfo/Documents/_Sunrise/Justice/ComplaintViolationLaborRules.xml
component: Justice
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ConditionReport
name: doc-template-condition-report-name
content: /ServerInfo/Documents/_Sunrise/Engineering/ConditionReport.xml
component: Engineering
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ConstructionPermit
name: doc-template-construction-permit-name
content: /ServerInfo/Documents/_Sunrise/Engineering/ConstructionPermit.xml
component: Engineering
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: DeathCertificate
name: doc-template-death-certificate-name
content: /ServerInfo/Documents/_Sunrise/Medical/DeathCertificate.xml
component: Medical
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: DecisionToStartTrial
name: doc-template-decision-to-start-trial-name
content: /ServerInfo/Documents/_Sunrise/Justice/DecisionToStartTrial.xml
component: Justice
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: DisposalReport
name: doc-template-disposal-report-name
content: /ServerInfo/Documents/_Sunrise/Supply/DisposalReport.xml
component: Supply
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: DivorceCertificate
name: doc-template-divorce-certificate-name
content: /ServerInfo/Documents/_Sunrise/Service/DivorceCertificate.xml
component: Service
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: EvacuationShuttleRequest
name: doc-template-evacuation-shuttle-request-name
content: /ServerInfo/Documents/_Sunrise/Command/EvacuationShuttleRequest.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ExperimentReport
name: doc-template-experiment-report-name
content: /ServerInfo/Documents/_Sunrise/Science/ExperimentReport.xml
component: Science
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: InternalAffairsAgentsReport
name: doc-template-internal-affairs-agents-report-name
content: /ServerInfo/Documents/_Sunrise/Justice/InternalAffairsAgentsReport.xml
component: Justice
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: Judgment
name: doc-template-judgment-name
content: /ServerInfo/Documents/_Sunrise/Justice/Judgment.xml
component: Justice
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: LetterResignation
name: doc-template-letter-resignation-name
content: /ServerInfo/Documents/_Sunrise/Command/LetterResignation.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: MarriageCertificate
name: doc-template-marriage-certificate-name
content: /ServerInfo/Documents/_Sunrise/Service/MarriageCertificate.xml
component: Service
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderDeprivationAccess
name: doc-template-order-deprivation-access-name
content: /ServerInfo/Documents/_Sunrise/Command/OrderDeprivationAccess.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderDismissal
name: doc-template-order-dismissal-name
content: /ServerInfo/Documents/_Sunrise/Command/OrderDismissal.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderEncouragement
name: doc-template-order-encouragement-name
content: /ServerInfo/Documents/_Sunrise/Command/OrderEncouragement.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderingSpecialEquipment
name: doc-template-ordering-special-equipment-name
content: /ServerInfo/Documents/_Sunrise/Centcom/OrderingSpecialEquipment.xml
component: Centcom
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderMedicalIntervention
name: doc-template-order-medical-intervention-name
content: /ServerInfo/Documents/_Sunrise/General/OrderMedicalIntervention.xml
component: General
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderParolePrisoner
name: doc-template-order-parole-prisoner-name
content: /ServerInfo/Documents/_Sunrise/Command/OrderParolePrisoner.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderPurchaseResourcesEquipment
name: doc-template-order-purchase-resources-equipment-name
content: /ServerInfo/Documents/_Sunrise/Supply/OrderPurchaseResourcesEquipment.xml
component: Supply
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderPurchaseWeapons
name: doc-template-order-purchase-weapons-name
content: /ServerInfo/Documents/_Sunrise/Supply/OrderPurchaseWeapons.xml
component: Supply
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: OrderRecognizingSentienceCreature
name: doc-template-order-recognizing-sentience-creature-name
content: /ServerInfo/Documents/_Sunrise/Science/OrderRecognizingSentienceCreature.xml
component: Science
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: PermissionDisposeBody
name: doc-template-permission-dispose-body-name
content: /ServerInfo/Documents/_Sunrise/Medical/PermissionDisposeBody.xml
component: Medical
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: PermissionEquipment
name: doc-template-permission-equipment-name
content: /ServerInfo/Documents/_Sunrise/Command/PermissionEquipment.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: PermissionToCarryWeapons
name: doc-template-permission-to-carry-weapons-name
content: /ServerInfo/Documents/_Sunrise/Command/PermissionToCarryWeapons.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: PermissionToExtendMarriage
name: doc-template-permission-to-extend-marriage-name
content: /ServerInfo/Documents/_Sunrise/Command/PermissionToExtendMarriage.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: PermissionToTravelInCaseOfThreat
name: doc-template-permission-to-travel-in-case-of-threat-name
content: /ServerInfo/Documents/_Sunrise/Command/PermissionToTravelInCaseOfThreat.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: PrescriptionDrugAuthorization
name: doc-template-prescription-drug-authorization-name
content: /ServerInfo/Documents/_Sunrise/Medical/PrescriptionDrugAuthorization.xml
component: Medical
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ProductManufacturingOrder
name: doc-template-product-manufacturing-order-name
content: /ServerInfo/Documents/_Sunrise/General/ProductManufacturingOrder.xml
component: General
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportDepartment
name: doc-template-report-department-name
content: /ServerInfo/Documents/_Sunrise/Command/ReportDepartment.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportEmployeePerformance
name: doc-template-report-employee-performance-name
content: /ServerInfo/Documents/_Sunrise/Command/ReportEmployeePerformance.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportOnEliminationOfViolations
name: doc-template-report-on-elimination-of-violations-name
content: /ServerInfo/Documents/_Sunrise/Command/ReportOnEliminationOfViolations.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportOnTheChaptersMeeting
name: doc-template-report-on-the-chapters-meeting-name
content: /ServerInfo/Documents/_Sunrise/Command/ReportOnTheChaptersMeeting.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportStation
name: doc-template-report-station-name
content: /ServerInfo/Documents/_Sunrise/Command/ReportStation.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportStudyObject
name: doc-template-report-study-object-name
content: /ServerInfo/Documents/_Sunrise/Science/ReportStudyObject.xml
component: Science
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestCallMembersCentralCommitteeDSO
name: doc-template-request-call-members-central-committee-dso-name
content: /ServerInfo/Documents/_Sunrise/Centcom/RequestCallMembersCentralCommitteeDSO.xml
component: Centcom
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestChangeSalary
name: doc-template-request-change-salary-name
content: /ServerInfo/Documents/_Sunrise/General/RequestChangeSalary.xml
component: General
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestConstructionWork
name: doc-template-request-construction-work-name
content: /ServerInfo/Documents/_Sunrise/Engineering/RequestConstructionWork.xml
component: Engineering
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestDocuments
name: doc-template-request-documents-name
content: /ServerInfo/Documents/_Sunrise/Justice/RequestDocuments.xml
component: Justice
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestEuthanasia
name: doc-template-request-euthanasia-name
content: /ServerInfo/Documents/_Sunrise/Medical/RequestEuthanasia.xml
component: Medical
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestForNonlistedEmployment
name: doc-template-request-for-non-listed-employment-name
content: /ServerInfo/Documents/_Sunrise/Command/RequestForNonlistedEmployment.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestForPromotion
name: doc-template-request-for-promotion-name
content: /ServerInfo/Documents/_Sunrise/Command/RequestForPromotion.xml
component: Command
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestModernization
name: doc-template-request-modernization-name
content: /ServerInfo/Documents/_Sunrise/Science/RequestModernization.xml
component: Science
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: RequestRequestToEstablishThreatLevel
name: doc-template-request-to-establish-threat-level-name
content: /ServerInfo/Documents/_Sunrise/Science/RequestRequestToEstablishThreatLevel.xml
component: Science
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: SearchPermission
name: doc-template-search-permission-name
content: /ServerInfo/Documents/_Sunrise/Security/SearchPermission.xml
component: Security
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: Sentence
name: doc-template-sentence-name
content: /ServerInfo/Documents/_Sunrise/Security/Sentence.xml
component: Security
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ShuttleRegistrationRequest
name: doc-template-shuttle-registration-request-name
content: /ServerInfo/Documents/_Sunrise/Security/ShuttleRegistrationRequest.xml
component: Security
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: StatementHealth
name: doc-template-statement-health-name
content: /ServerInfo/Documents/_Sunrise/Medical/StatementHealth.xml
component: Medical
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: BusinessDeal
@ -352,6 +526,9 @@
content: /ServerInfo/Documents/_Sunrise/Syndicate/BusinessDeal.xml
component: Syndicate
isPublic: false
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ErrorLoadingFormHeader
@ -359,6 +536,9 @@
content: /ServerInfo/Documents/_Sunrise/Syndicate/ErrorLoadingFormHeader.xml
component: Syndicate
isPublic: false
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: NoticeOfLiquidation
@ -366,6 +546,9 @@
content: /ServerInfo/Documents/_Sunrise/Syndicate/NoticeOfLiquidation.xml
component: Syndicate
isPublic: false
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: NoteBeginningMilitaryActions
@ -373,6 +556,9 @@
content: /ServerInfo/Documents/_Sunrise/Syndicate/NoteBeginningMilitaryActions.xml
component: Syndicate
isPublic: false
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header
- type: docTemplate
id: ReportAccomplishmentGoals
@ -380,3 +566,6 @@
content: /ServerInfo/Documents/_Sunrise/Syndicate/ReportAccomplishmentGoals.xml
component: Syndicate
isPublic: false
header:
sprite: /Textures/_Sunrise/CopyMachine/paper_headers.rsi
state: nanotrasen_form_header

View file

@ -1,11 +1,11 @@
- type: entity
id: PrinterDocMachineCircuitboard
id: CopyMachineMachineCircuitboard
parent: BaseMachineCircuitboard
name: document printer machine board
description: A machine printed circuit board for an document printer
components:
- type: MachineBoard
prototype: PrinterDoc
prototype: CopyMachine
stackRequirements:
Manipulator: 4
Glass: 1

View file

@ -1,8 +1,8 @@
- type: entity
parent: BaseFlatpack
id: PrinterDocFlatpack
id: CopyMachineFlatpack
name: document printer flatpack
description: A flatpack used for constructing a document printer.
components:
- type: Flatpack
entity: PrinterDoc
entity: CopyMachineFilled

View file

@ -1,13 +1,13 @@
- type: entity
parent: [ BaseMachinePowered, ConstructibleMachine ]
id: PrinterDoc
name: document printer
id: CopyMachine
name: copy machine
description: Bureaucratic perfection. Stores a database of all Nanotrasen documents, and lets you print them as long as you have paper.
components:
- type: Appearance
- type: WiresVisuals
- type: Sprite
sprite: _Sunrise/Structures/Machines/printer.rsi
sprite: _Sunrise/Structures/Machines/copy_machine.rsi
snapCardinals: true
layers:
- state: icon
@ -19,15 +19,12 @@
map: ["enum.MaterialStorageVisualLayers.Inserting"]
- state: panel
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: Transform
anchored: true
noRot: false
- type: Machine
board: PrinterDocMachineCircuitboard
- type: PrinterDoc
board: CopyMachineMachineCircuitboard
- type: CopyMachine
solution: inc
copySlot:
insertSound: /Audio/Effects/packetrip.ogg
@ -35,29 +32,23 @@
whitelist:
tags:
- Paper
- type: MaterialStorage
whitelist:
tags:
- SheetOfficePaper
- Paper
storage:
officePaper: 0
dropOnDeconstruct: false
- type: SolutionContainerManager
solutions:
inc:
maxVol: 250
- type: Spillable
solution: inc
- type: RefillableSolution
solution: inc
- type: ExaminableSolution
solution: inc
- type: Fixtures
fixtures:
fix1:
@ -69,36 +60,26 @@
- MachineMask
layer:
- MachineLayer
- type: ContainerContainer
containers:
paper_copy: !type:ContainerSlot
- type: ItemSlots
- type: WiresPanel
- type: ActivatableUI
key: enum.PrinterDocUiKey.Key
key: enum.CopyMachineUiKey.Key
- type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
enum.PrinterDocUiKey.Key:
type: PrinterDocBoundUserInterface
enum.CopyMachineUiKey.Key:
type: CopyMachineBoundUserInterface
- type: Pullable
- type: StaticPrice
price: 500
- type: Strap
handBuckle: false
position: Stand
buckleOffsets:
- "0,-0.05"
- type: Destructible
thresholds:
- trigger:
@ -112,3 +93,19 @@
node: machineFrame
- !type:DoActsBehavior
acts: ["Destruction"]
- type: entity
parent: CopyMachine
id: CopyMachineFilled
name: copy machine
suffix: Filled
components:
- type: MaterialStorage
storage:
officePaper: 3000
- type: SolutionContainerManager
solutions:
inc:
reagents:
- ReagentId: Inc
Quantity: 30

View file

@ -1,7 +1,7 @@
- type: latheRecipePack
id: CircuitStaticSunrise
recipes:
- PrinterDocMachineCircuitboard
- CopyMachineMachineCircuitboard
- type: latheRecipePack
id: CircuitDynamicSunrise

View file

@ -1,6 +1,6 @@
- type: latheRecipe
id: PrinterDocMachineCircuitboard
result: PrinterDocMachineCircuitboard
id: CopyMachineMachineCircuitboard
result: CopyMachineMachineCircuitboard
completetime: 4
materials:
Steel: 100

View file

@ -11,7 +11,9 @@
dollPrototype: MobDemonDummy
skinColoration: Hues
naming: firstlast
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # SUNRISE-TODO: Спрайт жопы аркан
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # SUNRISE-TODO: Спрайт жопы аркан
- type: bodyType
id: DemonNormal

View file

@ -19,7 +19,6 @@
youngAge: 18
oldAge: 30
maxAge: 60
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png
defaultHeight: 1
defaultWidth: 1
maxHeight: 1.2
@ -28,6 +27,9 @@
minWidth: 0.8
minHeightCm: 130
maxHeightCm: 190
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
- type: markingPoints
id: MobFelinidMarkingLimits

View file

@ -10,7 +10,6 @@
dollPrototype: MobXenoDummy
skinColoration: Hues
sponsorOnly: false
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png
defaultHeight: 1.1
defaultWidth: 1.2
maxHeight: 1.15
@ -19,6 +18,9 @@
minWidth: 1.05
minHeightCm: 155
maxHeightCm: 215
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
- type: bodyType
id: HumanoidXenoNormal

View file

@ -10,7 +10,6 @@
dollPrototype: MobPredatorDummy
skinColoration: None
sponsorOnly: false
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png
defaultHeight: 1.05
defaultWidth: 1.1
maxHeight: 1.15
@ -19,6 +18,9 @@
minWidth: 1
minHeightCm: 155
maxHeightCm: 205
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human
- type: bodyType
id: PredatorNormal

View file

@ -8,7 +8,9 @@
markingLimits: MobSwineMarkingLimits
dollPrototype: MobSwineDummy
skinColoration: None
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # SUNRISE-TODO: Спрайт жопы свинов
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # SUNRISE-TODO: Спрайт жопы свинов
- type: bodyType
id: SwineNormal

View file

@ -18,7 +18,10 @@
youngAge: 23
oldAge: 46
maxAge: 49
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # SUNRISE-TODO: Спрайт жопы таяров
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # SUNRISE-TODO: Спрайт жопы таяров
- type: bodyType
id: TajaranNormal

View file

@ -13,7 +13,10 @@
markingLimits: MobVulpkaninMarkingLimits
dollPrototype: MobVulpkaninDummy
skinColoration: Hues
buttScanTexture: /Textures/_Sunrise/ButtsScans/human.png # SUNRISE-TODO: Спрайт жопы вульп
# Sunrise-Edit
buttScan:
sprite: /Textures/_Sunrise/CopyMachine/butts_scans.rsi
state: human # SUNRISE-TODO: Спрайт жопы вульп
- type: bodyType
id: VulpkaninNormal # VulpkaninCurvedSmallMuzzle

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_centcom.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЦК-ЗАКССН[/bold]
[head=3]Заказ специального снаряжения[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_centcom.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЦК-ЗПЦК[/bold]
[head=3]Запрос на вызов членов ЦК, ДСО [/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЗПД[/bold]
[head=3]Заявление на получение доступа[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЗВРИО[/bold]
[head=3]Заявление о назначении ВрИО[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЗТУ[/bold]
[head=3]Заявление о трудоустройстве[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЗСН[/bold]
[head=3]Заявление на получение cнаряжения[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ГР[/bold]
[head=2]Грамота[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-КВАЛ[/bold]
[head=3]Свидетельство о повышении квалификации[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЦК-ЗЭВАК[/bold]
[head=3]Запрос эвакуационного шаттла[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма СНД/КОМ-ЗУВАЛ[/bold]
[head=2]Заявление об увольнении[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ПЛД[/bold]
[head=3]Приказ о лишении доступа[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ПУВАЛ[/bold]
[head=3]Приказ об увольнении[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ПЩРН[/bold]
[head=2]Приказ о поощрении[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ПУДО[/bold]
[head=3]Приказ об УДО заключенного[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОД-КОД[/bold]
[head=3]Разрешение на использование снаряжения[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-РСН[/bold]
[head=3]Разрешение на ношение оружия[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-РСН[/bold]
[head=3]Разрешение на расширение брака[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-РППУ[/bold]
[head=3]Разрешение на передвижение при угрозе[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ОРО[/bold]
[head=2]Отчет о работе отдела[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ОРО[/bold]
[head=2]Отчет о работе сотрудника[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ОУСН[/bold]
[head=2]Отчет об устранении нарушений[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ОУСН[/bold]
[head=2]Отчет о Собрании Глав[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЦК-СИТ[/bold]
[head=3]Отчет о ситуации на станции[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЗВТУ[/bold]
[head=3]Запрос на внеперечневое трудоустройство[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_cmd.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОМ-ЗПОВ[/bold]
[head=2]Запрос на повышение[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_eng.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/ИНЖ-ОТС[/bold]
[head=3]Отчет о техническом состоянии[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_eng.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/ИНЖ-РС[/bold]
[head=3]Разрешение на строительство[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header_eng.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/ИНЖ-ЗСР[/bold]
[head=3]Запрос на проведение строительных работ[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/КОД-КОД[/bold]
[head=2]Обращение[/head]

View file

@ -1,6 +1,4 @@
<Document>
[tex path="/Textures/_Sunrise/Paper/nanotrasen_form_header.png" scale=1]
[bold]Станция: {stationName}[/bold]
[bold]Форма НТ/МЕД[/bold]
[head=3]Приказ о медицинском вмешательстве[/head]

Some files were not shown because too many files have changed in this diff Show more