/* called by: entrance ctrl of the object 'track'
6 m0 Q+ _; `( @*/+ T; F9 f# I# F0 w9 ^9 t
is
4 W, i$ t S7 L( v) Y5 ^$ U# n% l part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ z7 S& W5 z( ^9 U0 K3 F
do
* y/ D2 ~! M8 m1 Z Lan := rootfolder.Internal.Tools.AOLlanguage;
) u+ Q* d5 ^. \( |( i if current = @.Destination -- else return
2 [5 b0 {' G4 _+ M! f6 H+ k9 W4 @ then
& [$ d! B" f7 J @.Destination := void;
M0 R" b5 E; W7 T if @.occupied then
3 j# D, b1 A% d part := @.cont;0 o7 J* F5 J- G- @2 X
@.transpOrder := void;
5 v" O6 ~8 h% i) S+ |2 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- Z7 _& W' X' v: s @,root.eventcontroller.simTime);/ |2 f' F- K% `2 _2 u9 S
@.HasOrder := false;
h; d1 X8 j w1 y: T7 y0 F. C @.DrivingHome := true;& R# c L) q/ r( W
rgManager.tryToStartTransOrder;
0 T) o; _3 [# c2 {$ m B1 Y9 r if @.Destination = void
! I3 B3 i |' [ then -- no transport order for vehicle @
# S( o0 j0 k" @/ [ @.Destination :=4 @# D# O; O. I9 s l3 A, j
rgManager.nearestFreeStation(@,track.~);) m! E. d# f j+ K Z
newDirection(@); 0 E( q+ f7 i( r" t* X8 w
if @.Destination /= void then6 n7 p+ _' t& I( J8 H( p. M4 K5 E0 z
@.Destination.NumReservation :=- A0 D5 e4 \; ]$ C8 ~, F0 f& f
@.Destination.NumReservation + 1;
5 m' Q# b+ s# i+ |* H end;8 `, V! c8 ~8 T* B, D
@.CurrIcon := "drivingHome";, w( }0 P0 Z. x6 X3 O
@.DrivingHome := true;( I7 _8 a/ n5 f- P# |
end;
3 w J" _2 b6 j6 f ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station* q0 {5 c2 B' u4 ?4 `. }1 T
part := @.transpOrder;" a C* H1 [# p R- t
part.move(@);-- load part Z* x' |" L6 ~* k6 _8 r
@.CurrIcon := "load";9 H! W6 G' X* w0 U7 T+ G2 }& N* q
GlobalDistObj := part.globDestination;/ I2 ^ T* w5 [# z( M# t
assignLObj := rgmanager.rgAssignL;7 l* |+ Q$ D0 R2 W5 O
row := assignLObj.getRowNo(GlobalDistObj);
+ v9 o: Q1 \" M. {8 v if Row = -1 then -- since 70
* _3 k7 w5 o0 |& }2 K if lan=1 then
2 G* A9 E0 J) g& j: z" N" k! C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* C7 w6 @: F! L4 ^5 I9 e! _! g. \+ c to_str("in der Andockstation: \"",?.~.name,"\""));
% \* x' u7 j' r F6 |7 h7 \7 r0 @ else! h% M6 w' v7 ? H" u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ G) ?/ C6 u1 y# K! l7 [5 Y4 }7 _- b
to_str("in docking station: \"",?.~.name,"\"")); : F0 z; A+ F$ J6 o7 A+ U/ Q
end;
) g" t2 @5 D) H9 Z: A else4 l; X3 K4 g9 M) c0 P
@.Destination := assignLObj[1,row];+ K& {4 P& o; d! J
end; ) p# @* u; T+ l
newDirection(@);$ {2 O# |2 L+ j' l+ w3 m9 f
@.HasOrder := true;, `( E Y! Y, C$ |1 {
end;8 ^3 ?; o/ a5 \4 A( C5 B7 K
end;9 U t6 d( K0 u4 e1 {3 j
end; -- of the method
1 c) q2 W( |% X2 b' X9 V9 _7 l( u8 E |