/* called by: entrance ctrl of the object 'track'
/ X: z3 [" x, r6 n A/ o# q9 c* c*/' E9 E; m' H' v% U$ |: b
is# k1 l5 P+ x+ J |/ e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" n2 f3 P; @& ?; H$ h) @! [; ]
do' F% U; `, r# M4 o0 s
Lan := rootfolder.Internal.Tools.AOLlanguage;/ c" J' d, t8 d) w4 V
if current = @.Destination -- else return
8 _, a6 I2 H& _, Y then
. l1 f" A/ j, R0 g @.Destination := void;4 y" S$ v& V9 J/ j' ]1 Z
if @.occupied then% L$ z9 t; B6 {4 x
part := @.cont;" R9 P, H% |* F" R: y( B: Y
@.transpOrder := void;( a% B" e5 W- t5 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 M8 X. g8 k% y" I, A) c1 X
@,root.eventcontroller.simTime);+ C# K+ R* ]- r7 [# o
@.HasOrder := false;
# q7 M! Y2 g( S9 G! ^3 b3 U/ q @.DrivingHome := true;: \' F' `' ?# [# k
rgManager.tryToStartTransOrder;& r, B, H# D+ u0 p7 F* ^
if @.Destination = void0 k4 O2 y) i! ]# Z
then -- no transport order for vehicle @
/ N8 g% z4 E- A6 C% i( H @.Destination :=' g8 v9 M9 N. ^$ s5 x7 }5 E
rgManager.nearestFreeStation(@,track.~);
- z0 v0 k( B( ], Z$ g" Z& A. M. r6 E newDirection(@);
' c* a+ k: E, g3 S& _! A if @.Destination /= void then
# r5 U& s; z2 ]/ F @.Destination.NumReservation :=
4 P8 h5 g& b9 k" N6 h2 t) m @.Destination.NumReservation + 1;
* ?& \, d1 v$ c, f2 x) B end;
6 d! g, p% Q& s" E9 f# K9 U @.CurrIcon := "drivingHome";
. s- \. c" E. C& B @.DrivingHome := true;1 H6 U5 v; ~4 Q# D7 f( h$ x* d
end;
3 u5 @8 j, _ G1 P# r% G% ^+ l else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 v5 e, r9 ?9 ^
part := @.transpOrder;
9 m' q8 K+ ?9 ^2 A4 j part.move(@);-- load part
' r( V% D" K7 ] @.CurrIcon := "load";
`- k9 H! `4 i# Q# h d+ f GlobalDistObj := part.globDestination;/ B8 p# t( J+ \
assignLObj := rgmanager.rgAssignL;
% P; V6 |# z8 b; W1 i n2 V6 z row := assignLObj.getRowNo(GlobalDistObj);2 B' o# {9 h! C
if Row = -1 then -- since 70
* J7 a) O: I! f) Y3 G if lan=1 then8 o( s' B/ L% m. k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" I, } T U! L( p6 t4 j& ^ to_str("in der Andockstation: \"",?.~.name,"\""));% P, d' e% ~; k7 O
else: F. s' j5 a; L4 A" ^+ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 E. z8 i; S V. F) k$ d to_str("in docking station: \"",?.~.name,"\""));
) g# C, W: g u' O* [ end;
( i; _" B2 S* Y @ else
% B# q: E: v7 a O @.Destination := assignLObj[1,row];7 l( H# D7 }6 l) n; k
end; 5 E+ `' l6 |1 r( j u
newDirection(@);
$ O$ m% l# P+ p# s @.HasOrder := true;
9 \7 R/ Z+ V% I3 v1 F# p7 c$ B7 L% j end;: S6 Y. k1 e' m+ c* s! K1 Y
end;. w3 e v+ o4 m1 z9 r
end; -- of the method
) {; b: b5 w z; u" s" i |