/* called by: entrance ctrl of the object 'track'
) u5 |- X( d: ^! Y3 n*/
% Q5 C7 k# k1 I) e3 |1 yis Q! r5 u' G. Z) g0 ~( I" E0 c) E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( a# ~8 N4 K5 |3 Q0 T1 e
do
# ]4 R, E( }, I5 l& f4 P: T+ B2 { Lan := rootfolder.Internal.Tools.AOLlanguage;- z$ ~7 U4 G$ D! q( r5 c
if current = @.Destination -- else return
" g# A# J j+ `# P8 }+ F# T then' G5 X" H1 f$ J8 E% p/ l" V4 |
@.Destination := void;4 `1 B/ l7 Z+ I
if @.occupied then8 A& S+ l- O* p& [2 U# l
part := @.cont;4 u) {. x9 m! ~
@.transpOrder := void;
% G" ]0 A4 M# U8 l' d7 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ i; H, P; ^1 T# e- R @,root.eventcontroller.simTime);3 k1 m t# h7 `5 _" M
@.HasOrder := false;" A! S6 o8 Y* u- p5 \ x
@.DrivingHome := true;5 p9 ^# w) |% Y3 d' z) H7 Q
rgManager.tryToStartTransOrder;
* }# y8 L8 p9 S5 P if @.Destination = void
* ^, P1 ]9 \- ~" x0 Y" ^, N$ a then -- no transport order for vehicle @
! p7 o& ~ k; y6 r1 O. P4 t9 m5 Z @.Destination :=$ _; l7 w) f' V, P, X. a
rgManager.nearestFreeStation(@,track.~);' m; N+ B/ L7 S
newDirection(@);
" E" v, D( N3 }" r- } if @.Destination /= void then
( N& X5 J# l' H2 _3 G! c# o @.Destination.NumReservation :=
, W e& O( F7 B( D& S% W @.Destination.NumReservation + 1;
! Y4 i Z' e* C9 i% C, H! P end;. p, E' f/ ]+ E
@.CurrIcon := "drivingHome";& `9 C+ u( q9 `5 ~/ x+ b
@.DrivingHome := true;
2 o- z( Q; L) ?' R; c# ^) z e end;
8 h0 Z R2 _6 C, E3 l+ x else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 P: o3 _ Z1 P; n5 @+ u
part := @.transpOrder;
0 c4 g5 D1 d9 R3 f4 Y2 T part.move(@);-- load part2 k$ C/ [: O7 D9 Y* p" |5 S
@.CurrIcon := "load";
$ ?8 G/ r: I# @4 v* {" g p7 p6 c) K GlobalDistObj := part.globDestination;4 [9 r. s" L. w) |: G, `
assignLObj := rgmanager.rgAssignL;# j6 c* j- [' u) @7 }
row := assignLObj.getRowNo(GlobalDistObj);
# G4 @- v+ i+ s p, [% {- U* z if Row = -1 then -- since 70
. d2 m1 O: {, C9 r- F" _9 Q; u if lan=1 then3 C- W" L* i4 L9 [& U) h3 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; j7 s+ Y9 A0 h to_str("in der Andockstation: \"",?.~.name,"\""));
& a+ g0 f5 m7 T- {" n else
7 V8 ?% E* ~' W/ P: ?1 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* f) K- _% S; M- E
to_str("in docking station: \"",?.~.name,"\"")); 4 t! H. }' I. G* }* ~# z4 u
end;
7 Q7 E6 ^2 V/ V) i; \ else
/ u$ v% ]& X9 z3 x( a5 W/ P* k @.Destination := assignLObj[1,row];+ E$ y) m/ Z& j) y
end;
' g1 Q7 M8 F$ }$ s: Z+ H6 I newDirection(@);% C# D2 @4 j9 a% b" @
@.HasOrder := true;- B+ m2 T$ w4 p/ l# J
end;
+ c2 j% I# w q3 A end;& @9 V/ M' X. i8 ?' B, K
end; -- of the method
" c% [ x* A$ J2 d- H |