2023-01-10 22:39:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace DarksLight2\Training;
|
|
|
|
|
2023-01-18 11:43:45 +00:00
|
|
|
use DarksLight2\Helpers\Str;
|
|
|
|
use User;
|
|
|
|
|
2023-01-10 22:39:11 +00:00
|
|
|
abstract class StepFactory
|
|
|
|
{
|
|
|
|
abstract public function getTitle(): string;
|
|
|
|
abstract public function getMessage(): string;
|
|
|
|
abstract public function getRewards(): array;
|
2023-01-18 11:43:45 +00:00
|
|
|
public function onLocations(): array
|
|
|
|
{
|
|
|
|
return ['all'];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getShortName(): string
|
|
|
|
{
|
|
|
|
return Str::snakeCase(get_class($this));
|
|
|
|
}
|
|
|
|
public function getAnswer()
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function allowedToMove(): array
|
|
|
|
{
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isInfo(): bool
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function databaseRecord()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'completed' => false,
|
|
|
|
'progress' => [
|
|
|
|
'current' => 0,
|
|
|
|
'need' => 1,
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
2023-01-10 22:39:11 +00:00
|
|
|
|
|
|
|
}
|