Skip to content

Commit

Permalink
:trollface:
Browse files Browse the repository at this point in the history
  • Loading branch information
GeneralGaws committed Jan 8, 2025
2 parents 8dd72ba + 4fdafdc commit 1eeeb4b
Show file tree
Hide file tree
Showing 6,580 changed files with 142,957 additions and 40,079 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ Upstream is the [space-wizards/space-station-14](https://github.com/space-wizard

# Content specific to Delta-V

In general anything you create from scratch (not modifying something that exists from upstream) should go in a DeltaV subfolder.
In general anything you create from scratch (not modifying something that exists from upstream) should go in a DeltaV subfolder, `_DV`.

Examples:
- `Content.Server/DeltaV/Chapel/SacrificialAltarSystem.cs`
- `Resources/Prototypes/DeltaV/ai_factions.yml`
- `Resources/Audio/DeltaV/Items/gavel.ogg`
- `Resources/Textures/DeltaV/Icons/cri.rsi`
- `Resources/Locale/en-US/deltav/shipyard/shipyard-console.ftl`
The locale subfolder is lowercase `deltav` instead of `DeltaV`.
- `Resources/ServerInfo/Guidebook/DeltaV/AlertProcedure.xml`
Note that guidebooks go in `ServerInfo/Guidebook/DeltaV` and not `ServerInfo/DeltaV`!
- `Content.Server/_DV/Chapel/SacrificialAltarSystem.cs`
- `Resources/Prototypes/_DV/ai_factions.yml`
- `Resources/Audio/_DV/Items/gavel.ogg`
- `Resources/Textures/_DV/Icons/cri.rsi`
- `Resources/Locale/en-US/_DV/shipyard/shipyard-console.ftl`
- `Resources/ServerInfo/Guidebook/_DV/AlertProcedure.xml`
Note that guidebooks go in `ServerInfo/Guidebook/_DV` and not `ServerInfo/_DV`!

# Changes to upstream files

Expand Down
69 changes: 69 additions & 0 deletions Content.Client/Body/Systems/BodySystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,76 @@
using Content.Shared.Body.Systems;
// Shitmed Change Start
using Content.Shared._Shitmed.Body.Part;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Robust.Client.GameObjects;
using Robust.Shared.Utility;
using Content.Shared.Body.Components;
// Shitmed Change End

namespace Content.Client.Body.Systems;

public sealed class BodySystem : SharedBodySystem
{
// Shitmed Change Start
[Dependency] private readonly MarkingManager _markingManager = default!;

private void ApplyMarkingToPart(MarkingPrototype markingPrototype,
IReadOnlyList<Color>? colors,
bool visible,
SpriteComponent sprite)
{
for (var j = 0; j < markingPrototype.Sprites.Count; j++)
{
var markingSprite = markingPrototype.Sprites[j];

if (markingSprite is not SpriteSpecifier.Rsi rsi)
continue;

var layerId = $"{markingPrototype.ID}-{rsi.RsiState}";

if (!sprite.LayerMapTryGet(layerId, out _))
{
var layer = sprite.AddLayer(markingSprite, j + 1);
sprite.LayerMapSet(layerId, layer);
sprite.LayerSetSprite(layerId, rsi);
}

sprite.LayerSetVisible(layerId, visible);

if (!visible)
continue;

// Okay so if the marking prototype is modified but we load old marking data this may no longer be valid
// and we need to check the index is correct. So if that happens just default to white?
if (colors != null && j < colors.Count)
sprite.LayerSetColor(layerId, colors[j]);
else
sprite.LayerSetColor(layerId, Color.White);
}
}

protected override void ApplyPartMarkings(EntityUid target, BodyPartAppearanceComponent component)
{
if (!TryComp(target, out SpriteComponent? sprite))
return;

if (component.Color != null)
sprite.Color = component.Color.Value;

foreach (var (visualLayer, markingList) in component.Markings)
foreach (var marking in markingList)
{
if (!_markingManager.TryGetMarking(marking, out var markingPrototype))
continue;

ApplyMarkingToPart(markingPrototype, marking.MarkingColors, marking.Visible, sprite);
}
}

protected override void RemoveBodyMarkings(EntityUid target, BodyPartAppearanceComponent partAppearance, HumanoidAppearanceComponent bodyAppearance)
{
return;
}
// Shitmed Change End
}
2 changes: 1 addition & 1 deletion Content.Client/Buckle/BuckleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private void OnAppearanceChange(EntityUid uid, BuckleComponent component, ref Ap
!buckled ||
args.Sprite == null)
{
_rotationVisualizerSystem.SetHorizontalAngle((uid, rotVisuals), rotVisuals.DefaultRotation);
//_rotationVisualizerSystem.SetHorizontalAngle((uid, rotVisuals), rotVisuals.DefaultRotation); // WD EDIT
return;
}

Expand Down
14 changes: 11 additions & 3 deletions Content.Client/CartridgeLoader/Cartridges/LogProbeUi.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Client.UserInterface.Fragments;
using Content.Shared.CartridgeLoader;
using Content.Shared.CartridgeLoader.Cartridges;
using Robust.Client.UserInterface;

Expand All @@ -13,16 +14,23 @@ public override Control GetUIFragmentRoot()
return _fragment!;
}

public override void Setup(BoundUserInterface userInterface, EntityUid? fragmentOwner)
public override void Setup(BoundUserInterface ui, EntityUid? fragmentOwner)
{
_fragment = new LogProbeUiFragment();

_fragment.OnPrintPressed += () =>
{
var ev = new LogProbePrintMessage();
var message = new CartridgeUiMessage(ev);
ui.SendMessage(message);
};
}

public override void UpdateState(BoundUserInterfaceState state)
{
if (state is not LogProbeUiState logProbeUiState)
if (state is not LogProbeUiState cast)
return;

_fragment?.UpdateState(logProbeUiState); // DeltaV - just take the state
_fragment?.UpdateState(cast); // DeltaV - just take the state
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@
<ScrollContainer VerticalExpand="True" HScrollEnabled="True">
<BoxContainer Orientation="Vertical" Name="ProbedDeviceContainer"/>
</ScrollContainer>
<BoxContainer Orientation="Horizontal" Margin="4 8">
<Button Name="PrintButton" HorizontalAlignment="Left" Text="{Loc 'log-probe-print-button'}" Disabled="True"/>
<BoxContainer HorizontalExpand="True"/>
<Label Name="EntityName" Align="Right"/>
</BoxContainer>
</cartridges:LogProbeUiFragment>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq; // DeltaV
using Content.Client.DeltaV.CartridgeLoader.Cartridges; // DeltaV
using Content.Client._DV.CartridgeLoader.Cartridges; // DeltaV
using Content.Shared.CartridgeLoader.Cartridges;
using Content.Shared.DeltaV.CartridgeLoader.Cartridges; // DeltaV
using Content.Shared._DV.CartridgeLoader.Cartridges; // DeltaV
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
Expand All @@ -11,9 +11,16 @@ namespace Content.Client.CartridgeLoader.Cartridges;
[GenerateTypedNameReferences]
public sealed partial class LogProbeUiFragment : BoxContainer
{
/// <summary>
/// Action invoked when the print button gets pressed.
/// </summary>
public Action? OnPrintPressed;

public LogProbeUiFragment()
{
RobustXamlLoader.Load(this);

PrintButton.OnPressed += _ => OnPrintPressed?.Invoke();
}

// DeltaV begin - Update to handle both types of data
Expand All @@ -29,8 +36,7 @@ public void UpdateState(LogProbeUiState state)
else
{
SetupAccessLogView();
if (state.PulledLogs.Count > 0)
DisplayAccessLogs(state.PulledLogs);
DisplayAccessLogs(state.EntityName, state.PulledLogs);
}
}

Expand Down Expand Up @@ -120,12 +126,17 @@ private void DisplayNanoChatData(NanoChatData data)
// DeltaV end

// DeltaV - Handle this in a separate method
private void DisplayAccessLogs(List<PulledAccessLog> logs)
private void DisplayAccessLogs(string name, List<PulledAccessLog> logs)
{
//Reverse the list so the oldest entries appear at the bottom
logs.Reverse();

var count = 1;
EntityName.Text = name;
PrintButton.Disabled = string.IsNullOrEmpty(name);

ProbedDeviceContainer.RemoveAllChildren();

var count = 1;
foreach (var log in logs)
{
AddAccessLog(log, count);
Expand Down
4 changes: 0 additions & 4 deletions Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ protected override void Open()
new ItemSlotButtonPressedEvent(SharedChemMaster.InputSlotName));
_window.OutputEjectButton.OnPressed += _ => SendMessage(
new ItemSlotButtonPressedEvent(SharedChemMaster.OutputSlotName));
_window.BufferTransferButton.OnPressed += _ => SendMessage(
new ChemMasterSetModeMessage(ChemMasterMode.Transfer));
_window.BufferDiscardButton.OnPressed += _ => SendMessage(
new ChemMasterSetModeMessage(ChemMasterMode.Discard));
_window.CreatePillButton.OnPressed += _ => SendMessage(
new ChemMasterCreatePillsMessage(
(uint) _window.PillDosage.Value, (uint) _window.PillNumber.Value, _window.LabelLine));
Expand Down
7 changes: 1 addition & 6 deletions Content.Client/Chemistry/UI/ChemMasterWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@
<Control MinSize="0 10" />

<!-- Buffer -->
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-buffer-text'}" />
<Control HorizontalExpand="True" />
<Button MinSize="80 0" Name="BufferTransferButton" Access="Public" Text="{Loc 'chem-master-window-transfer-button'}" ToggleMode="True" StyleClasses="OpenRight" />
<Button MinSize="80 0" Name="BufferDiscardButton" Access="Public" Text="{Loc 'chem-master-window-discard-button'}" ToggleMode="True" StyleClasses="OpenLeft" />
</BoxContainer>
<Label Text="{Loc 'chem-master-window-buffer-text'}" />

<!-- Buffer info -->
<PanelContainer VerticalExpand="True" MinSize="0 200">
Expand Down
3 changes: 0 additions & 3 deletions Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ private string GenerateLabel(ChemMasterBoundUserInterfaceState state)
/// <param name="state">State data for the dispenser.</param>
private void UpdatePanelInfo(ChemMasterBoundUserInterfaceState state)
{
BufferTransferButton.Pressed = state.Mode == ChemMasterMode.Transfer;
BufferDiscardButton.Pressed = state.Mode == ChemMasterMode.Discard;

BuildContainerUI(InputContainerInfo, state.InputContainerInfo, true);
BuildContainerUI(OutputContainerInfo, state.OutputContainerInfo, false);

Expand Down
8 changes: 7 additions & 1 deletion Content.Client/Credits/CreditsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ public sealed partial class CreditsWindow : DefaultWindow
[Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;

private PatronManager _patronManager = new PatronManager(); // Delta-V
private static readonly Dictionary<string, int> PatronTierPriority = new()
{
["Fund our stations"] = 1,
["$5 dollar tier"] = 2,
["Tip Jar"] = 3,
["Previous Donors"] = 4
};

public CreditsWindow()
{
Expand Down
50 changes: 44 additions & 6 deletions Content.Client/CrewManifest/UI/CrewManifestSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,62 @@ public CrewManifestSection(
Text = Loc.GetString($"department-{section.ID}")
});

var gridContainer = new GridContainer()
// Delta-V - changed type from GridContainer to BoxContainer to better handle long names and titles.
var gridContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
Columns = 2
};

// Delta-V - Start of column BoxContainers.
var namesContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true,
SizeFlagsStretchRatio = 3,
};

var titlesContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true,
SizeFlagsStretchRatio = 2,
};

gridContainer.AddChild(namesContainer);
gridContainer.AddChild(titlesContainer);
// Delta-V - end of column BoxContainers.

AddChild(gridContainer);

foreach (var entry in entries)
{
var name = new RichTextLabel()
// Delta-V - start of name and pronoun container
var nameContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
};

var name = new RichTextLabel();
name.SetMessage(entry.Name);

var gender = new RichTextLabel()
{
Margin = new Thickness(6, 0, 0, 0),
StyleClasses = { "CrewManifestGender" }
};
gender.SetMessage(Loc.GetString("gender-display", ("gender", entry.Gender)));

nameContainer.AddChild(name);
nameContainer.AddChild(gender);
// Delta-V - end of name and pronoun container

var titleContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true
HorizontalExpand = true,
SizeFlagsStretchRatio = 1, // Delta-V
};

var title = new RichTextLabel();
Expand All @@ -69,8 +105,10 @@ public CrewManifestSection(
titleContainer.AddChild(title);
}

gridContainer.AddChild(name);
gridContainer.AddChild(titleContainer);
// Delta-V - grid was replaced with two BoxContainer columns
namesContainer.AddChild(nameContainer);
titlesContainer.AddChild(titleContainer);
// Delta-V - end of grid container change
}
}
}
44 changes: 0 additions & 44 deletions Content.Client/DeltaV/Abilities/CrawlUnderObjectsSystem.cs

This file was deleted.

8 changes: 0 additions & 8 deletions Content.Client/DeltaV/Addictions/AddictionSystem.cs

This file was deleted.

Loading

0 comments on commit 1eeeb4b

Please sign in to comment.