-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Port] Smoke Implant / Имплант Дыма #79
Conversation
WalkthroughThe pull request introduces several changes related to the addition of a "Smoke implant" in both English and Russian localization files. It includes new entries for the implant's name and description, modifications to existing items' names and descriptions, and the introduction of new entities and actions related to the smoke effect. The changes enhance the localization support and functionality of the game by providing detailed descriptions and actions for the new and modified items. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (10)
Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/implanters.ftl (1)
1-2
: Consider adding Russian translations and more specific information.While the file is correctly placed in the Russian localization directory, it currently lacks any Russian text. Additionally, the entity name and description don't provide any specific information about the smoke functionality.
- Consider adding Russian translations for both the entity name and description.
- It would be helpful to include more specific information about the smoke functionality in the description.
Here's a suggestion for improvement (please replace the Russian text with appropriate translations):
-ent-SmokeImplanter = { ent-BaseImplanter } - .desc = { ent-BaseImplanter.desc } +ent-SmokeImplanter = Дымовой имплантер + .desc = Имплантер, содержащий дымовой имплант. { ent-BaseImplanter.desc } Позволяет пользователю создавать облако дыма.Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/subdermal_implants.ftl (1)
2-2
: LGTM: Entity description is clear and accurateThe description for "SmokeImplant" is well-defined in Russian, accurately describing its functionality. It follows the correct .ftl file format and aligns with the PR objectives.
Consider adding information about any cooldown or limitations on the smoke release, if applicable. For example:
- .desc = Этот имплант выпускает облако дыма при активации. + .desc = Этот имплант выпускает облако дыма при активации. Может использоваться раз в [X] минут.Replace [X] with the actual cooldown time if there is one.
Resources/Locale/ru-RU/_white/prototypes/actions/types.ftl (2)
2-2
: LGTM: Correct syntax and appropriate description.The description is well-formatted and accurately describes the action in Russian.
For consistency, consider adding a period at the end of the action name on line 1, matching the format of the description:
-ent-ActivateSmokeImplant = Выпустить облако дыма +ent-ActivateSmokeImplant = Выпустить облако дыма. .desc = Выпускает облако дыма вокруг вас.
1-2
: Changes align well with PR objectives.The additions to this file successfully implement the Russian localization for the smoke implant action, as outlined in the PR objectives. The translations are accurate and follow the expected format for .ftl files.
To ensure consistency across all localization files, consider creating or updating a style guide for localization entries. This could include guidelines on punctuation usage, capitalization, and formatting conventions for action names and descriptions.
Resources/Prototypes/_White/Entities/Objects/Misc/implanters.yml (1)
7-7
: Add a newline at the end of the file.To adhere to YAML best practices and resolve the linter warning, please add a newline character at the end of the file.
Apply this change:
- type: Implanter implant: SmokeImplant +
🧰 Tools
🪛 yamllint
[error] 7-7: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_White/Entities/Objects/Misc/subdermal_implants.yml (2)
4-6
: Consider capitalizing the implant name for consistency.The basic properties are well-defined:
- The description clearly explains the implant's function.
- The
noSpawn: true
property correctly prevents this entity from spawning in the game world.However, consider capitalizing the name for consistency with other entity names in the game.
Suggested change:
- name: smoke implant + name: Smoke Implant
15-15
: Add a newline at the end of the file.To comply with YAML best practices and resolve the linter warning, add a newline at the end of the file.
Add an empty line after line 15.
🧰 Tools
🪛 yamllint
[error] 15-15: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Locale/en-US/_white/store/uplink-catalog.ftl (3)
Line range hint
1-5
: Remove redundant "Betrayal dagger" entry.The "Betrayal dagger" entry (lines 4-5) is now redundant with the new "Experimental syndicate teleporter" entry. To avoid confusion, it should be removed.
Apply this diff to remove the redundant entry:
uplink-emp-flashlight-name = Emp Flashlight uplink-emp-flashlight-desc = A rechargeable device disguised as a flashlight designed to disrupt electronic systems. Useful for disrupting communications, security's energy weapons, and APCs when you're in a tight spot. -uplink-betrayal-knife-name = Betrayal dagger -uplink-betrayal-knife-desc = The betrayal dagger allows the user to teleport a short distance, and also causes significant damage when stabbed in the back. uplink-betrayal-knife-name = Experimental syndicate teleporter uplink-betrayal-knife-desc = Syndicate teleporter, when used, moves 3-8 meters forward. In case of teleportation into a wall, uses emergency teleportation. Has 4 charge.
13-14
: Approve new "Smoke implant" entry with suggestion for description enhancement.The addition of the "Smoke implant" entry aligns with the PR objectives. The description is concise but could benefit from more details to enhance player understanding.
Consider expanding the description to provide more context or gameplay implications. For example:
uplink-smoke-implant-name = Smoke implant -uplink-smoke-implant-desc = Releases a cloud of smoke when activated. +uplink-smoke-implant-desc = A covert implant that releases a thick cloud of smoke when activated, providing cover or creating a diversion. Single-use.This expanded description gives players more information about the item's potential uses and limitations.
Residual References to "Betrayal dagger" Found in Codebase
The following files still contain references to "Betrayal dagger" or "betrayal-knife":
Resources/Changelog/Changelog.yml
Resources/Prototypes/_White/Catalog/uplink_catalog.yml
Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/daggers.yml
Resources/Locale/ru-RU/store/uplink-catalog.ftl
Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/daggers.ftl
Resources/Locale/en-US/_white/store/uplink-catalog.ftl
Please update or remove these references to ensure consistency with the new item name "Experimental syndicate teleporter."
🔗 Analysis chain
Line range hint
6-7
: Verify game balance and update related code for the teleporter change.The item has been changed from a "Betrayal dagger" to an "Experimental syndicate teleporter". This is a significant change in functionality that may affect game balance and player strategies.
- Ensure that all related code (e.g., item behavior, crafting recipes, spawn rates) has been updated to reflect this change.
- Consider if this change aligns with the game's overall balance and design philosophy.
- Update any documentation or player guides that reference this item.
To check for any remaining references to the old name:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to "Betrayal dagger" or "betrayal-knife" rg -i "betrayal.?(dagger|knife)"Length of output: 2438
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (9)
- Resources/Locale/en-US/_white/store/uplink-catalog.ftl (1 hunks)
- Resources/Locale/ru-RU/_white/prototypes/actions/types.ftl (1 hunks)
- Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/implanters.ftl (1 hunks)
- Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/subdermal_implants.ftl (1 hunks)
- Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl (1 hunks)
- Resources/Prototypes/_White/Actions/types.yml (1 hunks)
- Resources/Prototypes/_White/Catalog/uplink_catalog.yml (1 hunks)
- Resources/Prototypes/_White/Entities/Objects/Misc/implanters.yml (1 hunks)
- Resources/Prototypes/_White/Entities/Objects/Misc/subdermal_implants.yml (1 hunks)
🧰 Additional context used
🪛 yamllint
Resources/Prototypes/_White/Catalog/uplink_catalog.yml
[warning] 64-64: wrong indentation: expected 4 but found 2
(indentation)
[error] 64-64: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_White/Entities/Objects/Misc/implanters.yml
[error] 7-7: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_White/Entities/Objects/Misc/subdermal_implants.yml
[error] 15-15: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (14)
Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/subdermal_implants.ftl (2)
1-1
: LGTM: Entity name correctly definedThe entity name for "SmokeImplant" is properly defined in Russian as "имплант дыма" (smoke implant). This aligns with the PR objectives and follows the correct .ftl file format.
1-2
: Overall: Excellent addition of Russian localization for SmokeImplantThe file successfully adds Russian localization for the new SmokeImplant entity, consistent with the PR objectives. Both the name and description are accurately translated and follow the correct .ftl file format. The content is concise and focused, providing essential information for Russian-speaking users.
To ensure consistency across localization files, let's verify the existence and content of the English version:
This will help ensure that the Russian translation aligns with the English original and that both languages are updated consistently.
Resources/Locale/ru-RU/_white/prototypes/actions/types.ftl (1)
1-1
: LGTM: Correct syntax and appropriate translation.The entity key and its Russian translation are correctly formatted and appear to accurately represent the action of releasing a smoke cloud.
Resources/Prototypes/_White/Entities/Objects/Misc/implanters.yml (1)
1-7
: LGTM! The smoke implanter entity is well-defined.The new entity
SmokeImplanter
is correctly structured and aligns with the PR objectives. It inherits fromBaseImplantOnlyImplanterSyndi
, has appropriate id and suffix, and includes the necessaryImplanter
component associated withSmokeImplant
.🧰 Tools
🪛 yamllint
[error] 7-7: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_White/Actions/types.yml (5)
1-5
: LGTM: Entity type and basic properties are well-defined.The entity type, id, name, and description are correctly defined and accurately describe the smoke implant activation action. The
noSpawn: true
property is appropriately set for an action that doesn't spawn a physical entity in the game world.
6-10
: Verify the InstantAction component properties.The InstantAction component is appropriate for the smoke release action. However, please confirm:
- Is the
useDelay
of 20 units the intended cooldown for this action?- What does the priority value of -20 signify in the game's action system?
These values may be correct, but it's worth verifying to ensure they align with the game design intentions.
1-14
: Summary: ActivateSmokeImplant entity implementation looks good, with some verifications needed.The implementation of the ActivateSmokeImplant entity aligns well with the PR objectives of adding a smoke implant feature. The entity definition is structured correctly and includes all necessary components for an instant action that releases smoke.
Key points to address:
- Verify the
useDelay
andpriority
values in the InstantAction component.- Confirm the existence of the smoke icon resource.
- Ensure the ActivateImplantEvent is properly implemented to handle the smoke release functionality.
Once these verifications are complete, this implementation should be ready for integration.
14-14
: Verify the implementation of ActivateImplantEvent.The use of a specific event type (ActivateImplantEvent) for activating the implant is a good practice. However, we should verify that this event type is properly implemented and handles the smoke release functionality as expected.
Run the following script to check for the implementation of ActivateImplantEvent:
#!/bin/bash # Description: Search for the implementation of ActivateImplantEvent # Test: Search for ActivateImplantEvent in C# files if rg -t cs "class ActivateImplantEvent" -A 10; then echo "ActivateImplantEvent class found. Please review the implementation to ensure it handles smoke release correctly." else echo "Warning: ActivateImplantEvent class not found in C# files. Verify that the event is implemented correctly." fi
11-13
: Verify the existence of the smoke icon resource.The use of a smoke grenade icon for the smoke implant action is appropriate. However, let's verify the existence of this resource to ensure it's correctly referenced.
Run the following script to check if the icon resource exists:
✅ Verification successful
Corrected Verification Script for Smoke Icon Resource
Please run the following corrected script to verify the existence and proper configuration of the smoke icon resource:
Smoke Icon Resource Verification Passed
The
smoke.rsi
file exists and correctly defines the'icon'
state within itself. The smoke icon resource is properly referenced.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the smoke icon resource. # Test: Check if the smoke.rsi file exists if fd -p "Resources/Textures/Objects/Weapons/Grenades/smoke.rsi"; then echo "smoke.rsi file found." else echo "Error: smoke.rsi file not found in the expected location." exit 1 fi # Test: Check if the 'icon' state exists in the smoke.rsi file if rg -q '"icon"' $(fd -p "Resources/Textures/Objects/Weapons/Grenades/smoke.rsi/meta.json"); then echo "'icon' state found in smoke.rsi metadata." else echo "Error: 'icon' state not found in smoke.rsi metadata." exit 1 fi echo "All checks passed. The smoke icon resource appears to be correctly referenced."Length of output: 1311
Script:
#!/bin/bash # Description: Verify the existence of the smoke icon resource. # Test: Check if the smoke.rsi file exists if fd -p "Resources/Textures/Objects/Weapons/Grenades/smoke.rsi" > /dev/null; then echo "smoke.rsi file found." else echo "Error: smoke.rsi file not found in the expected location." exit 1 fi # Test: Check if the 'icon' state exists in the smoke.rsi metadata meta_file=$(fd -e json "Resources/Textures/Objects/Weapons/Grenades/smoke.rsi/meta.json") if [ -f "$meta_file" ]; then if rg -q '"icon"' "$meta_file"; then echo "'icon' state found in smoke.rsi metadata." else echo "Error: 'icon' state not found in smoke.rsi metadata." exit 1 fi else echo "Error: meta.json file not found for smoke.rsi." exit 1 fi echo "All checks passed. The smoke icon resource appears to be correctly referenced."Length of output: 333
Script:
#!/bin/bash # Description: Further verify the metadata for the smoke icon resource. # Search for any JSON metadata files related to smoke.rsi meta_files=$(fd -e json "smoke.rsi" "Resources/Textures/Objects/Weapons/Grenades/") if [ -z "$meta_files" ]; then echo "No metadata JSON files found for smoke.rsi." else echo "Found metadata files:" echo "$meta_files" # Iterate through each found metadata file to check for 'icon' state for meta_file in $meta_files; do if rg -q '"icon"' "$meta_file"; then echo "'icon' state found in $meta_file." else echo "'icon' state not found in $meta_file." fi done fi # Additionally, check if 'icon' state is defined within smoke.rsi itself if rg -q '"icon"' "Resources/Textures/Objects/Weapons/Grenades/smoke.rsi"; then echo "'icon' state found directly within smoke.rsi." else echo "'icon' state not found within smoke.rsi." fiLength of output: 373
Resources/Prototypes/_White/Entities/Objects/Misc/subdermal_implants.yml (2)
1-3
: LGTM: Entity type and inheritance are well-defined.The entity is correctly defined as a type "entity" and inherits from "BaseSubdermalImplant", which is appropriate for a new implant type. The ID "SmokeImplant" is clear and follows a consistent naming convention.
7-15
: Components are well-defined, but verify the implantAction.The components are appropriate for the smoke implant functionality:
- SubdermalImplant with implantAction "ActivateSmokeImplant"
- TriggerImplantAction for activation logic
- SmokeOnTrigger with spread and duration parameters
- SoundOnTrigger with a sound effect
The smoke effect parameters and sound file path look good. However, please verify that the "ActivateSmokeImplant" action is correctly defined elsewhere in the codebase.
Run the following script to verify the implantAction:
✅ Verification successful
implantAction "ActivateSmokeImplant" is properly defined and referenced.
The
ActivateSmokeImplant
action is correctly defined inActions/types.yml
and properly referenced insubdermal_implants.yml
. No issues found with the implementation.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of "ActivateSmokeImplant" action in the codebase. # Test: Search for the "ActivateSmokeImplant" action definition rg --type yaml "ActivateSmokeImplant"Length of output: 225
🧰 Tools
🪛 yamllint
[error] 15-15: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl (1)
13-14
: LGTM! The new entries for the smoke implant are well-formatted and consistent.The additions for the smoke implant are correctly formatted and consistent with the existing entries in the file. The translations appear to be accurate:
- "Имплант дыма" translates to "Smoke implant"
- "Выпускает облако дыма при активации" translates to "Releases a cloud of smoke when activated"
These new entries align well with the PR objectives of adding a smoke implant feature to the game.
Resources/Prototypes/_White/Catalog/uplink_catalog.yml (2)
53-53
: LGTM: Sale limit added for UplinkBetrayalKnifeThe addition of a
saleLimit
of 1 for the UplinkBetrayalKnife is appropriate. This constraint helps balance the game by limiting the number of these powerful items that can be purchased.
53-53
: LGTM: Sale limit added for UplinkMiniEbowThe addition of a
saleLimit
of 1 for the UplinkMiniEbow is appropriate. This constraint helps balance the game by limiting the number of these powerful items that can be purchased.
Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/implanters.ftl
Show resolved
Hide resolved
Опять MobMimic |
Описание PR
Порт импланта дыма.
Изменения
🆑 Spatison