/* called by: entrance ctrl of the object 'track'' k+ q0 o4 o# `# R5 P
*/
; z# z, }1 t* |% Z0 bis
. G# {3 B3 x/ c# n part, GlobalDistObj, assignLObj:object;row,Lan:integer;! W% i" O Q7 ~4 A. A+ Q% n" W
do
! g. c4 ^# P O/ l5 _+ K$ | Lan := rootfolder.Internal.Tools.AOLlanguage;5 i* Z$ k3 t9 w4 t* ], `. Q
if current = @.Destination -- else return
. O9 F; C1 X# O6 C3 S then" c: t' z) j6 ~" n
@.Destination := void;
8 ]$ U* A- d6 ?& n$ q t- p: |3 j# { if @.occupied then
5 a6 v# x. ] E# T' c part := @.cont;) y% S- Y+ }; y* q& J: B2 G
@.transpOrder := void;, B1 R6 W1 L. V, ?9 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. T& _ B% w% O
@,root.eventcontroller.simTime);/ T- o* ~3 w: L5 ?0 f
@.HasOrder := false;
& v/ H" A! q' w8 ]9 d+ R. p' W @.DrivingHome := true;. n. E- @; H7 m% b
rgManager.tryToStartTransOrder;$ J' g+ o X: M$ r# G
if @.Destination = void: T: X1 S8 Z( _+ C. Q
then -- no transport order for vehicle @
+ _: Y* B: U/ ~, @: g @.Destination :=4 U* Y9 E( j' w( v9 J
rgManager.nearestFreeStation(@,track.~);
1 f7 o: P3 ]; y) t7 k newDirection(@);
: A5 T0 ^3 W: ` if @.Destination /= void then
7 ~) r" V1 D6 G4 G3 W @.Destination.NumReservation :=
( _7 T( L7 F# r }( L8 C @.Destination.NumReservation + 1;* E# y6 G5 y e5 N0 d+ O& P! Z
end;8 v- n: X9 c5 l: }3 J: A3 E
@.CurrIcon := "drivingHome";( K* c, P" D+ Q0 g" Q5 T, w
@.DrivingHome := true;3 t! U" K- c/ S2 W3 W# ^! i
end;
M" F: I7 `8 H8 _7 N" g; Z6 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 `$ p0 E- J- J& e! P% G5 z; }
part := @.transpOrder;
8 U$ H' V4 ^1 C. t4 |; x& ^ part.move(@);-- load part1 b- d% V% P* ?% M! F) D4 h
@.CurrIcon := "load";
4 E2 V' b, A! r7 o7 m GlobalDistObj := part.globDestination;" v9 k3 e9 ?& a( m* p# |
assignLObj := rgmanager.rgAssignL;# v+ e/ v. ]* z9 o+ ]1 X+ Z0 i
row := assignLObj.getRowNo(GlobalDistObj);
4 ^ e" Y2 q/ T$ u. Z8 N1 { x* I if Row = -1 then -- since 70
/ k! H1 R! O3 k5 m if lan=1 then8 Y. ?/ p+ [8 J) P8 a4 E# {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& S1 J2 \; A& r3 S# Z- q
to_str("in der Andockstation: \"",?.~.name,"\""));
, Z4 v: I ]3 t else
0 G& O9 h) T, q+ J' R5 D6 f# x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n) N9 x3 e |. b* i- w- R to_str("in docking station: \"",?.~.name,"\"")); . n8 i- ~+ W3 `3 E" A1 c7 W
end;
/ e0 F* E1 W+ w* k/ F0 h5 E | else7 r) |5 T; t9 I/ w; q4 C
@.Destination := assignLObj[1,row];
) Y2 T8 p9 ^9 H0 w: [) U6 u* ^ end; , k6 d% c: R# v7 a; w- a( ~
newDirection(@);
, m5 O9 S* O9 l1 {5 H9 D1 Q& r5 U @.HasOrder := true;* h7 F4 S$ H" r+ N. n. v, W: O& l
end;
+ @. y1 A/ I0 H( P) u% ^ end;
# _! U7 F) u* |9 W; N. Jend; -- of the method
( u F% Y" y, o8 @ |