18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 21:45:16 +01:00
Files
maszyna/application/driverhints_def.h
jerrrrycho aa84e41f09 feat: timetable service flags for the AI driver (eu07/maszyna#95)
A timetable can now tell the AI how the train is served, for trams,
underground trains and the like. The whole train gets them from a new
row of the first box of the header:

  [ Flagi AI | drzwi_centralne=tak,stopien=nie,kierownik=nie,proba_hamulca=nie ]

and a station changes them from there on with entries of its station
ware (the second line of the station, next to R2, ph, @):

  [       |     | po,kierownik=nie                 1  12.54  |        ]

- drzwi_centralne=tak: the driver opens all the doors from the cab,
  those of mixed control too (otherwise left to the passengers)
- stopien=tak/nie: the doorsteps switched on/off before the doors open
  (the AI didn't touch them before; new driver hints for it)
- kierownik=nie: no conductor, so no departure signal (direct or by
  radio) and no first door kept open for him before the departure
- proba_hamulca=nie: no running brake test

A flag left out keeps today's behaviour, so a timetable without flags
drives as before. Old builds skip the header row and keep the station
entries as station ware text (none starts with R or holds @, po, pt).

The reader moves out of TTrainParameters::LoadTTfile into
world/timetablereader.cpp (eu07_core) unchanged, so the tests can run it;
the flags come out of the station ware there. It now ends at the end of
the file with an error where the old one spun forever (a truncated file,
a missing number), and stops at 100 stations instead of writing past
the table.

Every .txt of the game's sceneries and of the SVN data reads the same
as with the old reader (compared field by field against a verbatim copy
of it); EU07_UNIT_TESTS_TIMETABLES=<scenery folder> reads them in the
unit tests and EU07_UNIT_TESTS_TIMETABLES_DUMP writes what was read.
2026-11-17 00:17:22 +01:00

109 lines
7.2 KiB
C

DRIVER_HINT_DEF(batteryon, STRN("Switch on battery"))
DRIVER_HINT_DEF(batteryoff, STRN("Switch off battery"))
DRIVER_HINT_DEF(radioon, STRN("Switch on radio"))
DRIVER_HINT_DEF(radiooff, STRN("Switch off radio"))
DRIVER_HINT_DEF(radiofuseon, STRN("Close radio fuse"))
DRIVER_HINT_DEF(radiochannel, STRN("Tune into channel %.0f"))
DRIVER_HINT_DEF(oilpumpon, STRN("Switch on oil pump"))
DRIVER_HINT_DEF(oilpumpoff, STRN("Switch off oil pump"))
DRIVER_HINT_DEF(fuelpumpon, STRN("Switch on fuel pump"))
DRIVER_HINT_DEF(fuelpumpoff, STRN("Switch off fuel pump"))
DRIVER_HINT_DEF(pantographairsourcesetmain, STRN("Switch pantograph 3-way valve to primary air source"))
DRIVER_HINT_DEF(pantographairsourcesetauxiliary, STRN("Switch pantograph 3-way valve to auxiliary air source"))
DRIVER_HINT_DEF(pantographcompressoron, STRN("Switch on pantograph compressor"))
DRIVER_HINT_DEF(pantographcompressoroff, STRN("Switch off pantograph compressor"))
DRIVER_HINT_DEF(pantographsvalveon, STRN("Enable pantographs valve"))
DRIVER_HINT_DEF(pantographsvalveoff, STRN("Disable pantographcs valve"))
DRIVER_HINT_DEF(frontpantographvalveon, STRN("Raise pantograph A"))
DRIVER_HINT_DEF(frontpantographvalveoff, STRN("Lower pantograph A"))
DRIVER_HINT_DEF(rearpantographvalveon, STRN("Raise pantograph B"))
DRIVER_HINT_DEF(rearpantographvalveoff, STRN("Lower pantograph B"))
DRIVER_HINT_DEF(converteron, STRN("Switch on converter"))
DRIVER_HINT_DEF(converteroff, STRN("Switch off converter"))
DRIVER_HINT_DEF(primaryconverteroverloadreset, STRN("Reset converter overload relay"))
DRIVER_HINT_DEF(maincircuitgroundreset, STRN("Reset main circuit ground relay"))
DRIVER_HINT_DEF(tractionnmotoroverloadreset, STRN("Reset traction motors overload relay"))
DRIVER_HINT_DEF(linebreakerclose, STRN("Close line breaker"))
DRIVER_HINT_DEF(linebreakeropen, STRN("Open line breaker"))
DRIVER_HINT_DEF(compressoron, STRN("Switch on compressor"))
DRIVER_HINT_DEF(compressoroff, STRN("Switch off compressor"))
DRIVER_HINT_DEF(frontmotorblowerson, STRN("Switch on front motor blowers"))
DRIVER_HINT_DEF(frontmotorblowersoff, STRN("Switch off front motor blowers"))
DRIVER_HINT_DEF(rearmotorblowerson, STRN("Switch on rear motor blowers"))
DRIVER_HINT_DEF(rearmotorblowersoff, STRN("Switch off rear motor blowers"))
DRIVER_HINT_DEF(springbrakeon, STRN("Apply spring brake"))
DRIVER_HINT_DEF(springbrakeoff, STRN("Release spring brake"))
DRIVER_HINT_DEF(manualbrakon, STRN("Apply manual brake"))
DRIVER_HINT_DEF(manualbrakoff, STRN("Release manual brake"))
DRIVER_HINT_DEF(mastercontrollersetidle, STRN("Set engine to idle"))
DRIVER_HINT_DEF(mastercontrollersetseriesmode, STRN("Set master controller to series mode"))
DRIVER_HINT_DEF(waterheateron, STRN("Switch on water heater"))
DRIVER_HINT_DEF(waterheateroff, STRN("Switch off water heater"))
DRIVER_HINT_DEF(waterheaterbreakeron, STRN("Switch on water heater breaker"))
DRIVER_HINT_DEF(waterheaterbreakeroff, STRN("Switch off water heater breaker"))
DRIVER_HINT_DEF(waterpumpon, STRN("Switch on water pump"))
DRIVER_HINT_DEF(waterpumpoff, STRN("Switch off water pump"))
DRIVER_HINT_DEF(waterpumpbreakeron, STRN("Switch on water pump breaker"))
DRIVER_HINT_DEF(waterpumpbreakeroff, STRN("Switch off water pump breaker"))
DRIVER_HINT_DEF(watercircuitslinkon, STRN("Link water circuits"))
DRIVER_HINT_DEF(watercircuitslinkoff, STRN("Unlink water circuits"))
DRIVER_HINT_DEF(waittemperaturetoolow, STRN("Wait for warm up to complete"))
DRIVER_HINT_DEF(mastercontrollersetzerospeed, STRN("Set master controller to neutral"))
DRIVER_HINT_DEF(mastercontrollersetreverserunlock, STRN("Set master controller to position %.0f"))
DRIVER_HINT_DEF(trainbrakesetpipeunlock, STRN("Set brake controller to pipe filling mode"))
DRIVER_HINT_DEF(trainbrakerelease, STRN("Release train brake"))
DRIVER_HINT_DEF(trainbrakeapply, STRN("Apply train brake"))
DRIVER_HINT_DEF(directionforward, STRN("Set reverser to forward"))
DRIVER_HINT_DEF(directionbackward, STRN("Set reverser to reverse"))
DRIVER_HINT_DEF(directionother, STRN("Switch reverser to opposite direction"))
DRIVER_HINT_DEF(directionnone, STRN("Set reverser to neutral"))
DRIVER_HINT_DEF(waitpressuretoolow, STRN("Wait for main reservoir to fill"))
DRIVER_HINT_DEF(waitpantographpressuretoolow, STRN("Wait for sufficient air pressure in pantograph subsystem"))
DRIVER_HINT_DEF(sandingon, STRN("Switch on sanding"))
DRIVER_HINT_DEF(sandingoff, STRN("Switch off sanding"))
DRIVER_HINT_DEF(consistdoorlockson, STRN("Switch on door locks"))
DRIVER_HINT_DEF(departuresignalon, STRN("Switch on departure signal"))
DRIVER_HINT_DEF(departuresignaloff, STRN("Switch off departure signal"))
DRIVER_HINT_DEF(doorrightopen, STRN("Open doors"))
DRIVER_HINT_DEF(doorrightclose, STRN("Close doors"))
DRIVER_HINT_DEF(doorleftopen, STRN("Open doors"))
DRIVER_HINT_DEF(doorleftclose, STRN("Close doors"))
DRIVER_HINT_DEF(doorrightpermiton, STRN("Grant permit to open doors"))
DRIVER_HINT_DEF(doorrightpermitoff, STRN("Revoke permit to open doors"))
DRIVER_HINT_DEF(doorleftpermiton, STRN("Grant permit to open doors"))
DRIVER_HINT_DEF(doorleftpermitoff, STRN("Revoke permit to open doors"))
DRIVER_HINT_DEF(doorstepon, STRN("Switch on doorsteps"))
DRIVER_HINT_DEF(doorstepoff, STRN("Switch off doorsteps"))
DRIVER_HINT_DEF(hornon, STRN("Sound the horn"))
DRIVER_HINT_DEF(hornoff, STRN("Switch off horn"))
DRIVER_HINT_DEF(consistlightson, STRN("Switch on consist lights"))
DRIVER_HINT_DEF(consistlightsoff, STRN("Switch off consist lights"))
DRIVER_HINT_DEF(consistheatingon, STRN("Switch on consist heating"))
DRIVER_HINT_DEF(consistheatingoff, STRN("Switch off consist heating"))
DRIVER_HINT_DEF(securitysystemreset, STRN("Acknowledge alerter"))
DRIVER_HINT_DEF(shpsystemreset, STRN("Acknowledge SHP"))
DRIVER_HINT_DEF(couplingadapterattach, STRN("Attach coupling adapter"))
DRIVER_HINT_DEF(couplingadapterremove, STRN("Remove coupling adapter"))
DRIVER_HINT_DEF(secondcontrollersetzero, STRN("Switch off field shunting"))
DRIVER_HINT_DEF(tractiveforcedecrease, STRN("Reduce tractive force"))
DRIVER_HINT_DEF(tractiveforceincrease, STRN("Increase tractive force"))
DRIVER_HINT_DEF(brakingforcedecrease, STRN("Reduce braking force"))
DRIVER_HINT_DEF(brakingforceincrease, STRN("Increase braking force"))
DRIVER_HINT_DEF(brakingforcesetzero, STRN("Release train brakes"))
DRIVER_HINT_DEF(brakingforcelap, STRN("Lap train brake"))
DRIVER_HINT_DEF(independentbrakeapply, STRN("Apply independent brake"))
DRIVER_HINT_DEF(independentbrakerelease, STRN("Release independent brake"))
DRIVER_HINT_DEF(antislip, STRN("Apply anti slip brake"))
DRIVER_HINT_DEF(waitloadexchange, STRN("Wait for passenger exchange to complete"))
DRIVER_HINT_DEF(waitdeparturetime, STRN("Wait for departure time"))
DRIVER_HINT_DEF(headcodepc1, STRN("Switch on Pc 1 head lamp code"))
DRIVER_HINT_DEF(headcodepc2, STRN("Switch on Pc 2 head lamp code"))
DRIVER_HINT_DEF(headcodepc5, STRN("Switch on Pc 5 tail lamp code"))
DRIVER_HINT_DEF(headcodetb1, STRN("Switch on Tb 1 head lamp code"))
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"))