/* called by: entrance ctrl of the object 'track'7 p8 C8 @ S: y. g0 ?0 y4 J, u
*/ {# N' P/ U0 U& t2 T5 Z1 V
is% e7 T& z& U5 Y8 S% V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 k" i: U' _8 Kdo
6 ?. j7 I, o% X7 ~/ a Lan := rootfolder.Internal.Tools.AOLlanguage;3 w4 o" j9 i# h5 U0 Y
if current = @.Destination -- else return
7 M/ ]+ H' v% ~9 }- P then9 w6 S7 g+ S# B1 p) |: q3 _$ [
@.Destination := void;8 }; u2 t! L1 [+ c$ {" P9 m/ u
if @.occupied then
6 R+ u& p( D( Q6 j% | part := @.cont;
/ `. i7 a# l T: e: q& b @.transpOrder := void;2 Y+ `9 g# ?+ z6 N& [' o# w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ ~4 O4 a! T3 V9 m0 f: t @,root.eventcontroller.simTime);
2 f2 p& D8 a% B9 q @.HasOrder := false;
! i4 E* @6 d8 D- B @.DrivingHome := true;* D8 K, y& i( e
rgManager.tryToStartTransOrder;# H: G% B! Y( T% ]
if @.Destination = void7 e! d) R. B8 L
then -- no transport order for vehicle @
' D0 B( T, x' u4 S @.Destination :=
8 s* t6 I. O- ]) }, d4 W5 C) C rgManager.nearestFreeStation(@,track.~);& W( \% q/ N& e& t+ b& f
newDirection(@);
$ ]5 A; b3 Q. r8 Y/ D4 K if @.Destination /= void then
9 y% Q/ n! I' ]4 |! j: F @.Destination.NumReservation :=
# w3 _) M% p5 `1 Q" G! x2 K. H6 W @.Destination.NumReservation + 1;6 S9 V3 n( j7 }# T8 @+ D- R: i
end;2 I6 ]8 A( p- m
@.CurrIcon := "drivingHome";
9 n$ q: e8 {/ l$ j' ` @.DrivingHome := true;4 z$ B4 O. T9 ?8 n1 T+ @0 D. P
end;
( J# ]" z* {/ ?6 s! ~# h6 q7 y4 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- t, n7 i$ l) r part := @.transpOrder;: V+ v; q' C; V2 @; a8 E
part.move(@);-- load part
- p$ N8 _3 E% h! L3 V @.CurrIcon := "load";
# _8 d* x9 U' n5 B! o GlobalDistObj := part.globDestination;& o( m. B: k/ U" A) x0 m7 A
assignLObj := rgmanager.rgAssignL;9 `- Y& H4 ^' u+ l4 M
row := assignLObj.getRowNo(GlobalDistObj);
9 O" l' _3 z, Q* y: x% `* e7 ?5 C if Row = -1 then -- since 702 q2 |7 y3 j: K# x
if lan=1 then
6 C' }& L6 {5 B: Z' L% a J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) Q$ s/ T. y6 w6 o$ W- Z
to_str("in der Andockstation: \"",?.~.name,"\"")); Z6 q W' d: ]' ^/ w/ n) G8 N
else1 F8 a( I5 Q% [: s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 w6 R% f4 f% P) U to_str("in docking station: \"",?.~.name,"\"")); / O. U8 @1 E8 ^
end;
[8 s3 |9 q* i" H. T else% U4 P# h3 `% v2 t7 T
@.Destination := assignLObj[1,row];
! H8 `+ T! B& Y' p end; 6 R) G+ m5 ]) m' i- {' H
newDirection(@);" D2 A, c4 e5 C' u# T' _
@.HasOrder := true;
2 u, o7 o# j" S7 ^& P# {/ W end;
) } b- B) Y, d( J O; J. F& }/ G end;
% J) L& c) a3 zend; -- of the method: y- u0 r6 {2 L! W, O0 y
|