- my $planet = $c->model->selectrow_array(q{SELECT planetid($1,$2,$3,tick())}
- ,undef,$x,$y,$z);
+ my ($planet,$dists,$tick) = $c->model->selectrow_array(q{
+SELECT pid,distorters,tick
+FROM current_planet_stats LEFT JOIN current_development_scans USING (pid)
+WHERE x = $1 AND y = $2 AND z = $3
+ },undef,$x,$y,$z);
+ unless ($planet){
+ $c->reply("There is no planet with coords $x:$y:$z, try again after the tick.");
+ return;
+ }