/* called by: entrance ctrl of the object 'track'- Y1 p( {6 H* Z/ r3 N4 u& G
*/# s! C% c) F5 U+ u
is, { ?2 j l7 U) X. B0 Z0 z9 f' f& C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' w' u7 U) ]5 l+ ^6 e! c' \( D
do
1 V2 ?+ f5 X1 W D& a% { F. |3 C Lan := rootfolder.Internal.Tools.AOLlanguage;3 c6 v q/ x: m; `" e) n
if current = @.Destination -- else return, S6 Q( n* V. f) ]
then
8 e8 o& _/ K# x: D5 L* i+ u' q @.Destination := void;" Q5 [; s, {6 c% n) ~
if @.occupied then
( v: [5 P; S+ J0 U8 j1 |* d, q O part := @.cont;
- h! h4 E; L: v. h3 A @.transpOrder := void;) {5 T: X2 x$ S6 M z% i8 D y& M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( N2 f3 d; Z5 L6 G' `
@,root.eventcontroller.simTime);
7 D4 a, g& U) ^ @.HasOrder := false;$ }1 I# V: V% m( M" S; N2 u5 ]: O
@.DrivingHome := true;5 F& f" _: Z j! @* Q3 }' n2 S) C! h
rgManager.tryToStartTransOrder;
1 ?1 m; t$ c# x5 W if @.Destination = void
8 E2 k8 {9 t+ K" Z4 v! Q1 ^ then -- no transport order for vehicle @
0 @1 k' f1 D% R2 ^7 h# T. x @.Destination :=9 f/ L$ d. ~( h9 _% G
rgManager.nearestFreeStation(@,track.~);/ P: l# Q1 d: Y4 u9 w$ G' O, U9 V
newDirection(@);
5 Q X! P* ? Y$ c+ Y if @.Destination /= void then
8 a5 [$ B1 C' e: r @.Destination.NumReservation :=
: r: N( L# |* c Y0 e. S+ w @.Destination.NumReservation + 1;( X/ m/ y$ T8 W* g
end;
/ j* K# N% l, B2 ` @.CurrIcon := "drivingHome";
6 A7 ?+ a( v7 G3 F- p- } @.DrivingHome := true; t$ [" ^6 S8 p- O2 s8 ~" X0 G
end;
7 S# q% J6 C6 ~- d3 u6 A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ `7 u6 d9 f2 w S$ a/ v/ ^ part := @.transpOrder;
# a& y4 u4 y4 ~ part.move(@);-- load part
1 H% ^+ s& T+ y: h) c @.CurrIcon := "load";* Q8 s" ?5 q9 B
GlobalDistObj := part.globDestination;# c7 ~! e5 F- Q: p
assignLObj := rgmanager.rgAssignL;
' J D% T: e0 f- g1 v. B8 [7 c: W row := assignLObj.getRowNo(GlobalDistObj);
4 q5 N+ _7 `3 k _7 f$ v- v: T if Row = -1 then -- since 709 c6 p& h8 b* c. B+ ~, B
if lan=1 then$ |2 z! }; w" K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 [6 W. x" u" A" H
to_str("in der Andockstation: \"",?.~.name,"\""));9 z% p6 \6 _: l' F6 b& a" X
else
/ T0 h4 g8 z% T" ^0 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 S5 K4 f2 h7 q! E% h
to_str("in docking station: \"",?.~.name,"\"")); 8 n/ Q2 D1 W9 J" f- M7 Z. n* w
end;% b" A- g1 E, `& ~
else( V6 Y# q0 w1 W
@.Destination := assignLObj[1,row];
p e* k! E9 [ end; 5 a/ D" u0 [3 Z- w5 T0 L
newDirection(@);
3 ~) C, M* y$ W1 l2 K3 p% O @.HasOrder := true;
3 T* T: W" u7 n% w( g% X end;
; X3 v( c7 ~8 D" ~9 { end;
; s3 H+ f8 I0 q& |1 _* H. nend; -- of the method+ |* s4 E" g4 Y* O
|