/* called by: entrance ctrl of the object 'track'
r0 b; q9 R2 y*/
# S1 z1 r0 f4 }* k: J( Zis
( c0 N: t* ^7 _ K* u" S- k. q# G( j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) `1 x: \8 B5 J9 T* odo
; ^+ z5 [4 i! q4 J6 w7 O Lan := rootfolder.Internal.Tools.AOLlanguage;$ R- I Y- h( B: b' ?" O2 C2 e* k1 |
if current = @.Destination -- else return/ @/ s: m. U; n% j$ B& M
then
0 x" Y4 p: F1 F @.Destination := void; N- c9 W$ x, o+ R
if @.occupied then
6 I; R5 D" q ?; C; Z; D/ q) A part := @.cont;
& t% V' v* H+ ^) v @.transpOrder := void;8 \3 B! F' g4 N/ D* {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" O% ]% p) e; d/ V! q @,root.eventcontroller.simTime);. W$ ~( _5 s) I$ \ Z4 X4 |; M
@.HasOrder := false; A3 C* o" }4 K1 }1 B2 V, J
@.DrivingHome := true;
# l' y' _7 E* {) i rgManager.tryToStartTransOrder;
& F6 J# @1 {+ N, |, i if @.Destination = void
+ |* I1 @, D( c2 T then -- no transport order for vehicle @0 A6 @2 a1 h7 ^. _# Z4 u
@.Destination :=
9 M1 N$ I* }" F6 |8 L rgManager.nearestFreeStation(@,track.~);: s$ `6 C( q6 ?# Z, ~" ?$ [
newDirection(@);
' C* e5 H$ s3 r7 ^ if @.Destination /= void then
7 s% {; U: j8 N @.Destination.NumReservation :=
2 P9 J [! Z# Z# \. {+ d @.Destination.NumReservation + 1;
0 v7 g' z+ U# t; @, l end;) J3 W3 E! _# \3 g9 U
@.CurrIcon := "drivingHome";8 B! z3 o+ I# I$ W3 L4 D
@.DrivingHome := true;4 Z2 I9 S" O" \: ^9 W2 l
end;
; l! c% Q. i0 Z1 n8 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 P# |/ K/ I/ c3 q part := @.transpOrder;$ |) a, b3 j2 t
part.move(@);-- load part
4 H# ~/ F3 f1 f& g* b6 i6 d8 w+ ?, } @.CurrIcon := "load";; V; ?( t0 j2 }/ g+ Q" I
GlobalDistObj := part.globDestination;) E$ n" m! }, F* o4 ?+ @1 A) Y
assignLObj := rgmanager.rgAssignL;
$ @% S$ t) y! A8 L row := assignLObj.getRowNo(GlobalDistObj);
3 _ o E; v B; x if Row = -1 then -- since 70! V" Y+ _* q0 [
if lan=1 then
$ }- h% e" @0 o* A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," s( b* C8 ]: c5 R6 p7 z) f% J
to_str("in der Andockstation: \"",?.~.name,"\""));+ A1 g' A% P7 ^/ P. `2 K9 B
else7 e6 n: W9 z7 G* S$ K# f E. J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ]" ~ L2 i9 k$ A* c g
to_str("in docking station: \"",?.~.name,"\"")); : ~5 U# f; y: j! i% D
end;
" N1 i. i0 n; u% e else$ q: Z! \- K/ n: d2 B* K! c
@.Destination := assignLObj[1,row];
. M, t0 x( {1 K4 f% i. h5 _ end; 7 Y, R2 U; T7 `. D; Q" w7 @& J5 k1 m
newDirection(@);
5 l4 g$ N2 O" z0 \/ p @.HasOrder := true;
# J8 y, c/ k2 x, w6 F+ S2 Q/ b end;
I" k+ k* h# R7 F( f end;! ^8 L. C- t: c% x
end; -- of the method
, h% K. g: H b4 U& m" A. s/ |4 c* ` |