/* called by: entrance ctrl of the object 'track'5 s+ u; ~7 W4 @2 ~7 [ R. q
*/. T7 P7 w! w/ M
is
+ }, w d! l. Y# o* ?) L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' _" A( f* Y7 C5 _# Hdo
: o, o8 s J: k* }) h2 L( [9 r Lan := rootfolder.Internal.Tools.AOLlanguage;
8 I* Q* f" A/ i* o6 s& J' ]. u if current = @.Destination -- else return
3 i% w, H$ A" B& t" ?/ F8 |; } then
7 D2 m, b) G& Q+ C& u @.Destination := void;
' P, d- a6 m% ^( g% J2 [& X if @.occupied then: ^; h$ a6 l4 E* w! E* Y' x- y
part := @.cont;
8 J& }0 x: k) p/ q9 E @.transpOrder := void;
, c7 v& Z- d/ e+ w( F- P) } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ [1 W/ K+ F6 O8 W
@,root.eventcontroller.simTime);# c& Z- k4 P; D7 R
@.HasOrder := false;1 _; _6 O" L" S9 `' E/ x4 a% W z
@.DrivingHome := true;( w/ ]" b% Y+ s+ i& w$ A# O
rgManager.tryToStartTransOrder;$ ?( J: _2 A& W5 @5 ]
if @.Destination = void
( C( y4 \4 N% @# Z% C" T then -- no transport order for vehicle @& h& v* _" U4 [. V5 ]; E7 q
@.Destination := ~) y, t' t9 f3 S3 j8 I
rgManager.nearestFreeStation(@,track.~);
* h) C$ P% ?; Q0 x newDirection(@); 8 G3 e$ u, E! G E6 a% X
if @.Destination /= void then
' i2 V- {6 |0 q6 { @.Destination.NumReservation :=" W/ ?( ]' z3 Z4 m; X$ V
@.Destination.NumReservation + 1;
- p- Y, v, |# j+ L+ ~* t) l. s end;; J' n, d& R3 M# Q8 m' o
@.CurrIcon := "drivingHome";
; M1 q! ]6 O3 K) x @.DrivingHome := true;
, e! n+ G. X8 ^8 x4 s8 Z2 D end;
A$ d* Z8 d2 V8 R+ R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 C) e, |+ U; L8 l9 _ part := @.transpOrder;
8 a; F- A% F) b0 ^ part.move(@);-- load part- K0 d9 Z; ~ O6 J9 }
@.CurrIcon := "load";4 d$ _! b8 y3 \7 t' y" f. P
GlobalDistObj := part.globDestination;
5 P# c- G+ G2 o4 ~3 H assignLObj := rgmanager.rgAssignL; `! x- z" Q, H
row := assignLObj.getRowNo(GlobalDistObj);, d V6 e8 }/ }1 C# N7 j
if Row = -1 then -- since 70
2 F% p# v/ G) {2 i$ {7 b" g if lan=1 then
( o% t G# e) z& l7 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
D1 d+ [6 B" ?: I to_str("in der Andockstation: \"",?.~.name,"\"")); _, L; Q$ u) A0 G; |* x
else; k- j/ C3 q2 Q- W; |. v5 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* h5 r% O* Y3 a$ ~, W to_str("in docking station: \"",?.~.name,"\"")); / Q2 J! _ `6 C c' w6 }
end;
$ H: L3 \: J* n( J2 q7 U else
4 N& K: l# {! @( a# ~" n- a @.Destination := assignLObj[1,row];
. ^6 d) ~9 ?+ ~4 j3 H$ C end; / | h. Z! U$ t9 h5 B
newDirection(@);
" g! O3 e1 ]/ \6 X) L' C* K* S3 w @.HasOrder := true;. X b% I6 r3 L- P
end;' R( w" `4 S1 C/ q! C' k
end;: p6 J- c" u! _, s" v7 V$ |0 e1 w
end; -- of the method
) f) d4 p( t* j |