/* called by: entrance ctrl of the object 'track'/ C3 w7 @# N" w& l. V" n
*/
: Q' w9 ` |) o! i l2 _is- W- y. v3 d* C8 h4 W3 g6 D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; N$ _9 o' p# H" }1 ?do* O0 Z! _2 {3 _9 M* {* ~
Lan := rootfolder.Internal.Tools.AOLlanguage;! G8 ^( I/ a2 O9 U: ~* r
if current = @.Destination -- else return
2 ^1 S# a o4 j5 B+ O7 \3 | then: D5 K3 w* S6 l9 }6 c( P$ t
@.Destination := void;
% x; {# H! }" S7 ^; |9 F6 h1 E if @.occupied then
; R) Q9 {, ]' H6 z+ I$ `; C% w' j part := @.cont;6 G5 a0 _, M7 ]" z$ z" q# D
@.transpOrder := void;
+ b! [* T& N1 ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# m. \" v9 i/ n( W. c+ H" e6 X @,root.eventcontroller.simTime);6 G( H7 M0 v" K8 U. E* O
@.HasOrder := false;) {! \4 |1 J; k
@.DrivingHome := true;
6 [3 i/ Y1 \" F7 x6 x- k rgManager.tryToStartTransOrder;
( I R6 B' x1 D4 z9 G1 P: D& j0 q7 Z if @.Destination = void
9 M9 W( d6 r+ I% e+ e- Y then -- no transport order for vehicle @
& k% f5 `' h: M @.Destination :=. i# d8 }# B) g3 C2 w. f' i
rgManager.nearestFreeStation(@,track.~);6 r9 a4 X7 ]: [5 G: X) H" J! \
newDirection(@);
9 n# p6 N' h t' y if @.Destination /= void then
: s4 m% t: k. @) f* T9 L @.Destination.NumReservation :=5 b. [8 u: d/ l
@.Destination.NumReservation + 1;
3 A' K: x$ q& Q6 w5 O# x end; X" [& T- Q. a+ a! X+ a4 J
@.CurrIcon := "drivingHome";
/ @( p! g' B( z0 r, [' n @.DrivingHome := true;
" I7 D/ X5 L" C end;5 e' P4 x: b0 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% S# ?3 N9 I8 H# ^- g% B5 E* ]
part := @.transpOrder;0 B6 |, m$ a- q
part.move(@);-- load part
9 c( i) {: P/ t, t4 O @.CurrIcon := "load";: s/ W6 z4 c! b/ X9 D* ?
GlobalDistObj := part.globDestination;" O& s# m; H* O; a: m: R
assignLObj := rgmanager.rgAssignL;
2 C L' t, ^: `1 q1 B1 D row := assignLObj.getRowNo(GlobalDistObj);9 M- L4 |# s2 M, T5 T
if Row = -1 then -- since 70" M3 S, z# x1 Q! {, g: y" L1 J. e
if lan=1 then- ], Q ?3 |* F% j1 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 m/ q2 G/ \5 }" h" P
to_str("in der Andockstation: \"",?.~.name,"\""));
3 U C% h& E" m' ?: t* b else
+ v5 Q; ~; Y3 l* c6 k) i7 m" b- @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 e) p4 B1 d# B0 X
to_str("in docking station: \"",?.~.name,"\"")); 9 n0 Q/ E. ^6 e5 m6 D7 N+ k
end;
3 E! v; q/ B$ p else
. q1 H. O7 q: z& b/ p! U @.Destination := assignLObj[1,row];& Y1 x( h* p. _, q; p2 J
end; 5 E& `& Y I1 j# _8 r
newDirection(@);
& a1 \2 A% T2 a& D1 o @.HasOrder := true;
q5 D0 H8 q8 @* ?" Q- B9 M end;
. r; m/ Q. R; U8 m5 I end;
( D# V4 C' T) {end; -- of the method
7 l% U0 w7 h: _5 e' W* y. q; [ |