/* called by: entrance ctrl of the object 'track'
: r$ Y5 ^5 u3 w) }*/
0 X9 z6 O2 r4 D) y) ]. I5 ]9 Tis
9 k$ t, G& Q9 W2 x7 ~$ }% w& r! g part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 E! Q' i/ ]( g& d) m( L0 l
do% [( q8 ?) D4 A/ t6 E) s
Lan := rootfolder.Internal.Tools.AOLlanguage;/ n3 M9 U9 r R# \. ?
if current = @.Destination -- else return
" I' Y3 m( l, E- v then3 K5 P6 o% d9 e1 l' U# ]5 ~& K
@.Destination := void;
$ j4 e/ s: ^& u5 C if @.occupied then
}" h, X: ~: u6 ?: F# A7 e part := @.cont;) I& [* V+ Q4 j6 G/ q
@.transpOrder := void;
/ [; L& J+ U9 ]- G; L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. a, v) z( n" n3 z @,root.eventcontroller.simTime);: s- e1 M. z6 ]$ Z) a, D
@.HasOrder := false;; b$ ^7 N. z. l! B- p
@.DrivingHome := true;
+ ?. \& A5 Y' h' I7 C# p, Z rgManager.tryToStartTransOrder;" F) L0 _0 A* w& |3 U" ^2 E
if @.Destination = void
b0 y/ K; d$ _. a2 D/ z$ X0 ] then -- no transport order for vehicle @
& w3 w# l/ g9 M) v. U @.Destination := Q$ y+ h! M6 p
rgManager.nearestFreeStation(@,track.~);0 T" N2 X4 O* l* G
newDirection(@); 3 D. r7 B3 @& h4 Y' @
if @.Destination /= void then
$ }+ O2 R, j! f' F$ \ @.Destination.NumReservation :=
0 H0 T. w% W! K8 y0 z @.Destination.NumReservation + 1;
. Y# C9 }4 b5 F- s( C! J end;
3 r' i. l' Z5 v @.CurrIcon := "drivingHome";: I5 F) R+ d5 d& I
@.DrivingHome := true;, q& R8 k# x$ ?/ O# q
end;
( K _" l* D; u6 _3 M3 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 S. E& z/ v0 g
part := @.transpOrder;
7 E- v, y! Q% Z, ?" _; s$ c! E part.move(@);-- load part2 ?7 r0 \" ^. i. f3 H
@.CurrIcon := "load";
. g- [. I$ t+ ]5 C- S/ p GlobalDistObj := part.globDestination;, |3 M, \1 X8 X
assignLObj := rgmanager.rgAssignL;5 [8 u3 }* \ ]
row := assignLObj.getRowNo(GlobalDistObj);
/ r: V3 Q7 L. o: o f8 [3 S9 W if Row = -1 then -- since 70
& K. m( c8 V4 z9 Q3 a4 z if lan=1 then
/ X3 d+ j9 V4 }, C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# v, |# I! Y4 _. f+ H) v
to_str("in der Andockstation: \"",?.~.name,"\""));
2 L3 X; c& p( X s/ q else
0 W/ ?" M. q* N9 q5 l% ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 X5 R3 n1 a" l2 i2 b5 P
to_str("in docking station: \"",?.~.name,"\""));
0 T' i$ \' A& ^' {; m8 k( l5 s, D end;# E0 w7 d; V0 k, S) i1 B
else
9 P3 U% B8 D$ |+ p @.Destination := assignLObj[1,row];
+ M& ~5 b/ u; A/ b" s end; ( e2 h- Y, R+ H( r! G& ^: j+ V' A$ B% v
newDirection(@);/ I' y" {/ S& y+ |1 c
@.HasOrder := true;
. t* B1 D9 M/ t& M L! C/ f end;
+ b; I, p, L% p9 ?) C3 o end;8 P- c* S; r& o# V0 S, d8 j
end; -- of the method' n# p& V" t& t/ x; T
|