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

Roadmap #307

Merged
merged 9 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Content.Client/Info/LinkBanner.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Content.Client.Changelog;
using Content.Client._LostParadise.Roadmap;
using Content.Client.Changelog;
using Content.Client.Stylesheets;
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
using Content.Client.UserInterface.Systems.EscapeMenu;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Shared.CCVar;
Expand Down Expand Up @@ -47,6 +49,14 @@ public LinkBanner()
changelogButton.OnPressed += args => UserInterfaceManager.GetUIController<ChangelogUIController>().ToggleWindow();
buttons.AddChild(changelogButton);

var roadmapButton = new Button
{
Text = Loc.GetString("server-info-roadmap-button"),
StyleClasses = { StyleBase.ButtonCaution },
};
roadmapButton.OnPressed += _ => UserInterfaceManager.GetUIController<RoadmapUI>().ToggleRoadmap();
buttons.AddChild(roadmapButton);

void AddInfoButton(string loc, CVarDef<string> cVar)
{
var button = new Button { Text = Loc.GetString(loc) };
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Options/UI/EscapeMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Resizable="False">

<BoxContainer Orientation="Vertical" SeparationOverride="4" MinWidth="150">
<Button Access="Public" Name="RoadmapButton" Text="{Loc 'ui-roadmap'}" StyleClasses="Caution" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Пересмотрите использование стиля Caution

Стиль Caution обычно используется для предупреждений или опасных действий. Дорожная карта является информационной функцией и может использовать более нейтральный стиль.

Предлагаемое изменение:

-<Button Access="Public" Name="RoadmapButton" Text="{Loc 'ui-roadmap'}" StyleClasses="Caution" />
+<Button Access="Public" Name="RoadmapButton" Text="{Loc 'ui-roadmap'}" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Button Access="Public" Name="RoadmapButton" Text="{Loc 'ui-roadmap'}" StyleClasses="Caution" />
<Button Access="Public" Name="RoadmapButton" Text="{Loc 'ui-roadmap'}" />

<changelog:ChangelogButton Access="Public" Name="ChangelogButton"/>
<ui:VoteCallMenuButton />
<Button Access="Public" Name="OptionsButton" Text="{Loc 'ui-escape-options'}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Client.Gameplay;
using Content.Client._LostParadise.Roadmap;
using Content.Client.Gameplay;
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
using Content.Client.UserInterface.Controls;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Client.UserInterface.Systems.Info;
Expand Down Expand Up @@ -63,6 +64,12 @@ public void OnStateEntered(GameplayState state)
_escapeWindow.OnClose += DeactivateButton;
_escapeWindow.OnOpen += ActivateButton;

_escapeWindow.RoadmapButton.OnPressed += _ =>
{
CloseEscapeWindow();
UIManager.GetUIController<RoadmapUI>().ToggleRoadmap();
};

_escapeWindow.ChangelogButton.OnPressed += _ =>
{
CloseEscapeWindow();
Expand Down
96 changes: 96 additions & 0 deletions Content.Client/_LostParadise/Roadmap/RoadmapControl.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
using Content.Shared._LostParadise.Roadmap;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface;
using System.Numerics;

namespace Content.Client._LostParadise.Roadmap
{
public class RoadmapControl : Control
{
private readonly RoadmapPrototype _prototype;
private readonly ProgressBar _progressBar;

public RoadmapControl(RoadmapPrototype prototype)
{
_prototype = prototype;
_progressBar = new ProgressBar
{
MinValue = 0,
MaxValue = 100,
Value = _prototype.Progress,
HorizontalExpand = true
};

SetupUI();
}

private void SetupUI()
{
Margin = new Thickness(0, 20, 0, 0);
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved

var vBox = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical
};

var nameButton = new Button
{
Text = _prototype.Name,
StyleClasses = { "Caution" },
HorizontalExpand = true
};
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved

vBox.AddChild(nameButton);

var descriptionLabel = new Label { Text = _prototype.Description, FontColorOverride = Color.LightGray };
var progressLabel = new Label
{
Text = Loc.GetString("roadmap-progress") + $": {_prototype.Progress}%",
FontColorOverride = Color.White
};

var statusBox = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Horizontal,
HorizontalExpand = true,
SeparationOverride = 5
};

var statusLabel = new Label
{
Text = Loc.GetString("roadmap-status") + $": {Loc.GetString(_prototype.Status)}",
FontColorOverride = GetStatusColor(),
};

statusBox.AddChild(statusLabel);
statusBox.AddChild(new Control { HorizontalExpand = true });

vBox.AddChild(descriptionLabel);
vBox.AddChild(progressLabel);
vBox.AddChild(_progressBar);
vBox.AddChild(statusBox);

var separator = new PanelContainer
{
Modulate = new Color(0.5f, 0.5f, 0.5f, 1f),
MinSize = new Vector2(0, 2),
HorizontalExpand = true
};
vBox.AddChild(separator);

AddChild(vBox);
}

private Color GetStatusColor()
{
string status = _prototype.Status;
return status switch
{
"roadmap-goal-completed" => new Color(0.0f, 1.0f, 0.0f),
"roadmap-goal-progress" => new Color(1.0f, 1.0f, 0.0f),
"roadmap-goal-waiting" => new Color(1.0f, 0.5f, 0.0f),
_ => Color.White
};
}
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
}
}
81 changes: 81 additions & 0 deletions Content.Client/_LostParadise/Roadmap/RoadmapUI.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using Content.Shared._LostParadise.Roadmap;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using System.Numerics;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.Controllers;
using System.Linq;

namespace Content.Client._LostParadise.Roadmap
{
public sealed class RoadmapUI : UIController
{
private DefaultWindow _roadmapWindow;

public RoadmapUI()
{
_roadmapWindow = new DefaultWindow
{
Title = Loc.GetString("roadmap-plan-LLP"),
SetSize = new Vector2(600, 600),
Resizable = false
};

var panelContainer = new PanelContainer
{
MinSize = new Vector2(580, 580),
ModulateSelfOverride = Color.Transparent,
Margin = new Thickness(10)
};

var scrollContainer = new ScrollContainer
{
HorizontalExpand = true,
VerticalExpand = true,
Margin = new Thickness(0, 20, 0, 0)
};

var phaseList = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
SeparationOverride = 10
};

scrollContainer.AddChild(phaseList);
panelContainer.AddChild(scrollContainer);
_roadmapWindow.AddChild(panelContainer);

RefreshUI(phaseList);
}
Comment on lines +17 to +51
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Рекомендации по улучшению конструктора

  1. Размер окна захардкожен, что может вызвать проблемы на разных разрешениях экрана. Рекомендуется:
    • Использовать относительные размеры
    • Добавить минимальный и максимальный размер окна
  2. Отсутствует корректная очистка ресурсов UI элементов

Предлагаемые изменения:

 public sealed class RoadmapUI : UIController, IDisposable
 {
     private DefaultWindow _roadmapWindow;
+    private const float MIN_WIDTH = 400;
+    private const float MAX_WIDTH = 800;
 
     public RoadmapUI()
     {
         _roadmapWindow = new DefaultWindow
         {
             Title = Loc.GetString("roadmap-plan-LLP"),
-            SetSize = new Vector2(600, 600),
+            SetSize = new Vector2(
+                Math.Min(MAX_WIDTH, Math.Max(MIN_WIDTH, UIScreen.Width * 0.4f)),
+                UIScreen.Height * 0.7f),
             Resizable = false
         };
         // ... rest of the code ...
     }

+    public void Dispose()
+    {
+        _roadmapWindow?.Dispose();
+    }
 }

Committable suggestion was skipped due to low confidence.


private void RefreshUI(BoxContainer phaseList)
{
phaseList.RemoveAllChildren();

var roadmapSystem = IoCManager.Resolve<IPrototypeManager>();

var roadmapPhases = roadmapSystem.EnumeratePrototypes<RoadmapPrototype>()
.OrderBy<RoadmapPrototype, int>(phase => phase.Order);

foreach (var phase in roadmapPhases)
{
var phaseControl = new RoadmapControl(phase);
phaseList.AddChild(phaseControl);
}
}
Comment on lines +53 to +67
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Необходима обработка ошибок в методе RefreshUI

  1. Отсутствует обработка ошибок при получении IPrototypeManager
  2. Нет проверки на null для входящего параметра phaseList
  3. Возможны проблемы с производительностью при частом обновлении UI

Рекомендуемые исправления:

-private void RefreshUI(BoxContainer phaseList)
+private void RefreshUI(BoxContainer phaseList)
 {
+    if (phaseList == null)
+        throw new ArgumentNullException(nameof(phaseList));
+
     phaseList.RemoveAllChildren();
 
-    var roadmapSystem = IoCManager.Resolve<IPrototypeManager>();
+    IPrototypeManager? roadmapSystem;
+    try
+    {
+        roadmapSystem = IoCManager.Resolve<IPrototypeManager>();
+    }
+    catch (Exception ex)
+    {
+        Logger.ErrorS("roadmap", ex, "Не удалось получить IPrototypeManager");
+        return;
+    }
 
     var roadmapPhases = roadmapSystem.EnumeratePrototypes<RoadmapPrototype>()
                                     .OrderBy<RoadmapPrototype, int>(phase => phase.Order);
 
     foreach (var phase in roadmapPhases)
     {
+        if (phase == null) continue;
         var phaseControl = new RoadmapControl(phase);
         phaseList.AddChild(phaseControl);
     }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private void RefreshUI(BoxContainer phaseList)
{
phaseList.RemoveAllChildren();
var roadmapSystem = IoCManager.Resolve<IPrototypeManager>();
var roadmapPhases = roadmapSystem.EnumeratePrototypes<RoadmapPrototype>()
.OrderBy<RoadmapPrototype, int>(phase => phase.Order);
foreach (var phase in roadmapPhases)
{
var phaseControl = new RoadmapControl(phase);
phaseList.AddChild(phaseControl);
}
}
private void RefreshUI(BoxContainer phaseList)
{
if (phaseList == null)
throw new ArgumentNullException(nameof(phaseList));
phaseList.RemoveAllChildren();
IPrototypeManager? roadmapSystem;
try
{
roadmapSystem = IoCManager.Resolve<IPrototypeManager>();
}
catch (Exception ex)
{
Logger.ErrorS("roadmap", ex, "Не удалось получить IPrototypeManager");
return;
}
var roadmapPhases = roadmapSystem.EnumeratePrototypes<RoadmapPrototype>()
.OrderBy<RoadmapPrototype, int>(phase => phase.Order);
foreach (var phase in roadmapPhases)
{
if (phase == null) continue;
var phaseControl = new RoadmapControl(phase);
phaseList.AddChild(phaseControl);
}
}


public void ToggleRoadmap()
{
if (_roadmapWindow.IsOpen)
{
_roadmapWindow.Close();
}
else
{
_roadmapWindow.OpenCentered();
}
}
Comment on lines +69 to +79
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Улучшение метода ToggleRoadmap

  1. Отсутствует проверка на null для _roadmapWindow
  2. Нет визуальной обратной связи при переключении окна

Предлагаемые улучшения:

 public void ToggleRoadmap()
 {
+    if (_roadmapWindow == null)
+        return;
+
     if (_roadmapWindow.IsOpen)
     {
+        _roadmapWindow.ModulateSelfOverride = Color.White.WithAlpha(0.5f);
         _roadmapWindow.Close();
     }
     else
     {
+        _roadmapWindow.ModulateSelfOverride = Color.White;
         _roadmapWindow.OpenCentered();
     }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public void ToggleRoadmap()
{
if (_roadmapWindow.IsOpen)
{
_roadmapWindow.Close();
}
else
{
_roadmapWindow.OpenCentered();
}
}
public void ToggleRoadmap()
{
if (_roadmapWindow == null)
return;
if (_roadmapWindow.IsOpen)
{
_roadmapWindow.ModulateSelfOverride = Color.White.WithAlpha(0.5f);
_roadmapWindow.Close();
}
else
{
_roadmapWindow.ModulateSelfOverride = Color.White;
_roadmapWindow.OpenCentered();
}
}

}
}
34 changes: 34 additions & 0 deletions Content.Server/_LostParadise/Roadmap/RoadmapSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Content.Shared.Administration.Logs;
using Content.Shared._LostParadise.Roadmap;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;

namespace Content.Server._LostParadise.Roadmap
{
public class RoadmapSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _protoManager = default!;

Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Рекомендуется добавить документацию к классу.

Структура класса и внедрение зависимостей реализованы правильно, но отсутствует документация, описывающая назначение системы.

Предлагаю добавить XML-документацию:

+/// <summary>
+/// Система управления дорожной картой, отвечающая за обработку обновлений фаз.
+/// </summary>
 public class RoadmapSystem : EntitySystem
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public class RoadmapSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _protoManager = default!;
/// <summary>
/// Система управления дорожной картой, отвечающая за обработку обновлений фаз.
/// </summary>
public class RoadmapSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _protoManager = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoadmapComponent, RoadmapUpdateEvent>(OnPhaseUpdate);
}

private void OnPhaseUpdate(EntityUid uid, RoadmapComponent component, RoadmapUpdateEvent args)
{
if (!_protoManager.TryIndex<RoadmapPrototype>(args.RoadmapId, out var phase))
{
Logger.ErrorS("roadmap", $"Roadmap {args.RoadmapId} not found.");
return;
}

component.CurrentPhase = phase.ID;
component.Progress = args.NewProgress;

Dirty(uid, component);
}
Comment on lines +20 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Улучшить обработку ошибок в методе OnPhaseUpdate.

Текущее сообщение об ошибке можно сделать более информативным, добавив контекст о сущности.

Предлагаю улучшить логирование:

-                Logger.ErrorS("roadmap", $"Roadmap {args.RoadmapId} not found.");
+                Logger.ErrorS("roadmap", $"Не найден прототип дорожной карты {args.RoadmapId} для сущности {uid}.");

Также рекомендуется добавить проверку значения args.NewProgress на допустимый диапазон (например, от 0 до 100).

Committable suggestion was skipped due to low confidence.

}
}
18 changes: 18 additions & 0 deletions Content.Shared/_LostParadise/Roadmap/RoadmapComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;

namespace Content.Shared._LostParadise.Roadmap
{
[RegisterComponent]
public sealed partial class RoadmapComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField("roadmap")]
public string CurrentPhase { get; set; } = string.Empty;
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved

[ViewVariables(VVAccess.ReadWrite)]
[DataField("progress")]
public float Progress { get; set; } = 0.0f;
}
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
}
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
26 changes: 26 additions & 0 deletions Content.Shared/_LostParadise/Roadmap/RoadmapPrototype.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;

namespace Content.Shared._LostParadise.Roadmap
{
[Prototype("roadmap")]
public class RoadmapPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
Comment on lines +9 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Рекомендуется добавить валидацию ID

Свойство ID является критически важным для прототипа. Рекомендуется добавить проверку на null или пустую строку.

 [IdDataField]
-public string ID { get; } = default!;
+public string ID { get; } = string.Empty;
+
+public void Validate()
+{
+    if (string.IsNullOrEmpty(ID))
+        throw new InvalidOperationException("ID не может быть пустым");
+}

Committable suggestion was skipped due to low confidence.


[DataField("name")]
public string Name { get; } = string.Empty;

[DataField("description")]
public string Description { get; } = string.Empty;
Comment on lines +12 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Based on the analysis of the codebase, I can now provide a final response regarding the localization recommendation.

Рекомендуется использовать Loc.GetString для локализации текстовых полей

В кодовой базе широко используется система локализации через Loc.GetString() для текстовых полей в прототипах и компонентах. Для полей Name и Description в RoadmapPrototype.cs рекомендуется:

  • Заменить строковые литералы на ключи локализации
  • Использовать Loc.GetString() для получения локализованных значений
  • Добавить соответствующие записи в файлы локализации

Пример реализации:

[DataField("name")]
public string Name => Loc.GetString("roadmap-prototype-name");

[DataField("description")] 
public string Description => Loc.GetString("roadmap-prototype-description");
🔗 Analysis chain

Рассмотрите добавление локализации

Name и Description являются текстовыми полями, которые могут требовать локализации. Рекомендуется использовать систему локализации.


Let me analyze the localization usage in the codebase further to understand the localization patterns, particularly in prototype-related code.


Let me try a different approach to check localization patterns in prototype and data field usage.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Проверяем использование локализации в других прототипах
rg -l "Loc\.GetString" --type cs

Length of output: 55226


Script:

#!/bin/bash
# Check for localization usage in prototype-related code and systems
rg -A 5 "DataField.*string" Content.Shared/.*Prototype.*

Length of output: 129


Script:

#!/bin/bash
# Check for localization patterns in prototype files and similar data structures
rg -A 5 "\[DataField.*\].*string" --type cs

Length of output: 47782


[DataField("progress")]
public float Progress { get; set; } = 0.0f;

[DataField("status")]
public string Status { get; set; } = "roadmap-goal-waiting";
Comment on lines +18 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Добавьте валидацию значений Progress и документацию Status

  • Progress должен быть в диапазоне [0, 1]
  • Status использует магическую строку, требуется документация возможных значений
 [DataField("progress")]
-public float Progress { get; set; } = 0.0f;
+public float Progress
+{
+    get => _progress;
+    set => _progress = Math.Clamp(value, 0f, 1f);
+}
+private float _progress = 0f;

+/// <summary>
+/// Возможные значения:
+/// - roadmap-goal-waiting: Цель ожидает выполнения
+/// </summary>
 [DataField("status")]
 public string Status { get; set; } = "roadmap-goal-waiting";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[DataField("progress")]
public float Progress { get; set; } = 0.0f;
[DataField("status")]
public string Status { get; set; } = "roadmap-goal-waiting";
[DataField("progress")]
public float Progress
{
get => _progress;
set => _progress = Math.Clamp(value, 0f, 1f);
}
private float _progress = 0f;
/// <summary>
/// Возможные значения:
/// - roadmap-goal-waiting: Цель ожидает выполнения
/// </summary>
[DataField("status")]
public string Status { get; set; } = "roadmap-goal-waiting";

[DataField("order")]
public int Order { get; set; }
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
}
}
16 changes: 16 additions & 0 deletions Content.Shared/_LostParadise/Roadmap/RoadmapUpdateEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Robust.Shared.GameObjects;

namespace Content.Shared._LostParadise.Roadmap
{
public sealed class RoadmapUpdateEvent : EntityEventArgs
{
public string RoadmapId { get; }
public float NewProgress { get; }

public RoadmapUpdateEvent(string roadmapId, float newProgress)
{
RoadmapId = roadmapId;
NewProgress = newProgress;
}
}
Farrellka-dev marked this conversation as resolved.
Show resolved Hide resolved
}
7 changes: 7 additions & 0 deletions Resources/Locale/ru-RU/_LostParadise/roadmap/roadmap.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ui-roadmap = План разработки
roadmap-plan-LLP = План разработки Lost Paradise
roadmap-goal-completed = Завершено
roadmap-goal-progress = В процессе
roadmap-goal-waiting = В ожидании
roadmap-progress = Прогресс
roadmap-status = Статус
27 changes: 27 additions & 0 deletions Resources/Prototypes/_LostParadise/Roadmap/roadmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Короче, думаю тут всё понятно, однако в status
# пихайте: roadmap-goal-completed, roadmap-goal-progress, roadmap-goal-waiting
# Order нужен, чтоб выставить в правильном порядке, так что вот, пользуйтесь

Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Комментарии должны быть на английском языке

Переведите комментарии на английский язык для поддержания единообразия кодовой базы.

Предлагаемые изменения:

-# Короче, думаю тут всё понятно, однако в status 
-# пихайте: roadmap-goal-completed, roadmap-goal-progress, roadmap-goal-waiting
-# Order нужен, чтоб выставить в правильном порядке, так что вот, пользуйтесь
+# Available status values:
+# - roadmap-goal-completed
+# - roadmap-goal-progress
+# - roadmap-goal-waiting
+# 
+# The 'order' field determines the display sequence of roadmap entries
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Короче, думаю тут всё понятно, однако в status
# пихайте: roadmap-goal-completed, roadmap-goal-progress, roadmap-goal-waiting
# Order нужен, чтоб выставить в правильном порядке, так что вот, пользуйтесь
# Available status values:
# - roadmap-goal-completed
# - roadmap-goal-progress
# - roadmap-goal-waiting
#
# The 'order' field determines the display sequence of roadmap entries
🧰 Tools
🪛 yamllint

[error] 1-1: trailing spaces

(trailing-spaces)

- type: roadmap
id: "helloworld"
name: "Версия 2.0 - Дивный новый мир!"
description: "Новая сборка и механики!"
progress: 100
status: roadmap-goal-completed
order: 0

- type: roadmap
id: "centcom"
name: "Обновление 2.1 - Центком важен!"
description: "Обновление Центкома!"
progress: 50
status: roadmap-goal-progress
order: 1

- type: roadmap
id: "blusec"
name: "Обновление 2.2 - BLUSEC!"
description: "Перекрас СБ в новый модный цвет!"
progress: 37
status: roadmap-goal-progress
order: 2
Comment on lines +1 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Исправьте форматирование YAML

Обнаружены проблемы с форматированием YAML файла.

Необходимо:

  1. Удалить пробелы в конце строк
  2. Добавить пустую строку в конец файла
🧰 Tools
🪛 yamllint

[error] 1-1: trailing spaces

(trailing-spaces)


[error] 27-27: no new line character at the end of file

(new-line-at-end-of-file)

Comment on lines +5 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

⚠️ Potential issue

Необходимо использовать только английский язык в прототипах

Согласно правилам кодирования, прототипы должны содержать текст только на английском языке. Русские переводы должны быть размещены в соответствующих локализационных файлах.

Предлагаемые изменения:

- name: "Версия 2.0 - Дивный новый мир!"
- description: "Новая сборка и механики!"
+ name: "Version 2.0 - Brave New World!"
+ description: "New build and mechanics!"

- name: "Обновление 2.1 - Центком важен!"
- description: "Обновление Центкома!"
+ name: "Update 2.1 - CentCom Matters!"
+ description: "CentCom Update!"

- name: "Обновление 2.2 - BLUSEC!"
- description: "Перекрас СБ в новый модный цвет!"
+ name: "Update 2.2 - BLUSEC!"
+ description: "Security department new trendy color!"

Хотите, чтобы я помог создать соответствующие записи локализации в файле Resources/Locale/ru-RU/_LostParadise/roadmap/roadmap.ftl?

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- type: roadmap
id: "helloworld"
name: "Версия 2.0 - Дивный новый мир!"
description: "Новая сборка и механики!"
progress: 100
status: roadmap-goal-completed
order: 0
- type: roadmap
id: "centcom"
name: "Обновление 2.1 - Центком важен!"
description: "Обновление Центкома!"
progress: 50
status: roadmap-goal-progress
order: 1
- type: roadmap
id: "blusec"
name: "Обновление 2.2 - BLUSEC!"
description: "Перекрас СБ в новый модный цвет!"
progress: 37
status: roadmap-goal-progress
order: 2
- type: roadmap
id: "helloworld"
name: "Version 2.0 - Brave New World!"
description: "New build and mechanics!"
progress: 100
status: roadmap-goal-completed
order: 0
- type: roadmap
id: "centcom"
name: "Update 2.1 - CentCom Matters!"
description: "CentCom Update!"
progress: 50
status: roadmap-goal-progress
order: 1
- type: roadmap
id: "blusec"
name: "Update 2.2 - BLUSEC!"
description: "Security department new trendy color!"
progress: 37
status: roadmap-goal-progress
order: 2
🧰 Tools
🪛 yamllint

[error] 27-27: no new line character at the end of file

(new-line-at-end-of-file)

Loading