/* called by: entrance ctrl of the object 'track'
5 n7 G% s9 |# S, X. Z8 ?*/; u# C; J. `& E6 x$ @7 H* V4 h
is
; h: k% _1 C+ h* ^- p) B; N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 b$ _( Z8 e1 @& Z+ v7 gdo' j7 m! V$ t( H( P W1 _* D$ Z! k# h/ I
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 r9 Q/ g( H( H1 M. |$ A- | if current = @.Destination -- else return
+ W$ I7 Q2 N$ W3 ?4 S ]9 y then
; r& u1 J$ D: I, X; R @.Destination := void;
& P4 K4 h" |8 Z7 u( \ if @.occupied then
# J& y# ?$ h# f; \ part := @.cont;
# Z+ D8 d% y P' d2 X) M @.transpOrder := void;; B8 M+ P+ q' J% u. i$ Q7 T3 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& _2 u% I a/ N2 M3 q2 {
@,root.eventcontroller.simTime);
3 `8 J4 Z7 n0 s7 Q# Q; ~ @.HasOrder := false;
' q- @9 v6 h- j$ m3 W/ }& f! V7 m- d @.DrivingHome := true;
" W; W1 C. _5 j! G7 w rgManager.tryToStartTransOrder;
. V5 T$ h- [& u5 o6 j+ E) d# K7 x if @.Destination = void" }2 ]. k7 U% Q$ G
then -- no transport order for vehicle @
5 L- F6 W& B* _0 p7 P5 O( b( W @.Destination :=( ]+ Z8 _5 o; P( V- C# d
rgManager.nearestFreeStation(@,track.~);$ f& }8 I# _; {2 X. b) F1 [
newDirection(@); 7 U2 u! N3 Y# ^4 ~- W" X
if @.Destination /= void then5 N& o5 g/ e/ `0 W
@.Destination.NumReservation :=- s$ Y& q3 a2 j6 B( I4 q' J% e
@.Destination.NumReservation + 1;8 ^ W. l; Y. S8 h5 S7 H
end;" H. Z: q) G/ w/ ~! P9 B& P
@.CurrIcon := "drivingHome";
& T! f( }* c. T @.DrivingHome := true;
! w1 @( U s7 u! u end;8 }" S7 H2 T/ s2 v- p9 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" X& F; c7 K9 ?8 Z8 A, T
part := @.transpOrder;# w8 x- \: j# [4 B: r0 Y
part.move(@);-- load part
2 w# z5 ?1 S$ d4 p* ? @.CurrIcon := "load";
( |4 i! `' |# H; ~# o) d GlobalDistObj := part.globDestination;0 a P2 K7 m# E' b4 v0 h
assignLObj := rgmanager.rgAssignL;
U! k# r6 [( s( K- u0 Z5 |9 W row := assignLObj.getRowNo(GlobalDistObj);7 Q2 u+ ]6 @5 c5 N
if Row = -1 then -- since 70
( S+ _# s& c u t4 o2 Q! \. ^( g if lan=1 then5 p) p) F: o0 e1 x/ B5 K. B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 \+ o+ h" T6 B. Z0 ?+ J3 {. u to_str("in der Andockstation: \"",?.~.name,"\""));' @/ c! J2 h# Z) d3 P
else
8 V6 m# F3 E) k& U: S+ F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," y9 O# h$ P! I9 Z( y& `$ V
to_str("in docking station: \"",?.~.name,"\""));
: Q/ u$ z6 V- k% q- ?7 E9 a- g" [ end;3 y' v# S* y8 Z. m/ k& D
else
2 ~+ s9 { L, R" `4 L @.Destination := assignLObj[1,row];
2 ^$ _( O: j5 w- g1 }7 K end; ( H" k8 W% j2 C. z
newDirection(@);
8 V# f' S8 G4 z2 }3 h3 r6 Z1 E, r @.HasOrder := true;! v" ]+ j( ~. d
end;) Q. f9 y) E% n2 q& |" s1 L
end;
; D( ]# z2 Y9 r% u0 r' P& Y' |end; -- of the method
. X# ~! _' T9 C, P% s6 b |