feat(city): add player marketplace, mission journal, character customization and presence

- Player-to-player marketplace with listings, buying and selling
- Mission system with progress tracking and money rewards
- Character appearance customization (skin, hair, face, beard, accessory)
- Multiplayer presence feed showing nearby citizens in near-real-time
- Admin world dashboard with live platform metrics
- Bus and train transportation with temporary ride state
- Mobile joystick controls and minimap HUD
- Education bonus applied to work salary
This commit is contained in:
2026-10-17 22:51:20 -03:00
parent 18778b3d26
commit a620f83dd8
30 changed files with 1822 additions and 10 deletions
@@ -0,0 +1,55 @@
<?php
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Models\Character;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
/**
* Character appearance customization.
*/
class CharacterCustomizeController extends Controller
{
/**
* Show current appearance slots.
*/
public function show(Request $request): JsonResponse
{
$me = Character::ensureForUser($request->user());
return response()->json([
'name' => $me->name,
'skin' => (int) $me->skin,
'hair' => (int) $me->hair,
'shirt' => (int) $me->shirt,
'face' => (int) $me->face,
'beard' => (int) $me->beard,
'accessory' => (int) $me->accessory,
]);
}
/**
* Persist appearance choices (1-based slots within safe ranges).
*/
public function update(Request $request): JsonResponse
{
$me = Character::ensureForUser($request->user());
$data = $request->validate([
'skin' => ['required', 'integer', 'min:1', 'max:4'],
'hair' => ['required', 'integer', 'min:1', 'max:4'],
'shirt' => ['required', 'integer', 'min:1', 'max:5'],
'face' => ['required', 'integer', 'min:1', 'max:3'],
'beard' => ['required', 'integer', 'min:0', 'max:2'],
'accessory' => ['required', 'integer', 'min:0', 'max:2'],
]);
$me->forceFill($data)->save();
return response()->json([
'message' => __('city.customize_saved'),
'appearance' => $data,
]);
}
}