feat(city): add humanoid worker robots as city agents
Seed five worker robot agents (TR-01 to TR-05) with Portuguese system prompts and active status. Extend the 3D humanoid renderer with metallic materials, glowing visor, antenna beacon, and chest status light for the worker_robot type. Add feature tests covering payload serialization and city bounds validation.
This commit is contained in:
@@ -67,6 +67,37 @@ class CityWorldSeeder extends Seeder
|
||||
],
|
||||
);
|
||||
|
||||
// --- Humanoid worker robots (walk the city like pedestrians) ---
|
||||
$robotSpawns = [
|
||||
['Robô TR-01', 12, -16],
|
||||
['Robô TR-02', -18, 10],
|
||||
['Robô TR-03', 100, -14],
|
||||
['Robô TR-04', -60, 14],
|
||||
['Robô TR-05', 60, 26],
|
||||
];
|
||||
$robotModel = (string) config('ai.default_model');
|
||||
if (! in_array($robotModel, config('ai.allowed_models', []), true)) {
|
||||
$robotModel = 'deepseek/deepseek-v4-flash-0731';
|
||||
}
|
||||
foreach ($robotSpawns as [$name, $rx, $rz]) {
|
||||
AiAgent::updateOrCreate(
|
||||
['name' => $name],
|
||||
[
|
||||
'type' => 'worker_robot',
|
||||
'model' => $robotModel,
|
||||
'system_prompt' => 'Você é '.$name.', um robô humanoide trabalhador da cidade '
|
||||
.'virtual City10. Você circula pelas ruas transportando materiais e ajudando '
|
||||
.'nas lojas. Fale de forma curta, educada e um pouco robótica, sempre em '
|
||||
.'português, sem inventar dados pessoais de usuários.',
|
||||
'current_goal' => 'Circular entre as lojas auxiliando nas tarefas do dia',
|
||||
'status' => 'active',
|
||||
'pos_x' => $rx,
|
||||
'pos_y' => 0,
|
||||
'pos_z' => $rz,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
$bakery = Store::where('type', 'bakery')->orderBy('id')->first();
|
||||
$market = Store::where('type', 'market')->orderBy('id')->first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user