/* called by: entrance ctrl of the object 'track'9 S. o2 L9 L" e% ~
*/
0 S3 w5 Z$ A$ c8 I7 E' lis5 U. Y4 _) p5 y5 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 L% M% J0 A6 \+ k- z
do! o5 u2 ~& a' @' z! V
Lan := rootfolder.Internal.Tools.AOLlanguage;! W4 e: Z/ W3 R" X7 Y5 X
if current = @.Destination -- else return
/ x9 h8 i T+ l* L7 r then7 g2 d' g4 ^9 l3 h( A
@.Destination := void;
* W( Q0 S* A3 l- p+ L if @.occupied then6 [: @5 L' ~7 F3 a
part := @.cont;
( y# ~ N5 U9 |8 o. Y @.transpOrder := void;& T0 i" z t5 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ k7 Q; q) U" v @,root.eventcontroller.simTime);
3 ^. f V! `. e @.HasOrder := false;
. m7 _7 l0 A% I2 E6 e ]8 O @.DrivingHome := true;! v; T: p ?7 k% `# N+ x! k" U* M
rgManager.tryToStartTransOrder;" j x% Y4 q& h) D
if @.Destination = void
, R2 A- ~. j2 B& g then -- no transport order for vehicle @% I' d* K v+ L$ x3 J* f
@.Destination :=
1 L9 w7 k, A P$ k( q4 G rgManager.nearestFreeStation(@,track.~);
8 U* z& X8 U2 B newDirection(@); - F0 \$ ?# z% C- i
if @.Destination /= void then4 g. ]6 ~) H3 F3 `, s! A2 D
@.Destination.NumReservation :=
+ o& a- e, X$ A/ l) f' M( y @.Destination.NumReservation + 1;# R7 @/ O8 ~& z6 F; ^4 n q) z* {
end;3 C* T) D. i( k$ E8 ~ t
@.CurrIcon := "drivingHome";
* M/ z) c- K- G' d4 Y+ Q @.DrivingHome := true;; T% ]' I# I" e4 Q$ O
end;
5 y1 f% x# \" G Z$ M k t( \8 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 X/ ^: Z* H6 V/ X+ B# P part := @.transpOrder;. H$ b- i6 Q& O9 C5 v f, u" o
part.move(@);-- load part
! `2 o- L( V# X @.CurrIcon := "load";
7 Y& t7 k; u4 t# l GlobalDistObj := part.globDestination;% C3 O! K: o8 F K5 L# T& {
assignLObj := rgmanager.rgAssignL;
7 R: n6 x) h) A% a row := assignLObj.getRowNo(GlobalDistObj);+ |9 @9 V- j# M0 `% W
if Row = -1 then -- since 70
b" k& e5 t2 c W" L' J if lan=1 then
5 X4 [# Y$ l" j7 g5 _6 a$ x% o4 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% D( N: E" _( p: m/ h) X to_str("in der Andockstation: \"",?.~.name,"\""));0 O) Z! R8 m. I& k2 B
else4 W; {; z1 T; N( {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ~, z- @7 @9 N6 v* x, h+ ?3 t to_str("in docking station: \"",?.~.name,"\"")); , x; l6 }+ Q1 A4 G5 L, x" g
end;7 y: ^% |9 ~: p
else" j7 H% R8 e, M( n" b1 e; h }
@.Destination := assignLObj[1,row];
& B+ M# U: e, u6 d* y end;
" X) t3 Z4 W! T: q# N. C( q newDirection(@);
3 X- u2 o% b8 c- B @.HasOrder := true;" K1 f; b# i2 R' q# s2 K5 W
end;* G; Q3 N2 y( _1 k( k4 I2 _
end;
/ T7 S( Y7 b9 z) gend; -- of the method0 `3 W4 G/ W0 J+ Y
|