/* called by: entrance ctrl of the object 'track'5 E8 U% `! L2 ~ o2 U
*/ @4 N4 r, H7 C, }9 k5 h% j2 w) r, F
is
. C0 Z# [! `' g0 q+ p part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 K9 Z" p4 Q; t0 n% S; t
do
3 G: `; {# h6 p8 f" c1 v Lan := rootfolder.Internal.Tools.AOLlanguage;
3 X3 u* `- U l' O5 a8 a# G3 P, T if current = @.Destination -- else return
: t* h O# \$ s$ Y# A then7 |! [6 l& L* {
@.Destination := void;
" p1 t0 q( c/ a( T4 `6 Z if @.occupied then
+ T# I" D. y- w N- P* {( a part := @.cont;
; \0 Q" _+ L* p' D/ z5 S @.transpOrder := void;
. S' Y; z, d# Y8 x9 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: `# Y) M& E9 }$ E' n+ A; s
@,root.eventcontroller.simTime);! @& ]: D& Q( F) I% Q# W) z
@.HasOrder := false;
( ~6 o( b3 z; C4 X8 Y& c+ b @.DrivingHome := true;
/ d( W. V6 M; k1 U* l9 N rgManager.tryToStartTransOrder;
5 K! D. B2 W/ b- H/ C: a if @.Destination = void
5 C2 ~4 O1 U' n1 V: M5 A then -- no transport order for vehicle @- V' I7 S% K( l3 ?) D! Z
@.Destination :=0 x7 \7 k' N: Q$ B
rgManager.nearestFreeStation(@,track.~);; {/ Q2 o0 D# X2 X
newDirection(@);
% n# F9 d/ t! R if @.Destination /= void then5 D8 Z' z! l) Y' ]- l
@.Destination.NumReservation :=' b; Z$ ^' ]/ H8 u [8 O+ u
@.Destination.NumReservation + 1;
. ~+ G+ V" u3 E( l' Y end;
% ~0 z/ [8 Q4 i* ?9 F0 r @.CurrIcon := "drivingHome";
7 w' E4 d1 D) _: ?$ `! ] @.DrivingHome := true;; K$ t( L ^/ u1 ~3 u* L! w
end;4 F, K0 F4 O( E1 G2 a% y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 S) j' } X5 c' l6 l" s8 v
part := @.transpOrder;
4 {( G6 c2 u& A0 b. G+ F! v part.move(@);-- load part7 K. ?6 k8 e/ [: r* P8 E( w# {
@.CurrIcon := "load";8 G& W5 z4 h, r5 s' V/ G% l% P
GlobalDistObj := part.globDestination;
' b9 z. u% \; Z; Q8 K$ g' P assignLObj := rgmanager.rgAssignL;
G9 m2 R- G" W% y+ ?' p row := assignLObj.getRowNo(GlobalDistObj);
; c0 q- |# U$ j1 Z+ p if Row = -1 then -- since 70
5 C# I5 a) u7 g, U' d B if lan=1 then5 S4 |6 Z2 O) ^5 t1 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 H, @/ C; a) d' W
to_str("in der Andockstation: \"",?.~.name,"\""));
9 B' J) m( |, O4 y6 p( E$ F' V' H& e else
, b P9 x7 P# N2 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( S7 n+ O" b& t# e5 I8 ] to_str("in docking station: \"",?.~.name,"\"")); , }6 I; L( T. W m+ ^# ]# V7 l
end;
; x5 Y" H7 _: U* m8 o else
' J& G% y' t% t @.Destination := assignLObj[1,row];& I4 j6 L$ ?+ |
end;
% _- t: P: c) j9 N5 L# p0 H newDirection(@);8 @5 o2 Z0 [8 G r& Y
@.HasOrder := true;1 K# p6 K+ ~# U, a/ V& P" d3 p6 a
end;8 y8 u; {7 N$ x+ e7 @/ f
end;
/ I( @; Z7 [, ]8 bend; -- of the method" v4 a$ `, u* e
|