/* called by: entrance ctrl of the object 'track'2 B; d( g# Q5 Z+ m) L2 K8 c
*/+ @3 w* w" W* `3 Y# }
is
2 E1 n' G4 F6 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( [' _7 F2 Q" t- r' f- Kdo
) E9 h" t. c1 S6 H) d Lan := rootfolder.Internal.Tools.AOLlanguage;3 F2 n/ l# |0 d
if current = @.Destination -- else return. P, o8 V( |- ^5 @
then
3 J9 F, s" h# J+ I4 Y* K) G @.Destination := void;. y- p% F7 G2 j. h
if @.occupied then5 S& ?/ I% `+ q) s1 r
part := @.cont;
4 q$ ^( A2 H* O$ {2 p- G @.transpOrder := void;% |' l, y6 k7 j; z& {) i5 J/ F1 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ ~" l7 [4 e9 [/ R) c1 z5 u
@,root.eventcontroller.simTime);
/ j* b& E1 y3 b" B1 k# o @.HasOrder := false;. e6 J7 H0 g" I O% R6 o" |- e
@.DrivingHome := true;
; w* W6 n2 r* q( x8 y rgManager.tryToStartTransOrder;5 M; Z( L, S2 L! `$ F3 D( N
if @.Destination = void
: v3 L; k1 T8 t( T: |. \; N0 P then -- no transport order for vehicle @9 K' x9 c' r9 m- c g c
@.Destination :=+ I' M+ w+ i9 |, X; ]3 j6 z; l/ P
rgManager.nearestFreeStation(@,track.~);
% N4 D7 w2 K/ F. b7 {$ F newDirection(@);
( D+ D( r5 v$ ^* `% z* Z" \8 K if @.Destination /= void then
9 ~. Y4 V% L9 f7 z8 d( g @.Destination.NumReservation :=
5 ^7 ^4 L& D+ t, e- P/ F @.Destination.NumReservation + 1;. t+ I B, G2 b! `
end;) d5 q1 H- |: x" Z6 i6 Z
@.CurrIcon := "drivingHome";
3 `0 y z4 l4 ?3 C' ~" T, ` @.DrivingHome := true;& B4 V& M3 `# I0 i, y- ]2 Q, E ?
end;
, Z' f* E! b" U* R9 G+ k6 `& P else -- the vehicle @ is empty, both vehicle and part are in the same dock station. ~# Q) v4 q, v
part := @.transpOrder;
9 ]4 k3 ~5 }+ D0 K0 g( Q0 Q& k part.move(@);-- load part
8 Y7 g4 _# U5 w/ a7 Y+ ^ @.CurrIcon := "load";* O% d9 L& E1 |5 I& P
GlobalDistObj := part.globDestination;9 v: F4 s6 O5 L- v* P; Q! f- o
assignLObj := rgmanager.rgAssignL;. h* O' u% h$ Q
row := assignLObj.getRowNo(GlobalDistObj);! A9 H8 {3 [+ z+ }7 r3 ^
if Row = -1 then -- since 708 S* O S& P; B! l( o
if lan=1 then
) A$ U7 v4 R6 w3 F& j7 L, g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% K' E1 `" @8 E' Y1 m to_str("in der Andockstation: \"",?.~.name,"\""));
0 N6 [4 }2 H1 N' e; g5 x else3 m" \7 T# }2 L4 F0 j) P9 ^6 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) @9 `, W- m2 S5 m1 Q
to_str("in docking station: \"",?.~.name,"\""));
% b4 T6 j6 M2 y% m6 B. m+ d end;
$ V3 h# W2 [: k3 }8 j$ _9 W else
. R4 J/ Z5 j! v' l8 o& ? @.Destination := assignLObj[1,row];
: B2 O" ~6 y( T- Y# K9 k! ] end;
6 l0 ~/ _7 t% {' Q4 ?! e# p newDirection(@);4 }% ^0 S7 N; m4 Q$ z% Y* }+ D
@.HasOrder := true;
1 s3 J' O! p9 q; i7 X4 M/ q9 e end;& s5 E9 G0 U2 g! w4 {4 f
end;2 Z9 f& m( ~+ V% E/ D
end; -- of the method8 z1 P E5 k/ x2 _
|