/* called by: entrance ctrl of the object 'track'* i( v- u( v' E0 j+ S( X
*/$ v6 q% q) h& b
is0 M( ]- Y% o, t# M* Y8 R) D* N0 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 t- q8 k6 w2 t! `) |1 P' e
do
2 s- V; n5 p9 l9 k# f; i1 K Lan := rootfolder.Internal.Tools.AOLlanguage;
& c' k5 o$ i# c$ X$ | if current = @.Destination -- else return5 I. S; \' K5 R0 t# m
then
2 u( [+ D. d* { @.Destination := void;
- O( Y1 [$ B6 E/ H/ M0 E7 }5 n if @.occupied then$ O: v" I7 m( }) K
part := @.cont;7 D+ `" ]5 }- d( o3 w
@.transpOrder := void;/ L% {- K+ k1 U7 J: q; A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& F2 i4 `* h5 b @,root.eventcontroller.simTime);3 N3 q" p/ ~+ m& L& u6 Z
@.HasOrder := false;
( P8 \3 ~9 \6 N @.DrivingHome := true;5 y, U# c1 u7 W1 M2 N0 B$ x
rgManager.tryToStartTransOrder;6 P9 |* Q- [8 @" P) R; z
if @.Destination = void' `0 m9 q( Y; y6 a: N
then -- no transport order for vehicle @
( j1 D; z* O$ q$ N. n @.Destination :=: c8 m- v# {7 t7 V2 l
rgManager.nearestFreeStation(@,track.~);- p" j9 Z- t/ b
newDirection(@); 8 S+ ?5 ~7 Z# F5 U7 a8 i/ B
if @.Destination /= void then3 R. G; t$ Y) E; r3 F4 C2 D
@.Destination.NumReservation :=( K5 m. `: a7 a
@.Destination.NumReservation + 1;8 O- j$ D4 o1 E, F
end;- C$ }/ y( ]% t+ a8 z/ q/ A9 p
@.CurrIcon := "drivingHome";, \' O ~0 {' p2 M# v) E, O
@.DrivingHome := true;
) ], ^" M1 j, k" @- m6 ?9 S end;
" I7 N( D/ V6 a3 Z9 z) k; b5 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) T& Y/ o2 J& |7 ^ part := @.transpOrder;
, o: E1 I- J6 e; b4 |# _: n part.move(@);-- load part! @" F1 U$ }7 q4 n
@.CurrIcon := "load";
2 m r/ Q) e2 S2 t0 ]3 q GlobalDistObj := part.globDestination;! u! z; D1 V; D4 s) |
assignLObj := rgmanager.rgAssignL;' p2 _' }( J6 n7 X3 t/ V! k
row := assignLObj.getRowNo(GlobalDistObj);
2 J2 a' L4 O* B if Row = -1 then -- since 706 h" [, {4 h5 a; X ?8 `. \
if lan=1 then
+ E' h6 F; T4 y# o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), y3 o2 c- l8 B( M8 e
to_str("in der Andockstation: \"",?.~.name,"\""));' V9 a6 d4 T( j* k# z7 o
else
6 o# B3 ]: u) w; W/ I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' D' X1 l( `# `# e6 g
to_str("in docking station: \"",?.~.name,"\""));
+ z4 R2 W( e2 Q6 t" ~% J3 d* X end;1 `* H" {4 e0 W
else$ p6 R8 y! o; ?( l; F, r
@.Destination := assignLObj[1,row];; R) U3 T+ a( O' h- W7 Q
end; : b1 d" J9 B- q& C$ [& ^
newDirection(@);
, S: J% K" Y" u. S( s% k, Q- h' W- x @.HasOrder := true;0 V4 i w" X9 B2 Q1 d
end;
: f @# B4 Z0 ~- T end;
/ K7 u ?4 q6 O1 r% Oend; -- of the method
! `# u# N/ F+ S |