/* called by: entrance ctrl of the object 'track'
5 Q" W! y$ J5 g6 m& }1 u*/
0 N, u( o! A$ P+ y, ]' Ais1 B) |7 `( n; U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 T; o8 f) ?$ U2 k' H
do
) i& E* O$ ^% C- S- e; D! Q Lan := rootfolder.Internal.Tools.AOLlanguage;
6 U2 o& d( c6 d! s# ], ]9 D# H# X if current = @.Destination -- else return
2 g( b+ @; m ], C' g( }, W then! T/ ]; b* }2 o
@.Destination := void;
+ l2 T/ O* n& c3 `. s& B p0 k if @.occupied then2 d2 u' t7 e+ q
part := @.cont;
, j& c" Z; m! k3 z7 e @.transpOrder := void;
7 A: C" l$ f# z. f8 Q5 B/ u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 ?: _5 F3 ?+ _' I/ s3 C! p @,root.eventcontroller.simTime);
- M" r: }3 L/ P! j2 g7 q' n @.HasOrder := false;
& _6 T* p# {1 K% w8 C @.DrivingHome := true;
% _' P: k( O( G: E' ]7 a0 u rgManager.tryToStartTransOrder;
6 G/ @+ ?6 m' Q7 }4 N! {" F if @.Destination = void, |8 \& p% |; L* c
then -- no transport order for vehicle @
* Q( {/ G1 J: a9 b+ A @.Destination :=
$ m1 d7 `* Z. h, I& v+ M7 X rgManager.nearestFreeStation(@,track.~);" a x, v+ P4 H. q1 T" Q, n' n1 G7 X
newDirection(@);
0 `+ D5 Q% k, Z( K7 v# w if @.Destination /= void then
- u: c2 m; K+ O# v0 A @.Destination.NumReservation :=
, m) v" ` m4 k7 c8 T3 j @.Destination.NumReservation + 1;
5 |, j! Z' p$ j/ g& a# R2 ~ end;
3 [" Y0 t, y: m* e# O @.CurrIcon := "drivingHome";
, }, y5 i1 }' @4 `6 g# C @.DrivingHome := true;
8 \, @/ A" ^; j- Z9 P0 [ end;
9 p/ c- m4 g/ T3 {% ?" v$ X! l8 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ w% g. U1 |& p" o& h part := @.transpOrder;
& y! B9 l- Y1 t" H. t8 y5 c, v part.move(@);-- load part t* n y7 l0 ], c& ]
@.CurrIcon := "load";0 M. ~! _2 ]' l# A0 |: Z" w0 D" h
GlobalDistObj := part.globDestination;8 j/ F% Y: F ^& d/ r/ g
assignLObj := rgmanager.rgAssignL;* x4 q& \& s/ {8 b0 G& x9 Z
row := assignLObj.getRowNo(GlobalDistObj);
1 U0 ]: J* J. W, G4 Q/ E& ^" P$ U if Row = -1 then -- since 70( P5 h! R. l/ y. `( }+ K2 W
if lan=1 then
9 D4 u- A# F8 T( a- Y9 [ i7 N$ X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 F- U( b: N3 H: a! G* E to_str("in der Andockstation: \"",?.~.name,"\""));$ y% B! ~9 P! x2 z
else
4 _: N! H; Y7 A9 r% Q5 n& q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 F2 s* u8 W+ `$ ~/ t) k8 ~: v to_str("in docking station: \"",?.~.name,"\"")); ; f9 [. H# p/ [# G8 l% ]7 q" q
end;# G$ M+ @3 Q5 l* Y& W \
else. _4 U8 w$ U9 i+ q: r0 _0 c
@.Destination := assignLObj[1,row];
# D* s- P3 U# @9 Y* h( P end;
6 o) ~( Z5 K* J7 c8 t1 t( m newDirection(@);- z$ m& Y8 M7 |
@.HasOrder := true;
- ]5 ? s9 j: y4 A end;7 z# O0 U$ L" d1 e
end;
$ x3 t- k2 Z1 nend; -- of the method
}$ d" j _- C) ~ |