diff agent.pl @ 289:4c1eb583b97c

new function for checking shipyard
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Fri, 05 Dec 2008 20:22:01 +0800
parents b2510d9339d8
children cdbb428b464c
line wrap: on
line diff
--- a/agent.pl	Fri Dec 05 20:20:19 2008 +0800
+++ b/agent.pl	Fri Dec 05 20:22:01 2008 +0800
@@ -238,6 +238,12 @@
     }
 }
 
+sub is_shipyard_availble {
+    my ($self, $city) = @_;
+    return 0 if(!defined($city->{buildings}->{shipyard}));
+    return 1;
+}
+
 sub is_shipyard_level_enough {
     my ($self, $city) = @_;
     return 0 if(!defined($city->{buildings}->{shipyard}));