/* called by: entrance ctrl of the object 'track'
! B( ? m/ [4 {% p9 h' E*/. w3 N% b+ p& F( h+ ^
is
) J& N$ ^% _- T" I& c" J8 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 j3 j) h* R. J
do% i2 @! s, P- f- M5 A2 G
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 ^" S. Z6 ?$ o6 J* A1 D6 U if current = @.Destination -- else return
5 u# w3 f, R7 |0 T- `- ? then
+ X5 E% Z( Z0 O$ g* M @.Destination := void;; H, L( u [8 a: E! V4 l
if @.occupied then
9 m3 L3 I. a5 U/ G7 Y/ E# D3 i part := @.cont;
# H) E2 l- Z8 }+ t; W @.transpOrder := void; r) z P9 Y; P' @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 Y" e- b: W8 z6 X& Z- J! Q
@,root.eventcontroller.simTime);
' v5 F$ n4 w3 ^/ h# V @.HasOrder := false;% n# A2 K5 P9 y/ T
@.DrivingHome := true;
8 l& [5 C' Y$ i- [ rgManager.tryToStartTransOrder;
! Y- T3 T6 ?3 U2 {0 T9 d0 P9 g0 N- V if @.Destination = void2 h) {9 p+ y$ F4 J- |
then -- no transport order for vehicle @
* W! i2 t; d+ \. m$ f C2 w @.Destination :=
; R) B5 c$ E% K( x; S$ ^' Y( y rgManager.nearestFreeStation(@,track.~);4 K4 R- K" t9 a5 g$ \- l
newDirection(@); 2 `% d/ X5 r6 v
if @.Destination /= void then& f1 Q, F& o: y5 u: [) W9 A
@.Destination.NumReservation :=% e. N0 j* }# x( f" g
@.Destination.NumReservation + 1;- ]2 R' [, O( i
end;: q6 r1 M& P$ k
@.CurrIcon := "drivingHome";8 P$ X. l8 x( i, p1 V
@.DrivingHome := true;
7 {9 m0 j6 Z6 q4 n; ]* H( A end;
8 R2 w% J+ K. b. X. L7 n$ _' g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ P" A/ S4 A, L N9 t8 ~ part := @.transpOrder;
7 q6 X) K! B8 P7 [# A part.move(@);-- load part* t% H2 Q+ P; L* h3 q
@.CurrIcon := "load";# r& n. ], h8 g0 a6 F$ U) ~( [ v7 W
GlobalDistObj := part.globDestination;$ E" e. y* }0 Z/ X
assignLObj := rgmanager.rgAssignL;
* e6 f1 v( N" Z8 m% d3 _ row := assignLObj.getRowNo(GlobalDistObj);/ z: A; F. {9 Z
if Row = -1 then -- since 70
4 x0 @" o9 n3 E7 A4 r C if lan=1 then
' `, \6 { e# N3 E: C& g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ] V$ u. c" X1 Q: m
to_str("in der Andockstation: \"",?.~.name,"\""));: _" Y$ ~) C+ E( w" a6 k5 n8 v' N$ J
else
: K3 p8 b) t9 Z; W) s( b6 K% s/ Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: H3 R& h& a, l; O+ P7 B to_str("in docking station: \"",?.~.name,"\"")); 0 B4 x% a; b7 C$ r9 j$ `# q( X
end;
$ {. X2 H$ n3 F+ c' a H, e else
" @ _; a0 l6 |7 @2 e7 ~/ h @.Destination := assignLObj[1,row];
9 v7 X5 p2 Z; L( m. |2 \, D end;
* U: \ V1 j% Q% c4 f% r newDirection(@);% W6 `/ V, v0 l2 v
@.HasOrder := true;
! \) F$ G6 E9 K/ ^* G- ?2 }3 C end;! s2 j/ ~* Q! Q/ j8 k3 G
end;
5 h c! E3 L5 rend; -- of the method
" L# ^$ @) |- {' |1 ~' a) B |