A lot of things
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Entry;
|
||||
use App\Models\EntryFile;
|
||||
use App\Services\FileServersService;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -15,9 +16,29 @@ class ToolsController extends Controller
|
||||
return view('tools.patcher');
|
||||
}
|
||||
|
||||
public function directPatch( Request $request, int $entry_id, EntryFile $file )
|
||||
public function directPatch( Request $request, int $entryId, EntryFile $file )
|
||||
{
|
||||
if( $file->entry_id != $entry_id ) {
|
||||
if( $file->entry_id != $entryId ) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$service = app(FileServersService::class);
|
||||
|
||||
|
||||
$patches = [
|
||||
'file' => $service->getDownloadFileUrl( $file ),
|
||||
'name' => $file->entry->title,
|
||||
'outputName' => $file->filename
|
||||
];
|
||||
|
||||
|
||||
|
||||
return view('tools.patcher', compact('patches'));
|
||||
}
|
||||
|
||||
public function play( Request $request, int $entryId, EntryFile $file )
|
||||
{
|
||||
if( $file->entry_id != $entryId ) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
@@ -28,7 +49,11 @@ class ToolsController extends Controller
|
||||
'name' => $file->entry->title,
|
||||
'outputName' => $file->filename
|
||||
];
|
||||
$emuConfig = [
|
||||
'core' => $file->playOnlineSetting?->core,
|
||||
'threads' => $file->playOnlineSetting?->threads,
|
||||
];
|
||||
|
||||
return view('tools.patcher', compact('patches'));
|
||||
return view('tools.play', compact('patches', 'emuConfig'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user