mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-09-08 03:06:03 -05:00
57 lines
1.6 KiB
PHP
57 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Enums\Game;
|
|
|
|
use App\Classes\Character\CharacterItemConfig;
|
|
use App\Classes\Character\HunterItemConfig\InquisitorItemConfig;
|
|
use App\Classes\Character\HunterItemConfig\PoacherItemConfig;
|
|
use App\Classes\Character\HunterItemConfig\StalkerItemConfig;
|
|
use App\Classes\Character\HunterItemConfig\VeteranItemConfig;
|
|
|
|
enum Hunter: string
|
|
{
|
|
case Stalker = 'Stalker';
|
|
case Poacher = 'Poacher';
|
|
case Inquisitor = 'Inquisitor';
|
|
case Mass = 'Mass';
|
|
|
|
public function getTag()
|
|
{
|
|
return 'Hunter.'.$this->value;
|
|
}
|
|
|
|
public static function tryFromTag(string $tag): Hunter|null
|
|
{
|
|
return match ($tag) {
|
|
'Hunter.Stalker' => Hunter::Stalker,
|
|
'Hunter.Poacher' => Hunter::Poacher,
|
|
'Hunter.Inquisitor' => Hunter::Inquisitor,
|
|
'Hunter.Mass' => Hunter::Mass,
|
|
default => null,
|
|
};
|
|
}
|
|
|
|
public function getGroupType(): ItemGroupType
|
|
{
|
|
return match ($this) {
|
|
Hunter::Stalker => ItemGroupType::HunterStalker,
|
|
Hunter::Poacher => ItemGroupType::HunterPoacher,
|
|
Hunter::Inquisitor => ItemGroupType::HunterInquisitor,
|
|
Hunter::Mass => ItemGroupType::HunterVeteran,
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @return class-string<CharacterItemConfig>
|
|
*/
|
|
public function getItemConfigClass(): string
|
|
{
|
|
return match ($this) {
|
|
Hunter::Stalker => StalkerItemConfig::class,
|
|
Hunter::Poacher => PoacherItemConfig::class,
|
|
Hunter::Inquisitor => InquisitorItemConfig::class,
|
|
Hunter::Mass => VeteranItemConfig::class,
|
|
};
|
|
}
|
|
}
|