feat(city): add plaza exercise system with health tracking
- Adds CityPlazas support class for deterministic public plaza generation with outdoor gym equipment - Implements exercise and stop-exercise actions with proximity validation to equipment - Introduces health (0-100) and exercise_count attributes to Character model - Reduces hospital stay duration from two game days to one game hour - Adds 3D gym equipment rendering (bench, bars, bike, treadmill) in city viewer - Includes exercise state machine handling in world ticker with energy drain - Adds comprehensive PlazaExerciseTest and updates HospitalAdmissionTest - Provides localized UI strings for health HUD and exercise prompts
This commit is contained in:
@@ -56,7 +56,7 @@ class CityWorldSeeder extends Seeder
|
||||
['salary' => 14, 'requires_education' => 60],
|
||||
);
|
||||
|
||||
// City hospital: accident victims are admitted here for two game days.
|
||||
// City hospital: accident victims are admitted here for one game hour.
|
||||
Building::updateOrCreate(
|
||||
[
|
||||
'city_id' => $city->id,
|
||||
@@ -83,5 +83,9 @@ class CityWorldSeeder extends Seeder
|
||||
User::query()->where('status', User::STATUS_ACTIVE)->each(function (User $user) use ($city): void {
|
||||
Character::ensureForUser($user, $city);
|
||||
});
|
||||
|
||||
// Backfill fitness columns for characters created before the migration.
|
||||
Character::query()->whereNull('health')->update(['health' => 100]);
|
||||
Character::query()->whereNull('exercise_count')->update(['exercise_count' => 0]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user