diff --git a/public/index.php b/public/index.php index 7d0f50e..6e1cdd0 100644 --- a/public/index.php +++ b/public/index.php @@ -76,8 +76,6 @@ function index(): string */ function show_character_info(int $id = 0): string { - global $controlrow; - $user = $id !== 0 ? User::find($id) : user(); if ($user === false) exit('Failed to show info for user ID '.$id); @@ -90,11 +88,10 @@ function show_character_info(int $id = 0): string foreach ($spells as $spell) $magic_list .= $spell['name'].'
'; } - $showchar = render('showchar', [ + $showchar = render('show_char', [ 'char' => $user, 'level' => $level, - 'magic_list' => $magic_list, - 'controlrow' => $controlrow + 'magic_list' => $magic_list ]); return render('layouts/minimal', ['content' => $showchar, 'title' => $user->username.' Information']); } diff --git a/src/actions/explore.php b/src/actions/explore.php index e41dcbf..30e2142 100644 --- a/src/actions/explore.php +++ b/src/actions/explore.php @@ -18,8 +18,6 @@ function explore() } function move() { - global $controlrow; - // Early exit if fighting if (user()->currentaction == 'Fighting') redirect('/fight'); @@ -31,7 +29,7 @@ function move() { } // Current game state - $game_size = $controlrow['gamesize']; + $game_size = env('game_size'); $latitude = user()->latitude; $longitude = user()->longitude; $direction = $form['data']['direction']; diff --git a/src/actions/help.php b/src/actions/help.php index 31d4cda..feed9bf 100644 --- a/src/actions/help.php +++ b/src/actions/help.php @@ -16,8 +16,6 @@ function register_routes(Router $r): Router function main() { - global $controlrow; - $page = <<Table of Contents