-
Notifications
You must be signed in to change notification settings - Fork 21
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] Custom Ghost's #21
[Port] Custom Ghost's #21
Conversation
Content.Shared/_White/CustomGhostSystem/CustomGhostPrototype.cs
Outdated
Show resolved
Hide resolved
Content.Shared/_White/CustomGhostSystem/CustomGhostPrototype.cs
Outdated
Show resolved
Hide resolved
Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs
Outdated
Show resolved
Hide resolved
Content.Client/_White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs
Outdated
Show resolved
Hide resolved
Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs
Outdated
Show resolved
Hide resolved
Moreover, RSI validator fails. You should fix it before PR can be merged. |
Оникс сказал что сам пройдется по списку гостов и скажет, какие оставить. |
WalkthroughThis pull request introduces several new classes and YAML configurations to enhance the visual representation of ghost entities in the game. Key components include the Changes
Possibly related PRs
Suggested labels
Tip OpenAI O1 model for chat
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: 1
Outside diff range and nitpick comments (3)
Content.Shared/_White/CustomGhostSystem/CustomGhostPrototype.cs (1)
1-42
: LGTM with a minor suggestion!The
CustomGhostPrototype
class andCustomGhostAppearance
enum are well-structured and follow the expected patterns. The properties have appropriate access modifiers and data types, and the[DataField]
attributes are used correctly.To align with the past review comment and maintain consistency, consider removing the redundant string names for
DataFields
where they match the variable name. For example:- [DataField("ghostName")] + [DataField] public string GhostName = string.Empty; - [DataField("ghostDescription")] + [DataField] public string GhostDescription = string.Empty; - [DataField("size")] + [DataField] public Vector2 SizeOverride = Vector2.One;Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs (1)
32-60
: Consider refactoring theTrySetCustomSprite
method to improve readability.The
TrySetCustomSprite
method can be refactored to improve readability by extracting the sprite setting logic into a separate method. This will make the method more concise and easier to understand.Apply this diff to refactor the method:
public void TrySetCustomSprite(EntityUid ghostUid, string ckey) { var prototypes = _prototypeManager.EnumeratePrototypes<CustomGhostPrototype>(); foreach (var customGhostPrototype in prototypes) { if (!string.Equals(customGhostPrototype.Ckey, ckey, StringComparison.CurrentCultureIgnoreCase)) continue; - _appearanceSystem.SetData(ghostUid, CustomGhostAppearance.Sprite, customGhostPrototype.CustomSpritePath.ToString()); - _appearanceSystem.SetData(ghostUid, CustomGhostAppearance.SizeOverride, customGhostPrototype.SizeOverride); - - if (customGhostPrototype.AlphaOverride > 0) - { - _appearanceSystem.SetData(ghostUid, CustomGhostAppearance.AlphaOverride, customGhostPrototype.AlphaOverride); - } - - if (customGhostPrototype.GhostName != string.Empty) - { - _metaData.SetEntityName(ghostUid, customGhostPrototype.GhostName); - } - - if (customGhostPrototype.GhostDescription != string.Empty) - { - _metaData.SetEntityDescription(ghostUid, customGhostPrototype.GhostDescription); - } + SetCustomSpriteData(ghostUid, customGhostPrototype); return; } } +private void SetCustomSpriteData(EntityUid ghostUid, CustomGhostPrototype customGhostPrototype) +{ + _appearanceSystem.SetData(ghostUid, CustomGhostAppearance.Sprite, customGhostPrototype.CustomSpritePath.ToString()); + _appearanceSystem.SetData(ghostUid, CustomGhostAppearance.SizeOverride, customGhostPrototype.SizeOverride); + + if (customGhostPrototype.AlphaOverride > 0) + { + _appearanceSystem.SetData(ghostUid, CustomGhostAppearance.AlphaOverride, customGhostPrototype.AlphaOverride); + } + + if (customGhostPrototype.GhostName != string.Empty) + { + _metaData.SetEntityName(ghostUid, customGhostPrototype.GhostName); + } + + if (customGhostPrototype.GhostDescription != string.Empty) + { + _metaData.SetEntityDescription(ghostUid, customGhostPrototype.GhostDescription); + } +}Resources/Prototypes/_White/Ghosts/custom_ghosts.yml (1)
85-410
: Consider removing unused custom ghost prototypes.There are several custom ghost prototypes that are commented out and marked as "Unused". To keep the codebase clean and maintainable, consider removing these unused prototypes entirely.
If there's a possibility that these prototypes might be used in the future, consider moving them to a separate file or directory to clearly separate them from the actively used prototypes.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (12)
Resources/Textures/_White/Ghosts/cheese_cheese-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/dageff-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/frostnova-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/krokozyabra-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/mapperian-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/nairsark-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/persikvin-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/reider207-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/s_k_r_i_m_e_x-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/suzuran.rsi/animated.png
is excluded by!**/*.png
Resources/Textures/_White/Ghosts/warete-ghost.rsi/animated.png
is excluded by!**/*.png
Files selected for processing (16)
- Content.Client/_White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs (1 hunks)
- Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs (1 hunks)
- Content.Shared/_White/CustomGhostSystem/CustomGhostPrototype.cs (1 hunks)
- Resources/Prototypes/_White/Ghosts/custom_ghosts.yml (1 hunks)
- Resources/Textures/_White/Ghosts/cheese_cheese-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/dageff-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/frostnova-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/krokozyabra-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/mapperian-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/nairsark-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/persikvin-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/reider207-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/s_k_r_i_m_e_x-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/suzuran.rsi/meta.json (1 hunks)
- Resources/Textures/_White/Ghosts/warete-ghost.rsi/meta.json (1 hunks)
Files skipped from review due to trivial changes (1)
- Resources/Textures/_White/Ghosts/krokozyabra-ghost.rsi/meta.json
Additional comments not posted (41)
Resources/Textures/_White/Ghosts/persikvin-ghost.rsi/meta.json (1)
1-14
: The texture metadata file looks good!The JSON file follows the expected structure and includes all the necessary metadata properties:
version
: Specifies the metadata format version.license
: Indicates the usage license, which is CC-BY-SA-4.0 in this case.copyright
: Attributes the copyright to the original author, Persikvin.size
: Defines the texture dimensions as 64x64 pixels.states
: Lists the available animation states, with a single "animated" state.No issues found. The metadata file is ready for inclusion.
Resources/Textures/_White/Ghosts/reider207-ghost.rsi/meta.json (1)
1-14
: LGTM!The JSON metadata for the ghost texture is well-structured and includes all the necessary fields:
- The
version
is set to 1, which is appropriate for a new asset.- The
license
field correctly specifies the CC-BY-SA-4.0 license, aligning with the project's open-source nature.- The
copyright
field properly attributes the texture to the original creator.- The
size
is set to 128x128 pixels, which is a common size for sprite textures and should provide sufficient resolution.- The
states
field includes an "animated" state, indicating the texture's intended use for animations.Overall, the metadata is complete and accurately represents the ghost texture.
Resources/Textures/_White/Ghosts/s_k_r_i_m_e_x-ghost.rsi/meta.json (1)
1-23
: LGTM!The JSON metadata file for the ghost texture is well-structured and follows the expected format. The license, copyright, size, and animation state are properly defined. The changes look good to me.
Resources/Textures/_White/Ghosts/frostnova-ghost.rsi/meta.json (1)
1-45
: LGTM!The JSON metadata file for the "frostnova-ghost" texture is well-structured and follows the project's conventions. The animation state configuration, texture size, license, and copyright information are all properly defined.
Great job on adding this new ghost texture to the project!
Resources/Textures/_White/Ghosts/warete-ghost.rsi/meta.json (3)
1-45
: The JSON metadata file follows the expected structure and properties.The file defines the necessary metadata for the ghost texture, including:
- Version
- License (CC-BY-SA-4.0)
- Copyright attribution (Warete)
- Size (128x128 pixels)
- Animation states (1 state with 4 directions and equal frame delays)
The structure and properties align with the requirements for RSI metadata files.
9-43
: The animation state is correctly defined.The "animated" state defines:
- 4 directions
- Equal frame delays of 0.12 seconds for each direction
This configuration ensures consistent animation across all directions.
1-45
: The metadata file is complete and valid.The file includes all the necessary metadata properties and follows the correct JSON structure for RSI metadata. The animation state is properly configured, ensuring the ghost texture will animate as intended.
No issues or improvements needed.
Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi/meta.json (5)
2-2
: LGTM!The version number is set correctly for a new metadata file.
3-4
: LGTM!The license and copyright information looks good:
- The CC-BY-SA-4.0 license allows sharing and adapting the material with attribution.
- The copyright is correctly attributed to the original creator "oniks".
5-8
: LGTM!The 64x64 size is appropriate for a ghost texture and matches the typical dimensions used in the project.
9-35
: LGTM!The "animated" state is defined correctly:
- It has 4 directions and 3 frames per direction, which is a common setup for ghost animations.
- The frame durations of 0.1 seconds will result in a smooth animation at 10 frames per second.
- The delays are specified consistently for all directions.
1-38
: LGTM!The overall JSON structure and formatting is correct:
- The JSON object is properly enclosed in curly braces.
- Properties are correctly separated by commas.
- Indentation is consistent throughout the file.
Resources/Textures/_White/Ghosts/suzuran.rsi/meta.json (5)
2-2
: Appropriate license choice.The CC-BY-SA-4.0 license is a suitable choice for open-source projects that encourage collaboration and sharing. It allows for the use, modification, and distribution of the material while ensuring proper attribution and maintaining the same license for derivative works.
3-3
: Proper attribution.The copyright notice correctly attributes the creation of the texture to the artist "cry_prism". This acknowledgment is important to give credit to the original creator and comply with the chosen CC-BY-SA-4.0 license.
5-8
: Appropriate texture size.The texture size of 64x64 pixels is a standard dimension for sprite textures in games. Maintaining consistent dimensions across textures helps ensure visual coherence and simplifies the rendering process.
9-43
: Well-structured animation configuration.The "animated" state is properly defined with 4 directions, each containing 5 frames. The consistent delay of 0.1 seconds between frames ensures a smooth animation across all directions. This configuration allows for a dynamic and visually appealing representation of the ghost entity.
1-45
: Valid JSON structure and consistent formatting.The JSON file follows a valid structure with properly nested objects and arrays. The indentation and spacing are consistent throughout the file, enhancing readability. A valid JSON structure is crucial for parsing and processing the metadata correctly, while consistent formatting improves code readability and maintainability.
Resources/Textures/_White/Ghosts/dageff-ghost.rsi/meta.json (4)
2-2
: LGTM!The version number is correctly specified.
3-4
: LGTM!The license is correctly specified as CC-BY-SA-4.0 and the copyright is correctly attributed to Dageff.
5-8
: LGTM!The size dimensions are correctly specified as 128x128.
9-47
: LGTM!The
states
array correctly defines an animation state named "animated" with the following properties:
- 4 directions
- 6 frames per direction
- Each frame is displayed for 0.3 seconds
The animation setup looks good and follows common practices.
Resources/Textures/_White/Ghosts/nairsark-ghost.rsi/meta.json (3)
1-8
: LGTM!The JSON schema version, license, copyright, and texture size are properly defined.
9-55
: LGTM!The animation state is properly defined with a name, directions, and delays. The delay times are consistent across all directions and add up to 1 second for each direction.
56-57
: LGTM!The closing brackets are correctly placed, and there are no trailing commas or syntax errors.
Content.Client/_White/CustomGhostSpriteSystem/CustomGhostVisualizer.cs (2)
14-15
:return
should be on a new line.The
return
statement should be on a new line for better readability.
10-31
: LGTM!The method is correctly overriding the base class method and performing additional logic based on the appearance data. The method is correctly setting the sprite RSI path, alpha, and scale based on the appearance data.
Resources/Textures/_White/Ghosts/cheese_cheese-ghost.rsi/meta.json (1)
1-65
: LGTM!The JSON metadata file for the ghost texture is well-structured and includes all the necessary properties. The animation state configuration is appropriate, with consistent delays across all directions. The chosen license (CC-BY-SA-4.0) aligns with the open-source nature of the project, and the copyright attribution gives credit to the original creator.
Resources/Textures/_White/Ghosts/mapperian-ghost.rsi/meta.json (5)
2-2
: LGTM!The version number is correctly specified.
3-3
: LGTM!The license is correctly specified.
4-4
: LGTM!The copyright attribution is correctly specified.
5-8
: LGTM!The size is correctly specified.
9-52
: LGTM!The
states
property is correctly specified with the following observations:
- The
delays
array is correctly specified with the same delay for each frame in each direction.- The delay of 0.12 seconds per frame results in a total animation duration of 0.84 seconds per direction.
Content.Server/_White/CustomGhostSpriteSystem/CustomGhostSpriteSystem.cs (1)
1-61
: LGTM!The
CustomGhostSpriteSystem
class is well-structured and follows good coding practices. The dependencies are properly injected, and the event subscription is handled correctly. TheTrySetCustomSprite
method effectively sets the custom sprite based on the player'sckey
by iterating through theCustomGhostPrototype
instances. The method also handles null checks and empty string checks appropriately.Resources/Prototypes/_White/Ghosts/custom_ghosts.yml (8)
1-9
: Verify the sprite file exists.The custom ghost prototype
persikvin-ghost
references a sprite file_White/Ghosts/persikvin-ghost.rsi
. Please ensure this file exists in the project.Verification successful
Sprite file verified with slight path difference.
The sprite file for the
persikvin-ghost
custom ghost prototype exists, but with a slightly different path than specified in the prototype. The correct path is:
./Resources/Textures/_White/Ghosts/persikvin-ghost.rsi
Please update the
sprite
property in the prototype to reflect this path:sprite: Textures/_White/Ghosts/persikvin-ghost.rsiThis will ensure that the correct sprite file is referenced.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `persikvin-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo persikvin-ghostLength of output: 251363
19-28
: Verify the sprite file exists.The custom ghost prototype
dageff-ghost
references a sprite file_White/Ghosts/dageff-ghost.rsi
. Please ensure this file exists in the project.Verification successful
Sprite file for "dageff-ghost" exists.
The custom ghost prototype "dageff-ghost" references the sprite file "_White/Ghosts/dageff-ghost.rsi", which has been confirmed to exist at the path "./Resources/Textures/_White/Ghosts/dageff-ghost.rsi".
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `dageff-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo dageff-ghostLength of output: 241565
65-74
: Verify the sprite file exists.The custom ghost prototype
reider207-ghost
references a sprite file_White/Ghosts/reider207-ghost.rsi
. Please ensure this file exists in the project.Verification successful
Sprite file verified: _White/Ghosts/reider207-ghost.rsi exists.
The custom ghost prototype
reider207-ghost
references a sprite file_White/Ghosts/reider207-ghost.rsi
, which has been confirmed to exist in the project at the path "./Resources/Textures/_White/Ghosts/reider207-ghost.rsi".Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `reider207-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo reider207-ghostLength of output: 251363
75-84
: Verify the sprite file exists.The custom ghost prototype
mapperian-ghost
references a sprite file_White/Ghosts/mapperian-ghost.rsi
. Please ensure this file exists in the project.Verification successful
Sprite file for "mapperian-ghost" verified.
The custom ghost prototype "mapperian-ghost" references the sprite file "_White/Ghosts/mapperian-ghost.rsi", which has been confirmed to exist at the path "./Resources/Textures/_White/Ghosts/mapperian-ghost.rsi". The sprite file is correctly located and should work as intended for the custom ghost.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `mapperian-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo mapperian-ghostLength of output: 251363
10-18
: Verify the sprite file exists.The custom ghost prototype
krokozyabra-ghost
references a sprite file_White/Ghosts/krokozyabra-ghost.rsi
. Please ensure this file exists in the project.Verification successful
To verify the existence of the specific sprite file, we need to perform a more targeted search. Let's run another script to look for the exact file path.
Sprite file "_White/Ghosts/krokozyabra-ghost.rsi" exists in the project.
The custom ghost prototype
krokozyabra-ghost
correctly references an existing sprite file. The file is located atResources/Textures/_White/Ghosts/krokozyabra-ghost.rsi
in the project structure.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `krokozyabra-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo krokozyabra-ghostLength of output: 257895
Script:
#!/bin/bash # Description: Search for the specific krokozyabra-ghost.rsi file in the _White/Ghosts directory # Use fd to search for the exact file path fd -p "_White/Ghosts/krokozyabra-ghost.rsi$" ResourcesLength of output: 112
29-36
: Verify the sprite file exists.The custom ghost prototype
scituzer2-ghost
references a sprite file_White/Ghosts/scituzer2-ghost.rsi
. Please ensure this file exists in the project.Verification successful
Sprite file for
scituzer2-ghost
exists and appears valid.The custom ghost prototype
scituzer2-ghost
references the sprite file_White/Ghosts/scituzer2-ghost.rsi
, which exists in the project at the path./Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi
. This .rsi file is a directory containing two files:
animated.png
(18114 bytes): Likely contains the sprite's image data, possibly with multiple frames for animation.meta.json
(480 bytes): Probably includes metadata about the sprite, such as animation information or dimensions.The presence and structure of this file suggest that the sprite reference in the prototype is correct and functional.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `scituzer2-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo scituzer2-ghostLength of output: 251363
Script:
#!/bin/bash # Description: Verify the existence of scituzer2-ghost.rsi and display basic information # Check if the file exists if [ -e "./Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi" ]; then echo "File exists: ./Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi" # Display file type file "./Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi" # List contents of the .rsi directory (if it's a directory) echo "Contents of the .rsi file/directory:" ls -la "./Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi" else echo "File not found: ./Resources/Textures/_White/Ghosts/scituzer2-ghost.rsi" fiLength of output: 734
37-46
: Verify the sprite file exists.The custom ghost prototype
warete-ghost
references a sprite file_White/Ghosts/warete-ghost.rsi
. Please ensure this file exists in the project.Verification successful
Sprite file for
warete-ghost
exists and is correctly referenced.The custom ghost prototype
warete-ghost
correctly references the sprite file_White/Ghosts/warete-ghost.rsi
. This file exists in the project at the locationResources/Textures/_White/Ghosts/warete-ghost.rsi
and contains the necessary components (animated.png and meta.json) for a valid RSI file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `warete-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo warete-ghostLength of output: 241565
Script:
#!/bin/bash # Description: Verify the exact sprite file for `warete-ghost` exists in the correct location. # Test: Check if the sprite file exists in the Resources/Textures/_White/Ghosts/ directory. Expect: File found. ls -l Resources/Textures/_White/Ghosts/warete-ghost.rsiLength of output: 189
56-64
: Verify the sprite file exists and address the mismatch.The custom ghost prototype
nairsark-ghost
references a sprite file_White/Ghosts/frostnova-ghost.rsi
. Please ensure this file exists in the project.Also, there seems to be a mismatch between the sprite file name
frostnova-ghost.rsi
and the prototype idnairsark-ghost
. Consider updating either the sprite file name or the prototype id to maintain consistency.Verification successful
To ensure we have the correct information, let's verify the existence of the sprite file with its full path.
Let's verify the existence of the "nairsark-ghost.rsi" file, which matches the prototype id.
Update the sprite reference in the custom ghost prototype.
The verification process has revealed that both "frostnova-ghost.rsi" and "nairsark-ghost.rsi" exist in the ./Resources/Textures/_White/Ghosts/ directory. However, there's a mismatch between the prototype id "nairsark-ghost" and the referenced sprite file "frostnova-ghost.rsi".
To maintain consistency and avoid potential confusion:
- Update the sprite reference in the custom ghost prototype from:
to:sprite: _White/Ghosts/frostnova-ghost.rsisprite: _White/Ghosts/nairsark-ghost.rsiThis change will ensure that the sprite file matches the prototype id, improving code clarity and reducing the risk of future errors.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sprite file for `nairsark-ghost` exists. # Test: Check if the sprite file exists. Expect: File found. fd -e rsi -x echo frostnova-ghostLength of output: 251363
Script:
#!/bin/bash # Verify the existence of the frostnova-ghost.rsi file if [ -f "./Resources/Textures/_White/Ghosts/frostnova-ghost.rsi" ]; then echo "The sprite file frostnova-ghost.rsi exists." else echo "The sprite file frostnova-ghost.rsi does not exist." fiLength of output: 180
Script:
#!/bin/bash # Verify the existence of the nairsark-ghost.rsi file if [ -f "./Resources/Textures/_White/Ghosts/nairsark-ghost.rsi" ]; then echo "The sprite file nairsark-ghost.rsi exists." else echo "The sprite file nairsark-ghost.rsi does not exist." fi # If nairsark-ghost.rsi doesn't exist, list all .rsi files in the _White/Ghosts directory if [ ! -f "./Resources/Textures/_White/Ghosts/nairsark-ghost.rsi" ]; then echo "Listing all .rsi files in _White/Ghosts directory:" ls -1 ./Resources/Textures/_White/Ghosts/*.rsi 2>/dev/null || echo "No .rsi files found in the directory." fiLength of output: 1976
Описание PR
Кастомные гостики.
Потом всё равно придётся рефакторить это дело, но почему бы и нет?
Изменения
🆑 Warete