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

M41-A Фикс #317

Merged
merged 4 commits into from
Nov 2, 2024
Merged

M41-A Фикс #317

merged 4 commits into from
Nov 2, 2024

Conversation

PowerKAT1
Copy link
Contributor

@PowerKAT1 PowerKAT1 commented Nov 2, 2024

image

Описание обновления:

Фикс патронов с .20 на .30

Проверки

  • PR завершён и мне не нужна помощь чтобы его закончить.
  • Я внимательно просмотрел все свои изменения и багов в них не нашёл.
  • Я запускал локальный сервер со своими изменениями и всё протестировал.
  • Я добавил скриншот/видео демонстрации PR в игре, или этот PR этого не требует.
  • Я не добавлял контент нарушающий чужие авторские права.
  • Я добавил свой контент только в папку _LostParadise(только если вы не меняете оригинальный код).
  • Я не добавлял переводы в прототипы, а сделал их с помощью скрипта translations.bat в Tools/SS14_RU.

Изменения

🆑 PowerKAT1

  • fix: Отредактирован перевод описания обоим и самого M41-A

Copy link
Contributor

coderabbitai bot commented Nov 2, 2024

Walkthrough

В данном пулл-реквесте внесены изменения в локализацию и конфигурацию сущностей, связанных с магазином для винтовки M41-A. Основные изменения заключаются в обновлении обозначения калибра с ".20" на ".30" для всех типов магазинов и описания винтовки. Эти изменения затрагивают файлы локализации на русском языке и YAML-файлы, при этом структура сущностей остается неизменной.

Changes

Файл Изменения
Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/ammunition/magazines/M41-A_mag.ftl Обновлены строки локализации для магазинов M41-A: калибр изменен с ".20" на ".30" для всех типов (базовый, полный, учебный, резиновый, урановый).
Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/rifles/M41-A.ftl Изменено описание сущности ent-LPPWeaponRifleM41: калибр обновлен с "20-го калибра" на "30-го калибра".
Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/M41-A_mag.yml Изменены названия сущностей магазинов M41-A с ".20" на ".30" для всех типов (базовый, полный, учебный, резиновый, урановый).
Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml Изменено описание сущности M41-A: тип патронов обновлен с ".20 rifle ammo" на ".30 rifle ammo".

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Game
    participant Localization
    participant YAML

    User->>Game: Запрос на использование M41-A
    Game->>Localization: Получить описание M41-A
    Localization-->>Game: "30-го калибра"
    Game->>YAML: Получить конфигурацию магазина
    YAML-->>Game: "magazine M41-A (.30 rifle)"
    Game-->>User: Предоставить информацию о M41-A
Loading

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.

@github-actions github-actions bot added Изменения: Локализация Изменяет какие-либо файлы .ftl Изменения: YML Изменяет какие-либо файлы .yml Статус: Требуется одобрение Ожидание разработчиков для принятия решений labels Nov 2, 2024
Copy link
Contributor

@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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 567868b and a5b635e.

📒 Files selected for processing (4)
  • Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/ammunition/magazines/M41-A_mag.ftl (1 hunks)
  • Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/rifles/M41-A.ftl (1 hunks)
  • Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/M41-A_mag.yml (1 hunks)
  • Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/ammunition/magazines/M41-A_mag.ftl (1)

Pattern **/*.ftl: Все повторяющиеся переводы должны быть написаны так:
Оригинальный перевод - id1 = text1
Повторяющийся, но с изменениями id2 = { id1 }
и если требуется .desc должен прописываться как { id1.desc }

А многострочные переводы начинающиеся со спецсимвола должны идти сначала id = спецсимвол текст и потом следующая строчка. Пример
id = спецсимвол текст
текст
спецсимвол текст

Все переводы начинающиеся с ent- должны быть с большой буквы после =. Даже после .desc и .suffix

Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/rifles/M41-A.ftl (1)

Pattern **/*.ftl: Все повторяющиеся переводы должны быть написаны так:
Оригинальный перевод - id1 = text1
Повторяющийся, но с изменениями id2 = { id1 }
и если требуется .desc должен прописываться как { id1.desc }

А многострочные переводы начинающиеся со спецсимвола должны идти сначала id = спецсимвол текст и потом следующая строчка. Пример
id = спецсимвол текст
текст
спецсимвол текст

Все переводы начинающиеся с ent- должны быть с большой буквы после =. Даже после .desc и .suffix

Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/M41-A_mag.yml (1)

Pattern **/*.yml: так же в прототипах запрещены любые переводы на русский. Только на английском или ссылкой на перевод.

Все добавляемые прототипы должны быть в нашей папке.

Никогда не предлагать ничего по отступам

При удалении дополнительного дополнения по типу prob:, можно оставить оригинальную часть с - id:.

Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml (1)

Pattern **/*.yml: так же в прототипах запрещены любые переводы на русский. Только на английском или ссылкой на перевод.

Все добавляемые прототипы должны быть в нашей папке.

Никогда не предлагать ничего по отступам

При удалении дополнительного дополнения по типу prob:, можно оставить оригинальную часть с - id:.

🪛 yamllint
Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/M41-A_mag.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)


[error] 7-7: wrong indentation: expected at least 3

(indentation)


[error] 24-24: wrong indentation: expected 6 but found 4

(indentation)


[error] 40-40: wrong indentation: expected 4 but found 2

(indentation)


[error] 44-44: wrong indentation: expected 6 but found 4

(indentation)


[error] 54-54: wrong indentation: expected 4 but found 2

(indentation)


[error] 58-58: wrong indentation: expected 6 but found 4

(indentation)


[error] 68-68: wrong indentation: expected 4 but found 2

(indentation)


[error] 72-72: wrong indentation: expected 6 but found 4

(indentation)


[error] 83-83: wrong indentation: expected 4 but found 2

(indentation)


[error] 87-87: wrong indentation: expected 6 but found 4

(indentation)

Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)


[error] 7-7: wrong indentation: expected at least 3

(indentation)

🔇 Additional comments (10)
Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/rifles/M41-A.ftl (2)

1-1: Перевод названия сущности корректен!

Название сущности следует правилам именования и правильно капитализировано.


2-2: Описание и изменение калибра корректны!

Изменение калибра с 20-го на 30-й соответствует целям PR. Описание грамматически верно и сохраняет согласованность с другими файлами локализации.

Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/ammunition/magazines/M41-A_mag.ftl (2)

3-10: Корректное использование ссылок на описания

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


1-2: ⚠️ Potential issue

Исправьте заглавную букву после знака равенства

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

Примените следующие изменения:

-ent-LPPBaseMagazineRifleM41A = Магазин для M41-A (.30 винтовочные)
+ent-LPPBaseMagazineRifleM41A = Магазин для M41-A (.30 Винтовочные)

Likely invalid or redundant comment.

Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml (1)

5-5: Изменение калибра подтверждено.

Изменение описания с .20 на .30 соответствует целям PR и выполнено корректно. Описание оставлено на английском языке, что соответствует требованиям к прототипам.

Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/M41-A_mag.yml (5)

1-33: Изменение калибра в базовом прототипе подтверждено!

Базовая сущность корректно обновлена с учетом нового калибра .30.

🧰 Tools
🪛 yamllint

[error] 1-1: wrong new line character: expected \n

(new-lines)


[error] 7-7: wrong indentation: expected at least 3

(indentation)


[error] 24-24: wrong indentation: expected 6 but found 4

(indentation)


35-48: Изменение калибра в полном магазине подтверждено!

Конфигурация полного магазина корректно обновлена для калибра .30.

🧰 Tools
🪛 yamllint

[error] 40-40: wrong indentation: expected 4 but found 2

(indentation)


[error] 44-44: wrong indentation: expected 6 but found 4

(indentation)


49-62: Изменение калибра в тренировочном магазине подтверждено!

Конфигурация тренировочного магазина корректно обновлена для калибра .30.

🧰 Tools
🪛 yamllint

[error] 54-54: wrong indentation: expected 4 but found 2

(indentation)


[error] 58-58: wrong indentation: expected 6 but found 4

(indentation)


63-76: Изменение калибра в резиновом магазине подтверждено!

Конфигурация резинового магазина корректно обновлена для калибра .30.

🧰 Tools
🪛 yamllint

[error] 68-68: wrong indentation: expected 4 but found 2

(indentation)


[error] 72-72: wrong indentation: expected 6 but found 4

(indentation)


78-90: Изменение калибра в урановом магазине подтверждено!

Конфигурация уранового магазина корректно обновлена для калибра .30.

🧰 Tools
🪛 yamllint

[error] 83-83: wrong indentation: expected 4 but found 2

(indentation)


[error] 87-87: wrong indentation: expected 6 but found 4

(indentation)

Comment on lines +1 to +10
ent-LPPBaseMagazineRifleM41A = Магазин для M41-A (.30 винтовочные)
.desc = { ent-BaseItem.desc }
ent-LPPBaseMagazineRifleM41AFull = Магазин для M41-A (.30 винтовочные Боевые)
.desc = { ent-LPPBaseMagazineRifleM41A.desc }
ent-LPPBaseMagazineRifleM41APractice = Магазин для M41-A (.30 винтовочные Учебные)
.desc = { ent-LPPBaseMagazineRifleM41A.desc }
ent-LPPBaseMagazineRifleM41ARubber = Магазин для M41-A (.30 винтовочные Резиновые)
.desc = { ent-LPPBaseMagazineRifleM41A.desc }
ent-LPPBaseMagazineRifleM41AUranium = Магазин для M41-A (.30 винтовочные Урановые)
.desc = { ent-LPPBaseMagazineRifleM41A.desc }
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

Обнаружены несоответствия в калибре M41-A между локализациями

В английской локализации (en-US) все ещё используется старый калибр .20, в то время как в русской локализации (ru-RU) и файлах прототипов используется новый калибр .30:

  • Resources/Locale/en-US/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/ammunition/magazines/M41-A_mag.ftl: калибр .20
  • Resources/Locale/ru-RU/ss14-ru/prototypes/_lostparadise/entities/objects/weapons/guns/ammunition/magazines/M41-A_mag.ftl: калибр .30
  • Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/M41-A_mag.yml: калибр .30

Необходимо обновить английскую локализацию для соответствия новому калибру .30.

🔗 Analysis chain

Проверка согласованности изменения калибра

Необходимо убедиться, что изменение калибра с .20 на .30 согласовано во всех связанных файлах.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Поиск возможных упоминаний старого калибра (.20) в связанных файлах
rg -g "*.yml" -g "*.ftl" "\.20.*M41-A"

# Поиск всех упоминаний M41-A для проверки согласованности
rg -g "*.yml" -g "*.ftl" "M41-A.*\.(20|30)"

Length of output: 2408

Comment on lines +1 to +46
- type: entity
name: M41-A
parent: BaseWeaponRifle
id: LPPWeaponRifleM41
description: An old rifle used during the colonial expansion. Uses .30 rifle ammo.
components:
- type: Sprite
sprite: _LostParadise/Objects/Weapons/Guns/Rifles/M41-A.rsi
layers:
- state: base
map: ["enum.GunVisualLayers.Base"]
- state: mag-0
map: ["enum.GunVisualLayers.Mag"]
- type: Gun
fireRate: 7
soundGunshot:
path: /Audio/_LostParadise/Weapons/Guns/Gunshots/M41-A.ogg
- type: ChamberMagazineAmmoProvider
soundRack:
path: /Audio/Weapons/Guns/Cock/ltrifle_cock.ogg
- type: ItemSlots
slots:
gun_magazine:
name: Magazine
startingItem: LPPBaseMagazineRifleM41AFull
insertSound: /Audio/Weapons/Guns/MagIn/ltrifle_magin.ogg
ejectSound: /Audio/Weapons/Guns/MagOut/ltrifle_magout.ogg
priority: 2
whitelist:
tags:
- MagazineRifleM41A
gun_chamber:
name: Chamber
startingItem: CartridgeLightRifle
priority: 1
whitelist:
tags:
- CartridgeLightRifle
- type: ContainerContainer
containers:
gun_magazine: !type:ContainerSlot
gun_chamber: !type:ContainerSlot
- type: MagazineVisuals
magState: mag
steps: 1
zeroVisible: true
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

Требуется исправление символов новой строки.

В файле используются некорректные символы переноса строки. Необходимо использовать \n вместо текущих символов.

Предлагаю выполнить конвертацию символов новой строки в редакторе с поддержкой UNIX-style line endings (LF) или использовать команду:

dos2unix Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml
🧰 Tools
🪛 yamllint

[error] 1-1: wrong new line character: expected \n

(new-lines)


[error] 7-7: wrong indentation: expected at least 3

(indentation)

Comment on lines +1 to +90
- type: entity
id: LPPBaseMagazineRifleM41A
name: "magazine M41-A (.30 rifle)"
parent: BaseItem
abstract: true
components:
- type: Tag
tags:
- MagazineRifleM41A
- type: Item
size: Small
- type: BallisticAmmoProvider
mayTransfer: true
whitelist:
tags:
- CartridgeRifle
capacity: 99
- type: ContainerContainer
containers:
ballistic-ammo: !type:Container
- type: Sprite
sprite: _LostParadise/Objects/Weapons/Guns/Ammunition/Magazine/M41-A_mag.rsi
layers:
- state: base
map: ["enum.GunVisualLayers.Base"]
- state: mag-1
map: ["enum.GunVisualLayers.Mag"]
- type: MagazineVisuals
magState: mag
steps: 5
zeroVisible: false
- type: Appearance
# Magazines
- type: entity
id: LPPBaseMagazineRifleM41AFull
name: "magazine M41-A (.30 rifle)"
parent: LPPBaseMagazineRifleM41A
components:
- type: BallisticAmmoProvider
proto: CartridgeRifle
- type: Sprite
layers:
- state: red
map: ["enum.GunVisualLayers.Base"]
- state: mag-1
map: ["enum.GunVisualLayers.Mag"]
- type: entity
id: LPPBaseMagazineRifleM41APractice
name: "magazine M41-A (.30 rifle practice)"
parent: LPPBaseMagazineRifleM41A
components:
- type: BallisticAmmoProvider
proto: CartridgeRiflePractice
- type: Sprite
layers:
- state: practice
map: ["enum.GunVisualLayers.Base"]
- state: mag-1
map: ["enum.GunVisualLayers.Mag"]
- type: entity
id: LPPBaseMagazineRifleM41ARubber
name: "magazine M41-A (.30 rifle rubber)"
parent: LPPBaseMagazineRifleM41A
components:
- type: BallisticAmmoProvider
proto: CartridgeRifleRubber
- type: Sprite
layers:
- state: rubber
map: ["enum.GunVisualLayers.Base"]
- state: mag-1
map: ["enum.GunVisualLayers.Mag"]
- type: entity
id: LPPBaseMagazineRifleM41AUranium
name: "magazine (.30 rifle uranium)"
parent: LPPBaseMagazineRifleM41A
components:
- type: BallisticAmmoProvider
proto: CartridgeRifleUranium
- type: Sprite
layers:
- state: uranium
map: ["enum.GunVisualLayers.Base"]
- state: mag-1
map: ["enum.GunVisualLayers.Mag"]
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

Обнаружено несоответствие калибров в конфигурациях

В файле Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/rifle.yml все базовые патроны определены как калибр .20, в то время как магазин M41-A настроен на использование этих патронов, но описан как калибр .30. Это создаст несоответствие в игре.

  • Необходимо либо обновить калибр базовых патронов до .30
  • Либо исправить описание магазина M41-A на калибр .20
🔗 Analysis chain

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

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

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Поиск оставшихся упоминаний калибра .20 в конфигурациях
echo "Searching for remaining .20 caliber references..."
rg -l "\.20\s*(rifle|caliber)" --type yaml

# Поиск конфигураций M41-A
echo "Checking M41-A related configurations..."
rg -l "M41-A" --type yaml

Length of output: 1514


Script:

#!/bin/bash
# Проверим содержимое файлов с упоминанием калибра .20
echo "Checking rifle ammunition configurations..."
rg "\.20\s*(rifle|caliber)" -C 2 Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/rifle.yml

echo -e "\nChecking M41-A specific configurations..."
rg "caliber|CartridgeRifle" Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Rifles/M41-A.yml

Length of output: 1162

🧰 Tools
🪛 yamllint

[error] 1-1: wrong new line character: expected \n

(new-lines)


[error] 7-7: wrong indentation: expected at least 3

(indentation)


[error] 24-24: wrong indentation: expected 6 but found 4

(indentation)


[error] 40-40: wrong indentation: expected 4 but found 2

(indentation)


[error] 44-44: wrong indentation: expected 6 but found 4

(indentation)


[error] 54-54: wrong indentation: expected 4 but found 2

(indentation)


[error] 58-58: wrong indentation: expected 6 but found 4

(indentation)


[error] 68-68: wrong indentation: expected 4 but found 2

(indentation)


[error] 72-72: wrong indentation: expected 6 but found 4

(indentation)


[error] 83-83: wrong indentation: expected 4 but found 2

(indentation)


[error] 87-87: wrong indentation: expected 6 but found 4

(indentation)

@Evgencheg Evgencheg merged commit 2ff2b0d into Lost-Paradise-Project:master Nov 2, 2024
15 checks passed
@PowerKAT1 PowerKAT1 deleted the Fix branch November 17, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Изменения: YML Изменяет какие-либо файлы .yml Изменения: Локализация Изменяет какие-либо файлы .ftl Статус: Требуется одобрение Ожидание разработчиков для принятия решений
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants