/* called by: entrance ctrl of the object 'track'6 S8 N4 W! Z# h
*/
9 E" p4 j! B( H2 T3 g$ p/ h# R( xis
9 H8 @ j5 Y' [! ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z" C' ^7 N+ _( F4 O! D: w6 Q2 sdo# {( `. `1 ]* S6 b& _) T: G
Lan := rootfolder.Internal.Tools.AOLlanguage;
# B3 L1 C L+ s9 L5 q if current = @.Destination -- else return
' j l% \2 m+ A1 t0 J then
( ], ]6 [; {# y; }0 g @.Destination := void;
/ H# d& J* k I | if @.occupied then0 ~, @7 D. D$ i0 r/ O! D
part := @.cont;
2 G+ N0 Y% [" B% ~/ n @.transpOrder := void;
" v! i6 n* x. r# D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. p+ |3 K$ Z$ ]) q2 F @,root.eventcontroller.simTime);+ ]( U( D' \# R; y* F" F; u# R' e- d& i
@.HasOrder := false;
. U5 l$ k, V2 j% r' J7 [$ _ @.DrivingHome := true;8 [# I1 V4 J* \0 ^# f
rgManager.tryToStartTransOrder;2 M% B# b6 Z( P: C* H" c6 b
if @.Destination = void4 B& Y( T' u t$ ]
then -- no transport order for vehicle @
7 R& y1 q# Y3 } @.Destination := k7 x# `; I8 e6 A" Z$ p$ @! Y+ L
rgManager.nearestFreeStation(@,track.~);
4 v+ k3 V7 _7 Z- N" C6 y/ ` newDirection(@);
5 {' h, H! X; f- D if @.Destination /= void then3 [' Y! `; b: I' |) X
@.Destination.NumReservation :=" [5 ]/ q: J7 i1 K9 f3 \: {; S
@.Destination.NumReservation + 1;; I& Q% G' E! w+ T. B! w
end;
' z! g% k5 |, Q @.CurrIcon := "drivingHome";# j7 w4 x% w8 e
@.DrivingHome := true;1 s$ ?, ^6 `) x0 n$ m
end;
/ M$ c ]% F s* a! P else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 W3 u$ @0 q+ E3 T6 q# k
part := @.transpOrder;- P3 w9 ?8 h# Y. `2 f4 ?/ m$ @8 i
part.move(@);-- load part
9 Y3 d; P x' ~$ y @.CurrIcon := "load";0 k& i( n: G/ G( x
GlobalDistObj := part.globDestination;
9 A6 D' P" Y$ O! X) C) R% D assignLObj := rgmanager.rgAssignL;
" ]9 {0 b1 T* a row := assignLObj.getRowNo(GlobalDistObj);' p- ~. [, F/ q, }7 E+ f
if Row = -1 then -- since 70
0 H# r+ ?8 w% w5 `& v if lan=1 then
" P/ W- E# v/ I7 M7 x& y9 j) Z& J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 ?, s* x+ ^4 ^5 e/ A2 A to_str("in der Andockstation: \"",?.~.name,"\""));
2 O2 [5 q! R/ Z U0 \ else! A5 X; U: s' n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" n, V M* o$ b5 J l to_str("in docking station: \"",?.~.name,"\""));
4 u/ W1 X) N$ H( u" [2 b. Z; r, p2 I end;
b8 ]$ \0 ^! d3 [1 T, T" |7 W else5 ` ]# \/ b. O
@.Destination := assignLObj[1,row];' O1 x8 M. t- ^8 L4 {; Q
end;
7 Q* Y8 N& j; [9 R newDirection(@);: ~& X1 b; [9 f4 c, w
@.HasOrder := true;
) C, z2 _4 c/ V r. `3 m( @( M end;
0 t+ y& D9 c3 ?9 F9 u; y5 k5 B end;
4 m/ r* c% \. G oend; -- of the method1 Q6 _1 M9 W# V" Q" Z3 [9 [
|