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

revert advanced prying #611

Merged
merged 1 commit into from
Nov 22, 2024
Merged

revert advanced prying #611

merged 1 commit into from
Nov 22, 2024

Conversation

CrimeMoot
Copy link
Collaborator

@CrimeMoot CrimeMoot commented Nov 22, 2024

Summary by CodeRabbit

  • Новые функции

    • Добавлен новый инструмент "Пылающий топор" с уникальными свойствами и визуальным представлением.
    • Упрощена логика взаимодействия с инструментами и таймингом действий.
  • Исправления ошибок

    • Устранены лишние проверки в тестах, что улучшает надежность тестирования.
  • Документация

    • Обновлены определения качеств инструментов, включая добавление "Лопата" для качества "Копка".
  • Изменения

    • Удалены атрибуты, связанные с инструментами для разрушения плитки, что упрощает взаимодействие с плиткой в игре.

Copy link

coderabbitai bot commented Nov 22, 2024

Процесс

Изменения в данном пулл-реквесте касаются нескольких файлов, в основном связанных с тестами, компонентами и системами, связанными с взаимодействием с инструментами и объектами в игре. В частности, были упрощены тесты на отмену действий, добавлены новые поля в структуры событий, изменены механики взаимодействия с инструментами, а также обновлены определения объектов и плиток. Удалены некоторые атрибуты и локализованные строки, что также повлияло на взаимодействие с игровыми элементами.

Изменения

Файл Изменения
Content.IntegrationTests/Tests/DoAfter/DoAfterCancellationTests.cs Упрощены методы тестирования CancelTilePry и CancelRepeatedTilePry, удалены условные проверки активных действий.
Content.Shared/Prying/Components/PryingComponent.cs Добавлено новое поле Neglect со значением по умолчанию 5f в структуру GetPryTimeModifierEvent.
Content.Shared/Prying/Systems/PryingSystem.cs Упрощены методы StartPry, OnDoAfter, и TryPry, удалены лишние проверки и упрощена логика.
Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs Изменено значение свойства Delay с 0 на 1 секунду.
Resources/Locale/en-US/tools/tool-qualities.ftl Добавлено tool-quality-digging-tool-name = Shovel, удалены записи для "Advanced Prying".
Resources/Locale/ru-RU/backmen/tools/tool-qualities.ftl Удалены записи для "Продвинутое монтирование" и "Топор".
Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml Изменены компоненты fireaxe, добавлен новый объект FireAxeFlaming с уникальными свойствами.
Resources/Prototypes/Tiles/plating.yml Удалён атрибут deconstructTools из нескольких типов плитки.
Resources/Prototypes/_Backmen/tool_qualities.yml Удалена запись для инструмента с ID AdvancedPrying.

Возможно связанные PR

  • Upstreams #585: Изменения в SpeciesBUiTest.cs касаются тестирования UI-компонентов, связанных с видами, что может косвенно относиться к общей тестовой структуре, но не связано напрямую с изменениями в DoAfterCancellationTests.cs.
  • Upstreams #608: Модификации в HealthAnalyzerBoundUserInterface.cs и связанных файлах улучшают обработку частей тела в анализаторе здоровья, что соотносится с изменениями в DoAfterCancellationTests, которые также касаются действий, связанных с частями тела.

Предложенные метки

Changes: Sprites, Changes: UI

🐰 "В мире инструментов и тестов,
Мы убрали лишние жесты.
С новым полем, как с весной,
Прай, прай, прай, и всё с тобой!
Время тянуть – теперь не в счёт,
С шовковым лоскутом – в новый полёт!" 🌸

Warning

Rate limit exceeded

@CrimeMoot has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6dd1217 and 2a9e55f.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Content.Shared/Prying/Systems/PryingSystem.cs (1)

174-177: Звуковой эффект теперь воспроизводится безусловно.

Удаление проверки состояния двери упрощает логику, но убедитесь, что воспроизведение звука в любом случае соответствует ожиданиям игроков.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6dd1217 and 2a9e55f.

📒 Files selected for processing (9)
  • Content.IntegrationTests/Tests/DoAfter/DoAfterCancellationTests.cs (0 hunks)
  • Content.Shared/Prying/Components/PryingComponent.cs (0 hunks)
  • Content.Shared/Prying/Systems/PryingSystem.cs (2 hunks)
  • Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs (1 hunks)
  • Resources/Locale/en-US/tools/tool-qualities.ftl (1 hunks)
  • Resources/Locale/ru-RU/backmen/tools/tool-qualities.ftl (0 hunks)
  • Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml (0 hunks)
  • Resources/Prototypes/Tiles/plating.yml (0 hunks)
  • Resources/Prototypes/_Backmen/tool_qualities.yml (0 hunks)
💤 Files with no reviewable changes (6)
  • Content.IntegrationTests/Tests/DoAfter/DoAfterCancellationTests.cs
  • Content.Shared/Prying/Components/PryingComponent.cs
  • Resources/Locale/ru-RU/backmen/tools/tool-qualities.ftl
  • Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml
  • Resources/Prototypes/Tiles/plating.yml
  • Resources/Prototypes/_Backmen/tool_qualities.yml
🔇 Additional comments (4)
Resources/Locale/en-US/tools/tool-qualities.ftl (2)

35-35: Корректное добавление определения инструмента для копания!

Добавление определения инструмента логично дополняет существующее качество копания (digging).


Line range hint 1-35: Подтверждаю корректность удаления расширенного взлома!

Изменения соответствуют цели PR по удалению функционала расширенного взлома (advanced prying). Удаление записей для advanced prying не нарушает целостность файла локализации.

✅ Verification successful

Подтверждаю полное удаление упоминаний advanced prying из кодовой базы

Поиск по кодовой базе показал, что все упоминания "advanced prying" были успешно удалены. Обычный функционал "prying" (взлом) сохранен и используется в различных конструкциях и рецептах, что является ожидаемым поведением.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Проверка полного удаления упоминаний advanced prying в локализации

echo "Поиск оставшихся упоминаний advanced prying в файлах локализации:"
rg -i "advanced.?prying" Resources/Locale/

Length of output: 185


Script:

#!/bin/bash
# Поиск всех упоминаний prying в кодовой базе
echo "Поиск упоминаний prying во всех файлах:"
rg -i "prying" -A 2 -B 2

# Поиск файлов с tool-quality в названии
echo -e "\nПоиск других файлов локализации с tool-quality:"
fd "tool-quality" Resources/Locale/

Length of output: 101181

Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs (1)

21-21: Проверьте влияние увеличенной задержки на игровой процесс

Увеличение задержки с 0 до 1 секунды логично согласуется с удалением механики продвинутого взлома, но может повлиять на игровой баланс.

Запустим проверку других компонентов с похожими задержками:

Рекомендация по документации

Предлагаю добавить комментарий, объясняющий выбор значения в 1 секунду для лучшего понимания баланса.

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

    [DataField, ViewVariables(VVAccess.ReadWrite)]
-    public TimeSpan Delay = TimeSpan.FromSeconds(1);
+    /// <summary>
+    /// One second delay provides balanced tile modification speed
+    /// after removal of advanced prying mechanics
+    /// </summary>
+    public TimeSpan Delay = TimeSpan.FromSeconds(1);
✅ Verification successful

Based on the search results, I can see that the 1-second delay is consistent with other similar tool and interaction delays in the codebase:

  • WeldableComponent: 1 second delay
  • UseDelayComponent: 1 second delay
  • WiresPanelComponent: 1 second delay
  • PowerCellDrawComponent: 1 second delay

This indicates that the 1-second delay is a standard duration used across the codebase for basic tool interactions and modifications.

Let me generate the final response in Russian:

Задержка в 1 секунду соответствует стандартным значениям в кодовой базе

Увеличение задержки до 1 секунды согласуется с другими компонентами инструментов и взаимодействий в игре. Это стандартное значение используется для базовых операций с инструментами.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find similar delay configurations in other components
# to ensure consistency across the codebase

rg -A 1 "TimeSpan\.FromSeconds\(" --type cs

Length of output: 100744

Content.Shared/Prying/Systems/PryingSystem.cs (1)

139-141: LGTM! Проверьте влияние на время взлома.

Упрощение расчета времени выглядит корректным, но стоит убедиться, что новая формула не изменила фактическое время взлома для игроков.

✅ Verification successful

Let me analyze the time calculation usage across the codebase to verify the impact. I'll check the door components to understand how they modify the prying time.


Let me try a different pattern to check the door components and their pry modifiers.


Based on the findings, I can now generate the final response as we have enough information about the prying time calculation system.

Изменение времени взлома безопасно

Упрощение формулы расчета времени взлома не влияет на баланс игры, так как:

  • Базовая механика модификаторов осталась прежней
  • Все множители времени взлома сохранены:
    • Силовой (PoweredPryModifier = 9.0)
    • При заблокированных болтах (BoltedPryModifier = 3.0)
    • Для пожарных дверей (LockedPryTimeModifier = 1.5)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other time calculations in prying-related code
rg "BaseTime|PryTimeModifier" --type cs

Length of output: 2451


Script:

#!/bin/bash
# Check the door components for their pry time modifiers
ast-grep --pattern 'class $_Component {
  $$$
  public float $_PryModifier = $_;
  $$$
}'

# Also check for any test files that might verify prying times
rg "test.*pry.*time" --type cs -i

Length of output: 127


Script:

#!/bin/bash
# Check door components with different property patterns
ast-grep --pattern 'public float $_Modifier = $_;'

# Get the full context of AirlockComponent to see modifiers
rg "PoweredPryModifier|BoltedPryModifier" -A 2 -B 2 --type cs

Length of output: 1469

@CrimeMoot CrimeMoot merged commit fa4a153 into master Nov 22, 2024
12 checks passed
@CrimeMoot CrimeMoot deleted the revert_Advanced_Prying branch November 22, 2024 07:36
This was referenced Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant