game/_incl_data/class/DarksLight2/Training/StepFactory.php

48 lines
867 B
PHP

<?php
namespace DarksLight2\Training;
use DarksLight2\Helpers\Str;
use User;
abstract class StepFactory
{
abstract public function getTitle(): string;
abstract public function getMessage(): string;
abstract public function getRewards(): array;
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,
]
];
}
}