/* called by: entrance ctrl of the object 'track'
+ j/ w) Y& R# p6 L*/
+ X- K7 p M7 A2 L1 Ris
" q4 H+ i# A& t0 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 l& J: V$ q5 w& g4 S2 w8 xdo
; ^; }3 Z9 D7 H Lan := rootfolder.Internal.Tools.AOLlanguage;
) X/ w4 i" N5 }7 U0 I& C5 L if current = @.Destination -- else return) _' h" {/ I* I C3 d
then9 P/ ?$ [4 U$ E* j% n
@.Destination := void;7 P, G1 V+ m- F4 I5 f
if @.occupied then1 n) d u/ I& u- w" p: O
part := @.cont;
; _6 ~0 K* B( H! v @.transpOrder := void;
8 i* E- W8 i2 V$ @+ O& r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; S1 ~9 _) W" t5 G7 v. \
@,root.eventcontroller.simTime);
I1 l& d5 D$ b9 R. k @.HasOrder := false;
, I- N3 ]' t/ g8 \# P' w @.DrivingHome := true;" n3 z' [8 q! z! l
rgManager.tryToStartTransOrder;+ O6 t1 R* W" g1 r6 |( _! h3 W
if @.Destination = void: e* B3 o* S) U. Q
then -- no transport order for vehicle @
2 J5 F% u( g+ p @.Destination :=
/ j, s S; J1 ^ rgManager.nearestFreeStation(@,track.~);/ ~: s. d0 E6 [. C
newDirection(@); $ @7 a+ k4 {# r/ z$ t |1 ]! u# Q
if @.Destination /= void then
4 E+ ~ g1 d- N+ f5 v# C$ N @.Destination.NumReservation :=' x1 I! S4 {$ o+ }; n$ M
@.Destination.NumReservation + 1;
5 ?7 e5 g. k' h- b5 o' E end;
1 m" c, b- d: y @.CurrIcon := "drivingHome";( [" j; o8 W! R; @. g
@.DrivingHome := true;
* F9 a: ^9 ?# B& u end;
3 }) B& e/ {1 r0 B) N" ?2 K6 ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 s5 }9 ^7 j4 {' j3 U8 y& G part := @.transpOrder;
; B* X) J$ Y" S7 q4 Q part.move(@);-- load part
6 K h$ P9 r6 g9 P- X! U! E @.CurrIcon := "load";
+ O, }( p$ F& {) v$ L& [' d2 K GlobalDistObj := part.globDestination;9 j6 O* o/ q0 n9 u" B* |; C
assignLObj := rgmanager.rgAssignL;
- \( z; K0 P" ?5 c; o( j row := assignLObj.getRowNo(GlobalDistObj);
7 A( b# N9 W# ~* r& h+ N% P2 q5 Q if Row = -1 then -- since 70! `; E3 b h4 Q- ~& \
if lan=1 then
- y. r* q1 N/ s1 G4 Q6 H1 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 n- ]' N3 _& P2 ~8 b' }0 c to_str("in der Andockstation: \"",?.~.name,"\""));0 i. F9 \' \$ c
else
! s6 s, e3 L9 [9 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& _* S4 Z" D$ p8 c/ ?' w5 o% E& E/ u
to_str("in docking station: \"",?.~.name,"\"")); & n# P% D8 P$ m- T; Z3 k
end;& ?1 ]! B4 t; W! b2 g Z8 @
else8 p6 j6 G; ^: ?/ t+ u+ A5 a. R
@.Destination := assignLObj[1,row];
, w& D+ @4 c3 D; r; b' z end;
4 M7 r# r' I: r/ j$ k newDirection(@);
( ]( E! @/ q+ B' w3 @$ W+ V @.HasOrder := true;
- b7 b6 h. A' x9 r3 ^' k4 A# p! F end;. D# k* K+ y2 q$ `4 F
end;6 V8 {, a: Y) c
end; -- of the method' ^' U4 i7 w; q5 v. m" K6 X' C
|