fixes to convoy strikes; UI updates; don't generate helis for enemy

This commit is contained in:
Vasyl Horbachenko
2018-11-06 04:06:59 +02:00
parent 7842c69ebb
commit fbbe56f954
7 changed files with 67 additions and 131 deletions

View File

@@ -73,9 +73,16 @@ def generate_groundobjects(theater: ConflictTheater):
group_id = 0
for cp in theater.controlpoints:
for _ in range(0, random.randrange(2, 4)):
available_categories = list(tpls) + ["aa", "aa"]
tpl_category = random.choice(available_categories)
if cp.is_global:
continue
amount = random.randrange(5, 7)
for i in range(0, amount):
available_categories = list(tpls)
if i >= amount - 2:
tpl_category = "aa"
else:
tpl_category = random.choice(available_categories)
tpl = random.choice(list(tpls[tpl_category].values()))
@@ -85,13 +92,6 @@ def generate_groundobjects(theater: ConflictTheater):
print("Couldn't find point for {}".format(cp))
continue
"""
dist = point.distance_to_point(cp.position) - 15000
for another_cp in theater.enemy_points():
if another_cp.position.distance_to_point(point) < dist:
cp = another_cp
"""
group_id += 1
object_id = 0