/* called by: entrance ctrl of the object 'track'
3 Q1 R9 e" u6 l*/+ G1 J0 K4 S/ v& W+ C
is$ E+ K9 I7 D$ V8 m% {9 |, ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 B; v9 }5 S* }- ~
do9 U" W' ]0 A4 O
Lan := rootfolder.Internal.Tools.AOLlanguage;
! x) p4 m& m: X, C if current = @.Destination -- else return
5 |7 i7 y, O6 d" w! W+ x3 G1 y then; `$ k2 w0 V9 P/ I8 R) p
@.Destination := void;
2 o2 ?' g2 ~" S5 C7 i4 W if @.occupied then c9 F6 u, a+ J" j
part := @.cont;
' A W' Q' [" |( x7 ] @.transpOrder := void;
. ~6 p" j, u$ p; M8 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 }( o$ A& u$ w- C( E @,root.eventcontroller.simTime);
) L. B0 B# H+ J: N# @ @.HasOrder := false;
( \5 M$ z9 T6 h* q R0 K @.DrivingHome := true;, t& s3 Z, o1 o" f, U: P
rgManager.tryToStartTransOrder;0 I" Z' i* j1 ?' {) X2 b- `
if @.Destination = void! f5 h2 s0 V& D" L- M# I* r
then -- no transport order for vehicle @6 ~1 x [* a( r% G) B; o
@.Destination :=* i( @1 _9 C* c: W
rgManager.nearestFreeStation(@,track.~);) J; D; h+ z4 ?2 B% _: D
newDirection(@); 1 j b0 ^- @$ z
if @.Destination /= void then
7 ^0 P- H& l( g3 b @.Destination.NumReservation :=
4 D* i2 f7 G6 o# D8 } @.Destination.NumReservation + 1;
+ z1 o1 l6 H, X! b" | end;8 @6 \( D+ m: m/ h" ^
@.CurrIcon := "drivingHome";; M5 Q- x0 m) ?, E4 a* W% {) q
@.DrivingHome := true;4 i* T* V8 B& \: N: z( S- m/ ]
end;
0 w# N8 p. {4 c& Z6 s) W& A& y else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 Q2 C3 @5 }" X8 p1 S/ B& X
part := @.transpOrder;
) Q1 p9 h( r) K Y( S- m& ] part.move(@);-- load part" x3 n" T- O( t- s x3 g* f# l
@.CurrIcon := "load";
/ q( l' W m7 i GlobalDistObj := part.globDestination;! V5 [% o+ F% \2 z$ _
assignLObj := rgmanager.rgAssignL;$ a. h4 h3 Z; B( B7 o
row := assignLObj.getRowNo(GlobalDistObj);
; S0 J/ i( Y: `/ t3 P' | if Row = -1 then -- since 709 ?% l3 [* }. _/ f* L* @
if lan=1 then
% g' A0 P1 g3 U) k9 ]3 `, w' ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: e/ c' v( R1 R. y- g to_str("in der Andockstation: \"",?.~.name,"\""));
2 ~; _( |2 F& o4 R% u$ S else2 s, W, P9 r+ g; C6 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
r( R3 o5 q: F2 o2 I to_str("in docking station: \"",?.~.name,"\""));
* g8 n. F' \4 {$ N8 l4 W end;
% d+ U+ C: y- G/ f( g else
; b: Y, U6 v, B, i* s @.Destination := assignLObj[1,row];
2 X9 u2 S3 j/ t$ X end;
" A; V& N! b8 o& F6 D0 z j9 J newDirection(@);0 ^6 N/ X2 z9 L
@.HasOrder := true;; F5 D% h- S( ~# h/ O' c
end;
- ^/ m1 `3 P7 |9 l# H2 t: i0 N5 _; Y end;. h2 X0 v- y) A8 T
end; -- of the method9 |' ^0 i0 e/ ~2 U: t
|