/* called by: entrance ctrl of the object 'track'8 p! r* P% O" s5 z5 l: L4 W
*/
5 `. ^! t/ z) _: i0 N; Q. Tis: `0 N# P3 m6 H, T$ q* L; Z2 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! d" H0 K1 Q* z% Y& I) e* ~do0 N/ j* X# B) `' o8 {
Lan := rootfolder.Internal.Tools.AOLlanguage;8 F8 [% `% F; Z9 U
if current = @.Destination -- else return
9 B8 y" z: _/ L' T3 ] then
$ `9 I8 p' b+ n2 ]7 s1 w @.Destination := void;
3 Q, q9 ?* [( ~0 s+ M- i* E4 n if @.occupied then
0 B s( |6 M* H9 R$ w# r part := @.cont;
0 P+ o9 S t- E @.transpOrder := void;
& @3 _6 u& F1 W6 k. J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, B y6 ^. o* W! a0 J! z
@,root.eventcontroller.simTime);
4 h, }. p6 ]8 w @.HasOrder := false;
# V* Q) l% a3 ?6 q @.DrivingHome := true;
3 p9 H" i! {, @: ]/ v3 K& ? rgManager.tryToStartTransOrder;- N( v( M; z: o7 Z! l
if @.Destination = void) u9 M% h6 c" J& q6 O
then -- no transport order for vehicle @
) e) w& Y1 L1 g @.Destination :=! {2 t6 y* F( y; K. S
rgManager.nearestFreeStation(@,track.~);
) S7 h& y( ` h+ I newDirection(@); ) ?7 A4 s6 U9 i0 h& Z, H
if @.Destination /= void then
1 {- A5 N; {% j0 w @.Destination.NumReservation :=: Q" Z7 i/ X! w; P& z$ c$ f' U3 O
@.Destination.NumReservation + 1;5 ^" ?" _& G7 a" B5 q! q$ c
end;
2 W% u! m% P( j4 Y" l @.CurrIcon := "drivingHome";4 B8 U [) F% w& t( w3 N1 }
@.DrivingHome := true;
( v" v5 i' P( q* E3 u X- ~ end;
7 U) A" G5 j( T" I else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 }# t4 v, j1 y, Q
part := @.transpOrder;
0 F! }& k. C& `3 X9 m part.move(@);-- load part" Q& T7 Q! }5 k' D" C4 _* F0 a
@.CurrIcon := "load";
]; G+ ~# e- u; n* _2 X. M GlobalDistObj := part.globDestination;
3 ?; ~9 l. k- Y, m7 ] assignLObj := rgmanager.rgAssignL; Z+ U8 [1 T! i- j* ?$ M3 s2 ^
row := assignLObj.getRowNo(GlobalDistObj);( ~6 i, Y7 S, i5 ?) W' p/ C
if Row = -1 then -- since 707 R, X+ p9 k4 T4 k2 B7 \* U I
if lan=1 then
' ~/ }/ N& D7 X& R8 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& B+ C9 t; ^) V1 K: i to_str("in der Andockstation: \"",?.~.name,"\""));# E5 H; I, C8 B! o9 T4 F
else+ |) ^0 k+ T. m7 _. C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! i e4 a: b. n2 f/ Q8 Q to_str("in docking station: \"",?.~.name,"\"")); # z- G5 v3 t; m/ F
end;) h7 m. b. H' e9 c7 T: F
else
7 E/ u9 d2 s3 P% S; p* z/ W @.Destination := assignLObj[1,row];0 |9 e2 v8 K5 T, p
end; + u9 y& { F X2 N
newDirection(@);
' I/ A& k+ L+ K! {( [* y' ~ @.HasOrder := true;+ b" R/ _0 p! r1 p
end;. G# f! M6 f6 w
end;9 ]" n' b$ o6 [6 Q& t' F; l
end; -- of the method3 [5 J( |# r. o' R
|