This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/game/beta5/tech/library/getBudget.inc

23 lines
411 B
PHP

<?php
class beta5_tech_getBudget {
function beta5_tech_getBudget($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 split('!', $b);
}
}
?>