/* called by: entrance ctrl of the object 'track'$ l8 B1 A: I5 L( Q3 l0 O
*/' A+ b; p; B- I+ a1 S1 C
is
; a6 N: L5 n* x6 A: R part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ P8 T5 Z- X2 w$ |7 l* p
do' I4 f, ^+ N, x/ K* f
Lan := rootfolder.Internal.Tools.AOLlanguage;
; @# h6 m; m3 O' Y" z4 J8 P if current = @.Destination -- else return
5 E4 s0 ^2 H7 q! ] then
/ n! n# K6 J$ v- n4 |& g0 N$ v @.Destination := void;
5 T, s% C& F# V( r if @.occupied then3 s, t: w$ x" P+ k; W. G6 h# {1 b
part := @.cont;! W) f- a1 S1 C& x" s5 d7 V+ U
@.transpOrder := void;
# B/ H2 Y( \ Q4 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) y+ Q U* J: H: F
@,root.eventcontroller.simTime);
4 D* ~9 y0 `' X# N; M* @ @.HasOrder := false;
* d8 O ?% g5 V5 V @.DrivingHome := true;
: g: m9 @4 t- f$ H5 s" G) k7 ]$ t rgManager.tryToStartTransOrder;5 A0 G6 U7 b, |+ i
if @.Destination = void% a& ?$ Y, g5 g/ [- K A
then -- no transport order for vehicle @
* s* n. T& s% E I; o7 X+ R @.Destination :=5 n7 ]0 x0 k9 ~+ V/ n
rgManager.nearestFreeStation(@,track.~);1 x$ P+ i7 q8 d; x' h
newDirection(@); 4 {# T! g# d1 [6 y8 {3 _- A/ |
if @.Destination /= void then* Z+ E& H' l3 ?! R8 y
@.Destination.NumReservation :=
9 _: H4 {! n# G: V3 D2 C; f @.Destination.NumReservation + 1;
( Z V+ h7 b; Q7 d$ v7 U/ C end;# [ Q+ i" C. A ]$ y5 T6 m5 X
@.CurrIcon := "drivingHome";
5 b/ K( D# s: m9 L% f @.DrivingHome := true;" l0 H/ Z8 n. C' O- R7 k% f8 Y
end;
4 t% Y b& L4 T' L* `+ U1 W# R else -- the vehicle @ is empty, both vehicle and part are in the same dock station- ]0 C; F2 z0 l0 O
part := @.transpOrder;
+ V% s6 d3 i: y part.move(@);-- load part5 o% a% c+ H# A; }
@.CurrIcon := "load";
" O& {+ a0 v F8 j7 R$ F GlobalDistObj := part.globDestination;( M @6 l2 d; y1 K. _5 X' p: e
assignLObj := rgmanager.rgAssignL;
) v5 X+ O* H: ]8 ?) ~ row := assignLObj.getRowNo(GlobalDistObj);5 S. n: F' o/ c/ V
if Row = -1 then -- since 700 t$ C+ t8 g5 P! m( I2 `- u1 x
if lan=1 then% i" c Z, k9 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 C1 p! ]& ]# x1 g$ Q4 E- S3 y
to_str("in der Andockstation: \"",?.~.name,"\""));+ t0 g7 J* R7 v4 }4 ?
else9 u( Q Y8 `" V( |! P7 a. M/ Q, P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) N1 ~5 A& P2 B7 |; w to_str("in docking station: \"",?.~.name,"\"")); & ~/ H m, m5 S9 e" S! {
end;
( ?/ k/ A3 r' @! t/ I else
" [2 ^4 V! w; l @.Destination := assignLObj[1,row];% y7 g9 D9 f# s+ O: ^$ P7 r6 c
end; 8 t" L) J0 Q. w+ [% ?3 O% m
newDirection(@);# N q! D1 i( v4 [' ^; g5 d9 `
@.HasOrder := true;
( |! h+ u& I8 l9 e7 F! m# D7 E end;
9 o7 L! `; y" h# l# s3 \( o end;
* O+ R$ w9 Z$ i3 bend; -- of the method) I+ @( g+ p4 A; R
|