Commit 53830d49 authored by m1ndgames's avatar m1ndgames

update

parent 49c59a63
......@@ -59,17 +59,6 @@ class TechTree():
else:
return 0
def get_supplycost(self, unitname):
for unit in self.unit:
if unit['name'] == unitname:
if 'supply' in unit:
for weapon in unit['weapons']:
if 'range' in weapon:
range = weapon['range']
return range
else:
return 0
def get_supplycost(self, name):
for unit in self.unit:
if unit['name'] == name:
......
......@@ -70,7 +70,7 @@ class UnitManager():
if self.bot.structures(trainbuilding).ready.idle:
trainstructure = self.bot.structures(trainbuilding).ready.idle.first
print("Training: " + str(unitname))
self.bot.do(trainstructure.train(trainunittype, subtract_cost=True, subtract_supply=True))
self.bot.do(trainstructure.train(trainunittype))
if self.bot.structures(trainbuilding).exists:
if unitrequirement:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment