Added Default Characters to a newly created player data and changed the default currencies and hunter/runner selection.

This commit is contained in:
Vari
2024-03-23 05:08:41 +01:00
parent 813c1ca782
commit 7887145b9b

View File

@@ -18,6 +18,7 @@
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Artisan;
/**
@@ -29,12 +30,12 @@ class PlayerData extends Model
protected $attributes = [
'has_played_tutorial' => false,
'has_played_dg_1' => true,
'currency_a' => 0,
'currency_b' => 0,
'currency_c' => 0,
'has_played_dg_1' => false,
'currency_a' => 1000,
'currency_b' => 500,
'currency_c' => 500,
'last_faction' => Faction::Runner,
'last_hunter' => Hunter::Poacher,
'last_hunter' => Hunter::Inquisitor,
'last_runner' => Runner::Smoke,
'readout_version' => 1,
'runner_faction_level' => 1,
@@ -93,6 +94,18 @@ protected static function booted(): void
}
$playerData->quitterState()->create();
// Add Default Characters
Artisan::call('game:add-characters-to-user', [
'user' => $playerData->user_id,
'characters' => [
Characters::Smoke->value,
Characters::Ghost->value,
Characters::Sawbones->value,
Characters::Inquisitor->value,
Characters::Mass->value,
]
]);
});
}