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

[Port] Blood Dagger / Кровавый Кинжал #86

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

Spatison
Copy link
Member

Описание PR

Порт и рефактор кровавого кинжала.


Изменения

🆑 Spatison

  • add: Added blood dagger/ Добавлен кровавый кинжал

@Spatison Spatison requested a review from Remuchi October 12, 2024 22:40
@Spatison Spatison self-assigned this Oct 12, 2024
Copy link
Contributor

coderabbitai bot commented Oct 12, 2024

Walkthrough

This pull request introduces significant changes to the blood management and melee combat systems within the game. Key modifications include the addition of new components and systems for blood absorption and blood lust, as well as updates to existing systems to enhance gameplay dynamics related to blood loss and movement speed. Localization files have been updated to reflect changes in item names and descriptions, particularly for daggers, while new metadata for assets has been added.

Changes

File Path Change Summary
Content.Server/Body/Systems/BloodstreamSystem.cs Updated TryModifyBloodLevel method signature to include createPuddle parameter; enhanced TryModifyBleedAmount method.
Content.Server/_White/Melee/BloodAbsorb/BloodAbsorbComponent.cs Introduced BloodAbsorbComponent with fields for blood absorption mechanics.
Content.Server/_White/Melee/BloodAbsorb/BloodAbsorbSystem.cs Added BloodAbsorbSystem class to manage blood absorption during combat events.
Content.Server/_White/Melee/Crit/CritSystem.cs Modified HandleHit method signature; added new CritHitEvent class for critical hits.
Content.Server/_White/Other/BloodLust/BloodLustComponent.cs Introduced BloodLustComponent with fields for modifying movement and attack rates.
Content.Server/_White/Other/BloodLust/BloodLustSystem.cs Added BloodLustSystem class to manage blood lust mechanics affecting attack rates and movement speed.
Resources/Locale/en-US/_white/store/uplink-catalog.ftl Renamed "knife" to "dagger" in identifiers; added new entry for "blood dagger."
Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/daggers.ftl Renamed "BetrayalKnife" to "BetrayalDagger"; added entry for "BloodDagger."
Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl Updated item names from "knife" to "dagger"; added new item "uplink-blood-dagger."
Resources/Prototypes/_White/Catalog/uplink_catalog.yml Removed several listings; modified "UplinkBetrayalKnife" to "UplinkBetrayalDagger"; added "UplinkBloodDagger."
Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/daggers.yml Updated "betrayal dagger" entity; added new "blood dagger" entity with properties.
Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/meta.json Added new metadata file for blood dagger asset, detailing animation states and timings.

Possibly related PRs

Suggested labels

Changes: C#, Changes: Localization, Changes: Sprite, Changes: YML, Status: Needs Review

Suggested reviewers

  • Remuchi

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
Contributor

RSI Diff Bot; head commit 5f1406a merging into a8c9bbf
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi

State Old New Status
icon Added
inhand-left Added
inhand-right Added

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: 10

🧹 Outside diff range and nitpick comments (9)
Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/meta.json (4)

1-8: LGTM with a minor formatting suggestion.

The metadata information is correctly defined, including version, license, copyright, and size. The attribution to tgstation is appropriate.

Consider aligning the indentation of the "license" and "copyright" fields with the "version" field for consistency:

 {
   "version": 1,
-    "license": "CC-BY-SA-3.0",
-    "copyright": "Taken from tgstation at https://github.com/tgstation/",
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from tgstation at https://github.com/tgstation/",
   "size": {
     "x": 32,
     "y": 32
   },

9-22: LGTM. Consider adding a comment to explain the animation.

The "icon" state definition looks good. The delay sequence suggests an animation with 5 quick frames followed by a longer pause, which is suitable for a looping animation.

Consider adding a comment to explain the purpose of this animation, e.g.:

{
  "name": "icon",
  "delays": [
    [
      0.1,
      0.1,
      0.1,
      0.1,
      0.1,
      0.5
    ]
  ],
  "_comment": "Animates the blood dagger icon with a pulsing effect, pausing briefly at the end of each cycle."
}

23-52: LGTM. Consider optimizing the delay sequence definition.

The "inhand-right" state definition is correct, with appropriate delays for a multi-directional in-hand animation.

To reduce redundancy, consider consolidating the repeated delay sequences:

 {
   "name": "inhand-right",
   "directions": 4,
   "delays": [
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ],
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ],
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ],
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ]
+    [0.8, 0.1, 0.1, 0.1]
   ]
 }

This change maintains the same behavior while making the file more concise and easier to maintain.


53-84: LGTM. Consider optimizing the delay sequence definition.

The "inhand-left" state definition is correct and consistent with the "inhand-right" state, which is appropriate for maintaining symmetry in the game.

As with the "inhand-right" state, consider consolidating the repeated delay sequences:

 {
   "name": "inhand-left",
   "directions": 4,
   "delays": [
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ],
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ],
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ],
-    [
-      0.8,
-      0.1,
-      0.1,
-      0.1
-    ]
+    [0.8, 0.1, 0.1, 0.1]
   ]
 }

This change maintains the same behavior while making the file more concise and easier to maintain.

Resources/Locale/en-US/_white/store/uplink-catalog.ftl (2)

22-23: LGTM! Consider minor grammatical improvement.

The addition of the blood dagger is consistent with the PR objectives, and the description accurately reflects its unique mechanics. However, there's a minor grammatical issue in the last sentence of the description.

Consider applying this diff to improve the grammar:

uplink-blood-dagger-name = Blood dagger
-uplink-blood-dagger-desc = A dagger of pain and blood. It has deadly accuracy, allowing you to deal critical damage and extract blood from opponents, treating the owner in proportion to the sucked blood. When absorbing the owner's blood, it briefly enhances his valuable profuse bleeding.
+uplink-blood-dagger-desc = A dagger of pain and blood. It has deadly accuracy, allowing you to deal critical damage and extract blood from opponents, healing the owner in proportion to the absorbed blood. When absorbing the owner's blood, it briefly enhances their profuse bleeding.

Line range hint 1-23: Consider reorganizing entries for better readability.

While the changes are consistent with the PR objectives and the file structure is intact, the entries for different types of items (weapons, implants, etc.) are mixed. Consider reorganizing the entries to group similar items together for better readability and maintainability.

Here's a suggested reorganization:

  1. Weapons (daggers, crossbow, etc.)
  2. Tools (flashlight, implanter)
  3. Implants

This organization will make it easier for future contributors to locate and update specific entries.

Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl (1)

4-5: LGTM! Consider updating the description for consistency.

The change from "knife" to "dagger" aligns with the PR objectives. However, for full consistency, consider updating the description to use "dagger" instead of "knife" if it's mentioned there as well.

Content.Server/_White/Melee/Crit/CritSystem.cs (1)

54-65: LGTM! Consider minor improvements for consistency and clarity.

The new CritHitEvent class is well-structured and uses modern C# features. The use of IReadOnlyList<EntityUid> for Targets is a good practice for immutability. To further improve the code:

  1. Consider making the properties read-only to ensure immutability:

    public EntityUid User { get; }
    public IReadOnlyList<EntityUid> Targets { get; }
  2. For consistency with C# naming conventions, consider renaming the parameter in the constructor from target to targets:

    public sealed class CritHitEvent(EntityUid user, IReadOnlyList<EntityUid> targets)
  3. Update the XML comment for Targets to use plural form:

    /// <summary>
    ///     Entities that were attacked with a critical attack
    /// </summary>
Resources/Prototypes/_White/Catalog/uplink_catalog.yml (1)

Residual References Detected for Removed Uplink Items

Several references to UplinkEmpFlashlight, UplinkExperimentalSyndicateTeleporter, and UplinkMiniEbow still exist in the codebase:

  • Content.Server/_White/EmpFlashlight/EmpOnHitComponent.cs
  • Content.Server/_White/EmpFlashlight/EmpOnHitSystem.cs
  • Resources/Prototypes/_White/Entities/Objects/Devices/Syndicate_Gadgets/experimental_teleporter.yml
  • Resources/Locale/ru-RU/experimentalsyndicateteleporter/experimentalsyndicateteleporter.ftl

Please ensure these references are intentionally retained or update/remove them to maintain consistency with the catalog changes.

🔗 Analysis chain

Line range hint 1-21: Please clarify the removal of several uplink items.

The listings for UplinkEmpFlashlight, UplinkExperimentalSyndicateTeleporter, and UplinkMiniEbow have been removed. While these changes are noted in the AI summary, they are not mentioned in the PR objectives.

Could you please clarify:

  1. Are these removals intentional?
  2. How do these removals align with the overall game design and balance?
  3. What is the expected impact on gameplay?

To assess the impact of these removals, please run the following script to check for any remaining references to these items:

If any results are found, consider updating or removing these references to maintain consistency with the catalog changes.

Also applies to: 26-83

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for references to removed uplink items

# Search for removed item names
rg -i "EmpFlashlight|ExperimentalSyndicateTeleporter|MiniEbow"

Length of output: 2181

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a8c9bbf and 5f1406a.

⛔ Files ignored due to path filters (6)
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/betrayal_dagger.rsi/icon.png is excluded by !**/*.png
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/betrayal_dagger.rsi/inhand-left.png is excluded by !**/*.png
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/betrayal_dagger.rsi/inhand-right.png is excluded by !**/*.png
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/icon.png is excluded by !**/*.png
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/inhand-left.png is excluded by !**/*.png
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/inhand-right.png is excluded by !**/*.png
📒 Files selected for processing (13)
  • Content.Server/Body/Systems/BloodstreamSystem.cs (6 hunks)
  • Content.Server/_White/Melee/BloodAbsorb/BloodAbsorbComponent.cs (1 hunks)
  • Content.Server/_White/Melee/BloodAbsorb/BloodAbsorbSystem.cs (1 hunks)
  • Content.Server/_White/Melee/Crit/CritSystem.cs (3 hunks)
  • Content.Server/_White/Other/BloodLust/BloodLustComponent.cs (1 hunks)
  • Content.Server/_White/Other/BloodLust/BloodLustSystem.cs (1 hunks)
  • Resources/Locale/en-US/_white/store/uplink-catalog.ftl (2 hunks)
  • Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/daggers.ftl (1 hunks)
  • Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl (2 hunks)
  • Resources/Locale/ru-RU/store/uplink-catalog.ftl (1 hunks)
  • Resources/Prototypes/_White/Catalog/uplink_catalog.yml (2 hunks)
  • Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/daggers.yml (2 hunks)
  • Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/meta.json (1 hunks)
🧰 Additional context used
🪛 yamllint
Resources/Prototypes/_White/Catalog/uplink_catalog.yml

[warning] 93-93: wrong indentation: expected 4 but found 2

(indentation)


[warning] 95-95: wrong indentation: expected 4 but found 2

(indentation)


[warning] 98-98: wrong indentation: expected 8 but found 6

(indentation)

🔇 Additional comments (26)
Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/daggers.ftl (3)

1-2: LGTM! Renaming from "BetrayalKnife" to "BetrayalDagger" is consistent.

The renaming from "BetrayalKnife" to "BetrayalDagger" is consistent with the file name (daggers.ftl). The Russian translation and description are appropriate.


4-5: LGTM! New "BloodDagger" entry is consistent with PR objectives.

The addition of the "BloodDagger" entry is consistent with the PR objectives mentioning the addition of a blood dagger. The Russian translation and description are appropriate and vivid, aligning well with the concept of a blood dagger.


1-5: Summary: Localization changes are consistent with PR objectives.

The changes in this localization file accurately reflect the addition of the blood dagger as mentioned in the PR objectives. The renaming of "BetrayalKnife" to "BetrayalDagger" and the addition of the "BloodDagger" entry are both appropriate and well-translated. The descriptions are vivid and fitting for the weapons they describe.

Content.Server/_White/Other/BloodLust/BloodLustComponent.cs (4)

3-5: LGTM: Component structure is well-defined.

The BloodLustComponent is correctly registered and follows the expected patterns for components in this codebase. The use of sealed partial is appropriate for performance and potential code generation.


12-13: Add documentation and consider balance implications.

The AttackRateModifier of 1.5 represents a significant 50% increase in attack rate. While this aligns with the "blood lust" theme, it could potentially lead to balance issues. Consider the following:

  1. Add XML documentation to explain the field's purpose and expected impact.
  2. Evaluate if this large increase in attack rate could lead to exploits or unbalanced gameplay.
  3. Consider implementing a cooldown or diminishing returns mechanism to prevent potential abuse.

To verify the usage and impact of this modifier, you can run the following script:

#!/bin/bash
# Search for usages of AttackRateModifier to understand its impact
rg --type csharp -g '!**/BloodLustComponent.cs' "AttackRateModifier" -C 5

6-7: Consider adding documentation and reviewing the modifier value.

While the SprintModifier field is correctly defined, consider adding XML documentation to explain its purpose and impact on gameplay. Additionally, the value of 1.3 (30% increase) seems significant. Please ensure this aligns with the intended game balance.

To verify the usage and impact of this modifier, you can run the following script:

#!/bin/bash
# Search for usages of SprintModifier to understand its impact
rg --type csharp -g '!**/BloodLustComponent.cs' "SprintModifier" -C 5

9-10: Reconsider modifier values and add documentation.

The WalkModifier is currently set to the same value as SprintModifier (1.3). This might not create a noticeable difference between sprinting and walking under the blood lust effect. Consider adjusting these values to create a more distinct difference. Also, add XML documentation to explain the field's purpose and impact.

To verify the usage and impact of this modifier, you can run the following script:

✅ Verification successful

Verification Completed: WalkModifier is Unused.

The WalkModifier field in BloodLustComponent.cs is currently not utilized anywhere in the codebase. If it's intended for future use, consider implementing its functionality. Otherwise, removing unused fields can help maintain a clean and efficient codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usages of WalkModifier to understand its impact
rg --type csharp -g '!**/BloodLustComponent.cs' "WalkModifier" -C 5

Length of output: 1221

Content.Server/_White/Melee/BloodAbsorb/BloodAbsorbComponent.cs (1)

1-5: LGTM: Namespace and component declaration are well-structured.

The namespace Content.Server._White.Melee.BloodAbsorb is appropriately organized, and the component is correctly registered using the [RegisterComponent] attribute. The class being sealed and partial is a good practice for performance and potential code organization.

Resources/Textures/_White/Objects/Weapons/Melee/Daggers/blood_dagger.rsi/meta.json (1)

1-84: Overall, the meta.json file for the blood dagger asset is well-structured and complete.

The file successfully defines all necessary components for the blood dagger asset, including metadata, icon state, and in-hand states for both left and right hands. The animations are well-defined with appropriate delays, ensuring smooth visualization in the game.

A few minor optimizations and documentation improvements have been suggested in the previous comments, which would enhance maintainability and clarity. These include:

  1. Consistent indentation in the metadata section.
  2. Adding a comment to explain the purpose of the icon animation.
  3. Consolidating repeated delay sequences in both "inhand-right" and "inhand-left" states.

Implementing these suggestions would further improve the quality of this well-crafted asset definition.

Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/daggers.yml (3)

35-66: LGTM! New "blood dagger" entity added successfully.

The new "blood dagger" entity has been implemented with appropriate components for a melee weapon, including unique features like blood absorption.


63-64: Please clarify the functionality of the BloodAbsorb component.

The BloodAbsorb component with bloodLust set to true suggests a unique gameplay mechanic. Could you provide more details on how this component works and its impact on gameplay?

Run the following script to find the implementation of the BloodAbsorb component:

#!/bin/bash
# Description: Find the implementation of the BloodAbsorb component

# Test: Search for BloodAbsorb class definition. Expect: C# file containing the BloodAbsorb component implementation
rg --type cs "class BloodAbsorb"

Would you like me to review the BloodAbsorb component implementation once located?


5-8: LGTM! Verify entity references in the codebase.

The renaming of "BetrayalKnife" to "BetrayalDagger" and the corresponding sprite path update improve consistency. However, ensure that all references to this entity in the codebase have been updated accordingly.

Run the following script to check for any remaining references to the old entity name:

Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl (2)

21-21: LGTM! Clarify style guide for spacing.

Adding a blank line can improve readability. However, to ensure consistency across the project, could you clarify if there's a specific style guide for spacing between entries in localization files?

#!/bin/bash
# Check for consistent use of blank lines between entries
rg -U --type ftl '(\n\n.+-.+(name|desc).+\n.+-.+(name|desc).+\n\n|\n\n.+-.+(name|desc).+\n.+-.+(name|desc).+$)' Resources/Locale/ru-RU/

22-23: LGTM! Verify gameplay mechanics with design team.

The addition of the blood dagger aligns well with the PR objectives. The description provides a detailed explanation of its functionality, including critical damage, blood extraction, healing, and temporary empowerment through self-bleeding.

Given the complexity of these mechanics and their potential impact on gameplay balance, it would be prudent to verify that these align with the intended design.

Could you confirm that the design team has reviewed and approved these mechanics? Additionally, it might be helpful to run the following script to check for any related gameplay logic changes:

Content.Server/_White/Melee/Crit/CritSystem.cs (1)

Line range hint 23-36: Verify the impact of the ref keyword and consider documenting the new event.

The change in the method signature to include ref for the MeleeHitEvent args parameter allows for modifications to the event arguments. This could potentially affect other systems that rely on this event.

  1. Ensure that all callers of this method are aware of the potential modifications to the args parameter.
  2. Consider adding a comment explaining why the ref keyword was added and what modifications, if any, are made to the args parameter within this method.

The addition of the CritHitEvent at the end of the method is a good way to allow other systems to react to critical hits. To improve maintainability:

  1. Consider adding XML documentation for the HandleHit method, explaining its purpose and the significance of the new event.
  2. Ensure that systems listening for CritHitEvent are properly documented and tested.

To verify the usage of MeleeHitEvent and potential impact of the ref keyword, run the following script:

✅ Verification successful

Verification Complete: No Conflicts Found

The introduction of the ref keyword in the HandleHit method and the addition of CritHitEvent have been reviewed. The ref modification is confined, and CritHitEvent has only one subscriber (BloodAbsorbSystem.cs), ensuring limited impact on the codebase.

Recommendations:

  • Documentation: Add comments or XML documentation explaining the purpose of the ref keyword and the new CritHitEvent.
  • Awareness: Ensure all method callers are informed about the potential modifications to the args parameter.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other occurrences of MeleeHitEvent to ensure compatibility with the ref keyword

# Search for MeleeHitEvent usage
echo "Searching for MeleeHitEvent usage:"
rg --type csharp "MeleeHitEvent" -C 3

# Search for potential subscribers to CritHitEvent
echo "\nSearching for potential subscribers to CritHitEvent:"
rg --type csharp "SubscribeLocalEvent.*CritHitEvent" -C 3

Length of output: 40549

Resources/Prototypes/_White/Catalog/uplink_catalog.yml (1)

22-25: LGTM! Verify related files for consistency.

The renaming from "UplinkBetrayalKnife" to "UplinkBetrayalDagger" is consistent and aligns with the PR objectives. The change has been applied correctly to all relevant fields (id, name, description, and productEntity).

To ensure consistency across the codebase, please run the following script to check for any remaining references to "BetrayalKnife":

If any results are found, consider updating them to "BetrayalDagger" for consistency.

✅ Verification successful

All references to "BetrayalKnife" have been successfully updated. No remaining instances found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to "BetrayalKnife"

# Search for "BetrayalKnife" in all files
rg "BetrayalKnife"

Length of output: 2181

Resources/Locale/ru-RU/store/uplink-catalog.ftl (4)

Line range hint 1-103: LGTM: New weapon and explosive entries

The new entries for weapons and explosives are well-written and consistent in style. They provide clear descriptions of item functionality and usage, which aligns with the PR objective of adding new items to the game.


Line range hint 104-220: LGTM: New utility items and implants, including blood dagger

The new entries for utility items and implants are well-written and consistent in style. They provide clear descriptions of item functionality and usage, aligning with the PR objective of adding new items to the game.

Notably, the addition of the "blood dagger" (Кинжал жажды) on lines 108-109 directly fulfills the main objective of this PR as mentioned in the description.


Line range hint 221-359: LGTM: New bundles, tools, and job-specific items

The new entries for bundles, tools, and job-specific items are well-written and consistent in style. They provide clear descriptions of item contents and usage, which aligns with the PR objective of adding new items to the game.


Line range hint 360-443: LGTM: New armor, misc, and pointless items, including Special Forces Helmet

The new entries for armor, misc items, and pointless items are well-written and consistent in style. They provide clear descriptions of item functionality and usage, aligning with the PR objective of adding new items to the game.

Notably, a new item "Шлем спецназа" (Special Forces Helmet) has been added on lines 442-443. While not specifically mentioned in the PR objectives, it fits well with the overall theme of adding new equipment to the game.

Content.Server/_White/Other/BloodLust/BloodLustSystem.cs (1)

17-21: Verify that args.User is the correct entity for retrieving BloodLustComponent

In OnGetMeleeAttackRate, you are retrieving BloodLustComponent from args.User. Since this event is subscribed for entities with BloodLustComponent, consider whether uid (the entity with the component) should be used instead of args.User. Confirm that args.User is indeed the intended entity.

To verify the correct entity to use, you can search the codebase for how GetMeleeAttackRateEvent is handled elsewhere:

✅ Verification successful

Verified args.User correctly references the entity with BloodLustComponent

No issues found with using args.User to retrieve BloodLustComponent in OnGetMeleeAttackRate.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for usages of `OnGetMeleeAttackRate` handlers to verify entity usage.

rg --type cs -A 5 'void\s+OnGetMeleeAttackRate\(.*GetMeleeAttackRateEvent args\)'

Length of output: 748


Script:

#!/bin/bash
# Description: Find the definition and usages of GetMeleeAttackRateEvent to understand the context of args.User.

rg --type cs 'class\s+GetMeleeAttackRateEvent' -A 10

Length of output: 54


Script:

#!/bin/bash
# Description: Search for all occurrences of GetMeleeAttackRateEvent to find its definition and usages.

rg --type cs 'GetMeleeAttackRateEvent'

Length of output: 1020


Script:

#!/bin/bash
# Description: Find all occurrences where args.User is used to retrieve BloodLustComponent.

rg --type cs 'TryComp\(args\.User,\s*out\s+BloodLustComponent\?'

Length of output: 191

Content.Server/_White/Melee/BloodAbsorb/BloodAbsorbSystem.cs (1)

62-66: ⚠️ Potential issue

Correct the condition to apply effect when hitting other entities

The current condition proceeds only if the user has hit themselves (args.HitEntities[0] != args.User returns false when the first hit entity is the user). If the intended behavior is to apply the effect when hitting others, you should return when the user hits themselves.

Apply this diff to fix the condition:

-if (args.HitEntities.Count == 0
-    || args.HitEntities[0] != args.User
+if (args.HitEntities.Count == 0
+    || args.HitEntities[0] == args.User
     || !component.BloodLust
     || !TryComp(args.User, out BloodstreamComponent? bloodstream))
    return;

Please confirm that this change aligns with the intended behavior of applying the BloodLust effect when hitting other entities.

Content.Server/Body/Systems/BloodstreamSystem.cs (4)

1-1: Import statement for BloodLust component is necessary.

The addition of using Content.Server._White.Other.BloodLust; correctly includes the BloodLustComponent needed for the new logic.


18-18: Import statement for Movement systems is appropriate.

Including using Content.Shared.Movement.Systems; is required for accessing MovementSpeedModifierSystem.


44-44: Dependency injection of MovementSpeedModifierSystem is correctly added.

The dependency on _movementSpeedModifier allows for refreshing movement speed modifiers when necessary.


379-379: Conditional check updated appropriately to include 'createPuddle'.

The condition now respects the createPuddle parameter, allowing control over whether a puddle is created based on the caller's intent.

@Spatison Spatison changed the title add: blood dagger [Port] Blood Dagger / Кровавый Кинжал Oct 12, 2024
@Remuchi Remuchi merged commit d61d9cd into master Oct 16, 2024
14 checks passed
@Remuchi Remuchi deleted the blood-dagger branch October 16, 2024 01:57
riddleridou added a commit that referenced this pull request Oct 16, 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.

2 participants