Skip to content

Conversation

@kekoven1
Copy link
Contributor

Описание PR

40 единиц надо


Медиа

Список

Example Media Embed


Изменения

🆑

  • add: 40 единиц масла лотофага даёт псионику

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

Walkthrough

Добавлен новый серверный эффект реагента ChemGivePsionic, выдающий/включающий псионические способности цели при срабатывании; эффект подключён к прототипу LotophagoiOil с порогом 40+ и добавлены локализации для руководства.

Changes

Cohort / File(s) Описание изменений
Chemistry Reagent Effect Implementation
Content.Server/_White/Chemistry/Effects/ChemGivePsionics.cs
Новый публичный класс ChemGivePsionic : EntityEffect с реализацией Effect(EntityEffectBaseArgs args) (валидирует EntityEffectReagentArgs, обеспечивает наличие PsionicComponent) и ReagentEffectGuidebookText(...) для локализованного текста с переменной шанса.
Reagent Prototype Configuration
Resources/Prototypes/Reagents/psionic.yml
В метаболизм Narcotic для LotophagoiOil добавлена новая запись, запускающая ChemGivePsionic при достижении порога ReagentThreshold (min: 40).
Guidebook Localizations
Resources/Locale/en-US/_white/guidebook/chemistry/effects.ftl, Resources/Locale/ru-RU/_white/guidebook/chemistry/effects.ftl
Добавлены ключи локализации reagent-effect-guidebook-chem-give-psionic с условной формой текста по значению $chance (английская и русская версии).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Remuchi
  • DVOniksWyvern
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed Заголовок полностью соответствует основному изменению в changeset: добавляет эффект псионики для масла лотофага при пороге 40 единиц.
Description check ✅ Passed Описание связано с изменениями в changeset, упоминая требование в 40 единиц масла лотофага, что соответствует добавленному эффекту в коде.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🤖 Fix all issues with AI agents
In `@Content.Server/_White/Chemistry/Effects/ChemGivePsionics.cs`:
- Around line 13-14: In ChemGivePsionic.cs update the ReagentEffectGuidebookText
override to use the correct localization key
"reagent-effect-guidebook-chem-give-psionic" instead of the current
"reagent-effect-guidebook-chem-remove-psionic"; then add matching entries for
that new key in both Resources/Locale/en-US/guidebook/chemistry/effects.ftl and
Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl with appropriate English
and Russian guidebook text (use the same placeholder ("chance", Probability) as
other entries) so the guidebook string resolves correctly at runtime.

Comment on lines 13 to 14
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("reagent-effect-guidebook-chem-remove-psionic", ("chance", Probability));
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, find and examine the file
find . -name "ChemGivePsionics.cs" -type f

Repository: WWhiteDreamProject/wwdpublic

Length of output: 133


🏁 Script executed:

# Search for psionic-related localization keys in ftl files
rg -n "reagent-effect-guidebook-chem.*psionic" --type ftl -i

Repository: WWhiteDreamProject/wwdpublic

Length of output: 99


🏁 Script executed:

# Also search for the ChemRemovePsionic file to understand the pattern
find . -name "*RemovePsionic*" -type f

Repository: WWhiteDreamProject/wwdpublic

Length of output: 219


🏁 Script executed:

# Read the actual file to verify the code
cat -n ./Content.Server/_White/Chemistry/Effects/ChemGivePsionics.cs

Repository: WWhiteDreamProject/wwdpublic

Length of output: 1078


🏁 Script executed:

# Read ChemRemovePsionic for comparison
cat -n ./Content.Server/Nyanotrasen/Chemistry/Effects/ChemRemovePsionic.cs

Repository: WWhiteDreamProject/wwdpublic

Length of output: 1261


🏁 Script executed:

# Search for ftl files without type filter
rg -n "reagent-effect-guidebook.*psionic" --glob="*.ftl"

Repository: WWhiteDreamProject/wwdpublic

Length of output: 721


🏁 Script executed:

# Check the full context of the ftl files to see if "give-psionic" key might be under a different name
rg -n "give.*psionic" --glob="*.ftl" -i

Repository: WWhiteDreamProject/wwdpublic

Length of output: 54


🏁 Script executed:

# Also check what the remove-psionic key text is to understand the pattern
sed -n '372,377p' ./Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl
sed -n '408,413p' ./Resources/Locale/en-US/guidebook/chemistry/effects.ftl

Repository: WWhiteDreamProject/wwdpublic

Length of output: 331


Неправильный ключ локализации в guidebook.

На строке 14 используется ключ "reagent-effect-guidebook-chem-remove-psionic" (удалить), но класс ChemGivePsionic выдаёт псионику, а не удаляет её. Это копирование из ChemRemovePsionic.

Необходимо:

  1. Заменить ключ на "reagent-effect-guidebook-chem-give-psionic"
  2. Добавить новый ключ локализации в Resources/Locale/en-US/guidebook/chemistry/effects.ftl и Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl
Предложенное исправление
        protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
-            => Loc.GetString("reagent-effect-guidebook-chem-remove-psionic", ("chance", Probability));
+            => Loc.GetString("reagent-effect-guidebook-chem-give-psionic", ("chance", Probability));
🤖 Prompt for AI Agents
In `@Content.Server/_White/Chemistry/Effects/ChemGivePsionics.cs` around lines 13
- 14, In ChemGivePsionic.cs update the ReagentEffectGuidebookText override to
use the correct localization key "reagent-effect-guidebook-chem-give-psionic"
instead of the current "reagent-effect-guidebook-chem-remove-psionic"; then add
matching entries for that new key in both
Resources/Locale/en-US/guidebook/chemistry/effects.ftl and
Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl with appropriate English
and Russian guidebook text (use the same placeholder ("chance", Probability) as
other entries) so the guidebook string resolves correctly at runtime.

@Lachklen
Copy link
Contributor

🥹

@Lachklen
Copy link
Contributor

Как по мне слишком маленькая плата за псионику...

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