# HG changeset patch # User "Rex Tsai " # Date 1228479721 -28800 # Node ID 4c1eb583b97ccb2502d4342fa6ab90bb89d2d13e # Parent 24de33db828448f965afbf8c4b9ed0c0ea5d4cda new function for checking shipyard diff -r 24de33db8284 -r 4c1eb583b97c agent.pl --- 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}));