mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
FARP spawn for helis on frontline cas; updated ground object placements
This commit is contained in:
24
game/db.py
24
game/db.py
@@ -358,7 +358,8 @@ PLANE_PAYLOAD_OVERRIDES = {
|
||||
},
|
||||
|
||||
Ka_50: {
|
||||
"*": "12x9A4172, 40xS-8",
|
||||
CAS: "12x9A4172, 40xS-8",
|
||||
GroundAttack: "12x9A4172, 40xS-8",
|
||||
},
|
||||
|
||||
M_2000C: {
|
||||
@@ -483,6 +484,27 @@ def assigned_units_from(d: PlaneDict) -> AssignedUnitsDict:
|
||||
return {k: (v, 0) for k, v in d.items()}
|
||||
|
||||
|
||||
def assignedunits_split_to_count(dict: AssignedUnitsDict, count: int):
|
||||
buffer_dict = {}
|
||||
for unit_type, (unit_count, client_count) in dict.items():
|
||||
for _ in range(unit_count):
|
||||
new_count, new_client_count = buffer_dict.get(unit_type, (0, 0))
|
||||
|
||||
new_count += 1
|
||||
|
||||
if client_count > 0:
|
||||
new_client_count += 1
|
||||
client_count -= 1
|
||||
|
||||
buffer_dict[unit_type] = new_count, new_client_count
|
||||
if new_count >= count:
|
||||
yield buffer_dict
|
||||
buffer_dict = {}
|
||||
|
||||
if len(buffer_dict):
|
||||
yield buffer_dict
|
||||
|
||||
|
||||
def unitdict_from(fd: AssignedUnitsDict) -> Dict:
|
||||
return {k: v1 for k, (v1, v2) in fd.items()}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user