/* called by: entrance ctrl of the object 'track'
j) {2 D; O- k# s*/2 d$ E" `$ L( C, u5 k$ z( i
is& ~! J/ I5 {5 t) `3 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 W1 b9 V" s5 z3 V1 J8 Ado% S) t4 K$ M, p% z) Z3 B
Lan := rootfolder.Internal.Tools.AOLlanguage;: c, \/ n/ Y) b
if current = @.Destination -- else return6 E/ {+ q! ~$ [& z9 A
then
- _- F, g' A) ?1 G @.Destination := void;* l: q X, @3 u9 y v5 i4 j
if @.occupied then
8 u' S5 }( |; s/ y- h6 P part := @.cont;- ?5 |$ |8 ?- e" H/ c
@.transpOrder := void; K) |8 F, s3 A& p1 E$ A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* Z& s$ X: u- l( R @,root.eventcontroller.simTime);5 T# @3 E+ I+ [% m/ d1 W+ n; Y
@.HasOrder := false;, K4 G" ]7 C6 T E
@.DrivingHome := true;
) A9 H: O8 b9 v7 `7 x rgManager.tryToStartTransOrder;: L5 y6 a2 P0 K5 i- j( n
if @.Destination = void3 W3 r1 Y. \6 O) c: v
then -- no transport order for vehicle @4 S) |& o; W+ S" B1 B: l2 w
@.Destination :=
+ o1 d: h' q* Z! E rgManager.nearestFreeStation(@,track.~);
5 K& S2 n# @9 Y- s newDirection(@);
1 _1 U7 E- T: Q( S8 E0 K if @.Destination /= void then
$ u4 f9 b$ ]( M% d6 [. Z3 { @.Destination.NumReservation :=
! A4 X* k6 i- R @.Destination.NumReservation + 1;1 k& [. s8 T+ v' `' f" M
end;
& N1 |! }! V7 W/ b) ~$ q @.CurrIcon := "drivingHome";
. H& r/ v" a A @.DrivingHome := true;
6 n% `6 n3 Z9 T, r' w$ F) }& J# B end;) C* n# w( H3 K" r& s% ^$ ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
b* n5 e/ q6 G! v/ C3 n& d part := @.transpOrder;6 L$ r! t5 O F* b$ ^
part.move(@);-- load part
7 J- w, \6 ^! O G @.CurrIcon := "load";
7 B3 [/ L3 t- x4 O1 d GlobalDistObj := part.globDestination;, v3 S; W% ^* t E; }6 Q
assignLObj := rgmanager.rgAssignL;2 N0 H/ s3 N+ g' p, U1 u
row := assignLObj.getRowNo(GlobalDistObj);- |0 j6 g6 n4 d. i
if Row = -1 then -- since 70+ P ^( H9 L6 C0 s/ H
if lan=1 then! h3 f. X7 Y W" J2 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% F/ y% v& T9 s4 `
to_str("in der Andockstation: \"",?.~.name,"\""));
- h/ P( R1 B$ v$ g/ q0 F else) y. d7 k: M- S, z, Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ P$ s5 X+ {1 b. t6 u& M" {' f
to_str("in docking station: \"",?.~.name,"\"")); ' i8 \& U! i" f
end;+ L1 t1 k i: }
else
5 a$ P& p4 B# w4 ?$ k @.Destination := assignLObj[1,row];1 W3 j$ [1 k9 X/ P T
end;
5 A# {3 F# [7 `8 C newDirection(@);
' S0 E! w- Q! ~ @.HasOrder := true;
% J) c" q) W) V- Y+ I end;: b( F8 k3 M ^0 O
end;/ g9 ^. h/ o) D3 ]% X* r& Z/ B
end; -- of the method2 i. p: K) S+ w, f( V* Q# C& Z
|