feat(world): add persistent citizen simulation with needs, jobs, and social features
- Adds Character model with survival needs (hunger, thirst, energy) and state machine - Implements city:tick world ticker for offline progression every minute - Adds city territory expansion and building construction system - Introduces job economy, inventory, and transaction audit trail - Adds social graph (friends, marriage, children) and character chat - Implements admin approval workflow for new registrations - Adds hospital admission system for traffic accidents - Includes comprehensive feature tests and world seeders
This commit is contained in:
Regular → Executable
+13
-2
@@ -45,7 +45,17 @@ class AuthController extends Controller
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
if (! $user->is_active) {
|
||||
if ($user->status === User::STATUS_PENDING) {
|
||||
Auth::logout();
|
||||
$request->session()->invalidate();
|
||||
$request->session()->regenerateToken();
|
||||
|
||||
return redirect()->route('login')->withErrors([
|
||||
'email' => __('auth.pending'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($user->status === User::STATUS_BANNED || ! $user->is_active) {
|
||||
Auth::logout();
|
||||
$request->session()->invalidate();
|
||||
$request->session()->regenerateToken();
|
||||
@@ -89,8 +99,9 @@ class AuthController extends Controller
|
||||
'email' => $data['email'],
|
||||
'password' => $data['password'],
|
||||
'role' => User::ROLE_USER,
|
||||
'status' => User::STATUS_PENDING,
|
||||
'locale' => $data['locale'] ?? 'pt_BR',
|
||||
'is_active' => true,
|
||||
'is_active' => false,
|
||||
]);
|
||||
|
||||
Auth::login($user);
|
||||
|
||||
Reference in New Issue
Block a user