fix: fix various PHP problems and a few bugs
This commit is contained in:
parent
c91440af72
commit
a4b45ddaa4
34 changed files with 27 additions and 66 deletions
admin
|
@ -37,19 +37,19 @@ function handleInput() {
|
|||
for ($y = $minY; $y <= $maxY; $y ++) {
|
||||
$str = array_shift($layout);
|
||||
for ($x = $minX; $x <= $maxX; $x ++) {
|
||||
$type = $str{0};
|
||||
$type = $str[0];
|
||||
$map->setSystemType($x, $y, $type);
|
||||
if ($type != 'S') {
|
||||
$str = substr($str, 1);
|
||||
continue;
|
||||
}
|
||||
$alloc = (int) $str{1};
|
||||
$alloc = (int) $str[1];
|
||||
$map->setSystemAlloc($x, $y, $alloc);
|
||||
if ($alloc == 0) {
|
||||
$str = substr($str, 2);
|
||||
continue;
|
||||
}
|
||||
$map->setSystemSpawn($x, $y, $str{2} == '1');
|
||||
$map->setSystemSpawn($x, $y, $str[2] == '1');
|
||||
$str = substr($str, 3);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue