changeset 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 24de33db8284
children 2cdf6c6bfd0e
files agent.pl
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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}));