/* called by: entrance ctrl of the object 'track'" N1 q4 r$ B6 m
*/7 h, W& s4 n- K; O. [4 h- y, q5 N
is5 t( W4 ^$ e1 H/ d+ Y% O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 e& \5 K. @* d6 E- O% }. w) L
do1 V3 O* M8 j4 d4 _" a' A$ {
Lan := rootfolder.Internal.Tools.AOLlanguage;, x$ y+ f1 A2 ?
if current = @.Destination -- else return
H' o) c+ `2 X5 h. O3 [ then
# N% Z4 }/ d% \ @.Destination := void;1 _: e4 ^ K7 r) z
if @.occupied then
) B) A4 t) i) f' ? part := @.cont;3 e0 d4 F3 O! G: ~) o' ?5 N" l
@.transpOrder := void;; ]; \! i% E+ G6 s3 @0 o, C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- U/ u! m4 A* H @,root.eventcontroller.simTime);4 j0 x s- z8 x4 x; Y2 s* d5 |+ ~3 }+ @- T
@.HasOrder := false;
; a9 k' I+ Z# Q8 O7 x' V" I) W @.DrivingHome := true;8 I7 p. @9 `+ w! M; o
rgManager.tryToStartTransOrder;( U$ u" I/ ]* Y/ ~) U4 @3 k0 k8 i
if @.Destination = void
5 ~4 F) L+ O, t( R" o( V, `# g8 _ then -- no transport order for vehicle @# r: r3 z9 R6 A7 t* D; G
@.Destination :=" G) H6 K1 R+ \+ A+ |+ K7 \+ h1 P
rgManager.nearestFreeStation(@,track.~);* s. O+ `8 B$ r- J8 g9 `
newDirection(@); 2 P( ~5 g: G1 @
if @.Destination /= void then2 n8 T( T2 f9 T& R& b
@.Destination.NumReservation :=; x2 H0 w9 m' \8 P0 Z! s# J. l
@.Destination.NumReservation + 1;% @9 p' i9 K6 p
end;
4 I2 E' I9 ^; V" l9 X9 _$ B @.CurrIcon := "drivingHome";
/ o' q* ~0 K: z- @* j @.DrivingHome := true;/ D% n) d8 o0 T) F7 U4 W$ o) r
end;+ f) Y' B1 F' ^2 j/ H/ x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station v; o; [4 B7 ~. ~% _
part := @.transpOrder;. k$ w7 O/ t7 P0 z. o, ^0 @
part.move(@);-- load part
$ U: k, @: P9 i0 a9 G/ g @.CurrIcon := "load";
; R8 {$ h H6 x GlobalDistObj := part.globDestination;6 J* r& q+ C: i/ h& ~1 x! l
assignLObj := rgmanager.rgAssignL;
$ A6 i- V% Z7 g, ~* f0 _8 D0 N row := assignLObj.getRowNo(GlobalDistObj);* B0 w# O8 N: D" K' }! c7 i
if Row = -1 then -- since 70
& z: Z6 G4 @! Z% Z if lan=1 then/ X: O1 o$ K/ }8 r- ]: m1 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; P0 H/ |# m! h/ p/ p to_str("in der Andockstation: \"",?.~.name,"\""));( T( y. F5 O3 m9 t X
else
3 I9 q1 |8 R4 U3 D8 J: c" g/ t9 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( s* m8 a( q* o F0 m ?" L# I
to_str("in docking station: \"",?.~.name,"\"")); 7 `0 Z. \& I1 d+ _' b) [
end;0 ]& B. o- V1 M, o
else6 f' K! W7 C, ~4 R4 D% |
@.Destination := assignLObj[1,row];
6 g# I( L }: |" l, o9 L end; 7 G1 C# m4 U$ \, @
newDirection(@);1 C+ ^9 K' ]) Y. i. i7 { B
@.HasOrder := true;
9 i* w# g t, d& s end;; f8 V: d/ u, l% i, ^/ G
end;' j1 j# m& `9 ~1 [% R9 W5 P
end; -- of the method o) j# F. t/ M: J: _! n: b5 u3 f
|