/* called by: entrance ctrl of the object 'track'
! u- z1 D% C" v4 J1 Q; q9 E s*/0 t& ]' F/ e# B
is( W4 ~- R- J" y. w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 s. P8 Z# i. ydo4 x# W( \: J5 E, `$ N7 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 m' ]( b: h& O9 r2 R G if current = @.Destination -- else return
! _" I2 X- D6 _9 R/ s; r then
; o5 a& k3 M2 | @.Destination := void;( H/ |" r. U) V% z+ a- _4 I
if @.occupied then0 ^# h# c" }; m
part := @.cont;0 [" L9 C2 w* C+ e7 ?$ e) @$ R v
@.transpOrder := void;
6 a, g: }7 X( e- d, u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' K% `$ @ J& e" K5 P# F* V
@,root.eventcontroller.simTime);8 |2 p8 F8 M; p# C
@.HasOrder := false;& ]" i* l9 J6 a% r
@.DrivingHome := true;
- h4 `6 l; x; n; K% Z6 u: X/ y rgManager.tryToStartTransOrder;6 E" _9 U1 x8 u) j
if @.Destination = void5 O* a* u0 x' V+ m- V
then -- no transport order for vehicle @0 e6 A& h- }6 e
@.Destination :=8 G# w) g2 A7 f! L3 U! h; s" _3 m
rgManager.nearestFreeStation(@,track.~);
# G2 |4 \( g# k newDirection(@);
& Q: B* A. s& G if @.Destination /= void then
2 C) i' O$ y W$ J @.Destination.NumReservation :=& e" p$ j+ I' o- c- [' U: h
@.Destination.NumReservation + 1;
9 ^; V* J) c6 ~4 ?: q end;
" X$ k9 \- X8 C @.CurrIcon := "drivingHome";0 d6 J2 n" k& w5 Y
@.DrivingHome := true;
( V, e5 B- K0 |* q3 O V' w, h; \ end;" W! [6 j' g4 X9 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 b* H5 N1 [, R6 M# T4 Y' m) R# c8 I
part := @.transpOrder;& s$ l! |4 I3 s: R; p
part.move(@);-- load part
9 y+ ?. t6 \2 I, m% m8 {: T @.CurrIcon := "load";
6 k0 I$ [. ~8 S: P7 Q7 {. _ GlobalDistObj := part.globDestination;8 a2 \+ l' a: ~1 F
assignLObj := rgmanager.rgAssignL;( ?8 f, I, q0 r d/ x8 @' M# B
row := assignLObj.getRowNo(GlobalDistObj);
0 D. N& E$ |" B' `$ X if Row = -1 then -- since 701 o- r$ H. k' P+ E, V
if lan=1 then y" I- w, m/ |* G* h4 j2 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# x* }+ C) c0 V6 D
to_str("in der Andockstation: \"",?.~.name,"\""));+ v! M# c4 u0 j* p5 p' M
else! ?4 X0 Q( U) x& P! a& X# {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 O4 }) r# M; D( u3 T
to_str("in docking station: \"",?.~.name,"\"")); 1 I: |$ q0 W6 k- D3 a6 _3 [
end;! a) H$ s" E* n1 ^
else
; s2 i9 F" m5 [ l @.Destination := assignLObj[1,row];$ ~+ F$ D4 p. b* v7 {" e/ I& e
end; ) m: T2 s2 p4 X3 R+ P, ]
newDirection(@);
0 G! ]* K% @. L) \8 p; Y# F @.HasOrder := true;* l6 I) K7 ` `( r% T. D/ b9 z
end;
. h0 X' T5 I [ end;
9 m0 e7 |9 E# ?$ g5 u8 R. jend; -- of the method
* P# c: U) S! C |