/* called by: entrance ctrl of the object 'track', I+ n: d( d) P# w& R* s
*/
$ K' n- e) }2 W8 U+ ^( p! u6 Uis
0 }' K! W3 q9 m9 u& f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 `4 b# U/ [) y* [do
. j% c! Q( Y; t Lan := rootfolder.Internal.Tools.AOLlanguage;
( C* C% C4 H! H Q if current = @.Destination -- else return- H v4 A' Z% i9 ]( q. }8 A
then8 N4 Z; u3 I8 X8 v! x
@.Destination := void;
6 Y; K" ^4 B+ g" J$ J, [+ ] R9 r if @.occupied then
4 f+ X- R& N! {( ]+ ~ part := @.cont;
/ X Z! p, I, X& q8 }& r @.transpOrder := void;
$ W, `6 l7 i- w% v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' p6 I( b4 q' _9 u6 U; U- _ @,root.eventcontroller.simTime);, i; [" ] f& i- ~) ^
@.HasOrder := false;$ l9 ^% m+ ^; y
@.DrivingHome := true;$ y g; H r( N% ?, R6 p
rgManager.tryToStartTransOrder;
1 O& H* s; Y6 b3 S( [( [+ o if @.Destination = void; c( C; F) O4 _5 D( n
then -- no transport order for vehicle @
% e; _& G3 [6 _( z/ X @.Destination :=0 n' Z! ?1 D& a* Z M
rgManager.nearestFreeStation(@,track.~);8 e/ o, d' i( |: N) d# z
newDirection(@);
) X1 U% ~0 ~9 n X8 E) ^0 D if @.Destination /= void then
9 ~: x# o @& c; C3 Y: d @.Destination.NumReservation :=
3 I. s. T, R/ W& \: J" r @.Destination.NumReservation + 1;
% C% r2 e; A$ ^3 Y end;
0 k5 \, D" L6 w" q9 Q/ T @.CurrIcon := "drivingHome";! m9 M' Q2 g( ~6 R- z
@.DrivingHome := true;6 [# A. P' a/ g' i2 i/ i
end;
( Q3 B( `& A" G3 T4 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station( r! l6 e9 J; n S9 ^
part := @.transpOrder;% Q+ H# d$ Z, N4 K& U
part.move(@);-- load part0 L1 y0 Z% ^4 N& [+ N
@.CurrIcon := "load";6 ^) h" c! ~" k. y; c: x7 b& w) N5 B
GlobalDistObj := part.globDestination;
. Q- l$ G8 B9 E7 m; F assignLObj := rgmanager.rgAssignL;
5 m4 g3 \; [& t row := assignLObj.getRowNo(GlobalDistObj);
5 j) j. f% u/ | if Row = -1 then -- since 70, l: \/ j( D. i1 u! l
if lan=1 then
8 d# n5 Z: `; ]& U4 T5 [7 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# ]- I+ o# i n! G6 l to_str("in der Andockstation: \"",?.~.name,"\""));
) D- v3 c" e$ P# B" Z6 J else7 M V; ]6 p4 Z% x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' x# O4 ^( r' K5 @: p4 {4 S to_str("in docking station: \"",?.~.name,"\"")); , r. u! Y5 K" v9 l% ]
end;% L- k0 `. X p- L2 M/ z& ?# w. b
else9 ^: o, A! E; Y- o9 Y6 r
@.Destination := assignLObj[1,row];9 h7 S- {% h# w4 K9 Q+ H* z
end; . Z7 S0 [. o1 \8 h% k" X5 U" Y
newDirection(@);! P; R, G: T/ G* A; x' }+ [$ k
@.HasOrder := true;
% l$ M9 |8 y2 h, _5 P end;
9 W& [& g. }# n7 x& Y* w- H end;
D8 N+ M' ^6 X* Wend; -- of the method
: U! S1 H; G4 |" N2 _ |