-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Fix] no more free chem change for bloba #960
Conversation
ran into a bug where changing the chem type chud be done whitout paying for it. Now it checks and aborts if you dont have enuf points to do the change.
ПроцессИзменения в классе Изменения
Стихотворение
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: 0
🧹 Outside diff range and nitpick comments (1)
Content.Server/Backmen/Blob/BlobObserverSystem.cs (1)
209-212
: Проверка стоимости смены химического типа реализована корректно!Изменение правильно предотвращает бесплатную смену химического типа, проверяя наличие достаточного количества очков перед выполнением действия. Код интегрирован с существующей системой проверки стоимости способностей.
Небольшое предложение по улучшению: добавьте всплывающее сообщение, информирующее игрока о недостатке очков.
if (!_blobCoreSystem.TryUseAbility(component.Core.Value, blobCoreComponent.SwapChemCost)) +{ + _popup.PopupEntity(Loc.GetString("blob-insufficient-points", ("cost", blobCoreComponent.SwapChemCost)), + uid, uid, PopupType.LargeCaution); return; +}
erm |
we all love heisentests failurue |
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.
Sike, actually there's an issue with the order of if's
Please move points removal just right above the chem swap, so when you click on current chem the system won't steal your points
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: 0
🧹 Outside diff range and nitpick comments (1)
Content.Server/Backmen/Blob/BlobObserverSystem.cs (1)
209-214
: Корректная проверка стоимости смены химического типа!Изменения правильно решают проблему бесплатной смены химического типа. Проверка наличия достаточного количества очков теперь выполняется до изменения типа.
Предлагаю добавить сообщение игроку при недостатке очков:
if (!_blobCoreSystem.TryUseAbility(component.Core.Value, blobCoreComponent.SwapChemCost)) +{ + _popup.PopupEntity(Loc.GetString("blob-not-enough-points"), uid, uid, PopupType.LargeCaution); return; +}
ah yes, i diddnt see that as the Chemical ui select dont let you select the chemical allready selected. |
ran into a bug where changing the chem type chud be done whitout paying for it. Now it checks and aborts if you dont have enuf points to do the change.
i cant speak russian so i cant fill this out. sorry
Описание PR
Медиа
Тип PR
Изменения
Summary by CodeRabbit
Новые функции
Исправления ошибок