Add checks for !hit

This commit is contained in:
2014-08-12 19:58:44 +01:00
parent f948080bd0
commit 0f4234dfc3

View File

@@ -337,8 +337,18 @@ class DropBot(ClientXMPP):
if isinstance(dest, basestring):
return dest
if self.map.node[dest]['security'] >= 0.5:
return '{} is a highsec system'.format(self.map.get_system_name(dest))
ly = self.map.system_distance(source, dest)
if ly > 6.5 * (1 + (0.25 * 5)):
return '{} to {} is greater than {}ly (maximum jump range of all ships)'.format(
self.map.get_system_name(source),
self.map.get_system_name(dest),
6.5 * (1 + (0.25 * 5))
)
res = []
for ship_class in base_range.keys():
res1 = []