/* called by: entrance ctrl of the object 'track'" p. X7 S* t, t% G5 P, l) Q+ n6 y& ~
*/ P- S; m: v/ u) G( @
is+ V# J" {0 `; W7 C- p7 B/ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ r3 n; n" K' N+ L3 E% L/ {
do
( g# ~3 c$ N& H" L4 o+ v% P Lan := rootfolder.Internal.Tools.AOLlanguage;
/ Z) V+ ~" D' C& H% l if current = @.Destination -- else return
9 J( i) D1 b5 G c, m! _1 H then
% q5 D; M) Q: C2 C; [! i; [( j2 d @.Destination := void;! k# k% {0 H& ?5 i4 K M' k9 B
if @.occupied then
6 b. `( b) q9 M. t! D, ?2 }2 y part := @.cont;" x: |* m& e0 K) z
@.transpOrder := void;
: }9 C* Y$ m$ ]. W$ }, _& H0 z$ e K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 k7 @* W+ @4 j @, R @,root.eventcontroller.simTime);
- x. q. c: V* a, l4 J) P$ v" A n @.HasOrder := false;# w- V5 _+ Q3 X- _5 Q9 G3 |
@.DrivingHome := true;( U, e% l, ~ }1 q: j/ J
rgManager.tryToStartTransOrder;. ^% [" e8 [; j/ | X
if @.Destination = void9 m$ Q0 X8 a( l- p9 g+ x
then -- no transport order for vehicle @/ ~7 T& L" {# I1 n, M6 v1 H
@.Destination :=2 M0 `8 O M/ b ^
rgManager.nearestFreeStation(@,track.~);& R0 Y) E) Z v8 ^- A4 t- P9 w+ }
newDirection(@); 7 y' B% g6 T; R( k. g
if @.Destination /= void then/ Y$ Y: b& ~+ a1 c
@.Destination.NumReservation :=4 ^6 i$ q7 C2 b5 p: V
@.Destination.NumReservation + 1;
; R5 u; W4 Q7 _6 ` end;
R4 ]' G2 ~8 T @.CurrIcon := "drivingHome";: o3 E$ o" C P) ~, S; }# W' F
@.DrivingHome := true;
. I8 ^6 P2 |6 z, {* A0 O end;+ }, v" }$ o7 j3 n ~2 P$ c# X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% P% R5 d. o, ?* [$ [1 y part := @.transpOrder;
' _+ g: a/ J. n7 W part.move(@);-- load part+ x( ^# F$ K2 L# G9 A8 u
@.CurrIcon := "load";
) ], v: o4 ?: w. u! U9 d! n, { GlobalDistObj := part.globDestination;3 t3 ~- b6 j, b: G4 Z
assignLObj := rgmanager.rgAssignL;: y" Z& H: P8 ?. O7 w
row := assignLObj.getRowNo(GlobalDistObj);
0 Z: W8 _ A2 y; \+ w, E# B if Row = -1 then -- since 70& J- w: l. r" V" X$ k
if lan=1 then- w( }6 A' e7 y5 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- g+ }6 R& r+ W% | to_str("in der Andockstation: \"",?.~.name,"\""));
0 E/ m9 a" F" i0 T8 M* X# G Z# t5 C else
9 i1 N5 C# o% h4 H/ g+ I' _5 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 c4 W* N9 ^ z6 L0 L% A7 K
to_str("in docking station: \"",?.~.name,"\"")); 8 z" D% z. M1 V
end;+ S: P5 C* S8 c
else
- O# [' I! ]' C6 O# a @.Destination := assignLObj[1,row];! p# D; M! v7 e6 e9 T+ O" V
end;
" L+ c- O% h" ]: ~, e, r' { newDirection(@);
* Z0 z. \6 G, v" g @.HasOrder := true;" o z% Y. }/ }, D4 [& G
end;6 K2 A2 V8 D5 T4 P) N$ C
end;
% R. e0 _) D1 a, q% {end; -- of the method! Q. o, U( {- {- [, V
|