Skip to content

Commit

Permalink
Fix some dependency crap
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadyita committed May 6, 2021
1 parent 7e805c4 commit a71b076
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
6 changes: 2 additions & 4 deletions SpawntimeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Nadybot\Core\LoggerWrapper;
use Nadybot\Core\Text;
use Nadybot\Core\Util;
use Nadybot\Modules\WHEREIS_MODULE\WhereisCoordinates;

/**
* @author Nadyita (RK5) <nadyita@hodorraid.org>
Expand All @@ -25,15 +24,14 @@
*/

class SpawntimeController {

public string $moduleName;

/** @Inject */
public DB $db;

/** @Inject */
public Text $text;

/** @Inject */
public Util $util;

Expand Down Expand Up @@ -63,7 +61,7 @@ public function getLocationBlob(Spawntime $spawntime): string {
}
return $this->text->makeBlob("locations (" . count($spawntime->coordinates).")", $blob);
}

/**
* Return the formatted entry for one mob
*/
Expand Down
23 changes: 23 additions & 0 deletions WhereisCoordinates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php declare(strict_types=1);

namespace Nadybot\User\Modules\SPAWNTIME_MODULE;

use Nadybot\Modules\HELPBOT_MODULE\Playfield;
use Nadybot\Modules\WHEREIS_MODULE\WhereisTrait;

class WhereisCoordinates extends Playfield {
use WhereisTrait;

public function __construct(Spawntime $spawn) {
$this->answer = $spawn->answer;
$this->keywords = $spawn->keywords;
if (isset($spawn->long_name)) {
$this->long_name = $spawn->long_name;
}
$this->name = $spawn->name;
$this->playfield_id = (int)$spawn->playfield_id;
$this->short_name = $spawn->short_name;
$this->xcoord = (int)$spawn->xcoord;
$this->ycoord = (int)$spawn->ycoord;
}
}

0 comments on commit a71b076

Please sign in to comment.