/* called by: entrance ctrl of the object 'track'
- t- e* y6 w) o5 n3 C*/3 f6 f) _3 \" s! ~4 h
is$ X h3 {) ?, v k) n" I6 O3 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ D2 l7 A8 o q: \$ Gdo
3 d3 F' [8 j) L Z0 R- | Lan := rootfolder.Internal.Tools.AOLlanguage;. q v3 s/ B; k H# ? v! i; c( D
if current = @.Destination -- else return; P, Q( d- R' r6 S/ m
then: S }' l M/ q% z e& H
@.Destination := void;
4 U2 u r0 G: w if @.occupied then
* D: s/ [; V9 Y# W part := @.cont;' p0 d) X) z1 [( Z( B2 U- x, V& C
@.transpOrder := void;
2 ~) k* g$ J! _: B2 a1 e* v' a$ h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- `- x, R' K% L @,root.eventcontroller.simTime);8 F0 G) x+ H% {$ N. _
@.HasOrder := false;
4 b% f R- T0 p, y6 s4 t6 u @.DrivingHome := true;8 `+ H- s% m" e8 X) O( o. R" G9 N3 @
rgManager.tryToStartTransOrder;
, ?1 {/ r$ |, D. t$ {3 @ if @.Destination = void: l9 X( x5 ?, n- I( c9 f* K$ B+ C
then -- no transport order for vehicle @- R8 B' s! L4 R1 u6 G4 E7 H( Y" k
@.Destination :=# b" D+ b2 p% n6 Y8 M
rgManager.nearestFreeStation(@,track.~);
2 j- h c* ^$ f6 Q# M2 o newDirection(@);
. X* l+ E, i) @! U- t: h" v if @.Destination /= void then; ]9 P, a w7 q! G9 s# K
@.Destination.NumReservation :=
: z( |/ U$ a) Q8 c @.Destination.NumReservation + 1;
. ?: {7 R* `# { end;4 r3 [- m% L7 D; a
@.CurrIcon := "drivingHome";2 ]( L- ~/ R6 k2 i1 a
@.DrivingHome := true;" x! t" c3 o6 V, ~' h" i
end;
* c. Y/ \6 d/ `5 n+ \4 G7 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 \& o7 H) Q# G+ n: n/ ^5 x! M part := @.transpOrder;) p3 e4 A' ]6 m4 ]
part.move(@);-- load part
. o) @8 W p9 g& f1 G! M, d @.CurrIcon := "load";
! B# I4 g& M$ q* v/ M2 X+ t GlobalDistObj := part.globDestination;" N# t* P3 H* F3 p
assignLObj := rgmanager.rgAssignL;
$ H% r; w1 U$ L: g' _ row := assignLObj.getRowNo(GlobalDistObj);
* }8 I- \; _# b: `! D6 \( I0 v: h if Row = -1 then -- since 70
3 y6 M( D6 L4 v& `& Z E# ? if lan=1 then6 Z3 t% R$ S' y+ A3 p+ a; Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 k$ S& K% k& V# R1 K
to_str("in der Andockstation: \"",?.~.name,"\""));
% k6 v9 w3 s, I; U5 Y; b' q) h' H else
9 O* B( Q4 f+ B5 P/ p9 v( A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n2 _6 C8 w& r6 c- l to_str("in docking station: \"",?.~.name,"\""));
: v3 z% F C) q6 S( n3 d+ k end;
! i% P. b$ X1 h" z5 q! t else
* ~( `) V/ T R& ?: h @.Destination := assignLObj[1,row];
) Y- _8 _9 i% Y( |* _* w% q6 [ end;
/ C$ L B, I( }5 f; y# M) L* ` newDirection(@);- Y% C0 k# j3 d% U# L
@.HasOrder := true;1 w7 r, u8 E% A/ s3 u# [3 o
end;
& I9 Y H2 e% Z/ R- k: [ end;
+ A* \; z! f+ _! Xend; -- of the method
/ A6 t& A _! [8 i |