/* called by: entrance ctrl of the object 'track'4 ~ b6 k7 h% w/ j* @
*/9 D8 T2 r* x/ g( m
is7 B5 [* h. w7 ]) i6 ]* k) k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. z* v% c9 s& cdo
+ x" Q% P( l! m8 c& g; n Lan := rootfolder.Internal.Tools.AOLlanguage;
2 [) {8 O6 J( Q2 I7 V$ l( [ if current = @.Destination -- else return
, Z3 g% ]' L2 ?5 y2 ]4 R then' j6 y$ {) b6 i/ |) ?, y2 y( d
@.Destination := void;
: f/ O) V3 Q7 D5 @ if @.occupied then
- q, x6 A. U u5 t) q9 i part := @.cont;6 Q+ u3 J* Z; @) U, ^4 G$ J
@.transpOrder := void;
: `' |( j6 J& B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 S8 H3 P. t, K' q/ I @,root.eventcontroller.simTime);1 F1 u& q/ j6 F& X' N& g
@.HasOrder := false; X1 o* W1 v9 s e% I/ `# p
@.DrivingHome := true;, O1 x( O/ z/ ^4 O; p; i
rgManager.tryToStartTransOrder;
$ \+ o& p# n }" {; i if @.Destination = void
7 w$ O$ c0 v v! S2 T. W then -- no transport order for vehicle @
' s L' {, s( `; D E) U3 }( P) z @.Destination :=9 t; z$ y) X: h8 u2 W8 [# T9 f
rgManager.nearestFreeStation(@,track.~);
+ J) \/ e4 k% m/ O/ x newDirection(@); # c3 ]' S5 |( j
if @.Destination /= void then8 Y- O/ F1 H2 I k
@.Destination.NumReservation :=; {# @+ e: X5 q9 Q; d& S+ g! x
@.Destination.NumReservation + 1;
0 G, w" e; z: K6 X8 N% D end;
) [4 @/ l; L6 T( S- H7 Q( n( r/ W @.CurrIcon := "drivingHome";
( j+ x; a5 o" q5 u3 J3 c8 V& l @.DrivingHome := true;9 Y/ C3 s% ]5 h: [* H) V
end;8 ^+ m5 S" K5 m+ S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 \ }: @) T2 _ Q z$ b) N7 t part := @.transpOrder;# T2 S. z7 P) U6 N+ {( n+ b
part.move(@);-- load part/ A0 E0 ]5 R+ O$ h8 p
@.CurrIcon := "load";6 W3 U% v6 E/ l# ^6 y1 [. q- R8 O
GlobalDistObj := part.globDestination;
) J& W. ~" b3 R/ j assignLObj := rgmanager.rgAssignL;/ s7 }" k, t! l8 E
row := assignLObj.getRowNo(GlobalDistObj);
9 U8 a! D) n2 O0 O% M( |- R9 G if Row = -1 then -- since 70% k2 ~- z, ^2 Z. Q$ B# C
if lan=1 then' z- K% T6 L$ w/ y$ O, ]5 d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 F* [+ o$ R+ Y( ~' s- n6 b, h: r
to_str("in der Andockstation: \"",?.~.name,"\""));
1 E0 w5 X# y9 B( n# s else; y* |7 g% k% x, H) P: o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, c% g, v+ X3 X/ c, J& s( w; e
to_str("in docking station: \"",?.~.name,"\""));
/ ~1 N5 S: K4 J4 a6 K) r* q end;8 m! B5 j5 g0 l# _7 ^# E) @7 N8 |
else2 j$ o3 p1 g- `) j
@.Destination := assignLObj[1,row];2 K. ?/ V$ ?4 N, |
end; ( _3 H5 m0 Y4 G
newDirection(@);; v9 q0 G8 G0 j. i0 Q
@.HasOrder := true;
; b4 ^7 `1 g$ f# _ end;
3 N3 A1 x* _% x. S end;" u. j2 ]- o6 `; p! f1 l3 N
end; -- of the method5 Q/ [: K/ d" {, F P
|