Commiting uncommited files

This commit is contained in:
WoodyXP 2024-01-11 09:28:39 +01:00
parent 89fb0a9da1
commit 4f72f10642
3 changed files with 6 additions and 3 deletions

View File

@ -95,6 +95,7 @@ string SpawnAircrafts::getString()
<< "lng = " << spawnOptions[i].location.lng << ", "
<< "alt = " << spawnOptions[i].location.alt << ", "
<< "loadout = \"" << spawnOptions[i].loadout << "\"" << ", "
<< "skill = \"" << spawnOptions[i].skill << "\"" << ", "
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << " }, ";
}
@ -122,6 +123,7 @@ string SpawnHelicopters::getString()
<< "lng = " << spawnOptions[i].location.lng << ", "
<< "alt = " << spawnOptions[i].location.alt << ", "
<< "loadout = \"" << spawnOptions[i].loadout << "\"" << ", "
<< "skill = \"" << spawnOptions[i].skill << "\"" << ", "
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << " }, ";
}

View File

@ -203,9 +203,10 @@ void Scheduler::handleRequest(string key, json::value value, string username, js
double alt = unit[L"altitude"].as_double();
Coords location; location.lat = lat; location.lng = lng; location.alt = alt;
string loadout = to_string(unit[L"loadout"]);
string skill = to_string(unit[L"skill"]);
string liveryID = to_string(unit[L"liveryID"]);
spawnOptions.push_back({unitType, location, loadout, liveryID});
spawnOptions.push_back({unitType, location, loadout, skill, liveryID});
log(username + " spawned a " + coalition + " " + unitType, true);
}

View File

@ -600,7 +600,7 @@ function Olympus.spawnUnits(spawnTable)
end
-- Generates unit table for air units
function Olympus.generateAirUnitsTable(units)
function Olympus.generateAirUnitsTable(units, skill)
local unitsTable = {}
for idx, unit in pairs(units) do
local loadout = unit.loadout -- loadout: a string, one of the names defined in unitPayloads.lua. Must be compatible with the unitType
@ -628,7 +628,7 @@ function Olympus.generateAirUnitsTable(units)
["y"] = spawnLocation.z,
["alt"] = unit.alt,
["alt_type"] = "BARO",
["skill"] = "Excellent",
["skill"] = skill,
["payload"] = payload,
["heading"] = unit.heading,
["callsign"] = { [1] = 1, [2] = 1, [3] = 1, ["name"] = "Olympus" .. Olympus.unitCounter.. "-" .. #unitsTable + 1 },