/* called by: entrance ctrl of the object 'track': y0 J9 m" p' s' ]9 ^9 Y
*/
. f& a% e; c u8 m; l1 Z+ m4 ?/ pis1 u# \- t4 j1 Y4 Y/ b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 P% x; q# l# e$ f: [6 vdo
" s( n1 `+ U% N Lan := rootfolder.Internal.Tools.AOLlanguage;
4 r2 Y& i2 F! U! [. X: O2 u+ T if current = @.Destination -- else return
! d: W/ y5 D3 h then
) v$ s" Y6 g/ f4 C @.Destination := void;
; K) F2 j( t3 `3 m. I if @.occupied then- d& N2 H/ o7 i
part := @.cont;
0 p0 s) i% A6 E! b; O @.transpOrder := void;
9 G, l; i* y$ M3 y$ e& m6 \4 ~ z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 ~0 X) M' a% X, \2 s
@,root.eventcontroller.simTime);
# N# E6 f3 q4 L5 {7 j% W4 r% I @.HasOrder := false;
: n% G3 Q6 Z8 P! X5 v, l5 z @.DrivingHome := true;0 U- Y* N& c' M1 t- q
rgManager.tryToStartTransOrder;
8 H' `3 U+ C2 ?/ } if @.Destination = void2 U+ |. g# h3 o" {: T
then -- no transport order for vehicle @/ E' \% _# J4 D) M: |( b! ~$ ?
@.Destination :=
5 F& s3 u5 ^% G! R, _ rgManager.nearestFreeStation(@,track.~);
/ j0 [( u' D9 U! L9 w- k newDirection(@);
' z' u1 M' q5 a0 j! j8 I2 R, ` if @.Destination /= void then
1 a D- K+ X b! X# Q- s* }. y @.Destination.NumReservation :=" n3 o% V) u/ c4 P
@.Destination.NumReservation + 1;
' O' Y/ d% U) T5 R W4 i* E end;
2 e# H! i7 I/ ^8 h @.CurrIcon := "drivingHome";9 C/ a# h. p) w% A
@.DrivingHome := true;5 @) P$ D1 Z8 I) w- @# d4 ?- E$ x- H
end;5 u* o1 n! D/ h f b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; D0 i% u7 \' j, J+ ? part := @.transpOrder;
5 H6 Z+ ^* {$ { part.move(@);-- load part5 g* Q1 ?+ @" ]0 K
@.CurrIcon := "load";$ c5 c+ o7 Y: [) r" ^( B( B p% V& A
GlobalDistObj := part.globDestination;
- z% c/ r8 q2 v6 R! n assignLObj := rgmanager.rgAssignL;
9 t' K6 S1 l5 e& x! o row := assignLObj.getRowNo(GlobalDistObj);
' _2 P" G3 \8 z% W0 g+ q% k9 @* u if Row = -1 then -- since 70
8 W) G% ^# f" }6 o if lan=1 then
3 M \. P. O, d5 w- V+ X. \0 w7 K0 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& I! p: ?- u! L1 o) b$ Y
to_str("in der Andockstation: \"",?.~.name,"\""));
' a/ L( U$ l8 Y) I else
7 O4 ^9 _; i1 r# _5 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 V! y, F# _# A% N3 B to_str("in docking station: \"",?.~.name,"\"")); ) U, M9 j; T9 ?8 l5 V( j
end;$ r6 w# \1 s+ R% N8 |
else
3 d+ ^6 v; B: k. i( I @.Destination := assignLObj[1,row];
' v5 R! I4 v3 P; w) `$ L/ ~2 a/ p end; * G, E, x- U7 `! e8 |% \7 b
newDirection(@);
0 V- k( X4 ]9 u { @.HasOrder := true;; v) Q% D3 I8 ~! m$ i
end;+ i7 Q: S; a! N) w! i0 Y
end;" r9 x" o9 r& y. K- B2 V; ^" U
end; -- of the method0 B, ^) F! U( ~$ j
|