/* called by: entrance ctrl of the object 'track'
o6 Q" S- z8 ^. \*/
# _: T$ P3 E* P6 t" U+ q; c8 kis
, A0 i* n) Z1 g. B. [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
X9 P' k: K/ T- hdo5 D l& B5 t. Q9 Q' M3 N
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 A$ u( ^/ G( s( O, X if current = @.Destination -- else return+ Y$ V1 H M- q3 ~
then
& i- E+ i5 F* O _0 M) L9 m @.Destination := void;
3 m, B- x G6 @. _1 x. x4 ]8 S2 u# R if @.occupied then# {$ V8 B# M' \8 R: B
part := @.cont;
/ T+ f8 S q2 f& ^ @.transpOrder := void;' l+ i2 T( [6 i: j: Q( h- h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' y: ^1 w5 I: T' i, u @,root.eventcontroller.simTime);
) B3 z% g& @/ L& M4 L6 D, N1 H/ ~/ r5 x @.HasOrder := false;
, p- Q7 c" S, c8 t% } @.DrivingHome := true;/ [' L6 P9 S! n( ~
rgManager.tryToStartTransOrder;
6 [7 u% G0 D. } if @.Destination = void
% o& [& X/ i0 P" _+ _9 m: M% C then -- no transport order for vehicle @" e ?) U9 J; O9 v/ m
@.Destination := U; u* ^! s4 Y6 [6 V& M
rgManager.nearestFreeStation(@,track.~);4 {+ C6 N: G! h O* N
newDirection(@); 9 \+ N5 h+ j9 \/ H9 R* p
if @.Destination /= void then( \7 g% C4 w5 ?( L% _2 d( ?9 U
@.Destination.NumReservation :=% q6 y, Y2 j( E' z6 }" l
@.Destination.NumReservation + 1;/ x" |$ I/ ]4 |5 |" b S
end;
6 f8 b! M; V+ R9 ? @.CurrIcon := "drivingHome";# N6 v- \) `- B
@.DrivingHome := true;
( n6 u2 w, }$ H2 U, j5 ~( @6 H( B end;6 g2 i. m1 G3 O. h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ p$ c( b1 t4 L+ k6 k/ S( I% k% ] part := @.transpOrder;8 d& J. S1 _9 E$ w2 N
part.move(@);-- load part3 z; A+ [) P% z% G
@.CurrIcon := "load";
/ m& X6 W' B* u1 S0 V4 x; Q/ B6 V GlobalDistObj := part.globDestination;$ _/ J% H- K5 Y* m2 n. ~
assignLObj := rgmanager.rgAssignL;
; M6 W7 l& y; H6 Y# o row := assignLObj.getRowNo(GlobalDistObj);: m6 L7 N2 c$ v) G5 h
if Row = -1 then -- since 70# T8 I8 s0 {# `& v3 h+ x
if lan=1 then
- w; ^# P2 M5 m$ l( M6 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ X m# r" M3 a% L+ l2 k to_str("in der Andockstation: \"",?.~.name,"\""));; t. c" q) e( K3 H9 }
else5 X+ x6 d4 V$ F* g5 T& W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# [: x: B/ T% ]8 Z* L to_str("in docking station: \"",?.~.name,"\""));
8 Q5 o4 V" b# T1 p' l( k$ A& r6 ? end;
7 `( R/ u8 E, H3 R1 l8 L) C else- s# F" h: ~ C" ]4 V3 S" Z
@.Destination := assignLObj[1,row];
; j& f- z- q0 y8 C. X- Q6 D. W" G+ v# D end;
" C7 }* j3 s# y6 U7 x9 p; c7 A newDirection(@);: G' n1 B& ^6 L, K" L
@.HasOrder := true;
5 {) o3 G! l ?4 }3 E end;
w3 q1 R0 _# Q. t* I/ r w; o, \ end;
) e8 b* V1 q% I( ?0 B9 l, Uend; -- of the method2 O- f( S% Y6 E
|