/* called by: entrance ctrl of the object 'track'- D/ T- S! F* s) s# L
*/7 @' Y0 h% s+ u/ c" @
is! G" o: i! g% F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 e( V2 T% z3 C; rdo
) [4 o6 v4 ], C5 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
6 i1 I# Q5 F( J# y if current = @.Destination -- else return
3 B, x( |' L4 \4 w, X9 Y then c4 H8 |/ y4 K( y. O' A/ Q
@.Destination := void;
U w+ T3 y" H if @.occupied then
2 F$ \6 K* ~ g9 b part := @.cont;
) S4 e( S. P: M7 H+ [ @.transpOrder := void;
@: ~, ?+ k# _' A3 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- p ]5 L3 ]8 t6 R" H$ ]- V
@,root.eventcontroller.simTime);% m# ?1 t2 z3 R( X( q$ D& n" e% Z
@.HasOrder := false;8 F1 c( j; t2 Q: V1 z
@.DrivingHome := true;
2 g+ A8 I/ [# E6 Z0 ? rgManager.tryToStartTransOrder;
+ ~1 D3 y$ K. R4 p% ]& d if @.Destination = void' s' B5 g) Z+ q! D9 v" l0 S% ^
then -- no transport order for vehicle @9 U: j# J" G# I8 ^
@.Destination :=0 k4 g. o6 p) h. F
rgManager.nearestFreeStation(@,track.~);
9 e) x5 j' z2 m, d1 K& W newDirection(@);
8 V$ T5 Y: ^- g; h3 |7 ~ if @.Destination /= void then! S ?: L4 b+ X- t& X/ \1 N( y$ b
@.Destination.NumReservation :=2 U8 X, W8 f! y# u
@.Destination.NumReservation + 1;, u' h, a( O1 o, {4 u& d
end;. o+ ~6 h0 P" w
@.CurrIcon := "drivingHome";
: y7 z, U3 t7 z6 | @.DrivingHome := true;$ X+ T) D5 {! _% j
end;. \ |# P/ e8 H8 c' g- N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 a$ \* Y/ {6 S n) v4 k# m1 a
part := @.transpOrder;
5 F9 O* e" ^, a part.move(@);-- load part
( x0 X! H1 n# \5 y4 a @.CurrIcon := "load";
. u% s% K$ K9 F& s/ r! c GlobalDistObj := part.globDestination;
! ^1 U$ {) G1 U; A# t assignLObj := rgmanager.rgAssignL;
5 K! [4 B: R0 B" S5 X; J row := assignLObj.getRowNo(GlobalDistObj);
) m# F( L! L% N" v& T6 S if Row = -1 then -- since 70
6 T/ a# Z8 N& _) g. k if lan=1 then* Q7 ~5 @# p$ ]! b8 e$ H: _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' r; Y" W9 t* b# N
to_str("in der Andockstation: \"",?.~.name,"\""));
' A- x: E% b, b- Z, H: F. v' r else
8 P; @1 V. D. D5 X, E9 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ J; m, G' d2 B( d. s$ L
to_str("in docking station: \"",?.~.name,"\""));
5 q0 o5 f; {( ]% ]$ _, Z( V end;* o9 B0 f9 s% j6 }% ?8 K; l: M! }
else4 D% H; f& ]1 o7 f6 i: ^
@.Destination := assignLObj[1,row];% b% E+ ^7 w& n# P2 A
end; 2 L" h% V$ _) ]6 o9 |" J- w
newDirection(@);
& @+ F' n. P3 ~ @.HasOrder := true;) q0 e4 c# a3 f) Y3 ^, B
end;
$ m3 ~- N7 _) f7 U+ _7 _' \ end;! _, p3 V7 i% z9 E; j8 m# D
end; -- of the method3 ]9 [3 m- e, q8 a. H0 M
|