Added costs to blueprints

This commit is contained in:
Pax1601 2023-08-12 12:31:28 +02:00
parent 46ca6ac327
commit 6c496e428f
12 changed files with 1082 additions and 3 deletions

View File

@ -0,0 +1,767 @@
{
"An-26B": {
"name": "An-26B",
"coalition": "red",
"label": "An-26B Curl",
"era": "Mid Cold War",
"shortLabel": "26",
"loadouts": [
{
"fuel": 1,
"items": [],
"roles": [
"Transport"
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "an-26.png",
"cost": 0
},
"An-30M": {
"name": "An-30M",
"coalition": "red",
"label": "An-30M Clank",
"era": "Mid Cold War",
"shortLabel": "30",
"loadouts": [
{
"fuel": 1,
"items": [],
"roles": [
"Transport"
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "a-50.png",
"cost": 0
},
"C-130": {
"name": "C-130",
"label": "C-130 Hercules",
"era": "Early Cold War",
"shortLabel": "130",
"loadouts": [
{
"fuel": 1,
"items": [],
"roles": [
"Transport"
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "c-130.png",
"cost": 0
},
"F-14A-135-GR": {
"name": "F-14A-135-GR",
"coalition": "blue",
"label": "F-14A-135-GR Tomcat",
"era": "Mid Cold War",
"shortLabel": "14A",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "fuel",
"quantity": 2
},
{
"name": "AIM-54A",
"quantity": 2
},
{
"name": "AIM-7F",
"quantity": 1
},
{
"name": "AIM-9L",
"quantity": 4
}
],
"roles": [
"CAP"
],
"code": "AIM-54A-MK47*2, AIM-7F*1, AIM-9L*4, XT*2",
"name": "Heavy / Fox 3 / Long Range"
},
{
"fuel": 1,
"items": [
{
"name": "fuel",
"quantity": 2
},
{
"name": "AIM-7F",
"quantity": 4
},
{
"name": "AIM-9L",
"quantity": 4
}
],
"roles": [
"CAP"
],
"code": "AIM-7F*4, AIM-9L*4, XT*2",
"name": "Heavy / Fox 1 / Long Range"
},
{
"fuel": 1,
"items": [
{
"name": "fuel",
"quantity": 2
},
{
"name": "AIM-7M",
"quantity": 1
},
{
"name": "AIM-9M",
"quantity": 2
},
{
"name": "GBU-12",
"quantity": 2
},
{
"name": "LANTIRN",
"quantity": 1
}
],
"roles": [
"Strike"
],
"code": "AIM-7M*1, AIM-9M*2, XT*2, GBU-12*2, LANTIRN",
"name": "Heavy / Fox 3, GBU-12 / Long Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "f-14.png",
"cost": 300,
"liveryID": "IRIAF Asia Minor"
},
"F-4E": {
"name": "F-4E",
"coalition": "blue",
"label": "F-4E Phantom II",
"era": "Mid Cold War",
"shortLabel": "4",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "fuel",
"quantity": 2
},
{
"name": "AIM-7M",
"quantity": 4
},
{
"name": "AIM-9M",
"quantity": 4
}
],
"roles": [
"CAP"
],
"code": "AIM-9*4,AIM-7*4,Fuel*2",
"name": "Heavy / Fox 1 / Long Range"
},
{
"fuel": 1,
"items": [
{
"name": "ECM",
"quantity": 1
},
{
"name": "AIM-7M",
"quantity": 2
},
{
"name": "Mk-82",
"quantity": 18
}
],
"roles": [
"Strike"
],
"code": "Mk-82*18,AIM-7*2,ECM",
"name": "Heavy / Fox 1, Mk-82 / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "f-4.png",
"cost": 100,
"liveryID": "IRIAF Asia Minor"
},
"F-5E-3": {
"name": "F-5E-3",
"coalition": "blue",
"label": "F-5E Tiger",
"era": "Mid Cold War",
"shortLabel": "5",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "Fuel 275",
"quantity": 3
},
{
"name": "AIM-9P5",
"quantity": 2
}
],
"roles": [
"CAP"
],
"code": "AIM-9P5*2, Fuel 275*3",
"name": "Heavy / Fox 2 / Long Range"
},
{
"fuel": 1,
"items": [
{
"name": "Mk-82",
"quantity": 4
},
{
"name": "AIM-9P5",
"quantity": 2
},
{
"name": "Fuel 275",
"quantity": 1
}
],
"roles": [
"Strike"
],
"code": "Mk-82LD*4,AIM-9P*2,Fuel 275",
"name": "Heavy / Fox 2 / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"liveryID": "ir iriaf 43rd tfs",
"filename": "f-5.png",
"cost": 80
},
"F-86F Sabre": {
"name": "F-86F Sabre",
"coalition": "blue",
"label": "F-86F Sabre",
"era": "Early Cold War",
"shortLabel": "86",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "120gal Fuel",
"quantity": 2
}
],
"roles": [
"CAP"
],
"code": "120gal Fuel*2",
"name": "Light / Guns / Short Range"
},
{
"fuel": 1,
"items": [
{
"name": "HVAR",
"quantity": 16
}
],
"roles": [
"CAS"
],
"code": "HVAR*16",
"name": "Light / HVAR / Short Range"
},
{
"fuel": 1,
"items": [
{
"name": "AN-M64",
"quantity": 2
}
],
"roles": [
"Strike"
],
"code": "AN-M64*2",
"name": "Light / AN-M64 / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Light / Guns / Short Range"
}
],
"filename": "f-86.png",
"cost": 40,
"liveryID": "iiaf bare metall"
},
"IL-76MD": {
"name": "IL-76MD",
"label": "IL-76MD Candid",
"era": "Mid Cold War",
"shortLabel": "76",
"loadouts": [
{
"fuel": 1,
"items": [],
"roles": [
"Transport"
],
"code": "",
"name": "Default Transport"
}
],
"filename": "il-76.png",
"cost": 0
},
"MiG-15bis": {
"name": "MiG-15bis",
"coalition": "red",
"label": "MiG-15 Fagot",
"era": "Early Cold War",
"shortLabel": "M15",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "300L Fuel Tanks",
"quantity": 2
}
],
"roles": [
"CAP"
],
"code": "2*300L",
"name": "Medium / Guns / Medium Range"
},
{
"fuel": 1,
"items": [
{
"name": "FAB-100M",
"quantity": 2
}
],
"roles": [
"Strike"
],
"code": "2*FAB-100M",
"name": "Medium / FAB-100M / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
"CAP"
],
"code": "",
"name": "Light / Guns / Short Range"
}
],
"filename": "mig-15.png",
"cost": 30,
"liveryID": "Iraqi_Camo"
},
"MiG-21Bis": {
"name": "MiG-21Bis",
"coalition": "red",
"label": "MiG-21 Fishbed",
"era": "Mid Cold War",
"shortLabel": "21",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "R-3 Atoll",
"quantity": 2
},
{
"name": "R-60 Aphid",
"quantity": 2
},
{
"name": "130 gal tanks",
"quantity": 1
},
{
"name": "ASO-2 Countermeasures",
"quantity": 1
}
],
"roles": [
"CAP"
],
"code": "Patrol, short range",
"name": "Light / Fox-2 / Short range"
},
{
"fuel": 1,
"items": [
{
"name": "R-3 Atoll",
"quantity": 2
},
{
"name": "R-60 Aphid",
"quantity": 2
},
{
"name": "210 gal tanks",
"quantity": 1
},
{
"name": "ASO-2 Countermeasures",
"quantity": 1
}
],
"roles": [
"CAP"
],
"code": "Patrol, medium range",
"name": "Medium / Fox-2 / Medium range"
},
{
"fuel": 1,
"items": [
{
"name": "R-3R Atoll",
"quantity": 2
},
{
"name": "R-3S Atoll",
"quantity": 2
},
{
"name": "210 gal tanks",
"quantity": 1
},
{
"name": "ASO-2 Countermeasures",
"quantity": 1
}
],
"roles": [
"CAP"
],
"code": "Patrol, long range",
"name": "Medium / Fox-1, Fox-2 / Medium range"
},
{
"fuel": 1,
"items": [
{
"name": "GROM",
"quantity": 2
},
{
"name": "FAB-250",
"quantity": 2
},
{
"name": "210 gal tanks",
"quantity": 1
},
{
"name": "ASO-2 Countermeasures",
"quantity": 1
}
],
"roles": [
"Strike"
],
"code": "Few big targets, GROM + BOMBS",
"name": "Heavy / GROM, FAB250 / Medium range"
},
{
"fuel": 1,
"items": [],
"roles": [
"CAP"
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "mig-21.png",
"cost": 100,
"liveryID": "iran - standard"
},
"MiG-23MLD": {
"name": "MiG-23MLD",
"coalition": "red",
"label": "MiG-23 Flogger",
"era": "Mid Cold War",
"shortLabel": "23",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "Fuel-800",
"quantity": 1
},
{
"name": "R-60M",
"quantity": 4
},
{
"name": "R-24R",
"quantity": 2
}
],
"roles": [
"CAP"
],
"code": "R-24R*2,R-60M*4,Fuel-800",
"name": "Heavy / Fox 1 / Long Range"
},
{
"fuel": 1,
"items": [
{
"name": "Fuel-800",
"quantity": 1
},
{
"name": "FAB-500",
"quantity": 2
},
{
"name": "R-60M",
"quantity": 2
}
],
"roles": [
"Strike"
],
"code": "FAB-500*2,R-60M*2,Fuel-800",
"name": "Heavy / FAB-500 / Long Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "mig-23.png",
"cost": 200
},
"Mirage-F1EE": {
"name": "Mirage-F1EE",
"coalition": "red",
"label": "Mirage-F1EE",
"era": "Mid Cold War",
"shortLabel": "F1EE",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "AIM-9JULI",
"quantity": 2
},
{
"name": "R530EM",
"quantity": 2
},
{
"name": "1137L Fuel Tank",
"quantity": 1
}
],
"roles": [
"CAP"
],
"code": "2*AIM9-JULI, 2*R530EM, 1*Fuel Tank",
"name": "Medium / Fox 1 / Medium Range"
},
{
"fuel": 1,
"items": [
{
"name": "AIM-9JULI",
"quantity": 2
},
{
"name": "SAMP 400 LD",
"quantity": 8
}
],
"roles": [
"Strike"
],
"code": "2*AIM-9JULI, 8*SAMP 400 LD",
"name": "Heavy / SAMP400 / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "mig-25.png",
"cost": 150,
"liveryID": "iriaf 3-6215 _ 1990-2010s desert (eq variant)"
},
"Mirage-F1CE": {
"name": "Mirage-F1CE",
"coalition": "red",
"label": "Mirage-F1CE",
"era": "Mid Cold War",
"shortLabel": "F1CE",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "AIM-9JULI",
"quantity": 2
},
{
"name": "R530IR",
"quantity": 2
},
{
"name": "1137L Fuel Tank",
"quantity": 1
}
],
"roles": [
"CAP"
],
"code": "2*AIM9-JULI, 2*R530IR, 1*Fuel Tank",
"name": "Medium / Fox 2 / Medium Range"
},
{
"fuel": 1,
"items": [
{
"name": "AIM-9JULI",
"quantity": 2
},
{
"name": "SAMP 400 LD",
"quantity": 8
}
],
"roles": [
"Strike"
],
"code": "2*AIM-9JULI, 8*SAMP 400 LD",
"name": "Heavy / SAMP400 / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "mig-25.png",
"cost": 150,
"liveryID": "iraq air force (fictional eq version)"
},
"Su-24M": {
"name": "Su-24M",
"coalition": "red",
"label": "Su-24M Fencer",
"era": "Mid Cold War",
"shortLabel": "24",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "R-60M",
"quantity": 2
},
{
"name": "FAB-1500",
"quantity": 2
}
],
"roles": [
"Strike"
],
"code": "FAB-1500*2,R-60M*2",
"name": "Heavy / FAB-500 / Short Range"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "su-24.png",
"cost": 250,
"liveryID": "iran air force"
}
}

View File

@ -0,0 +1,153 @@
{
"BMP-1": {
"name": "BMP-1",
"coalition": "red",
"era": "Mid Cold War",
"label": "BMP-1",
"shortLabel": "BMP-1",
"filename": "",
"type": "IFV",
"cost": 10,
"liveryID": "desert"
},
"Hawk SAM Battery": {
"name": "Hawk SAM Battery",
"coalition": "blue",
"era": "Early Cold War",
"label": "Hawk SAM Battery",
"shortLabel": "Hawk SAM Battery",
"range": "Medium",
"filename": "",
"type": "SAM Site",
"cost": 500
},
"Infantry AK": {
"name": "Infantry AK",
"era": "Mid Cold War",
"label": "Infantry AK",
"shortLabel": "Infantry AK",
"filename": "",
"type": "Infantry",
"cost": 1
},
"M-113": {
"name": "M-113",
"coalition": "blue",
"era": "Early Cold War",
"label": "M-113",
"shortLabel": "M-113",
"filename": "",
"type": "APC",
"cost": 5
},
"M-60": {
"name": "M-60",
"coalition": "blue",
"era": "Early Cold War",
"label": "M-60",
"shortLabel": "M-60",
"filename": "",
"type": "Tank",
"cost": 10
},
"SA-2 SAM Battery": {
"name": "SA-2 SAM Battery",
"coalition": "red",
"era": "Early Cold War",
"label": "SA-2 SAM Battery",
"shortLabel": "SA-2 SAM Battery",
"range": "Long",
"filename": "",
"type": "SAM Site",
"cost": 500
},
"T-55": {
"name": "T-55",
"coalition": "red",
"era": "Early Cold War",
"label": "T-55",
"shortLabel": "T-55",
"filename": "",
"type": "Tank",
"cost": 10,
"liveryID": "desert"
},
"T-72B": {
"name": "T-72B",
"coalition": "red",
"era": "Mid Cold War",
"label": "T-72B",
"shortLabel": "T-72B",
"filename": "",
"type": "Tank",
"cost": 20,
"liveryID": "desert"
},
"ZSU-23-4 Shilka": {
"name": "ZSU-23-4 Shilka",
"era": "Late Cold War",
"label": "ZSU-23-4 Shilka",
"shortLabel": "ZSU-23-4 Shilka",
"filename": "",
"type": "AAA",
"cost": 100
},
"Ural-375 ZU-23": {
"name": "Ural-375 ZU-23",
"era": "Early Cold War",
"label": "Ural-375 ZU-23",
"shortLabel": "Ural-375 ZU-23",
"filename": "",
"type": "AAA",
"cost": 50
},
"SAU Gvozdika": {
"name": "SAU Gvozdika",
"coalition": "red",
"era": "Early Cold War",
"label": "SAU Gvozdika",
"shortLabel": "SAU Gvozdika",
"filename": "",
"type": "Gun Artillery",
"cost": 10,
"liveryID": "desert"
},
"Grad-URAL": {
"name": "Grad-URAL",
"coalition": "blue",
"era": "Early Cold War",
"label": "BM-21",
"shortLabel": "BM-21",
"filename": "",
"type": "Rocket Artillery",
"cost": 10
},
"Chieftain_mk3": {
"name": "Chieftain_mk3",
"coalition": "blue",
"era": "Early Cold War",
"label": "Chieftain Mk3",
"shortLabel": "Chieftain Mk3",
"filename": "",
"type": "Tank",
"cost": 20
},
"Scud_B": {
"name": "Scud_B",
"era": "Early Cold War",
"label": "SCUD",
"shortLabel": "SCUD",
"filename": "",
"type": "Rocket Artillery",
"cost": 10
},
"tt_ZU-23": {
"name": "tt_ZU-23",
"era": "Early Cold War",
"label": "Technical ZSU-23",
"shortLabel": "Technical ZSU-23",
"filename": "",
"type": "AAA",
"cost": 25
}
}

View File

@ -0,0 +1,141 @@
{
"Mi-24P": {
"name": "Mi-24P",
"coalition": "red",
"era": "Mid Cold War",
"label": "Mi-24P Hind",
"shortLabel": "Mi24",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "S-8KOM",
"quantity": 40
},
{
"name": "9M114 ATGM",
"quantity": 8
}
],
"roles": [
"CAS"
],
"code": "2xB8V20 (S-8KOM)+8xATGM 9M114",
"name": "Gun / ATGM / Rockets"
},
{
"fuel": 1,
"items": [
{
"name": "S-24B",
"quantity": 4
},
{
"name": "9M114 ATGM",
"quantity": 4
}
],
"roles": [
"Strike"
],
"code": "4xS-24B+4xATGM 9M114",
"name": "Gun / ATGM / Rockets"
},
{
"fuel": 1,
"items": [
{
"name": "GUV-1 Grenade Launcher",
"quantity": 4
},
{
"name": "9M114 ATGM",
"quantity": 4
}
],
"roles": [
"CAS"
],
"code": "4xGUV-1 AP30+4xATGM 9M114",
"name": "Gun / ATGM / Grenade Launcher"
},
{
"fuel": 1,
"items": [],
"roles": [
""
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "mi-24.png",
"cost": 150,
"liveryID": "IQAF"
},
"Mi-8MT": {
"name": "Mi-8MT",
"coalition": "blue",
"era": "Mid Cold War",
"label": "Mi-8MT Hip",
"shortLabel": "Mi8",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "UPK",
"quantity": 2
},
{
"name": "B8",
"quantity": 2
}
],
"roles": [
"CAS"
],
"code": "2 x UPK +2 x B8",
"name": "Rockets / Gunpods"
},
{
"fuel": 1,
"items": [],
"roles": [
"Transport"
],
"code": "",
"name": "Empty Loadout"
}
],
"filename": "mi-8.png",
"cost": 100,
"liveryID": "IR Iranian Special Police Forces"
},
"SA342M": {
"name": "SA342M",
"coalition": "blue",
"era": "Mid Cold War",
"label": "SA342M Gazelle",
"shortLabel": "342",
"loadouts": [
{
"fuel": 1,
"items": [
{
"name": "HOT3",
"quantity": 4
}
],
"roles": [
"CAS"
],
"code": "4x HOT3, IR Deflector, Sand Filter",
"name": "ATGM"
}
],
"filename": "sa-342.png",
"cost": 80
}
}

View File

@ -0,0 +1,3 @@
{
}

View File

@ -23,4 +23,5 @@ interface UnitBlueprint {
loadouts?: LoadoutBlueprint[];
filename?: string;
liveryID?: string;
cost?: number;
}

View File

@ -16,6 +16,9 @@ export class AircraftDatabase extends UnitDatabase {
return 0;
const blueprint = this.getByName(name);
if (blueprint?.cost != undefined)
return blueprint?.cost;
if (blueprint?.era == "WW2")
return 20;
else if (blueprint?.era == "Early Cold War")

View File

@ -12,6 +12,9 @@ export class GroundUnitDatabase extends UnitDatabase {
return 0;
const blueprint = this.getByName(name);
if (blueprint?.cost != undefined)
return blueprint?.cost;
if (blueprint?.era == "WW2")
return 20;
else if (blueprint?.era == "Early Cold War")

View File

@ -12,6 +12,9 @@ export class HelicopterDatabase extends UnitDatabase {
return 0;
const blueprint = this.getByName(name);
if (blueprint?.cost != undefined)
return blueprint?.cost;
if (blueprint?.era == "WW2")
return 20;
else if (blueprint?.era == "Early Cold War")

View File

@ -12,6 +12,9 @@ export class NavyUnitDatabase extends UnitDatabase {
return 0;
const blueprint = this.getByName(name);
if (blueprint?.cost != undefined)
return blueprint?.cost;
if (blueprint?.era == "WW2")
return 20;
else if (blueprint?.era == "Early Cold War")

View File

@ -51,7 +51,7 @@ export class UnitDatabase {
const blueprint = this.blueprints[unit];
if (this.getSpawnPointsByName(blueprint.name) <= getMissionHandler().getAvailableSpawnPoints() &&
getMissionHandler().getCommandModeOptions().eras.includes(blueprint.era) &&
(!getMissionHandler().getCommandModeOptions().restrictToCoalition || blueprint.coalition === getMissionHandler().getCommandedCoalition())) {
(!getMissionHandler().getCommandModeOptions().restrictToCoalition || blueprint.coalition === getMissionHandler().getCommandedCoalition() || blueprint.coalition === undefined)) {
filteredBlueprints[unit] = blueprint;
}
}

View File

@ -1,6 +1,6 @@
local version = "v0.4.2-alpha"
local debug = false
local debug = true
Olympus.OlympusDLL = nil
Olympus.DLLsloaded = false
@ -455,6 +455,8 @@ function Olympus.generateAirUnitsTable(units)
["livery_id"] = unit.liveryID
}
Olympus.debug(unit.liveryID, 5)
-- Add the payload to the registry, used for unit cloning
Olympus.payloadRegistry[unitTable[#unitTable].name] = payload
end

View File

@ -203,7 +203,7 @@ void Scheduler::handleRequest(string key, json::value value, string username)
log(username + " spawned a " + coalition + " " + unitType, true);
}
command = dynamic_cast<Command*>(new SpawnAircrafts(coalition, unitTypes, locations, liveryIDs, loadouts, airbaseName, immediate));
command = dynamic_cast<Command*>(new SpawnAircrafts(coalition, unitTypes, locations, loadouts, liveryIDs, airbaseName, immediate));
}
else if (key.compare("spawnHelicopters") == 0)
{