Skip to content

Commit

Permalink
Fixes thanks delta o7
Browse files Browse the repository at this point in the history
  • Loading branch information
beck-thompson committed Mar 4, 2025
1 parent 2e9a745 commit 44ea717
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using Robust.Client.UserInterface.Controllers;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Input.Binding;
using Robust.Shared.Network; // DeltaV
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using static Content.Client.CharacterInfo.CharacterInfoSystem;
Expand All @@ -34,7 +33,6 @@ public sealed class CharacterUIController : UIController, IOnStateEntered<Gamepl
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly CustomObjectiveSummaryUIController _objective = default!; // DeltaV
[Dependency] private readonly IClientNetManager _net = default!; // DeltaV

[UISystemDependency] private readonly CharacterInfoSystem _characterInfo = default!;
[UISystemDependency] private readonly SpriteSystem _sprite = default!;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'custom-objective-UI-title'}"
Title="{Loc 'custom-objective-window-title'}"
MinSize="300 250"
SetSize="550 370">
<BoxContainer Orientation="Vertical" Margin="10 10 20 0">
<Label HorizontalAlignment="Center" Text="{Loc 'custom-objective-UI-explain'}" />
<Label HorizontalAlignment="Center" Text="{Loc 'custom-objective-window-explain'}" />
<TextEdit Name="ObjectiveSummaryTextEdit" MaxHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MinHeight="200" />
<Label Name="CharacterLimitLabel" HorizontalAlignment="Center" StyleClasses="LabelSmall"/>
<Label HorizontalAlignment="Center" Text="{Loc 'custom-objective-UI-explain-edit'}" />
<controls:ConfirmButton Name="SubmitButton" ConfirmationText="{Loc 'custom-objective-UI-submit-button-text-confirm'}" Text="{Loc 'custom-objective-UI-submit-button-text'}" Margin="0 10 0 10" />
<Label HorizontalAlignment="Center" Text="{Loc 'custom-objective-window-explain-edit'}" />
<controls:ConfirmButton Name="SubmitButton" ConfirmationText="{Loc 'custom-objective-window-submit-button-text-confirm'}" Text="{Loc 'custom-objective-window-submit-button-text'}" Margin="0 10 0 10" />
</BoxContainer>
</controls:FancyWindow>
5 changes: 4 additions & 1 deletion Content.Server/Objectives/ObjectivesSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,17 @@ private void AddSummary(StringBuilder result, string agent, List<(EntityUid, str
}
*/
// DeltaV - Remove greentext
// DeltaV - begin
agentSummary.AppendLine(Loc.GetString(
"objectives-objective",
("objective", objectiveTitle)
));
// DeltaV - end
}
}

var successRate = totalObjectives > 0 ? (float) completedObjectives / totalObjectives : 0f;
// DeltaV custom objective response.
// DeltaV begin - custom objective response.
if (TryComp<CustomObjectiveSummaryComponent>(mindId, out var customComp))
{
// We have to spit it like this to make it readable. Yeah, it sucks but for some reason the entire thing
Expand All @@ -213,6 +215,7 @@ private void AddSummary(StringBuilder result, string agent, List<(EntityUid, str

agentSummary.AppendLine(Loc.GetString("custom-objective-format", ("line", currentLine)));
}
// DeltaV end - custom objective response
agentSummaries.Add((agentSummary.ToString(), successRate, completedObjectives));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
custom-objective-button-text = Write objective summary
# UI
custom-objective-UI-title = Custom objective summary
custom-objective-UI-submit-button-text = Submit
custom-objective-UI-submit-button-text-confirm = Confirm submission
custom-objective-UI-explain = Explain how you completed your objectives here!
custom-objective-UI-explain-edit = You can always edit this anytime before the round ends.
custom-objective-window-title = Custom objective summary
custom-objective-window-submit-button-text = Submit
custom-objective-window-submit-button-text-confirm = Confirm submission
custom-objective-window-explain = Explain how you completed your objectives here!
custom-objective-window-explain-edit = You can always edit this anytime before the round ends.
objectives-objective = {$objective}
Expand Down

0 comments on commit 44ea717

Please sign in to comment.