/* called by: entrance ctrl of the object 'track'
, E0 `0 _5 M! J6 B: k*/: M; P. |9 D' j8 m0 o2 B
is: Q/ }8 g7 ?2 h( Y( n: g: R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 q8 t4 O T, c, U5 M) ]do) k" R$ q5 F% f o2 n+ V. ?, ^
Lan := rootfolder.Internal.Tools.AOLlanguage;5 e C! R) q R! s9 S& p
if current = @.Destination -- else return
6 `' ?1 A% c1 Q& s: G4 V2 R then2 y9 D m% b: `; Y
@.Destination := void;3 S9 d$ U. N9 h+ `6 X
if @.occupied then
7 F9 R4 f$ G9 |" u* ] part := @.cont;+ t, ?- I2 A; ^" R) }3 P6 U. m
@.transpOrder := void;
, J) n. q) S* B3 J. T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 c4 C& H* C' ]/ o @,root.eventcontroller.simTime);
) @2 c6 y: [* Z @.HasOrder := false;
, c9 [5 J* i/ C2 [0 s @.DrivingHome := true;
: ]* O( ~. m3 c0 a S# \2 F/ | [ rgManager.tryToStartTransOrder;
6 @+ f' F7 W$ X if @.Destination = void
, n4 @- H5 a1 f* @* K then -- no transport order for vehicle @
3 t6 D. K) N7 `) ^: h* E+ W @.Destination :=
, `* t8 x3 Z( o# i' @" {, }- ~/ K& \ rgManager.nearestFreeStation(@,track.~);) G7 D& d5 L4 O2 G
newDirection(@);
" O# A ~' E1 n3 {1 e% F if @.Destination /= void then
' Q, Q5 M' P B @.Destination.NumReservation :=
* o, m9 j8 }4 @7 z4 s: f @.Destination.NumReservation + 1;
- g: a5 [9 x1 u4 p- Y% E$ _0 F end;/ Q+ N+ X/ j; u+ w' g. _3 O
@.CurrIcon := "drivingHome";
1 E1 Z, E+ I+ z @.DrivingHome := true;" i7 E) M( I9 {1 {4 c8 F
end;
0 K1 {- C$ l( g else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 |- \, \3 q1 X, L& a b# g6 u
part := @.transpOrder;
6 X0 \6 O# r2 Q" @) t' }. C part.move(@);-- load part# g. y, l$ k2 G$ ]+ [
@.CurrIcon := "load";# e# F. R0 }/ m' w
GlobalDistObj := part.globDestination;
) W5 @8 ?: C, z# ]! y/ b6 M# { assignLObj := rgmanager.rgAssignL;. r; Z7 v3 _3 A0 x% \
row := assignLObj.getRowNo(GlobalDistObj);
x0 W, J; M" j8 M* g/ l7 n2 J! y if Row = -1 then -- since 70
2 J, f8 u( `- y9 A if lan=1 then$ N5 p# ] G7 @% I3 L$ X4 y: T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 E5 G; c) R6 e! b$ v1 a+ D, S3 r to_str("in der Andockstation: \"",?.~.name,"\""));
) S9 Z) {- s% \9 w0 o$ ?$ r8 Z else, ^! \. x% n; l( f9 Y# S5 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 S" |/ k: Y& Z p4 b# X to_str("in docking station: \"",?.~.name,"\"")); $ W4 U, L, @ K% {6 P
end;
8 V9 _! Y3 C5 B1 ?. T else
" U7 N1 e; S9 r/ b0 B4 a4 d& D @.Destination := assignLObj[1,row];2 D# v5 A& W X0 u
end; 5 W, b) I' l" x- L! J, F
newDirection(@);
! M5 t+ K% L; p( d# R# W& o @.HasOrder := true;' R" [1 g4 Q" P; _ O' T) l
end;/ ?5 F* X) J) T# S/ M- m, S
end;
. N, O, V5 ` N! u O3 [end; -- of the method' t0 H; e9 h1 `0 H
|