/* called by: entrance ctrl of the object 'track'
" u% ^/ Y# A( _! }, g' L0 n*/+ O* O/ j# I4 ~1 M; ?2 Z" i
is5 n* } v( Z) o! {3 s1 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' ^; s0 Q2 ?( p# |' K+ i/ }) |# _8 Y
do% V! d8 C/ x2 ]3 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
. U5 E o" ^# @4 N/ d. Z if current = @.Destination -- else return: }$ j8 k1 D* E& p8 j
then4 h# ]3 v1 C9 c: b" K( z
@.Destination := void;
- a# P" E3 \4 C# Y* Y8 J! ^ if @.occupied then
9 Q2 e1 V+ X' I8 P' g part := @.cont;) M9 x) w2 T+ P: D: Q$ ^% Q
@.transpOrder := void;
1 C; y2 ^+ j) P: L" x% M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ^. N! a; A7 k0 F @,root.eventcontroller.simTime);" X; R' `0 J4 Y' X
@.HasOrder := false;4 u7 N9 h O8 }; W0 z: X8 S- R3 `
@.DrivingHome := true;
% V- ~: L- _. L/ ^% W, q rgManager.tryToStartTransOrder;
7 [8 g( ^# E4 o [$ X0 i" ` if @.Destination = void' W0 W6 h" L" }; `
then -- no transport order for vehicle @1 ^9 d& {# N1 i" a0 d# Z
@.Destination :=# K3 h6 E% D4 \" Y0 k
rgManager.nearestFreeStation(@,track.~);
% x" K) F) k. T+ ~( V8 c newDirection(@);
4 h9 C$ o: z* r* J if @.Destination /= void then+ s5 ]/ S* k! [- w
@.Destination.NumReservation :=
$ Y: ^# t9 m' W* a" Q# p @.Destination.NumReservation + 1;" I, P& x# l; W$ I: z
end;0 _/ M2 G: |" J6 S
@.CurrIcon := "drivingHome";% z1 S7 c4 m) E& b
@.DrivingHome := true;
0 q1 ?! `, ?2 o7 _; k8 X* z) `% o end;- ^& L( L" x0 p0 d0 h2 q. z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 U2 u4 h: J" p! h$ @* Z- W1 m
part := @.transpOrder;2 X. z. O2 s, i) _1 M% w" `
part.move(@);-- load part! q+ z" J; P- m$ _4 @, n, K; D9 f
@.CurrIcon := "load";& u& O4 \# Y, C' P& G
GlobalDistObj := part.globDestination;
& R7 w: u" k5 Q* P0 j- x assignLObj := rgmanager.rgAssignL;/ u9 c" W# ?$ G/ ?( v7 q) p' c4 _
row := assignLObj.getRowNo(GlobalDistObj);
9 e, _4 |& a! Z/ F if Row = -1 then -- since 70 Q' l& \* k$ W; I/ E3 E
if lan=1 then2 l- j# A3 x$ S% j. B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ K |% u" K; T' _: g to_str("in der Andockstation: \"",?.~.name,"\""));8 H: X3 x; j2 B( l; p
else
0 @, r5 i/ C8 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) k1 p/ z. w& U% P to_str("in docking station: \"",?.~.name,"\"")); ' B' y& A( R) _. N9 k4 p
end;
0 g4 L* z9 ]6 V else
& w9 H, J ]! S; i, C, h @.Destination := assignLObj[1,row];6 g5 d' E' |1 l' V/ `8 C
end; 3 S) A( X& M1 {0 a1 z. D* l& V
newDirection(@);! `7 f- y) x" C9 D* z( R
@.HasOrder := true;
* o% |0 y& Z5 U8 q2 J end;" j4 C* k( W! o+ }
end;
( L6 h+ t! Z' \end; -- of the method
$ J% r) b# d h3 w3 J |