/* called by: entrance ctrl of the object 'track'
& F; m6 O/ t; k4 q" ~4 n1 N*/
: [: ^, W" i( q0 _8 g( V: [; C, X) U5 S4 Iis7 X; Q E# ?7 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: ^! S' l! C/ N* z
do
6 v U3 ]* v4 ^, ~2 s& g Lan := rootfolder.Internal.Tools.AOLlanguage;! C/ ^/ V) |& m5 C3 k$ M; h
if current = @.Destination -- else return
& A+ m$ K3 k% }& N7 \+ l then
$ v" L7 ]0 q* f M' i6 k, Z @.Destination := void;
6 {6 M+ \ x; Y( [- ] if @.occupied then
$ }* C5 k! H$ E+ r7 g9 }1 s part := @.cont;% q( @! U9 d" \' `: ]
@.transpOrder := void;, O3 h5 ?; i! w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 z- s2 Z8 o6 v @,root.eventcontroller.simTime);
) a R9 ]/ Z! I3 } K. O @.HasOrder := false; y& j. H& D7 ^9 u: @
@.DrivingHome := true;
s9 P& \+ u" o1 J# q+ q9 {0 B. H rgManager.tryToStartTransOrder;: v; F9 }) U- ?" D8 f) l% n
if @.Destination = void
/ O( l2 `: ^# m J, r) v- p _4 C' k then -- no transport order for vehicle @
% C w7 y/ M7 M/ c/ Y" { @.Destination :=
( h+ F* E; [; m* I& _- a* _# z rgManager.nearestFreeStation(@,track.~);
3 Z8 e7 c- X E1 p( G/ j* G0 X newDirection(@);
$ C8 { \" X" p# @6 G if @.Destination /= void then
* ^/ `) N4 u/ o" J: S* D2 ~ @.Destination.NumReservation :=
! g M9 r; Q- U# \9 Q4 j+ W @.Destination.NumReservation + 1;( e6 \7 B( F0 @" ~# _6 Y
end;' ~3 e8 T- l% A( h7 m$ U
@.CurrIcon := "drivingHome";
; Z; w7 m$ [2 {5 Z4 ~! r2 t$ @ @.DrivingHome := true;. k' U/ x8 z: q X/ ^- H, ?& V( ~
end;
6 I0 a$ S2 P4 f& ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station# s, A; d& g: p- @0 F2 y9 p, V
part := @.transpOrder;" M& D& ]) A3 z6 ^9 N- {
part.move(@);-- load part
) r/ S1 W& f* {( E( ^. x @.CurrIcon := "load";4 h% P& l v% |4 i5 I( p/ F
GlobalDistObj := part.globDestination;
. V4 k4 X: G6 ]2 s7 O assignLObj := rgmanager.rgAssignL;7 P$ P) @$ t- G6 [# e
row := assignLObj.getRowNo(GlobalDistObj);
" e3 J$ o/ ]6 l1 R3 X/ z5 j if Row = -1 then -- since 70
/ h8 R1 ?$ R$ z3 i+ M5 j if lan=1 then
0 Q+ H3 [- I6 [! Q/ ^0 ~' j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' [0 E$ z# J) z; U, v1 s to_str("in der Andockstation: \"",?.~.name,"\""));
* j/ f3 [6 n( n else9 b8 z9 e$ e' n5 c M" D3 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ q& S- ~0 i% w @, r+ W H
to_str("in docking station: \"",?.~.name,"\"")); " s2 H3 _# e7 R: `9 C1 r
end;6 z' ^7 S1 l( v1 D' V6 j8 U3 c
else
* h' a: w0 h+ m$ f @.Destination := assignLObj[1,row];
/ M! U- j S- Y a end; % u& a8 @% B) d! E: C$ W
newDirection(@);7 h B/ K6 Q; M5 m* `
@.HasOrder := true;
9 ]2 ] C6 D0 h) D2 z+ s end;
2 D" u5 q) u6 y! A0 | end;
$ I0 n# _0 D- c: M% }4 vend; -- of the method( @/ p( a7 |( A8 k( M
|