/* called by: entrance ctrl of the object 'track') |) }, q3 H! p8 {
*/3 M s7 {4 A6 X m" }
is$ q V) ]4 M4 m' [7 p8 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 D3 ?) N) l7 A0 N. _7 r' tdo7 I' `/ Z" Y2 c: h
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 V3 X# ?$ I' p% {* h( F if current = @.Destination -- else return
( x0 {1 u; g, i then
/ T6 n1 F, i% ~8 S5 U* ? @.Destination := void;6 A! k; p8 B; P9 v( P7 L/ Z
if @.occupied then |6 k2 m& \7 q1 f% K8 y; j5 F6 f
part := @.cont;
( c! b/ m! k9 g8 z/ ?+ Z7 } @.transpOrder := void;0 J7 D: V" r/ P; C9 o5 q3 ^" }( n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R3 {8 {6 ?, r1 | @,root.eventcontroller.simTime);
5 V) d) J5 e. e @.HasOrder := false;/ b$ k1 P4 F! a8 a: R2 W
@.DrivingHome := true;
, }% m& ^6 O+ v9 N7 ` rgManager.tryToStartTransOrder;8 @0 s$ d1 j. T9 ]
if @.Destination = void
8 c$ {1 o; o' w+ ^" ^- | then -- no transport order for vehicle @& R' g+ v b* s9 ]* B
@.Destination :=
G' P8 p [0 s! f! H, w6 [ rgManager.nearestFreeStation(@,track.~);
( G; r: s, q* Z1 v newDirection(@); ; g* D& J; d: R+ p
if @.Destination /= void then; n9 z# Y5 k! P* `# R
@.Destination.NumReservation :=( s, n# P/ }. J0 M3 O7 ~$ o [
@.Destination.NumReservation + 1;
0 [' p2 ^( i8 J, S# S- m end;
! G: \1 ]" k0 `6 Z5 N @.CurrIcon := "drivingHome";
& j0 b0 w; X9 z( V; V! o; M0 X @.DrivingHome := true;
6 O, v: u! H! T& d+ h- @4 q end;
6 S, `6 D' C1 J, b9 A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 C; b% n( s& l2 F1 c part := @.transpOrder;" N. r0 ?* D3 ~4 e$ |! O4 h
part.move(@);-- load part
& Y9 I7 X) U$ y8 u* D. g1 r @.CurrIcon := "load";
; o' X& P4 N( ^+ h$ i) Z GlobalDistObj := part.globDestination;- m1 V1 w( ^& e4 d' E6 t. q; y
assignLObj := rgmanager.rgAssignL;% i# k1 M% i7 e$ k& l. l
row := assignLObj.getRowNo(GlobalDistObj);9 k* j, `, C ^% z' z
if Row = -1 then -- since 706 x/ q* f- M0 @+ g
if lan=1 then8 } _' S0 W/ p$ M+ X+ z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Q/ Q7 @0 a f; N2 i! g to_str("in der Andockstation: \"",?.~.name,"\""));7 Y/ a7 \ ]- Y
else0 T3 Y- Q. E! C7 v( v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* \* f' p) f% _# G2 l/ u to_str("in docking station: \"",?.~.name,"\""));
7 a. _$ m1 p: |1 C3 f end;% Q# _8 S$ m- {+ _. b. r
else. f) N. y! R7 A5 U
@.Destination := assignLObj[1,row];* x, v. ^+ \5 {8 Z) S3 e/ @
end; 5 R6 W$ n0 x. T# y: |3 y0 q
newDirection(@);
: b; z+ J: }8 r0 J5 R/ d# [ @.HasOrder := true;
; b" Q3 @1 @3 ] end;
7 z2 V4 Q+ i9 f9 F- V) t S6 t* o end;
2 y' f5 w1 S( j$ E3 [end; -- of the method
7 S% v0 [; N: Q q2 p2 _# V8 D |