/* called by: entrance ctrl of the object 'track'5 X6 y1 | p" p
*/: V& j- E% [" _3 \
is
) g" M7 C2 v: T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* x0 a- G) C4 B ~2 m4 Tdo* h7 a5 s8 y* c+ D* s7 e; ^& x& u! q
Lan := rootfolder.Internal.Tools.AOLlanguage;
& W* g: @% W" i& F. j$ w4 Z" `/ O if current = @.Destination -- else return
0 G% J; h6 G) I; P. w0 ~8 J then4 J8 @0 d3 C) ~- B3 ?
@.Destination := void;/ G6 M) K3 D( B
if @.occupied then
& c' G2 e5 p. Z; C+ u- w part := @.cont;
) w; s+ {( n) {2 W @.transpOrder := void;
! t8 |7 k7 d$ T9 a3 ` a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! G w i- s1 _7 e8 G6 r+ T
@,root.eventcontroller.simTime);' e. ]4 z% [$ y+ ]* z$ H
@.HasOrder := false;/ Q F2 A! r5 o: a; W, M
@.DrivingHome := true;" [( T8 o. S1 o0 X: k( u
rgManager.tryToStartTransOrder;' s X" k! M% ?. R% @* m
if @.Destination = void
7 Y$ D. @. K# g$ \ then -- no transport order for vehicle @
6 A8 Q; Y3 D n0 _: B+ {+ R/ N @.Destination :=! B* p2 O/ p! S1 k; @) P9 |8 @
rgManager.nearestFreeStation(@,track.~);; {, Z3 j) @& k4 L3 v6 n
newDirection(@);
+ \1 A* r8 m1 p if @.Destination /= void then
) y ^3 ^. b' M- j3 r @.Destination.NumReservation :=6 B u8 [$ B" ~. r
@.Destination.NumReservation + 1;: y4 }. A }, e$ R# s; z9 @
end;7 O5 l @7 T" K
@.CurrIcon := "drivingHome";$ c' X9 R1 A' L
@.DrivingHome := true;
, w" i5 n# E4 n2 K) a3 d end;# Q ^! Q- P0 h, o3 X3 ?) [* v' U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ P- w, o/ o' d part := @.transpOrder;4 u! b+ i" S/ ]! d0 s* W% @5 z
part.move(@);-- load part: R7 a% ~3 W+ n* e, i* J- E1 w
@.CurrIcon := "load";1 {- g+ O# {- W8 W, e
GlobalDistObj := part.globDestination;
1 G% ]1 s5 O* B, d' v assignLObj := rgmanager.rgAssignL;
2 m- b. `" H+ j) c( [ row := assignLObj.getRowNo(GlobalDistObj);3 u: m8 A; }4 o
if Row = -1 then -- since 70
/ S' r& ` D( A/ G! t, {7 L if lan=1 then# z' q7 a) t: l8 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 l9 y9 I& R2 o" l* D w. b
to_str("in der Andockstation: \"",?.~.name,"\""));
% a& ?. [3 z. {# V. X else( G% h; r" m; ~+ p% a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. D S; l3 q+ h) g
to_str("in docking station: \"",?.~.name,"\"")); 3 {. C8 p' ?% {# O! o( q
end;' T( Q) ]* m" e4 ?
else
; t# _$ s2 s" K. B @.Destination := assignLObj[1,row];0 n2 r9 r) m; O, K' Y# L0 {
end; / P( g+ |4 j& b/ }
newDirection(@);
: f$ `$ J4 j! r/ ^9 C) I @.HasOrder := true;5 a9 @2 S6 S4 n0 S
end;, T* ~* j9 c: F6 f7 [& q) i
end;
! c9 r) c+ k W$ Y# Z& Uend; -- of the method
; ~3 N. m. a7 [# i- V3 [5 } |