/* called by: entrance ctrl of the object 'track'8 H( K0 G# y* q; P3 k$ ?5 s
*/
) b! [$ L( ?& i; j8 h! ?is
. A( s+ D/ x7 Z4 R. C7 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ Y, D0 ~8 C2 @; ^
do
. b; m# Y+ w; l8 y8 {/ ? Lan := rootfolder.Internal.Tools.AOLlanguage;
w: Z4 ~6 S% d0 S I' t( f4 @ if current = @.Destination -- else return
3 G( A) [% Y# A* V* r then
1 Y$ v! P: L; x/ C5 ^* j @.Destination := void;% F V1 }4 X$ O, f# L% q) i
if @.occupied then
. D% K( R9 S1 Y# U e ^ part := @.cont;
/ f: |: a: l. ^' A( s& F3 P3 A: A @.transpOrder := void;
1 E9 l- g0 w# t! E# W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 P. _( U$ ^" ]7 [; Q( h+ X
@,root.eventcontroller.simTime);8 J5 K/ E" M; z- h
@.HasOrder := false;6 ~; L0 j$ L2 x1 W* b: }' l( z3 Z
@.DrivingHome := true;3 d! d4 c+ _% D' f0 F
rgManager.tryToStartTransOrder;; X% r+ D) Q* L; X' H+ n. n
if @.Destination = void1 J: L2 I9 ]* `% i" D( l% o `
then -- no transport order for vehicle @
/ k3 i" u/ R% ~( Z% _* I/ d @.Destination :=5 d3 n& l, A* a, P
rgManager.nearestFreeStation(@,track.~);
1 q( h$ D, {& x: R newDirection(@);
) K- w0 E: ^6 C, i if @.Destination /= void then, P4 z3 b7 b- j# |' R/ y9 r4 x8 J9 l
@.Destination.NumReservation :=
5 k- R: F8 T5 S" N @.Destination.NumReservation + 1;5 J# V; O* [" V( ]( g
end;# s7 X6 J1 |% S' D0 s, [8 f1 v; c5 V
@.CurrIcon := "drivingHome";
{) g; O8 N0 A/ V8 m* h @.DrivingHome := true;
9 l, f! f2 ~& C' u, t% {$ p6 Z end;
5 K$ V: j3 ~1 O7 e" E5 N: w else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 W$ y6 z! _4 j1 Q
part := @.transpOrder;! V. g/ X4 r) P7 |2 W/ k
part.move(@);-- load part
2 k9 U/ l; K; l' ^8 s! r/ z @.CurrIcon := "load";4 q6 r3 }+ m% U& A/ I
GlobalDistObj := part.globDestination;6 R" ]- [# M; `- W4 g% Z' Q4 n, D/ z. H
assignLObj := rgmanager.rgAssignL;
; _0 r2 Q b+ ~: V. @# O, M8 w row := assignLObj.getRowNo(GlobalDistObj);
' o+ o3 S: Z' \8 M* \ if Row = -1 then -- since 70
3 }6 d; U! p6 f) k% ? if lan=1 then
( N/ [. c2 Y7 F4 W0 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 r9 l0 [2 z5 I5 ^. M0 e
to_str("in der Andockstation: \"",?.~.name,"\""));
1 [+ y6 T# d- v1 ~ else9 b- P( O% ^, R- a0 g% F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: v5 u4 s+ K! X( F3 k6 {; H4 J to_str("in docking station: \"",?.~.name,"\"")); ' i' `4 y g* k9 X2 E" n
end;
. J W3 k! x( M5 ^ else5 c. k. p" p* o; h. J
@.Destination := assignLObj[1,row];
! J# j f# A' O J$ j8 t end; . t9 A9 E; {: |7 ~
newDirection(@);
2 V" H4 i6 O# p# J+ g# @6 k, K @.HasOrder := true;
" h; b" c& J9 c4 N+ Z, Z$ d: b end;
$ M1 i8 V4 @4 S3 m. E0 h9 b end;
M$ k8 R$ s" ~( L4 A, vend; -- of the method
. w: t6 I# A9 j+ L, s' m |