From 484b92816ef67e42f770c81a39669bc391d7e0f3 Mon Sep 17 00:00:00 2001 From: Darin McBride Date: Tue, 2 Feb 2016 09:36:51 -0700 Subject: [PATCH] Allow client to pass in "" for orbit to mean "no orbit". It already does so, but causes a warning. Get rid of the warning. --- lib/Lacuna/RPC/Building/BlackHoleGenerator.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm index 73682fdd..3e93f7ec 100644 --- a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm +++ b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm @@ -231,7 +231,7 @@ sub find_target { $target_type = "star"; $target_word =~ s/:?orbit:?//g; - if ($target && exists $target_params->{orbit} && 1 <= $target_params->{orbit} && $target_params->{orbit} <= 8) { + if ($target && $target_params->{orbit} && 1 <= $target_params->{orbit} && $target_params->{orbit} <= 8) { my $star = $target; my $orbit = int($target_params->{orbit}); my ($x, $y) = ($star->x + $orbits[$orbit][0], $star->y + $orbits[$orbit][1]); #++); -- 2.51.2