Skip to content

Commit

Permalink
Merge branch 'new-frontiers-14:master' into ship-time
Browse files Browse the repository at this point in the history
  • Loading branch information
assignedgod authored Feb 27, 2025
2 parents 6dc5388 + 5fad8b5 commit 5b79c37
Show file tree
Hide file tree
Showing 1,160 changed files with 18,238 additions and 6,773 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
- all:
- changed-files:
- any-glob-to-any-file: "**/*.yml"
- all-globs-to-all-files:
- all-globs-to-any-file:
- "!Resources/Maps/_NF/**/*.yml"
- "!Resources/Prototypes/Maps/_NF/**/*.yml"

Expand Down
10 changes: 7 additions & 3 deletions Content.Client/Guidebook/DocumentParsingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ public void Initialize()
.Assert(_tagControlParsers.ContainsKey, tag => $"unknown tag: {tag}")
.Bind(tag => _tagControlParsers[tag]);

_controlParser = OneOf(_tagParser, TryHeaderControl, TryListControl, TextControlParser) // Frontier: ListControlParser<TryListControl
.Before(SkipWhitespaces);
// Frontier: comment parser
Parser<char, Unit> whitespaceAndCommentParser = SkipWhitespaces.Then(Try(String("<!--").Then(Parser<char>.Any.SkipUntil(String("-->")))).SkipMany());

_controlParser = OneOf(_tagParser, TryHeaderControl, TryListControl, TextControlParser)
.Before(whitespaceAndCommentParser);
// End Frontier

foreach (var typ in _reflectionManager.GetAllChildren<IDocumentTag>())
{
_tagControlParsers.Add(typ.Name, CreateTagControlParser(typ.Name, typ, _sandboxHelper));
}

ControlParser = SkipWhitespaces.Then(_controlParser.Many());
ControlParser = whitespaceAndCommentParser.Then(_controlParser.Many()); // Frontier: SkipWhitespaces<whitespaceAndCommentParser

_sawmill = Logger.GetSawmill("Guidebook");
}
Expand Down
10 changes: 10 additions & 0 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)
MaxWidth = 300
});

// Frontier: uncloneable text
if (msg.Uncloneable == true)
AlertsContainer.AddChild(new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-uncloneable-text"),
Margin = new Thickness(0, 4),
MaxWidth = 300
});
// End Frontier

if (msg.Bleeding == true)
AlertsContainer.AddChild(new RichTextLabel
{
Expand Down
10 changes: 9 additions & 1 deletion Content.Client/Inventory/StrippableBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Robust.Shared.Map;
using static Content.Client.Inventory.ClientInventorySystem;
using static Robust.Client.UserInterface.Control;
using Content.Shared._EE.Strip.Components; // EE

namespace Content.Client.Inventory
{
Expand Down Expand Up @@ -172,7 +173,9 @@ private void AddHandButton(Hand hand)
button.BlockedRect.MouseFilter = MouseFilterMode.Ignore;
}

UpdateEntityIcon(button, hand.HeldEntity);
// Goobstation: use virtual entity if hidden
UpdateEntityIcon(button, EntMan.HasComponent<StripMenuHiddenComponent>(hand.HeldEntity) ? _virtualHiddenEntity : hand.HeldEntity);
// End Goobstation
_strippingMenu!.HandsContainer.AddChild(button);
}

Expand Down Expand Up @@ -214,6 +217,11 @@ private void AddInventoryButton(EntityUid invUid, string slotId, InventoryCompon
if (entity != null && _strippable.IsStripHidden(slotDef, _player.LocalEntity))
entity = _virtualHiddenEntity;

// Goobstation/EE: hide strip menu items
if (entity != null && EntMan.HasComponent<StripMenuHiddenComponent>(entity))
entity = _virtualHiddenEntity;
// End Goobstation/EE

var button = new SlotButton(new SlotData(slotDef, container));
button.Pressed += SlotPressed;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ protected override void Open()
_window = this.CreateWindow<SignalTimerWindow>();
_window.OnStartTimer += StartTimer;
_window.OnCurrentTextChanged += OnTextChanged;
_window.OnCurrentRepeatChanged += OnRepeatChanged; // Frontier
_window.OnCurrentDelayMinutesChanged += OnDelayChanged;
_window.OnCurrentDelaySecondsChanged += OnDelayChanged;
}
Expand All @@ -35,6 +36,13 @@ private void OnTextChanged(string newText)
SendMessage(new SignalTimerTextChangedMessage(newText));
}

// Frontier: Handle Repeat changed
private void OnRepeatChanged(bool newRepeat)
{
SendMessage(new SignalTimerRepeatToggled(newRepeat));
}
//End Frontier

private void OnDelayChanged(string newDelay)
{
if (_window == null)
Expand All @@ -56,6 +64,7 @@ protected override void UpdateState(BoundUserInterfaceState state)
_window.SetCurrentText(cast.CurrentText);
_window.SetCurrentDelayMinutes(cast.CurrentDelayMinutes);
_window.SetCurrentDelaySeconds(cast.CurrentDelaySeconds);
_window.SetCurrentRepeat(cast.CurrentRepeat); // Frontier
_window.SetShowText(cast.ShowText);
_window.SetTriggerTime(cast.TriggerTime);
_window.SetTimerStarted(cast.TimerStarted);
Expand Down
5 changes: 5 additions & 0 deletions Content.Client/MachineLinking/UI/SignalTimerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<LineEdit Name="CurrentDelayEditSeconds" MinWidth="32" />
<Label Name="DelayInfo" Text=" (mm:ss)" />
</BoxContainer>
<!-- Frontier: Repeat Checkbox -->
<BoxContainer Name="RepeatEdit" Orientation="Horizontal">
<CheckBox Name="CurrentRepeatEdit" Access="Public" Text="{Loc 'signal-timer-menu-repeat'}" />
</BoxContainer>
<!-- End Frontier -->
<Button Name="StartTimer" Text="{Loc signal-timer-menu-start}" />
</BoxContainer>
</DefaultWindow>
16 changes: 16 additions & 0 deletions Content.Client/MachineLinking/UI/SignalTimerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public sealed partial class SignalTimerWindow : DefaultWindow
public event Action<string>? OnCurrentTextChanged;
public event Action<string>? OnCurrentDelayMinutesChanged;
public event Action<string>? OnCurrentDelaySecondsChanged;
public event Action<bool>? OnCurrentRepeatChanged; //Frontier: Repeat Changed handler

private TimeSpan? _triggerTime;

Expand All @@ -32,6 +33,7 @@ public SignalTimerWindow()
CurrentTextEdit.OnTextChanged += e => OnCurrentTextChange(e.Text);
CurrentDelayEditMinutes.OnTextChanged += e => OnCurrentDelayMinutesChange(e.Text);
CurrentDelayEditSeconds.OnTextChanged += e => OnCurrentDelaySecondsChange(e.Text);
CurrentRepeatEdit.OnToggled += e => OnCurrentRepeatChange(e.Pressed); //Frontier: Repeat OnToggled
StartTimer.OnPressed += _ => StartTimerWeh();
}

Expand Down Expand Up @@ -77,6 +79,13 @@ public void OnCurrentTextChange(string text)
OnCurrentTextChanged?.Invoke(text);
}

// Frontier: OnCurrentRepeatChange handler
public void OnCurrentRepeatChange(bool toggled)
{
OnCurrentRepeatChanged?.Invoke(toggled);
}
//End Frontier

public void OnCurrentDelayMinutesChange(string text)
{
List<char> toRemove = new();
Expand Down Expand Up @@ -142,6 +151,13 @@ public void SetCurrentText(string text)
CurrentTextEdit.Text = text;
}

// Frontier: SetCurrentRepeat
public void SetCurrentRepeat(bool repeat)
{
CurrentRepeatEdit.Pressed = repeat;
}
// End Frontier

public void SetCurrentDelayMinutes(string delay)
{
CurrentDelayEditMinutes.Text = delay;
Expand Down
13 changes: 13 additions & 0 deletions Content.Client/Materials/MaterialReclaimerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,18 @@ namespace Content.Client.Materials;
/// <inheritdoc/>
public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
{
// Frontier: shut the reclaimer up when it's done if we missed something.
public override bool TryFinishProcessItem(EntityUid uid, MaterialReclaimerComponent? component = null, ActiveMaterialReclaimerComponent? active = null)
{
// We only need the reclaimer component for this.
if (!Resolve(uid, ref component, false))
return false;

// Stop the stream if it exists.
if (component.CutOffSound && component.Stream != null)
_audio.Stop(component.Stream);

return base.TryFinishProcessItem(uid, component, active);
}
// End Frontier
}
17 changes: 17 additions & 0 deletions Content.Client/Materials/MaterialStorageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ public override bool TryInsertMaterialEntity(EntityUid user,
_transform.DetachEntity(toInsert, Transform(toInsert));
return true;
}

// Frontier: partial stack insertion
public override bool TryInsertMaxPossibleMaterialEntity(EntityUid user,
EntityUid toInsert,
EntityUid receiver,
out bool empty,
MaterialStorageComponent? storage = null,
MaterialComponent? material = null,
PhysicalCompositionComponent? composition = null)
{
if (!base.TryInsertMaxPossibleMaterialEntity(user, toInsert, receiver, out empty, storage, material, composition))
return false;
if (empty)
_transform.DetachEntity(toInsert, Transform(toInsert));
return true;
}
// End Frontier: partial stack insertion
}

public enum MaterialStorageVisualLayers : byte
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Physics/Controllers/MoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public override void UpdateBeforeSolve(bool prediction, float frameTime)
return;

if (RelayQuery.TryGetComponent(player, out var relayMover))
{
HandleClientsideMovement(relayMover.RelayEntity, frameTime);
HandleRelayMovement(relayMover.RelayEntity); // Upstream - #34016
}

HandleClientsideMovement(player, frameTime);
}
Expand Down
5 changes: 3 additions & 2 deletions Content.Client/Salvage/UI/SalvageExpeditionWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ public void UpdateState(SalvageExpeditionConsoleState state)
Margin = new Thickness(0f, 0f, 0f, 5f),
});

// Frontier: wrap in rewards > 0 , otherwise dont show "rewards" text
if (mission.Rewards.Count > 0)
// Frontier: only show rewards if enabled via cvar and not empty
if (_cfgManager.GetCVar(NFCCVars.SalvageExpeditionRewardsEnabled) && mission.Rewards.Count > 0)
{
lBox.AddChild(new Label()
{
Expand Down Expand Up @@ -254,6 +254,7 @@ public void UpdateState(SalvageExpeditionConsoleState state)
PanelOverride = new StyleBoxFlat(new Color(30, 30, 34)),
HorizontalExpand = true,
Margin = new Thickness(5f, 0f),
MinWidth = 280, // Frontier
Children =
{
new BoxContainer
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ private void DrawDocks(DrawingHandleScreen handle, EntityUid uid, Matrix3x2 grid
const float sqrt2 = 1.41421356f;
const float dockRadius = DockScale * sqrt2;
// Worst-case bounds used to cull a dock:
Box2 viewBounds = new Box2(-dockRadius, -dockRadius, Size.X + dockRadius, Size.Y + dockRadius);
Box2 viewBounds = new Box2(-dockRadius, -dockRadius, PixelSize.X + dockRadius, PixelSize.Y + dockRadius); // Frontier: Size<PixelSize
if (_docks.TryGetValue(nent, out var docks))
{
foreach (var state in docks)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ public SiliconLawContainer()
if (Corrupted.Pressed)
{
_law!.LawIdentifierOverride = CorruptedString;
_law!.LawPrintOverride = Loc.GetString("silicon-law-print-error"); // Frontier
}
else
{
_law!.LawIdentifierOverride = null;
_law!.LawPrintOverride = null; // Frontier
}
};

Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Silicons/Laws/Ui/LawDisplay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public LawDisplay(EntityUid uid, SiliconLaw law, HashSet<string>? radioChannels)
var identifier = law.LawIdentifierOverride ?? $"{law.Order}";
var lawIdentifier = Loc.GetString("laws-ui-law-header", ("id", identifier));
var lawDescription = Loc.GetString(law.LawString);
var lawIdentifierPlaintext = FormattedMessage.RemoveMarkupPermissive(lawIdentifier);
//var lawIdentifierPlaintext = FormattedMessage.RemoveMarkupPermissive(lawIdentifier); // Frontier
var lawIdentifierPlaintext = FormattedMessage.RemoveMarkupPermissive(law.LawPrintOverride != null ? Loc.GetString("laws-ui-law-header", ("id", law.LawPrintOverride)) : lawIdentifier); // Frontier
var lawDescriptionPlaintext = FormattedMessage.RemoveMarkupPermissive(lawDescription);

LawNumberLabel.SetMarkup(lawIdentifier);
Expand Down
15 changes: 15 additions & 0 deletions Content.Client/UserInterface/Systems/Hands/HandsUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Robust.Shared.Input;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Content.Shared._NF.Interaction.Components;

namespace Content.Client.UserInterface.Systems.Hands;

Expand Down Expand Up @@ -138,6 +139,13 @@ private void LoadPlayerHands(HandsComponent handsComp)
handButton.SetEntity(virt.BlockingEntity);
handButton.Blocked = true;
}
// Frontier - borg hand placeholder
else if (_entities.TryGetComponent(hand.HeldEntity, out HandPlaceholderVisualsComponent? placeholder))
{
handButton.SetEntity(placeholder.Dummy);
handButton.Blocked = true;
}
// End Frontier - borg hand placeholder
else
{
handButton.SetEntity(hand.HeldEntity);
Expand Down Expand Up @@ -189,6 +197,13 @@ private void OnItemAdded(string name, EntityUid entity)
hand.SetEntity(virt.BlockingEntity);
hand.Blocked = true;
}
// Frontier: borg hand placeholders
else if (_entities.TryGetComponent(entity, out HandPlaceholderVisualsComponent? placeholder))
{
hand.SetEntity(placeholder.Dummy);
hand.Blocked = true;
}
// End Frontier: borg hand placeholders
else
{
hand.SetEntity(entity);
Expand Down
26 changes: 18 additions & 8 deletions Content.Client/VendingMachines/UI/VendingMachineMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:co="clr-namespace:Content.Client.UserInterface.Controls"
SetSize="360 380"
MinSize="300 300"> <!-- Frontier: added SetSize, MinSize, remove MinHeight="210" -->
SetSize="360 400"
MinSize="300 320"> <!-- Frontier: added SetSize, MinSize, remove MinHeight="210" -->
<BoxContainer Name="MainContainer" Orientation="Vertical">
<BoxContainer Margin ="0 2 0 4" Orientation="Horizontal">
<Label Text="{Loc 'bank-atm-menu-balance-label'}"
StyleClasses="LabelKeyText" />
<Label Name="BalanceLabel"
Text="{Loc 'bank-atm-menu-no-bank'}" />
</BoxContainer>
<!-- Frontier: balance -->
<GridContainer Margin ="0 2 0 4" Columns="2" HorizontalExpand="True">
<BoxContainer Margin="4 0 2 0" Orientation="Horizontal" HorizontalExpand="True" HorizontalAlignment="Left">
<Label Text="{Loc 'bank-atm-menu-balance-label'}"
StyleClasses="LabelKeyText" />
<Label Name="BalanceLabel"
Text="{Loc 'bank-atm-menu-no-bank'}" />
</BoxContainer>
<BoxContainer Margin="2 0 4 0" Orientation="Horizontal" HorizontalExpand="True" HorizontalAlignment="Right" Name="CashSlotControls">
<Label Text="{Loc 'vending-machine-menu-cash-slot-label'}"
StyleClasses="LabelKeyText" />
<Label Name="CashSlotLabel"
Text="$0" />
</BoxContainer>
</GridContainer>
<!-- End Frontier: balance -->
<LineEdit Name="SearchBar" PlaceHolder="{Loc 'vending-machine-component-search-filter'}" HorizontalExpand="True" Margin ="4 4"/>
<co:SearchListContainer Name="VendingContents" VerticalExpand="True" Margin="4 4"/>
<!-- Footer -->
Expand Down
Loading

0 comments on commit 5b79c37

Please sign in to comment.