/* called by: entrance ctrl of the object 'track'
& g9 }2 F5 W5 ^8 P" \7 L*/7 ?7 b+ h) r( w" [. k
is7 g% d' @ Y- x+ }' P0 g- }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 b$ ?8 ]+ b: Z7 z L% ydo7 g! ~ w- n" s, @/ n
Lan := rootfolder.Internal.Tools.AOLlanguage;6 d+ U) b/ i9 r! X5 }
if current = @.Destination -- else return! n5 @* G: C: J+ s: c
then' i0 Q6 j" M% N+ T* }
@.Destination := void;
2 u1 H* X7 _5 _9 j7 Q; z3 i if @.occupied then# R/ @9 x% b7 R+ X
part := @.cont;
$ ?: [2 f; P5 ^" \0 ^ @.transpOrder := void;
) D3 U. \$ W( Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 U% j0 j7 c# t+ y @,root.eventcontroller.simTime);
5 X; {0 f/ c+ r; r0 e# W @.HasOrder := false;
' K) A9 E! F0 T* ~' \/ X) R1 I7 n. R @.DrivingHome := true;$ J8 U& h; n+ ]! i
rgManager.tryToStartTransOrder;5 @: D( a2 O3 K
if @.Destination = void" B+ g, y5 i, X- e) M) d( G1 W
then -- no transport order for vehicle @0 D, n% o; F1 L, j
@.Destination :=
+ G; @; z) I) T, n; V, i rgManager.nearestFreeStation(@,track.~);0 {1 G* o0 s6 i( a0 Y# I
newDirection(@);
, J: N! _' G" F, m/ R% R if @.Destination /= void then
; E* B$ k2 }, k; Z @.Destination.NumReservation :=8 `& `3 [* v" m: {1 c, F: |
@.Destination.NumReservation + 1;/ m3 a! ?2 G* h2 \* q) r
end;) ~% M, U6 x5 t9 K' ?0 I
@.CurrIcon := "drivingHome";* o/ y, U" L$ g0 C/ k
@.DrivingHome := true;3 m- e6 S3 M+ P y* i* {- }' I% h
end;( h% R" W i4 ]: L+ j% r& @$ p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 T/ }! e( V- \* A4 g) d7 R
part := @.transpOrder;
( ~4 v7 N; S7 O; N, l8 { part.move(@);-- load part* L6 e5 |- d0 s7 T, {( m; m
@.CurrIcon := "load";! X! y4 u. A) T0 D1 ~% R8 L
GlobalDistObj := part.globDestination;
i$ G8 V3 b) F. i0 T assignLObj := rgmanager.rgAssignL;5 x7 u1 }4 k! ]3 d% }: X, X
row := assignLObj.getRowNo(GlobalDistObj);
- z0 f6 G% w8 ]) y( L2 d' \* h V if Row = -1 then -- since 70' p% P' w" E! i9 D
if lan=1 then5 k9 l0 `% D6 H, D% C! U: w7 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; c- k' p4 _4 a; h4 l to_str("in der Andockstation: \"",?.~.name,"\""));7 ?- D/ Q, k" y; |' }# d4 j+ p0 o$ [
else( `+ F5 I4 @4 t& a* k0 I/ [% M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! F" P4 o: A8 L* z3 d* |) N to_str("in docking station: \"",?.~.name,"\""));
( m0 _5 J0 m8 E5 @! }. M/ G2 _ end;
( I; k" V/ q, X" n3 b8 q else2 f& c3 V# F8 W9 U* S1 F; a9 E
@.Destination := assignLObj[1,row];, y" r+ X3 R' Z; W& L/ x) U
end; ' r, z( V! v/ g3 i% E) h
newDirection(@);0 u: x# _/ O \- ]/ P, b/ r3 @
@.HasOrder := true;4 `5 b, O& H% P6 v& d2 e& ~9 R
end;
1 r& }$ L) L2 p& K o end;
/ Z1 W) J# Q' Send; -- of the method
8 ^; k+ F4 j5 S7 T& u) q |