/* called by: entrance ctrl of the object 'track'
: R4 T3 ^% i' U*/1 B5 x ?7 P. M% T
is! k0 x; g1 f& ?6 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ l6 G9 P: h$ A; f9 \
do1 x) X9 |( l6 \' m/ t
Lan := rootfolder.Internal.Tools.AOLlanguage;
' {) k: a: Q+ j, E' C if current = @.Destination -- else return
5 `0 X7 @, U* O" F& o3 L then
# }4 S) N: J/ @; J: i6 M @.Destination := void;7 G, F8 r3 a, }! m: ?
if @.occupied then8 h6 J2 e) ?, L) V
part := @.cont;
/ c# ` F- Z( E. X @.transpOrder := void;5 w0 z8 Z9 z' H' p; M* f/ u1 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 J4 l5 z2 i5 ~; m7 x W- W
@,root.eventcontroller.simTime);
0 v/ j. N4 a- d9 B( I* ^: n2 l% ? @.HasOrder := false;' R9 q8 g9 @; Y2 v' Y4 R+ M C' n
@.DrivingHome := true;7 u; M+ ~. o0 ]* r
rgManager.tryToStartTransOrder;* N! s: ?6 c& S" \6 F
if @.Destination = void& O9 _: [; G. V7 ^+ I$ f8 D
then -- no transport order for vehicle @
0 u; j( X. a. p, L% M' e" D2 p, K. i @.Destination :=! w+ m) l$ J# @) \
rgManager.nearestFreeStation(@,track.~);6 z1 j: b% U }. Z
newDirection(@); - ?4 L: w9 |1 N! q$ [
if @.Destination /= void then
1 N& M1 ?4 L. x' G @.Destination.NumReservation :=! S+ k$ r5 |1 D- j6 b! {
@.Destination.NumReservation + 1;
/ K+ m: v. p8 S c% C. H end;
+ _4 m$ ~) Q; e. Q4 P2 V5 b) \ @.CurrIcon := "drivingHome";2 y, U6 p2 g! {( E# l3 o- }- A8 \
@.DrivingHome := true;
4 w8 E+ [& E: W0 E5 \4 F/ E end;" e. z6 h- G( E/ h0 |* w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 f& [; _" L5 _: \2 A8 v part := @.transpOrder;) v4 K# Z1 m4 p- s: u: H
part.move(@);-- load part. j5 a7 V I% D9 E% G" L/ R" ^5 X
@.CurrIcon := "load";+ u# R8 H, X( J7 I$ z
GlobalDistObj := part.globDestination;% h* b# e9 L. K. N
assignLObj := rgmanager.rgAssignL;
3 F$ k0 n0 W. K% {1 L; m row := assignLObj.getRowNo(GlobalDistObj);5 B8 I2 h) q- l0 d2 g
if Row = -1 then -- since 70
4 i6 s }5 R7 l' m9 E- ~6 C$ g if lan=1 then3 ?* a* E. `* _) l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; { B+ y* R5 F7 H( P4 A+ l
to_str("in der Andockstation: \"",?.~.name,"\""));
$ A; F$ M: d5 L/ O else
5 r- G( t( o9 e2 x* ]$ U8 `2 r' e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* N* {$ M8 o' o
to_str("in docking station: \"",?.~.name,"\""));
0 w" a! l7 V+ f$ i; y end;$ f @8 Q" \. `- P. j
else- y9 m# z+ x7 g
@.Destination := assignLObj[1,row];
8 L$ d* L( k7 ~0 F* K end;
0 N; [: n* r2 {: d newDirection(@);3 \$ A3 u- V( E Q0 y! V
@.HasOrder := true;$ w( W! _: S2 {# q2 |9 e: K4 B
end;
: |) L$ z* s1 \) C+ W! u$ N2 k end;( I6 ^/ s7 R5 f# s5 K
end; -- of the method
8 \2 L: G' H6 l |