/* called by: entrance ctrl of the object 'track'5 S) t: E8 N* a, L2 B1 Q
*/
- ^* j# u" J0 J2 \7 P) }is
9 P# T1 n+ M# Z* [4 J0 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 a0 |0 D* `8 z5 P; R9 b- C$ ^do
, Q q! n& Z! c4 X Lan := rootfolder.Internal.Tools.AOLlanguage;; A, s2 y: P+ }# r
if current = @.Destination -- else return. e# H" y3 q- P* V. k, }
then
* q7 I6 |- W; R @.Destination := void;0 Z/ r* l8 Z/ v$ }
if @.occupied then* z. k& M, U1 U% ^/ l$ X
part := @.cont;
. m+ m t; p4 ] @.transpOrder := void;$ l- w! H1 o# E( }+ X* ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% b9 @" \7 B9 M9 Y @,root.eventcontroller.simTime);
: ^" m+ x0 @; f$ Y5 h6 b @.HasOrder := false;0 |- `+ ^6 |- N
@.DrivingHome := true;
2 t6 w1 g( H# E; m& X. k3 _7 g rgManager.tryToStartTransOrder;: a: @. J) H2 J
if @.Destination = void" A9 o- P: Y; p0 v+ \
then -- no transport order for vehicle @7 S6 r$ R$ [4 s0 e, ^
@.Destination := M N$ _" K7 l+ I5 B3 u
rgManager.nearestFreeStation(@,track.~);3 x$ T2 |/ X6 Q: \9 K4 Q
newDirection(@); 4 r' X& { w( j1 n0 h9 V! j8 @) D
if @.Destination /= void then
7 h. N' g( G& O @.Destination.NumReservation :=) \; r6 [8 e% \; T9 U
@.Destination.NumReservation + 1;
$ C! R I+ T% {) s7 Q+ D end;9 S) y7 f! m. M6 N% N. x. q
@.CurrIcon := "drivingHome";1 R) C7 x) Z, R6 ^
@.DrivingHome := true;
9 t# |6 }1 ^4 M" E6 k" U; q end;# z. Q% s. X1 `4 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# A5 w- R3 g/ \" x% { part := @.transpOrder;
2 j6 w9 b [3 }3 _0 h4 i part.move(@);-- load part# U$ c$ M5 w1 r8 f$ a$ c# p
@.CurrIcon := "load";( e) L* C% g$ n6 U7 X0 T
GlobalDistObj := part.globDestination;$ S, d: {; n) s3 E' z3 M: q2 f
assignLObj := rgmanager.rgAssignL;* }) G4 v6 s: S
row := assignLObj.getRowNo(GlobalDistObj);
% m9 r5 A4 Y8 F# p; {/ n if Row = -1 then -- since 70
* d3 ^# F3 Y+ z$ i if lan=1 then
* @: [$ E! a, [( ]" y1 V8 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 k1 z) r4 a- b3 l- B9 U& X
to_str("in der Andockstation: \"",?.~.name,"\""));
# O: g2 [# G9 s4 A( M6 E0 {# S else& B) j6 q0 V3 |. k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% G, ~1 |3 R/ R3 @: L" i0 S& @
to_str("in docking station: \"",?.~.name,"\""));
! D. Q# P' x4 ?# T9 n. ~ end;8 @- j; `" z3 @ q2 r K* c
else
1 S' R F+ y0 m% y( C @.Destination := assignLObj[1,row];
- B4 E6 @5 v0 t& W: J) M end; 7 _! f- s7 e' g, v: x& d" o) d: ~
newDirection(@);
8 J) }0 Z$ w' w* T5 ] @.HasOrder := true;3 f+ Y3 K0 k% J
end;
& C, l, t2 N9 y- q# w, z; C( K3 M/ |/ G end;
& v6 X; A5 M P! v+ tend; -- of the method) G7 U( E8 ^" k$ z, U
|