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

[Feature] Minor races tweaks #49

Merged
merged 8 commits into from
Sep 12, 2024
Merged

[Feature] Minor races tweaks #49

merged 8 commits into from
Sep 12, 2024

Conversation

Remuchi
Copy link
Collaborator

@Remuchi Remuchi commented Sep 9, 2024

Описание PR

Описание.


Изменения

🆑

  • add: Reintroduced dwarfs / Возвращены дворфы в игру. Лучше переносят алкоголь и имеют чуть больше выносливости, чем остальные расы.
  • tweak: Arachnids now have action to place spider web and no longer slowed down by it / Арахниды получили возможность ставить паутину и не замедляться в ней.
  • tweak: Most races min/max/default height and width was rebalanced. Now they go mostly +-10% from default / Параметры роста/ширины многих раз были изменены. Теперь они могут (в большинстве случаев) изменяться на максимум +-10% от стандартного значения.
  • remove: Removed arachne from roundstart species pool / Арахне были удалены из стартового набора рас.
  • remove: Removed oni from roundstart species pool / Они были удалены из стартового набора рас.

Copy link
Contributor

coderabbitai bot commented Sep 9, 2024

Walkthrough

The pull request introduces modifications to various species configurations and gameplay mechanics, including an enhancement to the GetPlayerProfile method by adding validation logic. Height and width parameters for multiple species, such as Humanoid, felinid, dwarf, and harpy, are adjusted, resulting in a more constrained size range. The roundStart attribute for the Dwarf species is set to true, indicating they will now start rounds in the game, while similar attributes for other species are also modified.

Changes

Files Change Summary
Content.Server/GameTicking/GameTicker.Player.cs Modified GetPlayerProfile method to include validation logic for player profiles.
Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs Adjusted height and width parameters for species, narrowing acceptable size ranges.
Resources/Prototypes/Entities/Mobs/Species/dwarf.yml Changed roundStart from false to true, and adjusted height and width parameters for Dwarf species.
Resources/Prototypes/Nyanotrasen/Species/felinid.yml Modified height and width parameters for felinid species, tightening size parameters.
Resources/Prototypes/Species/harpy.yml Adjusted height and width parameters for harpy species, tightening size specifications.
Resources/Prototypes/Species/reptilian.yml Adjusted height and width parameters for reptilian species, enhancing their size parameters.

Suggested labels

Changes: C#, Changes: YML


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e6c61f2 and c87f0fa.

Files selected for processing (7)
  • Content.Server/GameTicking/GameTicker.Player.cs (1 hunks)
  • Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs (1 hunks)
  • Resources/Prototypes/Entities/Mobs/Species/dwarf.yml (1 hunks)
  • Resources/Prototypes/Nyanotrasen/Species/felinid.yml (1 hunks)
  • Resources/Prototypes/Species/dwarf.yml (1 hunks)
  • Resources/Prototypes/Species/harpy.yml (1 hunks)
  • Resources/Prototypes/Species/reptilian.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • Resources/Prototypes/Species/reptilian.yml
Files skipped from review as they are similar to previous changes (5)
  • Content.Server/GameTicking/GameTicker.Player.cs
  • Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs
  • Resources/Prototypes/Entities/Mobs/Species/dwarf.yml
  • Resources/Prototypes/Nyanotrasen/Species/felinid.yml
  • Resources/Prototypes/Species/harpy.yml
Additional comments not posted (5)
Resources/Prototypes/Species/dwarf.yml (5)

4-4: LGTM!

The change to set roundStart to true for the Dwarf species aligns with the PR objective of reintroducing Dwarfs as a playable race. This will allow players to select the Dwarf race at the start of the game.


10-10: LGTM!

The change to increase the minHeight for the Dwarf species from 0.6 to 0.7 aligns with the PR objective of rebalancing race dimensions. This will provide a more flexible character customization experience for players choosing the Dwarf race.


12-12: LGTM!

The change to adjust the maxHeight for the Dwarf species from 0.8 to 0.9 aligns with the PR objective of rebalancing race dimensions. This will provide a more flexible character customization experience for players choosing the Dwarf race.


13-13: LGTM!

The change to modify the minWidth for the Dwarf species from 0.55 to 0.7 aligns with the PR objective of rebalancing race dimensions. This will provide a more flexible character customization experience for players choosing the Dwarf race.


15-15: LGTM!

The change to update the maxWidth for the Dwarf species from 0.85 to 0.9 aligns with the PR objective of rebalancing race dimensions. This will provide a more flexible character customization experience for players choosing the Dwarf race.


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a5508cb and 2cebbfc.

Files selected for processing (9)
  • Content.Server/GameTicking/GameTicker.Player.cs (1 hunks)
  • Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs (3 hunks)
  • Content.Shared/Preferences/HumanoidCharacterProfile.cs (1 hunks)
  • Resources/Prototypes/Entities/Mobs/Species/arachnid.yml (1 hunks)
  • Resources/Prototypes/Nyanotrasen/Species/felinid.yml (1 hunks)
  • Resources/Prototypes/Species/arachne.yml (1 hunks)
  • Resources/Prototypes/Species/dwarf.yml (1 hunks)
  • Resources/Prototypes/Species/harpy.yml (1 hunks)
  • Resources/Prototypes/Species/reptilian.yml (1 hunks)
Additional comments not posted (24)
Resources/Prototypes/Species/dwarf.yml (3)

10-12: Approved: Adjusted height parameters for Dwarfs.

The changes to minHeight and maxHeight are approved as they provide a more realistic and flexible character customization. Verify that these changes do not negatively impact any gameplay mechanics or interactions that depend on character size.


13-15: Approved: Adjusted width parameters for Dwarfs.

The changes to minWidth and maxWidth are approved as they align with the goal of providing more realistic proportions for Dwarfs. Ensure that these changes are consistent with other species and do not negatively impact gameplay mechanics, especially those related to navigation or interaction with the environment.


4-4: Approved: Enable Dwarfs at round start.

The change to set roundStart to true is approved as it aligns with the PR's objectives. Ensure that this change is integrated properly with the game's UI and other configurations where playable races are listed.

Resources/Prototypes/Species/harpy.yml (4)

10-10: Approved minHeight change.

The increase in minHeight from 0.6 to 0.8 is noted and approved. Ensure to verify its impact on gameplay mechanics and interactions.


15-15: Approved maxWidth change.

The reduction in maxWidth from 1.15 to 1 is approved. Ensure to verify its impact on customization options and gameplay interactions.

Verification successful

Verified: maxWidth change for Harpy is consistent and does not restrict customization.

The maxWidth for the Harpy species has been set to 1, aligning with the Felinid species. This change appears to be part of a standardization effort and does not unduly restrict customization options. No further action is needed.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new maxWidth does not restrict customization unduly.

# Test: Search for any gameplay scripts that use maxWidth. Expect: No undue restrictions.
rg --type yaml -A 5 $'maxWidth: 1'

Length of output: 1527


13-13: Approved minWidth change.

The increase in minWidth from 0.55 to 0.8 is noted and approved. Ensure to verify its impact on gameplay mechanics and interactions.

Verification successful

Approved minWidth change for Harpy.

The increase in minWidth for the Harpy species to 0.8 aligns with other species configurations and appears to be part of a balancing effort. No direct gameplay impacts were found in the codebase, but manual verification in a gameplay context is recommended to ensure no unintended effects.

  • Ensure to test the Harpy species in-game to confirm that the new minWidth does not adversely affect gameplay mechanics or interactions.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new minWidth does not affect gameplay negatively.

# Test: Search for any gameplay scripts that use minWidth. Expect: No negative impacts.
rg --type yaml -A 5 $'minWidth: 0.8'

Length of output: 1195


12-12: Approved maxHeight change.

The reduction in maxHeight from 1.1 to 1 is approved. Ensure to verify its impact on customization options and gameplay interactions.

Verification successful

Verified maxHeight change for harpy.

The reduction in maxHeight for harpy to 1 is consistent with other species like felinid and does not appear to restrict customization or gameplay interactions. No undue restrictions were found in the context of gameplay scripts.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new maxHeight does not restrict customization unduly.

# Test: Search for any gameplay scripts that use maxHeight. Expect: No undue restrictions.
rg --type yaml -A 5 $'maxHeight: 1'

Length of output: 1521

Resources/Prototypes/Species/reptilian.yml (6)

14-14: Approved minHeight change.

The increase in minHeight from 0.7 to 0.9 is noted and approved. Ensure to verify its impact on gameplay mechanics and interactions.

Verification successful

Approved minHeight change.

The increase in minHeight from 0.7 to 0.9 in reptilian.yml appears consistent with other species configurations and does not show direct impacts on gameplay scripts. However, ensure to verify its impact through gameplay testing to confirm no unintended effects occur.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new minHeight does not affect gameplay negatively.

# Test: Search for any gameplay scripts that use minHeight. Expect: No negative impacts.
rg --type yaml -A 5 $'minHeight: 0.9'

Length of output: 809


15-15: Approved defaultHeight change.

The increase in defaultHeight from 0.95 to 1.1 is noted and approved. Ensure to verify its impact on gameplay mechanics and interactions.

Verification successful

Verified defaultHeight change.

The increase in defaultHeight to 1.1 in the reptilian.yml file appears to be isolated, with no direct references found in other gameplay scripts. It is unlikely to negatively impact gameplay, but a manual verification in the game environment is recommended to ensure no unintended effects.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new defaultHeight does not affect gameplay negatively.

# Test: Search for any gameplay scripts that use defaultHeight. Expect: No negative impacts.
rg --type yaml -A 5 $'defaultHeight: 1.1'

Length of output: 391


16-16: Approved maxHeight change.

The slight reduction in maxHeight from 1.25 to 1.2 is approved. Ensure to verify its impact on customization options and gameplay interactions.

Verification successful

No impact on gameplay or customization logic found.

The change in maxHeight for the reptilian species from 1.25 to 1.2 is confined to YAML configuration files and does not appear in any gameplay scripts or logic files. This suggests that the change is purely configurational and should not affect gameplay or customization options.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new maxHeight does not restrict customization unduly.

# Test: Search for any gameplay scripts that use maxHeight. Expect: No undue restrictions.
rg --type yaml -A 5 $'maxHeight: 1.2'

Length of output: 393


Script:

#!/bin/bash
# Broaden the search to include other file types that might reference maxHeight.
rg --type-add 'scripts:*.{js,ts,py}' --type scripts --type yaml --type json 'maxHeight'

Length of output: 391


19-19: Approved maxWidth change.

The reduction in maxWidth from 1.3 to 1.2 is approved. Ensure to verify its impact on customization options and gameplay interactions.

Verification successful

Approved maxWidth change.

The reduction in maxWidth from 1.3 to 1.2 in reptilian.yml is localized and does not affect other parts of the codebase. This change is unlikely to restrict customization options or gameplay interactions.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new maxWidth does not restrict customization unduly.

# Test: Search for any gameplay scripts that use maxWidth. Expect: No undue restrictions.
rg --type yaml -A 5 $'maxWidth: 1.2'

Length of output: 403


18-18: Approved defaultWidth change.

The increase in defaultWidth from 0.95 to 1.1 is noted and approved. Ensure to verify its impact on gameplay mechanics and interactions.

Verification successful

Verified: No gameplay impact from defaultWidth change.

The increase in defaultWidth for the reptilian species is consistent with similar parameters in other species configuration files. There is no evidence of this parameter affecting gameplay mechanics directly. The change is localized to visual or sprite configurations.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new defaultWidth does not affect gameplay negatively.

# Test: Search for any gameplay scripts that use defaultWidth. Expect: No negative impacts.
rg --type yaml -A 5 $'defaultWidth: 1.1'

Length of output: 400


Script:

#!/bin/bash
# Comprehensive search for any references to defaultWidth across all file types.
rg 'defaultWidth' -A 5

Length of output: 1641


17-17: Approved minWidth change.

The increase in minWidth from 0.65 to 0.9 is noted and approved. Ensure to verify its impact on gameplay mechanics and interactions.

Verification successful

Approved minWidth change for reptilian species.

The increase in minWidth to 0.9 is consistent with the configuration patterns for other species and does not impact gameplay mechanics negatively. This change is localized to the species configuration.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new minWidth does not affect gameplay negatively.

# Test: Search for any gameplay scripts that use minWidth. Expect: No negative impacts.
rg --type yaml -A 5 $'minWidth: 0.9'

Length of output: 401


Script:

#!/bin/bash
# Description: Search for any references to minWidth in the codebase to verify its usage.

# Test: Search for any references to minWidth in YAML files.
rg --type yaml 'minWidth'

Length of output: 329

Resources/Prototypes/Entities/Mobs/Species/arachnid.yml (2)

127-127: Approved addition of Spider type.

The addition of the Spider type is noted and approved. Ensure to verify its integration and functionality within the game.


128-128: Approved addition of IgnoreSpiderWeb type.

The addition of the IgnoreSpiderWeb type is noted and approved. Ensure to verify its integration and functionality within the game.

Verification successful

The IgnoreSpiderWebComponent is currently a marker component.

The IgnoreSpiderWebComponent is defined but contains no logic or properties, indicating it may serve as a marker within the system. Ensure to verify if there are systems or components that utilize this marker for functionality related to spider webs.

  • File: Content.Shared/Spider/IgnoreSpiderWebComponent.cs
  • Component: IgnoreSpiderWebComponent is registered but empty.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new IgnoreSpiderWeb type integrates well with existing gameplay mechanics.

# Test: Search for any gameplay scripts that use the IgnoreSpiderWeb type. Expect: Seamless integration.
rg --type yaml -A 5 $'type: IgnoreSpiderWeb'

Length of output: 1813


Script:

#!/bin/bash
# Description: Search for any references to IgnoreSpiderWeb in non-YAML files to verify its functionality.

# Test: Look for any logic or scripts that reference IgnoreSpiderWeb.
rg 'IgnoreSpiderWeb' --type-not yaml -A 5

Length of output: 311


Script:

#!/bin/bash
# Description: Extract the full content of IgnoreSpiderWebComponent.cs to understand its implementation.

# Extract the full content of the IgnoreSpiderWebComponent.cs file.
cat Content.Shared/Spider/IgnoreSpiderWebComponent.cs

Length of output: 179

Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs (4)

140-140: Approved change to maximum height.

The decrease in maximum height from 1.25f to 1.1f is approved. Ensure to verify how this affects character interactions with the environment.


128-128: Approved change to minimum height.

The increase in minimum height from 0.75f to 0.9f is approved. However, ensure to verify the impact on gameplay elements such as collision detection and animations.


158-158: Approved change to maximum width.

The decrease in maximum width from 1.3f to 1.1f is approved. Ensure to verify how this affects character navigation through tight spaces.


146-146: Approved change to minimum width.

The increase in minimum width from 0.7f to 0.9f is approved. However, ensure to verify the impact on character spacing and interactions.

Content.Server/GameTicking/GameTicker.Player.cs (1)

166-168: Approved addition of validation logic in GetPlayerProfile.

The introduction of a validation step before returning the player profile enhances the robustness of the method and helps prevent issues related to invalid profiles. This is a positive change that improves the reliability of the game's player management system.

Content.Shared/Preferences/HumanoidCharacterProfile.cs (1)

535-537: Approved simplification in EnsureValid method.

The direct application of Math.Clamp to both Height and Width simplifies the code and ensures that these properties are always within the valid range. This change improves the maintainability and reliability of the method.

Resources/Prototypes/Nyanotrasen/Species/felinid.yml (2)

12-12: Change approved for maxHeight.

The reduction in maxHeight to 1 aligns with the PR's objective to tighten size parameters.


15-15: Change approved for maxWidth.

The reduction in maxWidth to 1 aligns with the PR's objective to tighten size parameters.

Resources/Prototypes/Species/arachne.yml (1)

4-4: Change approved with commendation for clear documentation.

Setting roundStart to false is well-documented with a clear reason provided. This transparency helps players understand the change.

@Remuchi
Copy link
Collaborator Author

Remuchi commented Sep 9, 2024

I need upstream

UPD: I did not need it

@Remuchi Remuchi marked this pull request as ready for review September 10, 2024 14:21
Copy link
Member

@Spatison Spatison left a comment

Choose a reason for hiding this comment

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

WD EDIT надо добавить

Copy link
Member

@Spatison Spatison left a comment

Choose a reason for hiding this comment

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

Надо добавить WD EDIT там где это надо

Copy link
Member

@Spatison Spatison left a comment

Choose a reason for hiding this comment

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

👍

@Remuchi Remuchi merged commit eae3633 into master Sep 12, 2024
11 checks passed
@Remuchi Remuchi deleted the feature/races-rebalance branch September 12, 2024 05:51
riddleridou added a commit that referenced this pull request Sep 12, 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