/* called by: entrance ctrl of the object 'track'. o9 ?5 P8 m# {( G# M8 S0 A/ \
*/
8 \. m1 \: ]$ s) e2 ]7 p- x7 Iis
- N6 q1 n6 J$ b$ u e% ~2 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;* G o: p9 `: I$ H1 e, a
do% T. s- U$ f1 L# H a: Y) a2 l
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 ?/ J4 M/ V7 n" n" k' e if current = @.Destination -- else return9 t& ~6 ~/ Q: K/ _
then( i6 @( A9 p3 a0 v) T
@.Destination := void;9 I% o, H: z; ~! `
if @.occupied then
+ s& X% n' E6 M$ ]9 F5 E' c: r B part := @.cont;
3 a) ]+ y) U/ { s, x @.transpOrder := void;0 i% a! o- q) Z6 i( b" e% x0 W" V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 | D- K! B, W4 O' w @,root.eventcontroller.simTime);# }5 s: l7 x1 d0 I1 e9 w
@.HasOrder := false;/ f3 ]+ P a' j0 e6 R
@.DrivingHome := true;: T; G6 W3 F0 Q4 c5 E
rgManager.tryToStartTransOrder;/ i) C7 Z2 h) j1 @& b
if @.Destination = void
6 I" Z7 l+ ?: s* } then -- no transport order for vehicle @
% r! M4 G! M' X' e& p' y. m @.Destination :=2 U8 U1 J& k, K
rgManager.nearestFreeStation(@,track.~);
. s0 t. R$ i7 F1 n. Q newDirection(@);
8 P2 {. n; C y; G1 r3 U$ Q if @.Destination /= void then* ?# Y8 ~1 ^1 h& N" e
@.Destination.NumReservation :=
9 m% A2 R) [. Q. h% v, k* C* O @.Destination.NumReservation + 1; a7 A, s s- s! O4 L' |6 T6 w! n
end;
! s" n% k6 L( y: S& [ @.CurrIcon := "drivingHome";
2 I" \. i; g8 P$ n5 b- K" f( ^$ z0 M @.DrivingHome := true;3 [( o7 s0 m+ r$ a0 H: y
end;- W3 @$ N, n0 t, h" ~7 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- B% v; Y @% b
part := @.transpOrder;9 {% g: M* H2 X4 s
part.move(@);-- load part( u' N+ `+ S' d0 A( x
@.CurrIcon := "load";/ o) [; f# T0 O: j* M, T# {+ V5 P
GlobalDistObj := part.globDestination;" r+ Y2 d. M+ Q: O
assignLObj := rgmanager.rgAssignL;
l; l3 G# ?; v0 l% e* m row := assignLObj.getRowNo(GlobalDistObj);
) i! o3 n' e* Q* p8 G4 l3 O if Row = -1 then -- since 70
9 ]9 k! {* r6 s! `7 N if lan=1 then) C( `/ y& ?( p! U. a5 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 }+ S$ ?/ I% ~( i9 h& y7 |
to_str("in der Andockstation: \"",?.~.name,"\""));5 Q/ w" d2 m' V9 E! ^( n0 F* J
else$ L7 O0 |5 \6 k1 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 F4 z9 \) e& |. t# n! D g d% l+ g
to_str("in docking station: \"",?.~.name,"\"")); " M$ D/ i- r1 X% f" k% S
end;6 }' A( T( j8 _1 K
else
' y7 |8 {% J# m& o @.Destination := assignLObj[1,row];
9 f* Y4 T9 a7 ^; {8 F end; 1 }4 S: O4 V3 L# E8 u k1 S
newDirection(@);7 y l6 ^5 c) J3 M
@.HasOrder := true;$ ] D) R5 v7 f% H; @4 k; l6 F# P
end;
. [' Z7 N+ @# h+ g end;
' `% g( p, y" x( m; K. v1 ?+ Kend; -- of the method @0 J/ Q- `( m$ u4 S
|