mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Merge remote-tracking branch 'upstream/develop'
into skynet-iads-plugin
This commit is contained in:
@@ -8,21 +8,18 @@ from dcs.unit import Vehicle
|
||||
|
||||
class GroupGenerator():
|
||||
|
||||
def __init__(self, game, ground_object, faction = None):
|
||||
def __init__(self, game, ground_object, faction = None): # faction is not mandatory because some subclasses do not use it
|
||||
self.game = game
|
||||
self.go = ground_object
|
||||
self.position = ground_object.position
|
||||
self.heading = random.randint(0, 359)
|
||||
groupNamePrefix = self.getGroupNamePrefix(faction)
|
||||
self.vg = unitgroup.VehicleGroup(self.game.next_group_id(), groupNamePrefix + self.go.group_identifier)
|
||||
|
||||
self.faction = faction
|
||||
self.vg = unitgroup.VehicleGroup(self.game.next_group_id(), self.groupNamePrefix + self.go.group_identifier)
|
||||
wp = self.vg.add_waypoint(self.position, PointAction.OffRoad, 0)
|
||||
wp.ETA_locked = True
|
||||
|
||||
def getGroupNamePrefix(self, faction):
|
||||
if not faction:
|
||||
return ""
|
||||
|
||||
@property
|
||||
def groupNamePrefix(self):
|
||||
return ""
|
||||
|
||||
def generate(self):
|
||||
|
||||
Reference in New Issue
Block a user