/* called by: entrance ctrl of the object 'track'
2 z' D' n5 M* U' q/ `3 d*/$ L: x. O+ c. ~" G$ A
is
: l, r2 u a' J6 D$ b$ f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 ?7 v! ^: _, Z, l. Z3 xdo
) n* J% n& ?% u, d5 b5 l: Y Lan := rootfolder.Internal.Tools.AOLlanguage;
! [2 l! S( `3 Y( `1 p: D2 u3 e! u if current = @.Destination -- else return7 {2 z5 L1 u3 v+ C+ |
then
4 x% n* D, p& ^1 X' h @.Destination := void;
' F2 X6 ~* m R) R if @.occupied then
1 O7 L0 Q6 v7 Q8 ]$ b& b' F part := @.cont;
+ n s! A# ~* ~/ N- ?/ F/ O* ] @.transpOrder := void;3 `3 `0 `# H$ E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. ~% \$ i4 c3 I y6 x" @
@,root.eventcontroller.simTime);
0 j; j4 u, ]# { @.HasOrder := false;
# w- S6 s; ]% C5 X @.DrivingHome := true;
* Z. ]3 t5 P) A* { rgManager.tryToStartTransOrder;$ c" y( G; X' ?( T
if @.Destination = void
+ K# C' Q' S a Z then -- no transport order for vehicle @
% M3 h/ v9 [" c1 ]/ M @.Destination :=
' K* u) }& x* J: q rgManager.nearestFreeStation(@,track.~);. [5 f- M# A- }* {! H
newDirection(@); $ n3 S$ Z& V% Q( n! G- }
if @.Destination /= void then4 |: I5 B$ J6 H7 C; G6 _
@.Destination.NumReservation :=- t0 q1 t2 U/ s- S3 r% z9 Y$ a; E
@.Destination.NumReservation + 1;" }! G' e5 g9 _6 ?9 ^; [) ?
end;4 E: |$ x+ l4 Z9 o. z
@.CurrIcon := "drivingHome";
/ x* k* \5 x% O9 _3 q, ]4 O9 \2 C. H @.DrivingHome := true;
7 ^( O" O% h% `* D- V) ?5 v; h end;
: F; c! t* M( ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. Y y6 k& |) n* Z1 w* A. o part := @.transpOrder;
2 S# A6 q! b1 V% i' G1 L# T part.move(@);-- load part3 C2 o8 L8 L4 a u1 k4 A
@.CurrIcon := "load";; w2 l4 O+ y7 n& g' S
GlobalDistObj := part.globDestination;% M4 p4 Q8 a1 [' ?
assignLObj := rgmanager.rgAssignL;
! l! c1 \, I4 @, s W6 k, N row := assignLObj.getRowNo(GlobalDistObj);
( V. _# A/ S. u, \( Q# ~% K8 f if Row = -1 then -- since 70
" t2 D5 I- R0 g$ R- ?1 j0 l if lan=1 then
: [4 Z' J$ L3 A4 g- U' L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' \: K& s- I% |3 Z# K+ q+ d1 i to_str("in der Andockstation: \"",?.~.name,"\""));
# Y1 r+ S d0 Q }3 V0 o+ s, x else- x$ \% f+ S$ b, g4 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 M/ q& X P( |% s [" ?* D* S( H to_str("in docking station: \"",?.~.name,"\""));
8 q* E! g# v1 ]' e, H0 ` end;
& b1 ^; [. U; @% y, W else
+ F5 r% d* H+ s( [+ _" J2 U- N @.Destination := assignLObj[1,row];0 k" m3 c2 G, I! I( w, n
end; 8 o3 n$ p, @$ c
newDirection(@);/ m. Z% H5 @7 J9 O
@.HasOrder := true;
/ Z+ M- F7 e6 B/ K9 G8 N0 X+ @$ P end;+ D5 w' M6 Z2 t# ?7 h( [4 Z/ p- T7 P
end;
' {/ n# y7 e3 V. I- C) Z' [+ H+ Gend; -- of the method& S) y; @: t: e: w9 ?: g! N' J4 e
|