lwb5-in-2025/scripts/game/beta5/tech/library/getBudget.inc

23 lines
411 B
PHP

<?php
class beta5_tech_getBudget {
public function __construct($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
// Returns an array containing research budget allocations
function run($pid) {
$q = $this->db->query("SELECT research FROM player WHERE id = $pid");
if (!($q && dbCount($q))) {
return array();
}
list($b) = dbFetchArray($q);
return explode('!', $b);
}
}
?>