Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstrem #10

Merged
merged 71 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b4ee01e
Translate Upstream #2748 (#2837)
lzk228 Dec 10, 2024
9affb3c
Перевод Upstream #2830 (#2836)
lapatison Dec 10, 2024
588e4d7
translate borer names (#2835)
lzk228 Dec 10, 2024
42a8309
[Localize] Poster 52 (#2840)
MureixloI Dec 11, 2024
04b738a
Translate new diona names (#2839)
lzk228 Dec 11, 2024
9d99701
[Resprite] Medical uniforms & rollerbeds (#2802)
MureixloI Dec 11, 2024
ae180fc
Automatic changelog update
IanComradeBot Dec 11, 2024
eef3b02
TooLoud (#151)
Vonsant Dec 12, 2024
80526dc
Опять поднял гит (#152)
FireNameFN Dec 12, 2024
9db0a8e
micro-upstream #4 (#149)
Vonsant Dec 12, 2024
a95d724
[PORT] Система обмена сообщениями в КПК (#153)
Vonsant Dec 12, 2024
d99479e
Revert "new year lobbyscreens removed" (#2831)
NotSoDana Dec 12, 2024
4efc031
Surgeon spawnpoint (#2841)
Ko4ergaPunk Dec 12, 2024
95ecf19
fix nukedisk chances (#2745)
TokenStyle Dec 12, 2024
b72d322
Revert "[PORT] Система обмена сообщениями в КПК (#153)" (#154)
AwareFoxy Dec 12, 2024
8e8938f
Revert "Revert "[PORT] Система обмена сообщениями в КПК (#153)" (#154)"
Vonsant Dec 12, 2024
60272f7
fixes after testing
Vonsant Dec 12, 2024
d89e6aa
Adds surgeon spawnpoint on maps (#2845)
Ko4ergaPunk Dec 12, 2024
4a803db
[Port] Flags (#156)
PuroSlavKing Dec 12, 2024
91d9c3f
Revert "[Port] Flags (#156)" (#157)
Vonsant Dec 13, 2024
67e2d78
Merge pull request #155 from space-syndicate/revert-154-revert-153-PD…
Tornado-Technology Dec 13, 2024
9c8207e
Winter stuff tweak (#2833)
Ko4ergaPunk Dec 14, 2024
7b908e9
[MAPS] Silly Christmass Date (#2854)
Doctorjakes Dec 14, 2024
d46a511
[MAPS] Paper Christmass Date (#2853)
XsenonDash Dec 14, 2024
eac62b1
[MAPS] Avrite New Year update (#2852)
CaptainMaru Dec 14, 2024
d27e5d9
[Maps] Tushkan new year update (#2851)
Ko4ergaPunk Dec 14, 2024
b33fc55
[Maps] Pilgrim new year update (#2850)
Ko4ergaPunk Dec 14, 2024
b75a24a
[Maps] Maus new year update (#2849)
Ko4ergaPunk Dec 14, 2024
1be6a6b
[Maps] Awesome new year update (#2848)
Stubaretka24 Dec 14, 2024
2f27031
[Maps] Outpost return (#2847)
kvant8 Dec 14, 2024
74f47dc
[Maps] Astra new year update (#2844)
lastPechkin Dec 14, 2024
7fa704a
Update corvax_delta.yml (#2856)
Bloodcanis Dec 14, 2024
c89fd75
Merge remote-tracking branch 'upstream/master' into upstream
AwareFoxy Dec 15, 2024
eb94acf
Merge pull request #159 from space-syndicate/upstream
AwareFoxy Dec 15, 2024
cd14136
Помощник по КЗ (#158)
Vonsant Dec 15, 2024
fc5a222
Adds Surgeon role & surgical belt (#146)
Ko4ergaNext Dec 15, 2024
53b0503
Dynamic Hostname System (#121)
AwareFoxy Dec 15, 2024
9043ecc
Спавн хирурга и бригмедика (#161)
AwareFoxy Dec 15, 2024
fd8c85b
upd goal
AwareFoxy Dec 15, 2024
1bf1bee
Merge pull request #162 from AwareFoxy/rewrite-bsh-goal
Tornado-Technology Dec 15, 2024
1fc73fc
new playtim
AwareFoxy Dec 15, 2024
aeeb359
Merge pull request #163 from AwareFoxy/upd-surgery-playtime
AwareFoxy Dec 15, 2024
291cb93
surgeon spawnpoint
Ko4ergaPunk Dec 15, 2024
366baae
[Maps] Pilgrim hotfix #2 (#2860)
Ko4ergaPunk Dec 15, 2024
5874cfa
Merge pull request #164 from Ko4ergaNext/surgeon-spawnpoint
AwareFoxy Dec 15, 2024
5e736bd
Resprite botany food (#2858)
SonicHDC Dec 15, 2024
fbbed4b
pda
Ko4ergaPunk Dec 15, 2024
a6f34cc
spawnpoint
Ko4ergaPunk Dec 15, 2024
7de1aa8
meta fix
Ko4ergaPunk Dec 15, 2024
d743874
fix
Ko4ergaPunk Dec 15, 2024
d8c418a
Merge pull request #165 from Ko4ergaNext/surgeon-pda
AwareFoxy Dec 15, 2024
ff4a2ef
Stonks
Vonsant Dec 15, 2024
75eb5e5
NotStonks
Vonsant Dec 15, 2024
ebdc467
NotSoStonks
Vonsant Dec 15, 2024
4745cdd
Fix spacelaw loadout (#2861)
lzk228 Dec 16, 2024
c68c0ad
Merge pull request #166 from Vonsant/StockTrading
AwareFoxy Dec 16, 2024
06ed3db
Make Jolene TTS voice female (#2834)
Morb0 Dec 16, 2024
712e5fa
Update configs (#2855)
lzk228 Dec 16, 2024
8a798d2
New Year Music (#2829)
AwareFoxy Dec 16, 2024
ac0bae5
Revert "Удаление лимита времени для доступа к стартовым ролям." (#2652)
lzk228 Dec 16, 2024
389c461
Automatic changelog update
IanComradeBot Dec 16, 2024
3448634
Automatic changelog update
IanComradeBot Dec 16, 2024
4b7be5d
[Maps] Glacier new year update (#2864)
NotSoDana Dec 16, 2024
6bb8e2b
Merge pull request #167 from space-syndicate/master
AwareFoxy Dec 16, 2024
f6fd496
Merge pull request #168 from AwareFoxy/surg-hotfix-mood
AwareFoxy Dec 17, 2024
9f340a1
Update solaris.toml (#169)
ksen0morph Dec 17, 2024
65357bb
Гит заебет
FireNameFN Dec 19, 2024
ef3e961
Disabled mood (#171)
FireNameFN Dec 19, 2024
403f991
Автоматический этикеровщик химикалиев (#172)
Vonsant Dec 19, 2024
c2693c4
Умный холодильник. (#175)
Vonsant Dec 20, 2024
caa867d
Merge branch 'master' into upstrem
Mor-Dast Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@ protected override void Open()
_window.OnNameChanged += OnNameChanged;
_window.OnJobChanged += OnJobChanged;
_window.OnJobIconChanged += OnJobIconChanged;
_window.OnNumberChanged += OnNumberChanged; // Corvax-Next-PDAChat
}

// Corvax-Next-PDAChat-Start
private void OnNumberChanged(uint newNumber)
{
SendMessage(new AgentIDCardNumberChangedMessage(newNumber));
}
// Corvax-Next-PDAChat-End

private void OnNameChanged(string newName)
{
SendMessage(new AgentIDCardNameChangedMessage(newName));
Expand Down Expand Up @@ -56,6 +64,7 @@ protected override void UpdateState(BoundUserInterfaceState state)
_window.SetCurrentName(cast.CurrentName);
_window.SetCurrentJob(cast.CurrentJob);
_window.SetAllowedIcons(cast.CurrentJobIconId);
_window.SetCurrentNumber(cast.CurrentNumber); // Corvax-Next-PDAChat
}
}
}
4 changes: 4 additions & 0 deletions Content.Client/Access/UI/AgentIDCardWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<LineEdit Name="NameLineEdit" />
<Label Name="CurrentJob" Text="{Loc 'agent-id-card-current-job'}" />
<LineEdit Name="JobLineEdit" />
<!-- Corvax-Next-PDAChat-Start - Add NanoChat number field -->
<Label Name="CurrentNumber" Text="{Loc 'agent-id-card-current-number'}" />
<LineEdit Name="NumberLineEdit" PlaceHolder="#0000" />
<!-- Corvax-Next-PDAChat-End- -->
<Label Text="{Loc 'agent-id-card-job-icon-label'}"/>
<GridContainer Name="IconGrid" Columns="10">
<!-- Job icon buttons are generated in the code -->
Expand Down
37 changes: 37 additions & 0 deletions Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ public sealed partial class AgentIDCardWindow : DefaultWindow
private readonly SpriteSystem _spriteSystem;

private const int JobIconColumnCount = 10;

private const int MaxNumberLength = 4; // Corvax-Next-PDAChat - Same as NewChatPopup

public event Action<string>? OnNameChanged;
public event Action<string>? OnJobChanged;

public event Action<uint>? OnNumberChanged; // Corvax-Next-PDAChat - Add event for number changes

public event Action<ProtoId<JobIconPrototype>>? OnJobIconChanged;

Expand All @@ -35,9 +39,42 @@ public AgentIDCardWindow()
NameLineEdit.OnTextEntered += e => OnNameChanged?.Invoke(e.Text);
NameLineEdit.OnFocusExit += e => OnNameChanged?.Invoke(e.Text);

// Corvax-Next-PDAChat-Start
JobLineEdit.OnTextEntered += e => OnJobChanged?.Invoke(e.Text);
JobLineEdit.OnFocusExit += e => OnJobChanged?.Invoke(e.Text);

// Corvax-Next-PDAChat - Add handlers for number changes
NumberLineEdit.OnTextEntered += OnNumberEntered;
NumberLineEdit.OnFocusExit += OnNumberEntered;

// Corvax-Next-PDAChat - Filter to only allow digits
NumberLineEdit.OnTextChanged += args =>
{
if (args.Text.Length > MaxNumberLength)
{
NumberLineEdit.Text = args.Text[..MaxNumberLength];
}

// Filter to digits only
var newText = string.Concat(args.Text.Where(char.IsDigit));
if (newText != args.Text)
NumberLineEdit.Text = newText;
};
}

// Corvax-Next-PDAChat - Add number validation and event
private void OnNumberEntered(LineEdit.LineEditEventArgs args)
{
if (uint.TryParse(args.Text, out var number) && number > 0)
OnNumberChanged?.Invoke(number);
}

// Corvax-Next-PDAChat - Add setter for current number
public void SetCurrentNumber(uint? number)
{
NumberLineEdit.Text = number?.ToString("D4") ?? "";
}
// Corvax-Next-PDAChat-End

public void SetAllowedIcons(string currentJobIconId)
{
Expand Down
53 changes: 53 additions & 0 deletions Content.Client/Backmen/Overlays/Shaders/SaturationScaleOverlay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System.Numerics;
using Content.Shared._CorvaxNext.Overlays;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;

namespace Content.Client._CorvaxNext.Overlays.Shaders;

public sealed class SaturationScaleOverlay : Overlay
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] IEntityManager _entityManager = default!;

public override bool RequestScreenTexture => true;
public override OverlaySpace Space => OverlaySpace.WorldSpace;
private readonly ShaderInstance _shader;
private const float Saturation = 0.5f;


public SaturationScaleOverlay()
{
IoCManager.InjectDependencies(this);

_shader = _prototypeManager.Index<ShaderPrototype>("SaturationScale").Instance().Duplicate();
}

protected override bool BeforeDraw(in OverlayDrawArgs args)
{
if (_playerManager.LocalEntity is not { Valid: true } player
|| !_entityManager.HasComponent<SaturationScaleOverlayComponent>(player))
return false;

return base.BeforeDraw(in args);
}


protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture is null)
return;

_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
_shader.SetParameter("saturation", Saturation);

var handle = args.WorldHandle;
handle.SetTransform(Matrix3x2.Identity);
handle.UseShader(_shader);
handle.DrawRect(args.WorldBounds, Color.White);
handle.UseShader(null);
}
}
63 changes: 63 additions & 0 deletions Content.Client/Backmen/Overlays/Systems/SaturationScaleSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
using Content.Client._CorvaxNext.Overlays.Shaders;
using Content.Shared._CorvaxNext.Overlays;
using Content.Shared.GameTicking;
using Robust.Client.Graphics;
using Robust.Shared.Player;

namespace Content.Client._CorvaxNext.Overlays.Systems;

public sealed class SaturationScaleSystem : EntitySystem
{
[Dependency] private readonly IOverlayManager _overlayMan = default!;
[Dependency] private readonly ISharedPlayerManager _playerMan = default!;

private SaturationScaleOverlay _overlay = default!;


public override void Initialize()
{
base.Initialize();

_overlay = new();

SubscribeLocalEvent<SaturationScaleOverlayComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<SaturationScaleOverlayComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<SaturationScaleOverlayComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<SaturationScaleOverlayComponent, PlayerDetachedEvent>(OnPlayerDetached);

SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup);
}


private void RoundRestartCleanup(RoundRestartCleanupEvent ev)
{
_overlayMan.RemoveOverlay(_overlay);
}

private void OnPlayerDetached(EntityUid uid, SaturationScaleOverlayComponent component, PlayerDetachedEvent args)
{
_overlayMan.RemoveOverlay(_overlay);
}

private void OnPlayerAttached(EntityUid uid, SaturationScaleOverlayComponent component, PlayerAttachedEvent args)
{
_overlayMan.AddOverlay(_overlay);
}

private void OnShutdown(EntityUid uid, SaturationScaleOverlayComponent component, ComponentShutdown args)
{
if (uid != _playerMan.LocalEntity)
return;

_overlayMan.RemoveOverlay(_overlay);
}

private void OnInit(EntityUid uid, SaturationScaleOverlayComponent component, ComponentInit args)
{
if (uid != _playerMan.LocalEntity)
return;

_overlayMan.AddOverlay(_overlay);
}
}
2 changes: 1 addition & 1 deletion Content.Client/CartridgeLoader/Cartridges/LogProbeUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public override void UpdateState(BoundUserInterfaceState state)
if (state is not LogProbeUiState logProbeUiState)
return;

_fragment?.UpdateState(logProbeUiState.PulledLogs);
_fragment?.UpdateState(logProbeUiState); // Corvax-Next-PDAChat - just take the state
}
}
26 changes: 22 additions & 4 deletions Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@
BorderColor="#5a5a5a"
BorderThickness="0 0 0 1"/>
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Horizontal" Margin="4 8">
<Label Align="Right" SetWidth="26" ClipText="True" Text="{Loc 'log-probe-label-number'}"/>
<Label Align="Center" SetWidth="100" ClipText="True" Text="{Loc 'log-probe-label-time'}"/>
<Label Align="Left" SetWidth="390" ClipText="True" Text="{Loc 'log-probe-label-accessor'}"/>
<BoxContainer Orientation="Vertical" Margin="4 8">
<!-- Corvax-Next-PDAChat-Start - Add title label -->
<Label Name="TitleLabel"
Text="{Loc 'log-probe-header-access'}"
StyleClasses="LabelHeading"
HorizontalAlignment="Center"
Margin="0 0 0 8"/>

<!-- Add card number display -->
<Label Name="CardNumberLabel"
StyleClasses="LabelSubText"
HorizontalAlignment="Center"
Margin="0 0 0 8"
Visible="False"/>

<!-- Adjust column headers -->
<BoxContainer Orientation="Horizontal">
<Label Align="Right" SetWidth="26" ClipText="True" Text="{Loc 'log-probe-label-number'}"/>
<Label Align="Center" SetWidth="100" ClipText="True" Text="{Loc 'log-probe-label-time'}"/>
<Label Name="ContentLabel" Align="Left" SetWidth="390" ClipText="True" Text="{Loc 'log-probe-label-accessor'}"/>
</BoxContainer>
<!-- Corvax-Next-PDAChat-End -->
</BoxContainer>
</PanelContainer>
<ScrollContainer VerticalExpand="True" HScrollEnabled="True">
Expand Down
109 changes: 107 additions & 2 deletions Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using Content.Shared.CartridgeLoader.Cartridges;
using System.Linq;
using Content.Client._CorvaxNext.CartridgeLoader.Cartridges;
using Content.Shared.CartridgeLoader.Cartridges;
using Content.Shared._CorvaxNext.CartridgeLoader.Cartridges;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
Expand All @@ -13,10 +16,112 @@ public LogProbeUiFragment()
RobustXamlLoader.Load(this);
}

public void UpdateState(List<PulledAccessLog> logs)
// Corvax-Next-PDAChat-Start - Update to handle both types of data
public void UpdateState(LogProbeUiState state)
{
ProbedDeviceContainer.RemoveAllChildren();

if (state.NanoChatData != null)
{
SetupNanoChatView(state.NanoChatData.Value);
DisplayNanoChatData(state.NanoChatData.Value);
}
else
{
SetupAccessLogView();
if (state.PulledLogs.Count > 0)
DisplayAccessLogs(state.PulledLogs);
}
}

private void SetupNanoChatView(NanoChatData data)
{
TitleLabel.Text = Loc.GetString("log-probe-header-nanochat");
ContentLabel.Text = Loc.GetString("log-probe-label-message");

// Show card info if available
var cardInfo = new List<string>();
if (data.CardNumber != null)
cardInfo.Add(Loc.GetString("log-probe-card-number", ("number", $"#{data.CardNumber:D4}")));

// Add recipient count
cardInfo.Add(Loc.GetString("log-probe-recipients", ("count", data.Recipients.Count)));

CardNumberLabel.Text = string.Join(" | ", cardInfo);
CardNumberLabel.Visible = true;
}

private void SetupAccessLogView()
{
TitleLabel.Text = Loc.GetString("log-probe-header-access");
ContentLabel.Text = Loc.GetString("log-probe-label-accessor");
CardNumberLabel.Visible = false;
}

private void DisplayNanoChatData(NanoChatData data)
{
// First add a recipient list entry
var recipientsList = Loc.GetString("log-probe-recipient-list") + "\n" + string.Join("\n",
data.Recipients.Values
.OrderBy(r => r.Name)
.Select(r => $" {r.Name}" +
(string.IsNullOrEmpty(r.JobTitle) ? "" : $" ({r.JobTitle})") +
$" | #{r.Number:D4}"));

var recipientsEntry = new LogProbeUiEntry(0, "---", recipientsList);
ProbedDeviceContainer.AddChild(recipientsEntry);

var count = 1;
foreach (var (partnerId, messages) in data.Messages)
{
// Show only successfully delivered incoming messages
var incomingMessages = messages
.Where(msg => msg.SenderId == partnerId && !msg.DeliveryFailed)
.OrderByDescending(msg => msg.Timestamp);

foreach (var msg in incomingMessages)
{
var messageText = Loc.GetString("log-probe-message-format",
("sender", $"#{msg.SenderId:D4}"),
("recipient", $"#{data.CardNumber:D4}"),
("content", msg.Content));

var entry = new NanoChatLogEntry(
count,
TimeSpan.FromSeconds(Math.Truncate(msg.Timestamp.TotalSeconds)).ToString(),
messageText);

ProbedDeviceContainer.AddChild(entry);
count++;
}

// Show only successfully delivered outgoing messages
var outgoingMessages = messages
.Where(msg => msg.SenderId == data.CardNumber && !msg.DeliveryFailed)
.OrderByDescending(msg => msg.Timestamp);

foreach (var msg in outgoingMessages)
{
var messageText = Loc.GetString("log-probe-message-format",
("sender", $"#{msg.SenderId:D4}"),
("recipient", $"#{partnerId:D4}"),
("content", msg.Content));

var entry = new NanoChatLogEntry(
count,
TimeSpan.FromSeconds(Math.Truncate(msg.Timestamp.TotalSeconds)).ToString(),
messageText);

ProbedDeviceContainer.AddChild(entry);
count++;
}
}
}
// Corvax-Next-PDAChat-End

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

Expand Down
Loading
Loading