/* called by: entrance ctrl of the object 'track'
" ~4 ~ p) k* J1 D( U/ H*/
$ E& O5 g1 e0 u% Q6 N# L; xis4 ]! v% p1 v7 \. X( c9 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 J6 {- D+ n% F0 Q& K p) |$ q0 Q; e
do4 b$ N& ~/ A* ^! [1 o$ ~
Lan := rootfolder.Internal.Tools.AOLlanguage;+ @& V" \6 u7 u
if current = @.Destination -- else return2 @# I! ^9 d! P5 U s7 Q1 R- W) h5 Y
then+ W' G1 X6 b& `
@.Destination := void;; g% O: S2 c; C2 O* p; B8 l
if @.occupied then _! |- V1 ?/ V; ]: G
part := @.cont;& }. s, y+ r/ y: _9 ^9 U: ~+ V
@.transpOrder := void;7 }; y- C8 q* n2 |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) @" P" G2 m" b @,root.eventcontroller.simTime);: L# {, `/ b3 a, x6 K2 ^" L; D* _3 W
@.HasOrder := false;
% f& b' B6 h' i! Z" V) Y @.DrivingHome := true;! x8 j$ z/ x: @% y% |6 K2 w) r. i$ t
rgManager.tryToStartTransOrder;# g5 [' r; O* j7 w* U0 r+ ~
if @.Destination = void) k: h6 c5 k- g) e
then -- no transport order for vehicle @
5 ~3 G' X# _' G @.Destination :=
5 T. l5 B" `2 M% V* M rgManager.nearestFreeStation(@,track.~);9 |8 y8 X& K2 t1 @' R; H
newDirection(@); 9 |: n) D, [2 }( P$ P
if @.Destination /= void then
+ \6 p4 _. N# j3 T$ i# T @.Destination.NumReservation :=2 U; d" j1 \/ Y. t
@.Destination.NumReservation + 1;; l6 W% r3 t6 N
end;
4 ]& E8 L3 ^ @" Y6 \5 O @.CurrIcon := "drivingHome";
" V9 V) b( N4 k1 ` @.DrivingHome := true;. P2 p7 J5 i c4 {! G) f" T# ~% _* ^
end;% D2 r; o) m8 D3 u1 ]0 O1 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 U7 e5 M* q' O, _
part := @.transpOrder;6 U6 {7 W& m! k
part.move(@);-- load part" U- |; X1 d% Q1 M" F+ C. E
@.CurrIcon := "load";
6 Y' V# b- e- L9 O( } GlobalDistObj := part.globDestination;4 \5 q; r: ?. X2 O
assignLObj := rgmanager.rgAssignL;
" P& U# L% @* z. i row := assignLObj.getRowNo(GlobalDistObj);, C0 D; D" I& D ]0 W8 J1 S
if Row = -1 then -- since 70
- x( y' t# t; N) k1 U if lan=1 then+ @6 j: [2 x+ q8 I% @( ^$ P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! |5 K. p0 G9 |8 l to_str("in der Andockstation: \"",?.~.name,"\""));
' @, p$ W/ T4 B else
; d3 |1 k3 K/ A+ e6 {* r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 x, A0 C# R( b+ ^5 o& n, W3 U
to_str("in docking station: \"",?.~.name,"\"")); 5 M% ]7 b% P8 w- Q3 n
end;) D& U7 D' C) T+ u
else/ u5 Z" V4 G; I, V0 l/ _ a
@.Destination := assignLObj[1,row];5 a7 z7 l4 k: G4 v. p0 E* M
end; / t1 L$ t- }& m$ w: ^
newDirection(@);
" O& W! N$ j, H) Q @.HasOrder := true;7 C5 @. C( \% V% t: x" k
end;
4 l2 R4 Y s/ L end;+ _ T- O, X( r8 g/ h6 w7 c5 l! `
end; -- of the method! P+ i, w M! D+ L* {6 [
|