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

feat: Add login and signup system #44

Merged
merged 3 commits into from
Aug 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: Create variable to make code more expressive
MrDave1999 committed Aug 31, 2024
commit 55676ad1e6d71a90f856e299ff3514396c277249
3 changes: 2 additions & 1 deletion src/Application/Players/PlayerSystem.cs
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@ public class PlayerSystem : ISystem
public bool OnPlayerRequestSpawn(Player player)
{
var accountComponent = player.GetComponent<AccountComponent>();
if (accountComponent is null)
bool isNotLoggedInOrRegistered = accountComponent is null;
if (isNotLoggedInOrRegistered)
{
player.SendClientMessage(Color.Red, Messages.LoginOrRegisterToContinue);
return false;