Compare commits

...

5 Commits

Author SHA1 Message Date
David Pierron
45c67534e6 added whatever was necessary to generate
the new IADS CPs on the map
2020-10-28 12:05:05 +01:00
David Pierron
bcc3333d1b typing corrections 2020-10-28 12:04:40 +01:00
David Pierron
f9ee36db83 Merge remote-tracking branch 'origin/develop' into plugin-skynet-iads 2020-10-28 08:10:04 +01:00
David Pierron
ca5204634a added ground object templates :
- iads-power
- iads-controlcenter
- iads-ewr
- iads-commnode
2020-10-28 08:09:51 +01:00
David Pierron
14a3279b2c cleaner way of adding a faction parameter
to the groupgenerator constructor
2020-10-27 10:06:22 +01:00
27 changed files with 24 additions and 4 deletions

12
.vscode/launch.json vendored
View File

@@ -4,6 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Main",
"type": "python",
@@ -15,6 +16,17 @@
},
"preLaunchTask": "Prepare Environment"
},
{
"name": "Python: build ground objects templates",
"type": "python",
"request": "launch",
"program": "resources\\tools\\generate_groundobject_templates.py",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": ".;./pydcs"
},
"preLaunchTask": "Prepare Environment"
},
{
"name": "Python: Make Release",
"type": "python",

View File

@@ -1,7 +1,7 @@
import inspect
import dcs
DEFAULT_AVAILABLE_BUILDINGS = ['fuel', 'ammo', 'comms', 'oil', 'ware', 'farp', 'fob', 'power', 'factory', 'derrick', 'aa']
DEFAULT_AVAILABLE_BUILDINGS = ['fuel', 'ammo', 'comms', 'oil', 'ware', 'farp', 'fob', 'power', 'factory', 'derrick', 'aa', 'iads-controlcenter', 'iads-ewr', 'iads-commnode', 'iads-power']
WW2_GERMANY_BUILDINGS = ['fuel', 'factory', 'ww2bunker', 'ww2bunker', 'ww2bunker', 'allycamp', 'allycamp', 'aa']
WW2_ALLIES_BUILDINGS = ['fuel', 'factory', 'allycamp', 'allycamp', 'allycamp', 'allycamp', 'allycamp', 'aa']

View File

@@ -9,6 +9,10 @@ class GenericSamGroupGenerator(GroupGenerator):
"""
This is the base for all SAM group generators
"""
def __init__(self, game, ground_object, faction):
self.faction = faction
super(GenericSamGroupGenerator, self).__init__(game, ground_object)
@property
def groupNamePrefix(self) -> str:

View File

@@ -8,12 +8,11 @@ from dcs.unit import Vehicle
class GroupGenerator():
def __init__(self, game, ground_object, faction = None): # faction is not mandatory because some subclasses do not use it
def __init__(self, game, ground_object):
self.game = game
self.go = ground_object
self.position = ground_object.position
self.heading = random.randint(0, 359)
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

View File

@@ -9,6 +9,7 @@ from gen.sam.aaa_bofors import BoforsGenerator
from gen.sam.aaa_flak import FlakGenerator
from gen.sam.aaa_zu23_insurgent import ZU23InsurgentGenerator
from gen.sam.group_generator import GroupGenerator
from gen.sam.genericsam_group_generator import GenericSamGroupGenerator
from gen.sam.sam_avenger import AvengerGenerator
from gen.sam.sam_chaparral import ChaparralGenerator
from gen.sam.sam_gepard import GepardGenerator
@@ -99,7 +100,7 @@ SAM_PRICES = {
}
def get_faction_possible_sams_generator(faction: str) -> List[Type[GroupGenerator]]:
def get_faction_possible_sams_generator(faction: str) -> List[Type[GenericSamGroupGenerator]]:
"""
Return the list of possible SAM generator for the given faction
:param faction: Faction name to search units for

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -64,6 +64,10 @@ CATEGORY_MAP = {
"ww2bunker": ["Siegfried Line", "Fire Control Bunker", "SK_C_28_naval_gun", "Concertina Wire", "Czech hedgehogs 1"],
"village": ["Small house 1B", "Small House 1A", "Small warehouse 1"],
"allycamp": [],
"iads-commnode": [], # I don't think the list of objects (value of the key in this dict) is ever used...
"iads-controlcenter": [], # I don't think the list of objects (value of the key in this dict) is ever used...
"iads-ewr": [], # I don't think the list of objects (value of the key in this dict) is ever used...
"iads-power": [], # I don't think the list of objects (value of the key in this dict) is ever used...
}