/* called by: entrance ctrl of the object 'track'
* W/ O( u; B( x5 `* O*/
7 A2 C; a* \+ g4 |" X# j+ A# Wis( l+ B( L. U4 D; q" U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 p! l. e) T$ Y \! T* a% K/ C. vdo! P! H7 X& _3 u
Lan := rootfolder.Internal.Tools.AOLlanguage;3 W/ z) M: D' M' A5 d7 N2 ?
if current = @.Destination -- else return
# P' z* M0 g( U9 T& p then7 ^0 }( x% f$ j
@.Destination := void;
& m+ \" M5 n/ d& G6 U if @.occupied then
* W* m8 B# K% G) d* @, T part := @.cont;
8 _5 K& y; S6 O* Z0 P* K @.transpOrder := void;
7 I( `. d: j+ p$ B' n' h1 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 Q& g. n' b2 s8 w
@,root.eventcontroller.simTime);5 l. x# ~; G: s7 Y- I0 l
@.HasOrder := false;4 K- n; }+ W0 k" ^8 s7 D. ]
@.DrivingHome := true;
9 _ K" Z Z2 \7 B rgManager.tryToStartTransOrder;
% r! d6 h) j+ J k: r: g$ n% i | if @.Destination = void
W+ C+ ?" [& \ C N! @2 m then -- no transport order for vehicle @) `: ]6 z, k( j! {
@.Destination :=
# D. N3 `5 g$ ?+ Q" I rgManager.nearestFreeStation(@,track.~);1 t* V5 e5 k k( q1 F
newDirection(@);
& N3 Q ?6 |/ N" K2 q" `8 y if @.Destination /= void then
" Z$ Z% S% Q, H: R2 }1 y @.Destination.NumReservation :=1 Q& [+ u% `& d5 t" @3 C
@.Destination.NumReservation + 1;, e3 f" b5 R; S. z# H( {5 u. ]% g+ I
end;
: A- F4 R- q- L( u1 e# I* w @.CurrIcon := "drivingHome";
9 {) E" R& ]% p! v, [$ v7 n @.DrivingHome := true;
/ \) g( f' F3 v _2 H5 H$ l1 p" W end;
0 [" l4 h) j& \; I5 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station' Y: ^. u1 o4 y6 \9 b4 ] z0 k- @
part := @.transpOrder;
: s9 B1 f: a# K9 ?5 s1 I; |* U part.move(@);-- load part C7 h+ {# ]! y9 d; {. u8 K
@.CurrIcon := "load";, k; w- ~7 l5 F8 Z: C
GlobalDistObj := part.globDestination;
+ v* `# R$ ~9 p6 i2 N+ t assignLObj := rgmanager.rgAssignL;
' z5 W/ m4 R* I0 i3 n0 A" c row := assignLObj.getRowNo(GlobalDistObj);" Z* S. l) O8 h
if Row = -1 then -- since 70
6 e i5 [0 z2 Z r8 i: ?7 s if lan=1 then
, O8 v' A u7 F! r# l$ T& m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) Y4 k) W- Z, l+ A to_str("in der Andockstation: \"",?.~.name,"\""));
( T* H/ s% I M4 d; R else( |2 ^: }; J( }5 X% V8 x+ W" e9 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 K$ k( ?# P2 z, U" h/ Z
to_str("in docking station: \"",?.~.name,"\""));
8 i" r% K% s2 `" m8 z; `; K end;
5 I, Q: @2 C4 U5 O% n else
. i6 f/ C# v8 d$ X- h0 q @.Destination := assignLObj[1,row];
! s0 B! N7 w( x0 x6 q8 F end;
& o& C: Z$ W2 }; X+ P newDirection(@);1 X9 _8 S. ?" S8 ?. u7 h. o
@.HasOrder := true;8 r2 F# i+ O3 \- b+ @2 L+ M
end;
1 J ]& c5 B1 w! V! q2 y end;
" u& Z2 l! ~& T% I4 _0 U: I" aend; -- of the method- K9 k) r- w$ w
|