-
Notifications
You must be signed in to change notification settings - Fork 38
Conversation
Content.Server/PDA/PdaSystem.cs
Outdated
if (TryComp<BankAccountComponent>(actor_uid, out var bank)) { | ||
balance = (ulong)bank.Balance; | ||
} | ||
} |
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.
Не по конвенциям стоят {.
Да и не нужны они, когда одна строчка.
Да и ифы можно объединить.
И тебе следует использовать тот тип, что у тебя в bank.Balance, а не ulong
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.
нельзя, зачем исполнять второе если первое нулл
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.
if (actor_uid != null && TryComp<BankAccountComponent>(actor_uid, out var bank))
balance = (ulong)bank.Balance;
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.
И лучше bank переименуй а account, ведь он там главное слово
И в следующий раз можешь удалить мусор из первого комментария
|
About the PR
Why / Balance
How to test
Media
Breaking changes
Changelog