mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
chore: removed useless code
This commit is contained in:
parent
a733c98259
commit
b7bf89ce2f
@ -413,7 +413,6 @@ void Scheduler::handleRequest(string key, json::value value, string username, js
|
||||
Unit* unit = unitsManager->getGroupLeader(ID);
|
||||
if (unit != nullptr) {
|
||||
unsigned char alarmState = value[L"alarmState"].as_integer();
|
||||
log(username + " is trying to set unit " + unit->getUnitName() + "(" + unit->getName() + ") alarm state to " + to_string(alarmState), true);
|
||||
unit->commandAlarmState(alarmState);
|
||||
log(username + " set unit " + unit->getUnitName() + "(" + unit->getName() + ") alarm state to " + to_string(alarmState), true);
|
||||
} else {
|
||||
|
||||
@ -84,7 +84,6 @@ void Unit::update(json::value json, double dt)
|
||||
setAlive(json[L"isAlive"].as_bool());
|
||||
|
||||
if (json.has_string_field(L"alarmState")) {
|
||||
// log("Unit " + to_string(json[L"unitName"]) + " has alarmState: " + to_string(json[L"alarmState"]));
|
||||
setAlarmState(to_string(json[L"alarmState"]));
|
||||
}
|
||||
|
||||
|
||||
@ -626,8 +626,6 @@ export class ServerManager {
|
||||
loadEnvResources() {
|
||||
/* Load the drawings */
|
||||
this.getDrawings((drawingsData: { drawings: Record<string, Record<string, any>> }) => {
|
||||
console.log('---- drawings: ', drawingsData);
|
||||
|
||||
if (drawingsData) {
|
||||
getApp().getDrawingsManager()?.initDrawings(drawingsData);
|
||||
}
|
||||
|
||||
@ -1077,27 +1077,6 @@ function Olympus.setOnOff(groupName, onOff)
|
||||
end
|
||||
end
|
||||
|
||||
-- Disable the AI of a group on or off entirely
|
||||
function Olympus.setRedGreenAuto(groupName, redGreenAuto)
|
||||
Olympus.debug("Olympus.setRedGreenAuto " .. groupName .. " " .. tostring(redGreenAuto), 2)
|
||||
local group = Group.getByName(groupName)
|
||||
if group ~= nil then
|
||||
|
||||
if redGreenAuto == 'RED' then
|
||||
group:getController():setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.RED)
|
||||
end
|
||||
|
||||
if redGreenAuto == 'GREEN' then
|
||||
group:getController():setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.GREEN)
|
||||
end
|
||||
|
||||
if redGreenAuto == 'AUTO' then
|
||||
group:getController():setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.AUTO)
|
||||
end
|
||||
Olympus.debug("Olympus.setRedGreenAuto completed successfully", 2)
|
||||
end
|
||||
end
|
||||
|
||||
function getUnitDescription(unit)
|
||||
return unit:getDescr()
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user