Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Добавление баланса в кпк #208

Merged
merged 5 commits into from
May 23, 2024

Conversation

user424242420
Copy link

About the PR

Why / Balance

How to test

Media

image

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

  • add: Добавлен баланс в кпк

Content.Client/PDA/PdaMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Client/PDA/PdaMenu.xaml.cs Outdated Show resolved Hide resolved
if (TryComp<BankAccountComponent>(actor_uid, out var bank)) {
balance = (ulong)bank.Balance;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Не по конвенциям стоят {.
Да и не нужны они, когда одна строчка.
Да и ифы можно объединить.
И тебе следует использовать тот тип, что у тебя в bank.Balance, а не ulong

Copy link
Author

Choose a reason for hiding this comment

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

нельзя, зачем исполнять второе если первое нулл

Copy link
Member

Choose a reason for hiding this comment

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

if (actor_uid != null && TryComp<BankAccountComponent>(actor_uid, out var bank))
    balance = (ulong)bank.Balance;

Copy link
Member

Choose a reason for hiding this comment

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

И лучше bank переименуй а account, ведь он там главное слово

Resources/Locale/en-US/pda/pda-component.ftl Show resolved Hide resolved
Content.Shared/PDA/PdaUpdateState.cs Outdated Show resolved Hide resolved
@FireNameFN
Copy link
Member

FireNameFN commented May 22, 2024

И в следующий раз можешь удалить мусор из первого комментария

About the PR

Why / Balance

How to test

Media

@user424242420 user424242420 requested a review from FireNameFN May 22, 2024 18:05
@Vonsant Vonsant merged commit 8c953e1 into Corvax-Frontier:master May 23, 2024
11 checks passed
@user424242420 user424242420 deleted the balance-pda branch May 24, 2024 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants