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

ЭТО ЖЕ ТАРХУН!!! #132

Merged
merged 5 commits into from
Nov 18, 2024
Merged

ЭТО ЖЕ ТАРХУН!!! #132

merged 5 commits into from
Nov 18, 2024

Conversation

loksill
Copy link

@loksill loksill commented Nov 13, 2024

О чем PR

ЭТО ТАРХУН!

Почему

НАДО

Технические детали

Медиа

image

  • Я добавил скриншот/видео, показывающее изменения в игре или PR не нуждается в показе
  • Я проверил изменения на предмет багов

Summary by CodeRabbit

  • New Features

    • Introduced the DrinkTarragonBottleFull to various inventories, enhancing beverage options in soda dispensers and vending machines.
    • Added a new consumable drink entity for Tarragon Bottle, complete with unique attributes and descriptions.
    • New reagent Tarragon defined, featuring distinct flavor and effects.
  • Enhancements

    • Expanded contents of the CrateServiceTrashCartFilled for greater variety in item discovery.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

coderabbitai bot commented Nov 16, 2024

Walkthrough

The changes involve the addition of a new drink item, DrinkTarragonBottleFull, across multiple configuration files. This new item enhances the beverage options available in the soda dispenser and vending machine inventories. Additionally, a detailed list of contents for the CrateServiceTrashCartFilled entity has been introduced, expanding its functionality. The modifications primarily focus on integrating the new drink and updating the trash cart's contents, while existing entities remain unchanged.

Changes

File Path Change Summary
Resources/Prototypes/Catalog/Fills/Crates/service.yml Added new item DrinkTarragonBottleFull to CrateServiceSodaDispenser; detailed contents for CrateServiceTrashCartFilled.
Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml Added DrinkTarragonBottleFull to SodaDispenserInventory.
Resources/Prototypes/Catalog/VendingMachines/Inventories/boozeomat.yml Added DrinkTarragonBottleFull: 3 to startingInventory of BoozeOMatInventory.
Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml Introduced new entity DrinkTarragonBottleFull with components including SolutionContainerManager, Label, and Sprite.
Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml Added new reagent Tarragon with flavor and metabolism effects.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SodaDispenser
    participant BoozeOMat
    participant TrashCart

    User->>SodaDispenser: Request DrinkTarragonBottleFull
    SodaDispenser->>User: Dispense DrinkTarragonBottleFull

    User->>BoozeOMat: Request DrinkTarragonBottleFull
    BoozeOMat->>User: Dispense DrinkTarragonBottleFull

    User->>TrashCart: Inspect contents
    TrashCart->>User: Show detailed contents
Loading

🐰 "In the land of crates and drinks so fine,
Comes a tarragon bottle, a treasure divine.
With flavors that dance and a label so bright,
A sip of this potion brings pure delight!
From trash carts to dispensers, joy does abound,
In our whimsical world, new wonders are found!" 🌟


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

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

🧹 Outside diff range and nitpick comments (5)
Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml (3)

5-5: Consider revising the informal description

The current description "Безалкогольный напиток... хотя кому надо описание?" (Non-alcoholic drink... who needs a description?) seems informal. Consider providing a more informative description that matches the game's tone.


17-17: Add newline at end of file

Add a newline character at the end of the file to comply with YAML standards.

  - type: Sealable
+
🧰 Tools
🪛 yamllint

[error] 17-17: no new line character at the end of file

(new-line-at-end-of-file)


4-4: Consider implementing localization for text content

While the Russian text is appropriate for this PR, consider implementing a proper localization system for text content to support multiple languages in the future.

Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml (2)

1-9: Consider localizing the flavor text

The flavor text "мята и газировка" (mint and soda) is hardcoded in Russian. For consistency and internationalization, consider using a translation key similar to how name and desc fields are using reagent-name-tarragon and reagent-desc-cola.

-  flavor: мята и газировка.
+  flavor: reagent-flavor-tarragon

24-24: Add newline at end of file

Add a newline character at the end of the file to comply with YAML formatting standards.

       type: Remove
+
🧰 Tools
🪛 yamllint

[error] 24-24: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 10d70ce and c10abb5.

📒 Files selected for processing (5)
  • Resources/Prototypes/Catalog/Fills/Crates/service.yml (1 hunks)
  • Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml (1 hunks)
  • Resources/Prototypes/Catalog/VendingMachines/Inventories/boozeomat.yml (1 hunks)
  • Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml (1 hunks)
  • Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml (1 hunks)
🧰 Additional context used
🪛 yamllint
Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml

[error] 17-17: no new line character at the end of file

(new-line-at-end-of-file)

Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml

[error] 24-24: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (8)
Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml (3)

11-12: Verify Tarragon reagent definition

Let's ensure the Tarragon reagent is properly defined and balanced.

#!/bin/bash
# Search for Tarragon reagent definition
rg -l "id:\s*Tarragon" --type yaml

# Check other drink quantities for comparison
rg "Quantity:\s*100" --type yaml -C 2

2-2: Verify parent entity exists

Let's ensure the parent entity DrinkColaBottleFull exists and is properly defined.

✅ Verification successful

Parent entity exists and is properly defined

The parent entity DrinkColaBottleFull is properly defined in Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml with all necessary components. The inheritance is appropriate as both are soda-type drinks with similar container properties. The entity is also well-integrated into the game's systems, appearing in vending machines, crates, and maps.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for DrinkColaBottleFull entity definition
rg -l "id:\s*DrinkColaBottleFull" --type yaml

Length of output: 244


Script:

#!/bin/bash
# Let's check the actual definition of DrinkColaBottleFull
rg "DrinkColaBottleFull" --type yaml -A 10

Length of output: 11551


15-16: Verify sprite asset exists

Let's confirm the sprite asset exists at the specified path.

✅ Verification successful

Sprite asset verification successful

The sprite asset exists at Resources/Textures/Objects/Consumable/Drinks/colabottle.rsi and contains all necessary files including icon states (icon.png, icon_empty.png, icon_open.png), fill states (fill-1.png through fill-5.png), and meta.json. The sprite path in the YAML file is correctly specified.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the sprite file
fd "colabottle.rsi" Resources/

Length of output: 185


Script:

#!/bin/bash
# Let's verify if the sprite file exists in the Textures directory instead of Objects
fd "colabottle.rsi" Resources/Textures/

# Also check the contents of the directory if it exists
ls -la Resources/Textures/Objects/Consumable/Drinks/colabottle.rsi/ 2>/dev/null || echo "Directory not found"

Length of output: 847

Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/soda.yml (1)

16-24: Review drowsiness removal effect

The metabolism effect removes drowsiness instantly (1.0 seconds), which seems inconsistent with typical soda effects. Consider if this is intentional or if it should be aligned with other sodas in the game.

#!/bin/bash
# Check drowsiness removal duration in other soda definitions
rg -g "*.yml" "Drowsiness.*Remove" Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/
🧰 Tools
🪛 yamllint

[error] 24-24: no new line character at the end of file

(new-line-at-end-of-file)

Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml (2)

6-8: Verify alphabetical ordering

The placement between DrinkColaBottleFull and DrinkCreamCartonXL appears to maintain alphabetical ordering, but let's verify:

#!/bin/bash
# Description: Check if the inventory items are in alphabetical order
# Expected: Should see the items in sorted order matching the file

# Extract and sort the inventory items
rg "^\s+- Drink.*Full$" "Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml" | sort | uniq

7-7: LGTM! Verify the entity exists.

The addition of DrinkTarragonBottleFull to the soda dispenser inventory aligns with the PR's objective of adding Tarkhun (tarragon-flavored soda).

Let's verify the entity exists to prevent runtime errors:

✅ Verification successful

Entity verification successful

The DrinkTarragonBottleFull entity is properly defined and integrated across multiple configuration files:

  • Main entity definition in Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml
  • Referenced in vending machine inventory, crates, and reagent dispensers
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that DrinkTarragonBottleFull entity is properly defined
# Expected: Should find the entity definition in the DeltaV/Entities directory

# Search for the entity definition
rg -l "DrinkTarragonBottleFull" "Resources/Prototypes/DeltaV/Entities"

Length of output: 510


Script:

#!/bin/bash
# Let's search for the entity definition in the entire Resources/Prototypes directory
rg -l "DrinkTarragonBottleFull" Resources/Prototypes/

Length of output: 320

Resources/Prototypes/Catalog/VendingMachines/Inventories/boozeomat.yml (1)

21-21: LGTM! Verify complete integration across systems.

The addition of DrinkTarragonBottleFull with quantity 3 follows the existing inventory patterns for specialty drinks. The placement maintains alphabetical ordering.

Let's verify the complete integration of this drink across related systems:

✅ Verification successful

Integration verified across all required systems

The Tarragon drink has been properly integrated across all necessary systems:

  • Defined as a drink prototype in drinks_bottles.yml
  • Added to beverage dispensers in beverage.yml
  • Tarragon reagent defined in soda.yml
  • Included in service crates in service.yml
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the complete integration of DrinkTarragonBottleFull across all necessary systems

# Check if the drink is properly defined in the drinks prototype
rg "DrinkTarragonBottleFull" Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/

# Verify integration in soda dispenser
rg "DrinkTarragonBottleFull" Resources/Prototypes/Catalog/ReagentDispensers/

# Check if the Tarragon reagent is properly defined
rg "Tarragon" Resources/Prototypes/DeltaV/Reagents/Consumable/Drink/

# Verify if it's included in any relevant crates
rg "DrinkTarragonBottleFull" Resources/Prototypes/Catalog/Fills/Crates/

Length of output: 678

Resources/Prototypes/Catalog/Fills/Crates/service.yml (1)

205-205: LGTM! Verify related configuration files.

The addition of DrinkTarragonBottleFull to the soda dispenser refill crate is properly placed among other drink items.

Let's verify the consistency of this addition across related configuration files:

✅ Verification successful

Drink prototype properly integrated across configurations

The DrinkTarragonBottleFull is correctly configured across all relevant files:

  • Defined as an entity in Resources/Prototypes/DeltaV/Entities/Objects/Consumable/Drinks/drinks_bottles.yml
  • Added to soda dispenser crate in Resources/Prototypes/Catalog/Fills/Crates/service.yml
  • Integrated in beverage dispenser config in Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml
  • Available in boozeomat vending machine with quantity of 3 in Resources/Prototypes/Catalog/VendingMachines/Inventories/boozeomat.yml

The implementation is consistent and properly placed among similar drink items across all configurations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that DrinkTarragonBottleFull is properly configured across the codebase

# Check if the drink is defined in the prototypes
rg "DrinkTarragonBottleFull" Resources/Prototypes/Entities/Objects/Consumable/Drinks/

# Verify integration with dispenser and vending machine configs
rg "DrinkTarragonBottleFull" Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml
rg "DrinkTarragonBottleFull" Resources/Prototypes/Catalog/VendingMachines/Inventories/boozeomat.yml

Length of output: 333


Script:

#!/bin/bash
# Let's verify if the drink prototype is defined somewhere else and check for the reagent definition

# Search for the drink prototype definition
fd -e yml -e yaml | xargs rg "DrinkTarragonBottleFull" -B2 -A2

# Search for tarragon reagent definition
rg -i "tarragon" Resources/Prototypes/Reagents/

Length of output: 2037

Comment on lines +10 to +15
metamorphicSprite:
sprite: Objects/Consumable/Drinks/colaglass.rsi
state: icon_empty
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Consider using glass_green.rsi for better color representation

The colaglass sprite is not ideal for Tarkhun's distinctive green color (#99bb43). I found that Resources/Textures/Objects/Consumable/Drinks/glass_green.rsi would be more appropriate as:

  1. It's specifically designed for green-colored drinks
  2. It has the same fill level support (5 levels)
  3. It will better represent Tarkhun's characteristic color when metamorphicChangeColor is false

Consider changing:

metamorphicSprite:
  sprite: Objects/Consumable/Drinks/glass_green.rsi
  state: icon_empty
🔗 Analysis chain

Verify the sprite compatibility

The metamorphic sprite configuration is using the generic cola glass sprite (colaglass.rsi). Tarkhun typically has a distinctive green color (#99bb43), which might not be properly represented using the cola glass sprite if metamorphicChangeColor is set to false.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there's a specific tarragon glass sprite that might be more appropriate
rg -g "*.rsi" "tarragon" || echo "No specific tarragon sprite found"

Length of output: 91


Script:

#!/bin/bash
# Let's check for any specific glass sprites that might be more appropriate
fd ".rsi$" | grep -i "glass\|drink"

# Also check the contents of colaglass.rsi to verify its states
ls -la Resources/Textures/Objects/Consumable/Drinks/colaglass.rsi/ || echo "Directory not found"

# Check if there are any green-colored drink sprites
fd ".rsi$" Resources/Textures/Objects/Consumable/Drinks/ -x echo "Checking {}"

Length of output: 41461


Script:

#!/bin/bash
# Let's check for any green-colored glass sprites that might be more suitable
fd ".rsi$" | grep -i "green\|emerald" | while read -r sprite; do
    echo "=== Checking $sprite ==="
    ls -la "$sprite" 2>/dev/null || echo "Cannot access $sprite"
done

# Also check if there are any specific tarkhun-related files in the codebase
rg -i "tarkhun" || echo "No tarkhun-related files found"

# Let's also check the meta.json of colaglass.rsi to understand its states
cat Resources/Textures/Objects/Consumable/Drinks/colaglass.rsi/meta.json || echo "Cannot access meta.json"

Length of output: 22612

@EndrAnimet EndrAnimet merged commit 82f120c into EndrAnimet:master Nov 18, 2024
7 of 10 checks passed
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