/* called by: entrance ctrl of the object 'track'4 A: s; @1 J3 E) i6 d
*/
% ^7 j# o" _! Sis
1 T2 P& ~/ F4 V/ h+ U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ A0 U$ A( K3 c1 K9 h- K2 Y( |do1 g6 e# w: H) l8 ^3 g- h7 B$ U3 x7 G
Lan := rootfolder.Internal.Tools.AOLlanguage;0 ?$ q' U4 r: l6 m0 G! I2 s$ y% Q' K
if current = @.Destination -- else return
' a; h, \+ P# A; O: G, A6 Q1 _3 ~ then3 m1 [2 O4 _4 b) v4 W/ E, B
@.Destination := void;7 ]5 k9 L# y; x! p
if @.occupied then! ]" P9 I* Z% K; O, A
part := @.cont;
4 @) ?8 J( C) b3 T3 A/ n @.transpOrder := void;
4 A6 n" q. P1 s( o; e p X) C5 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ y8 z' D; v6 ~ @,root.eventcontroller.simTime);) g! }- n/ U- y+ F; P# {
@.HasOrder := false;
8 C5 [! Z9 E& z) S @.DrivingHome := true;6 a/ u# U3 F& l# z3 \3 N
rgManager.tryToStartTransOrder;4 j1 i1 W) _7 \" G
if @.Destination = void/ [, y* v) X8 T
then -- no transport order for vehicle @
7 O' U4 C& E/ P2 U @.Destination :=
, Z2 ^! l2 h( e0 z+ @: K rgManager.nearestFreeStation(@,track.~);2 H+ T- E' v" C6 R4 @# F
newDirection(@); ) w; Z9 i9 W% @2 A, p3 _( n
if @.Destination /= void then
$ I: {. O8 k& t9 H) J* A) [5 R# Y8 R# P @.Destination.NumReservation :=
# R' I8 M4 n3 b @.Destination.NumReservation + 1;
$ A, t$ ~$ Z' d8 E8 Y. B/ g. }" E end;
% h0 I Z3 U& }! w6 F: k @.CurrIcon := "drivingHome";+ y" ^+ U1 F4 E6 K. o5 ?
@.DrivingHome := true;
$ J8 H7 W: @# j( s) ?9 {( ]0 a c end;
) [+ P' D: z* m7 C# C9 y6 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station, I( f- R" k* N) S/ j: u' e% s
part := @.transpOrder;
8 g% s( U. C8 S# W part.move(@);-- load part8 I$ a' b& r2 k$ f2 \% ~
@.CurrIcon := "load";4 f% s0 J2 T2 ]" G4 X6 b3 D
GlobalDistObj := part.globDestination;" H- F' F, W7 ~- J4 T
assignLObj := rgmanager.rgAssignL;
$ L* z; `- ?: v9 I4 F& ?9 G row := assignLObj.getRowNo(GlobalDistObj);
7 R, X- m1 e; z( [" I9 ^7 a1 y if Row = -1 then -- since 70
6 D% Y( l8 w- h& y8 `( E- o if lan=1 then
f' c k! y+ ]- O0 U+ q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 G' n7 Q/ D2 }0 O to_str("in der Andockstation: \"",?.~.name,"\""));
* r, t* G W9 e else
7 ^* [& c7 B: R( ~8 \3 N2 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. z: ?* R, W5 p to_str("in docking station: \"",?.~.name,"\"")); 4 l$ s0 ]/ M4 c9 H& [! L
end;6 s7 S; `, e+ e
else% K. L7 R: ? c! [1 D
@.Destination := assignLObj[1,row];6 M+ [" C! ?7 S: L( n. y5 V" b
end; 7 a4 a4 ]5 D- a
newDirection(@);
; A& X' t6 J8 j D @.HasOrder := true;! ^# [! A, d4 A, u& o7 W
end;5 p& F, ?( D2 J
end;& n& ^$ {; g8 A+ X! S3 C* r" C% _
end; -- of the method
9 F2 E4 [# J/ x/ ?9 x! r |