Fix after merge

This commit is contained in:
Królik Uszasty
2022-04-10 00:53:52 +02:00
parent cdca4f108d
commit a1a5d1d9e1
4 changed files with 165 additions and 7 deletions

View File

@@ -6008,12 +6008,12 @@ TController::determine_consist_state() {
if (mvOccupied->CabActive == 0 && mvOccupied->Power24vIsAvailable)
{
cue_action( locale::string::driver_hint_cabactivation );
cue_action( driver_hint::cabactivation );
}
else if (!mvOccupied->AutomaticCabActivation
&& ( (mvOccupied->CabActive == -mvOccupied->CabOccupied) || (!mvOccupied->CabMaster) || (!mvOccupied->Power24vIsAvailable) ) )
{
cue_action( locale::string::driver_hint_cabdeactivation );
cue_action( driver_hint::cabdeactivation );
}
int index = double(BrakeAccTableSize) * (mvOccupied->Vel / mvOccupied->Vmax);

View File

@@ -22,7 +22,163 @@ namespace simulation {
command_queue Commands;
commanddescription_sequence Commands_descriptions = {
aphcompressorvalveenable", command_target::vehicle, command_mode::oneoff },
{ "aidriverenable", command_target::vehicle, command_mode::oneoff },
{ "aidriverdisable", command_target::vehicle, command_mode::oneoff },
{ "jointcontrollerset", command_target::vehicle, command_mode::oneoff },
{ "mastercontrollerincrease", command_target::vehicle, command_mode::oneoff },
{ "mastercontrollerincreasefast", command_target::vehicle, command_mode::oneoff },
{ "mastercontrollerdecrease", command_target::vehicle, command_mode::oneoff },
{ "mastercontrollerdecreasefast", command_target::vehicle, command_mode::oneoff },
{ "mastercontrollerset", command_target::vehicle, command_mode::oneoff },
{ "secondcontrollerincrease", command_target::vehicle, command_mode::oneoff },
{ "secondcontrollerincreasefast", command_target::vehicle, command_mode::oneoff },
{ "secondcontrollerdecrease", command_target::vehicle, command_mode::oneoff },
{ "secondcontrollerdecreasefast", command_target::vehicle, command_mode::oneoff },
{ "secondcontrollerset", command_target::vehicle, command_mode::oneoff },
{ "mucurrentindicatorothersourceactivate", command_target::vehicle, command_mode::oneoff },
{ "independentbrakeincrease", command_target::vehicle, command_mode::continuous },
{ "independentbrakeincreasefast", command_target::vehicle, command_mode::oneoff },
{ "independentbrakedecrease", command_target::vehicle, command_mode::continuous },
{ "independentbrakedecreasefast", command_target::vehicle, command_mode::oneoff },
{ "independentbrakeset", command_target::vehicle, command_mode::oneoff },
{ "independentbrakebailoff", command_target::vehicle, command_mode::oneoff },
{ "universalbrakebutton1", command_target::vehicle, command_mode::oneoff },
{ "universalbrakebutton2", command_target::vehicle, command_mode::oneoff },
{ "universalbrakebutton3", command_target::vehicle, command_mode::oneoff },
{ "trainbrakeincrease", command_target::vehicle, command_mode::continuous },
{ "trainbrakedecrease", command_target::vehicle, command_mode::continuous },
{ "trainbrakeset", command_target::vehicle, command_mode::oneoff },
{ "trainbrakecharging", command_target::vehicle, command_mode::oneoff },
{ "trainbrakerelease", command_target::vehicle, command_mode::oneoff },
{ "trainbrakefirstservice", command_target::vehicle, command_mode::oneoff },
{ "trainbrakeservice", command_target::vehicle, command_mode::oneoff },
{ "trainbrakefullservice", command_target::vehicle, command_mode::oneoff },
{ "trainbrakehandleoff", command_target::vehicle, command_mode::oneoff },
{ "trainbrakeemergency", command_target::vehicle, command_mode::oneoff },
{ "trainbrakebasepressureincrease", command_target::vehicle, command_mode::oneoff },
{ "trainbrakebasepressuredecrease", command_target::vehicle, command_mode::oneoff },
{ "trainbrakebasepressurereset", command_target::vehicle, command_mode::oneoff },
{ "trainbrakeoperationtoggle", command_target::vehicle, command_mode::oneoff },
{ "manualbrakeincrease", command_target::vehicle, command_mode::oneoff },
{ "manualbrakedecrease", command_target::vehicle, command_mode::oneoff },
{ "alarmchaintoggle", command_target::vehicle, command_mode::oneoff },
{ "wheelspinbrakeactivate", command_target::vehicle, command_mode::oneoff },
{ "sandboxactivate", command_target::vehicle, command_mode::oneoff },
{ "autosandboxtoggle", command_target::vehicle, command_mode::oneoff },
{ "autosandboxactivate", command_target::vehicle, command_mode::oneoff },
{ "autosandboxdeactivate", command_target::vehicle, command_mode::oneoff },
{ "reverserincrease", command_target::vehicle, command_mode::oneoff },
{ "reverserdecrease", command_target::vehicle, command_mode::oneoff },
{ "reverserforwardhigh", command_target::vehicle, command_mode::oneoff },
{ "reverserforward", command_target::vehicle, command_mode::oneoff },
{ "reverserneutral", command_target::vehicle, command_mode::oneoff },
{ "reverserbackward", command_target::vehicle, command_mode::oneoff },
{ "waterpumpbreakertoggle", command_target::vehicle, command_mode::oneoff },
{ "waterpumpbreakerclose", command_target::vehicle, command_mode::oneoff },
{ "waterpumpbreakeropen", command_target::vehicle, command_mode::oneoff },
{ "waterpumptoggle", command_target::vehicle, command_mode::oneoff },
{ "waterpumpenable", command_target::vehicle, command_mode::oneoff },
{ "waterpumpdisable", command_target::vehicle, command_mode::oneoff },
{ "waterheaterbreakertoggle", command_target::vehicle, command_mode::oneoff },
{ "waterheaterbreakerclose", command_target::vehicle, command_mode::oneoff },
{ "waterheaterbreakeropen", command_target::vehicle, command_mode::oneoff },
{ "waterheatertoggle", command_target::vehicle, command_mode::oneoff },
{ "waterheaterenable", command_target::vehicle, command_mode::oneoff },
{ "waterheaterdisable", command_target::vehicle, command_mode::oneoff },
{ "watercircuitslinktoggle", command_target::vehicle, command_mode::oneoff },
{ "watercircuitslinkenable", command_target::vehicle, command_mode::oneoff },
{ "watercircuitslinkdisable", command_target::vehicle, command_mode::oneoff },
{ "fuelpumptoggle", command_target::vehicle, command_mode::oneoff },
{ "fuelpumpenable", command_target::vehicle, command_mode::oneoff },
{ "fuelpumpdisable", command_target::vehicle, command_mode::oneoff },
{ "oilpumptoggle", command_target::vehicle, command_mode::oneoff },
{ "oilpumpenable", command_target::vehicle, command_mode::oneoff },
{ "oilpumpdisable", command_target::vehicle, command_mode::oneoff },
{ "linebreakertoggle", command_target::vehicle, command_mode::oneoff },
{ "linebreakeropen", command_target::vehicle, command_mode::oneoff },
{ "linebreakerclose", command_target::vehicle, command_mode::oneoff },
{ "convertertoggle", command_target::vehicle, command_mode::oneoff },
{ "converterenable", command_target::vehicle, command_mode::oneoff },
{ "converterdisable", command_target::vehicle, command_mode::oneoff },
{ "convertertogglelocal", command_target::vehicle, command_mode::oneoff },
{ "converteroverloadrelayreset", command_target::vehicle, command_mode::oneoff },
{ "compressortoggle", command_target::vehicle, command_mode::oneoff },
{ "compressorenable", command_target::vehicle, command_mode::oneoff },
{ "compressordisable", command_target::vehicle, command_mode::oneoff },
{ "compressortogglelocal", command_target::vehicle, command_mode::oneoff },
{ "compressorpresetactivatenext", command_target::vehicle, command_mode::oneoff },
{ "compressorpresetactivateprevious", command_target::vehicle, command_mode::oneoff },
{ "compressorpresetactivatedefault", command_target::vehicle, command_mode::oneoff },
{ "motoroverloadrelaythresholdtoggle", command_target::vehicle, command_mode::oneoff },
{ "motoroverloadrelaythresholdsetlow", command_target::vehicle, command_mode::oneoff },
{ "motoroverloadrelaythresholdsethigh", command_target::vehicle, command_mode::oneoff },
{ "motoroverloadrelayreset", command_target::vehicle, command_mode::oneoff },
{ "universalrelayreset1", command_target::vehicle, command_mode::oneoff },
{ "universalrelayreset2", command_target::vehicle, command_mode::oneoff },
{ "universalrelayreset3", command_target::vehicle, command_mode::oneoff },
{ "notchingrelaytoggle", command_target::vehicle, command_mode::oneoff },
{ "epbrakecontroltoggle", command_target::vehicle, command_mode::oneoff },
{ "trainbrakeoperationmodeincrease", command_target::vehicle, command_mode::oneoff },
{ "trainbrakeoperationmodedecrease", command_target::vehicle, command_mode::oneoff },
{ "brakeactingspeedincrease", command_target::vehicle, command_mode::oneoff },
{ "brakeactingspeeddecrease", command_target::vehicle, command_mode::oneoff },
{ "brakeactingspeedsetcargo", command_target::vehicle, command_mode::oneoff },
{ "brakeactingspeedsetpassenger", command_target::vehicle, command_mode::oneoff },
{ "brakeactingspeedsetrapid", command_target::vehicle, command_mode::oneoff },
{ "brakeloadcompensationincrease", command_target::vehicle, command_mode::oneoff },
{ "brakeloadcompensationdecrease", command_target::vehicle, command_mode::oneoff },
{ "mubrakingindicatortoggle", command_target::vehicle, command_mode::oneoff },
{ "alerteracknowledge", command_target::vehicle, command_mode::oneoff },
{ "cabsignalacknowledge", command_target::vehicle, command_mode::oneoff },
{ "hornlowactivate", command_target::vehicle, command_mode::oneoff },
{ "hornhighactivate", command_target::vehicle, command_mode::oneoff },
{ "whistleactivate", command_target::vehicle, command_mode::oneoff },
{ "radiotoggle", command_target::vehicle, command_mode::oneoff },
{ "radiochannelincrease", command_target::vehicle, command_mode::oneoff },
{ "radiochanneldecrease", command_target::vehicle, command_mode::oneoff },
{ "radiostopsend", command_target::vehicle, command_mode::oneoff },
{ "radiostoptest", command_target::vehicle, command_mode::oneoff },
{ "radiocall3send", command_target::vehicle, command_mode::oneoff },
{ "radiovolumeincrease", command_target::vehicle, command_mode::oneoff },
{ "radiovolumedecrease", command_target::vehicle, command_mode::oneoff },
{ "cabchangeforward", command_target::vehicle, command_mode::oneoff },
{ "cabchangebackward", command_target::vehicle, command_mode::oneoff },
{ "viewturn", command_target::entity, command_mode::oneoff },
{ "movehorizontal", command_target::entity, command_mode::oneoff },
{ "movehorizontalfast", command_target::entity, command_mode::oneoff },
{ "movevertical", command_target::entity, command_mode::oneoff },
{ "moveverticalfast", command_target::entity, command_mode::oneoff },
{ "moveleft", command_target::entity, command_mode::oneoff },
{ "moveright", command_target::entity, command_mode::oneoff },
{ "moveforward", command_target::entity, command_mode::oneoff },
{ "moveback", command_target::entity, command_mode::oneoff },
{ "moveup", command_target::entity, command_mode::oneoff },
{ "movedown", command_target::entity, command_mode::oneoff },
{ "nearestcarcouplingincrease", command_target::vehicle, command_mode::oneoff },
{ "nearestcarcouplingdisconnect", command_target::vehicle, command_mode::oneoff },
{ "nearestcarcoupleradapterattach", command_target::vehicle, command_mode::oneoff },
{ "nearestcarcoupleradapterremove", command_target::vehicle, command_mode::oneoff },
{ "occupiedcarcouplingdisconnect", command_target::vehicle, command_mode::oneoff },
{ "occupiedcarcouplingdisconnectback", command_target::vehicle, command_mode::oneoff },
{ "doortoggleleft", command_target::vehicle, command_mode::oneoff },
{ "doortoggleright", command_target::vehicle, command_mode::oneoff },
{ "doorpermitleft", command_target::vehicle, command_mode::oneoff },
{ "doorpermitright", command_target::vehicle, command_mode::oneoff },
{ "doorpermitpresetactivatenext", command_target::vehicle, command_mode::oneoff },
{ "doorpermitpresetactivateprevious", command_target::vehicle, command_mode::oneoff },
{ "dooropenleft", command_target::vehicle, command_mode::oneoff },
{ "dooropenright", command_target::vehicle, command_mode::oneoff },
{ "dooropenall", command_target::vehicle, command_mode::oneoff },
{ "doorcloseleft", command_target::vehicle, command_mode::oneoff },
{ "doorcloseright", command_target::vehicle, command_mode::oneoff },
{ "doorcloseall", command_target::vehicle, command_mode::oneoff },
{ "doorsteptoggle", command_target::vehicle, command_mode::oneoff },
{ "doormodetoggle", command_target::vehicle, command_mode::oneoff },
{ "mirrorstoggle", command_target::vehicle, command_mode::oneoff },
{ "departureannounce", command_target::vehicle, command_mode::oneoff },
{ "doorlocktoggle", command_target::vehicle, command_mode::oneoff },
{ "pantographcompressorvalvetoggle", command_target::vehicle, command_mode::oneoff },
{ "pantographcompressorvalveenable", command_target::vehicle, command_mode::oneoff },
{ "pantographcompressorvalvedisable", command_target::vehicle, command_mode::oneoff },
{ "pantographcompressoractivate", command_target::vehicle, command_mode::oneoff },
{ "pantographtogglefront", command_target::vehicle, command_mode::oneoff },

View File

@@ -102,23 +102,23 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
break;
}
// battery
case locale::string::driver_hint_cabactivation: {
case driver_hint::cabactivation: {
if (AIControllFlag && mvOccupied->Power24vIsAvailable) {
mvOccupied->CabActivisation();
CheckVehicles();
}
remove_hint( locale::string::driver_hint_cabdeactivation );
remove_hint( driver_hint::cabdeactivation );
hint(
Action,
[this](float const Parameter) -> bool {
return ( ( mvOccupied->AutomaticCabActivation ) || ( mvOccupied->IsCabMaster() ) ); } );
break;
}
case locale::string::driver_hint_cabdeactivation: {
case driver_hint::cabdeactivation: {
if (AIControllFlag) {
mvOccupied->CabDeactivisation();
}
remove_hint( locale::string::driver_hint_cabactivation );
remove_hint( driver_hint::cabactivation );
hint(
Action,
[this](float const Parameter) -> bool {

View File

@@ -100,3 +100,5 @@ DRIVER_HINT_DEF(lightsoff, STRN("Switch off lights"))
DRIVER_HINT_DEF(releaseron, STRN("Actuate"))
DRIVER_HINT_DEF(releaseroff, STRN("Stop actuating"))
DRIVER_HINT_DEF(bufferscompress, STRN("Apply tractive force to compress buffers"))
DRIVER_HINT_DEF(cabactivation, STRN("Activate cabin"))
DRIVER_HINT_DEF(cabdeactivation, STRN("Deactivate cabin"))