/* called by: entrance ctrl of the object 'track'4 g+ m8 m. Y/ |+ o) f1 p2 c
*/ u& m5 p' r6 B2 b4 o4 [
is
# f- r" ?/ u! x& D( d part, GlobalDistObj, assignLObj:object;row,Lan:integer;* n! u) ]9 B2 S7 }% A
do$ i: R; H0 r8 t0 v; S: T
Lan := rootfolder.Internal.Tools.AOLlanguage;: w! j, t& J$ C; _
if current = @.Destination -- else return
) B8 {7 ]; E* c' w: n% _' @' o then
: V7 N H) K$ v; c' L8 O# o @.Destination := void;6 t8 w0 @% G% _/ w2 T
if @.occupied then# [* z3 e9 ?. W. H
part := @.cont;
% I Y% x! y) D @.transpOrder := void;
8 I" `: Y( ]0 v9 @6 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, d$ A* F- G$ u6 G ^
@,root.eventcontroller.simTime);
1 {, K: i9 r$ g6 P/ I6 O+ i @.HasOrder := false;
' b9 Y8 }8 U7 H6 m# q @.DrivingHome := true;" ? {. G; e1 @, b' I8 M
rgManager.tryToStartTransOrder;
1 J0 d% W+ D% ?) m v9 l, G. g3 @# ] if @.Destination = void6 s7 f7 T4 k' p
then -- no transport order for vehicle @* }6 @& ]% a9 |7 r% n+ W
@.Destination :=
4 ^6 x% [) J" h+ F( z# i rgManager.nearestFreeStation(@,track.~);4 S1 ?5 i( x t- G0 L
newDirection(@);
" |4 l S$ _5 ]; `7 o3 |+ O if @.Destination /= void then$ s! Z- V( n* W/ c6 V2 T
@.Destination.NumReservation :=
8 w3 G8 L2 A! g4 U( ~ @.Destination.NumReservation + 1;, J' ^, \6 ?5 R6 s }+ t
end;$ o) Z% @$ r# N6 }5 h4 `' `
@.CurrIcon := "drivingHome"; R# d" a* G) K
@.DrivingHome := true;
* C8 `. h0 k1 ^2 H9 P& _+ h end;! G+ Z$ `; {. y; F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ `. F4 I7 i+ ~4 q ^9 s
part := @.transpOrder;$ z$ @/ B$ M2 w; ~. l' S
part.move(@);-- load part6 D7 }' j3 W5 A3 J* z
@.CurrIcon := "load";
" |$ \9 q8 U7 a, r2 L b GlobalDistObj := part.globDestination;
% s, q' \* u0 j* ~7 J9 _# L assignLObj := rgmanager.rgAssignL;
# k; Z3 E9 j- f! n row := assignLObj.getRowNo(GlobalDistObj);/ r* w- n3 i8 }( L& ~
if Row = -1 then -- since 709 D! {9 \0 H# T
if lan=1 then
- N: V% {6 Z( W, C$ |% |( a6 [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ M+ C5 `( G2 z9 L' T, q5 ~
to_str("in der Andockstation: \"",?.~.name,"\""));% s: F7 W/ a. S5 x# l8 W+ b* m
else5 D0 b* A7 s" g0 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ y+ G& P6 K' p8 b8 U3 Y* ~$ Y
to_str("in docking station: \"",?.~.name,"\"")); + K8 f0 r7 M# [( w$ D6 x
end;0 d _: T( Q$ I# X! B$ O" P
else
t) x' f; ]7 F @.Destination := assignLObj[1,row];
7 Y8 N. r3 c; U" O ^0 w end; ; ~9 A" [, S1 z+ f
newDirection(@);
2 l9 B) n* X! d: T @.HasOrder := true;
1 z& B( T' l# ] end;" M4 x; [1 x" ]5 i8 J
end;* T2 w' C& C. ^! v, z D
end; -- of the method. L8 k" | I0 y2 U" _9 j
|