/* called by: entrance ctrl of the object 'track'+ p' K8 q( v) @( ]; ^$ V" j
*/6 ?4 t4 u- A$ K8 s
is
% c& X' t7 |7 F: I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 F: ?% w* `, K* `; Wdo
; D' U4 S- x! M0 L Lan := rootfolder.Internal.Tools.AOLlanguage;
3 M2 d! M% }- |+ F if current = @.Destination -- else return
% g. m& ^* j, C4 Z then
- i( U- H5 i- Y* @1 o+ h @.Destination := void;' O4 H' Y1 e( f2 o& [
if @.occupied then
) `; _/ R* j Z/ m" G part := @.cont;5 f( S# J) b9 p" V! `4 Z
@.transpOrder := void;( Q* H. t A$ p0 z$ m, o: ~$ P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 _: H* S9 J- v1 c) [2 i& F
@,root.eventcontroller.simTime);# P$ a3 P( ?# _; X% ]. K
@.HasOrder := false;
& D: q/ Q9 `- y6 ~! X @.DrivingHome := true;! l! a Q7 y$ k* |% r
rgManager.tryToStartTransOrder;
& l# |/ C+ h# a/ s/ u- _ if @.Destination = void* n! Q; {5 y0 w
then -- no transport order for vehicle @
! m" k: m3 l. r; H# B @.Destination :=& Q0 J- s+ H7 T* O" U& C0 d
rgManager.nearestFreeStation(@,track.~);
7 y( i1 P6 m( u newDirection(@);
Y4 [( F, J5 Z* u2 {+ m if @.Destination /= void then; z$ ^5 e ^% u$ Y
@.Destination.NumReservation :=2 f( d) ?2 r$ S3 l! ]9 }2 S$ `
@.Destination.NumReservation + 1;# E7 i3 y+ Q8 j3 f
end;6 {3 r4 t$ V) v6 f! l
@.CurrIcon := "drivingHome";6 p8 X6 s! _' J/ t! M
@.DrivingHome := true;
; a/ @: F/ Y4 H6 {: i; ^ end;
0 E5 {. {! T8 D# A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: U' g2 w- ~/ M8 y5 J part := @.transpOrder;
( x" a$ X( d$ F: O/ o& h& _. s part.move(@);-- load part
1 @8 w6 e, E2 \" [ @.CurrIcon := "load";5 N9 i0 \) q: g! B+ ^# c
GlobalDistObj := part.globDestination;
9 V; s: k% T- T4 l' \$ {, Q% Z assignLObj := rgmanager.rgAssignL;6 S4 W+ o! f0 N; W
row := assignLObj.getRowNo(GlobalDistObj);8 z7 }' C8 }; V9 P3 P, V/ U! w1 H) @
if Row = -1 then -- since 70+ j' D4 L* w( d+ S
if lan=1 then
- b% z& \- y9 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 H" }/ [. |9 e
to_str("in der Andockstation: \"",?.~.name,"\""));! \- O9 [9 E7 F& `
else" I/ D+ J( z% }+ R5 _' @, |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 k, R% N; f2 }3 }0 { to_str("in docking station: \"",?.~.name,"\"")); % h0 p! @1 t2 F$ O
end;
4 k4 \; u5 x; Y7 @2 t else
0 q0 T6 k9 h# A. k& ] @.Destination := assignLObj[1,row];9 g" h* Q9 u" ?0 u) d2 A
end; # b6 b, L% v, s; g
newDirection(@);
: @2 d% u: I) V7 A9 M2 h: B @.HasOrder := true;; {" u T% e" E1 u/ k0 R
end;
+ ~8 b9 A- r& o) W! K/ E, F end;
7 N. f+ R0 R8 t. J( r+ v& Zend; -- of the method1 M6 S2 K- Q, Y, g$ J
|