/* called by: entrance ctrl of the object 'track'
3 q, A- H7 a8 I }3 _2 K# `" J*/
7 J# O4 C- n* ?$ g6 R2 D; {is
! P n% j x( C8 e% j3 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, c6 u, P) Y8 L+ ^4 hdo7 S( R$ U. W% x+ q
Lan := rootfolder.Internal.Tools.AOLlanguage;- P- c: \0 d+ @3 h
if current = @.Destination -- else return" g. @( R9 L7 w4 f5 Z" E
then( W1 r; Q! V0 d# A' M9 g
@.Destination := void;+ b5 \) F& u3 ?' s
if @.occupied then8 a( M" o, Q& h; G# t! ^* e+ K
part := @.cont;4 z U# n& G7 x2 [/ W6 T
@.transpOrder := void;' Q, Y4 r3 t9 f; \7 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 G7 e* @# _7 @/ h) n
@,root.eventcontroller.simTime);
2 Y0 @/ {6 g- T) j% o7 A @.HasOrder := false;
9 s# t8 M8 v& j! W @.DrivingHome := true;
0 u4 ~' ?) o7 Y rgManager.tryToStartTransOrder;( g) g/ z* E( k) V
if @.Destination = void
2 q% U6 l9 g9 M( v4 O then -- no transport order for vehicle @, R+ y4 s: `" {" b5 `
@.Destination :=
" ~8 Y- }# m' q8 B6 H; Q rgManager.nearestFreeStation(@,track.~);( p% z. I5 h' N# |! l4 W% q# Y
newDirection(@);
7 j R( E6 T9 g; p' \! p if @.Destination /= void then
, t& R2 |, v0 [ ] @.Destination.NumReservation :=
- l' q8 y- K) b& Z @.Destination.NumReservation + 1;
; l) [1 v' q9 N& `/ x9 Y) s0 [0 _ end;
* C( |: }4 U" j4 a0 W, X; @0 O1 S @.CurrIcon := "drivingHome";! [0 b. W3 X: p& e' O% S) P% Z
@.DrivingHome := true;8 P1 q, G- L0 a. `/ ]1 }0 X9 m0 ^
end;' U7 l- {) u9 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* o; E5 [) i" t4 ]9 `& W
part := @.transpOrder;# _7 Q9 C$ M# Q
part.move(@);-- load part
4 I0 D# d4 A' X @.CurrIcon := "load";: L$ d$ {) [0 F6 _1 A
GlobalDistObj := part.globDestination;
/ F; P7 Z" X1 z: Y assignLObj := rgmanager.rgAssignL;
) x" W" d' F R3 p6 V row := assignLObj.getRowNo(GlobalDistObj);6 s# E9 j4 L. q! ]8 e s- t8 I
if Row = -1 then -- since 703 L5 z( G l9 L$ y9 e X z
if lan=1 then
, B9 i2 X3 J. Y. t! j9 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: j: e" J/ ?. S+ c% x' {. V
to_str("in der Andockstation: \"",?.~.name,"\""));
$ d( t% Q( d& f0 u4 H& s5 V else
7 V3 U- f6 e4 y, {5 L( w; L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 l% B* E4 z: d! {
to_str("in docking station: \"",?.~.name,"\""));
3 e. g F8 f; [, U3 B9 n end;, A8 B6 N: i8 w# Z3 R! A9 X3 S: z
else, f8 B* ^6 F$ N* R! j' T. Z3 q9 k
@.Destination := assignLObj[1,row];
# u5 Y7 w7 h4 [& j+ I/ V( ~. ~ end; 8 ?# Y1 E& T- F1 P
newDirection(@);
) x2 m4 p0 h4 ~1 C& h; ^4 x @.HasOrder := true;
& L. O5 H* e9 P8 F$ y8 p r. \0 ? end;
; o A8 K" i1 F2 X0 K" h7 J end;* b- A5 y; Q; L' u
end; -- of the method7 s4 C' J' n5 T: L
|