/* called by: entrance ctrl of the object 'track'1 `! h% g y8 H: G# G' I# D
*/
) [ ]- M' ?1 {is A, U7 J- x* z" O6 j/ J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 e9 H" r4 m3 e+ n0 R. d
do" w4 ]/ o* m3 e4 M+ u7 |
Lan := rootfolder.Internal.Tools.AOLlanguage;4 k6 z$ I6 I/ b+ v8 L
if current = @.Destination -- else return* \0 O1 L; x1 t
then, C& R& s. A# a0 {( ?
@.Destination := void;0 U) g" l8 i+ _7 {4 z
if @.occupied then
- M: B; k0 W8 ` p part := @.cont;
5 D7 @* P" T" D) h @.transpOrder := void;# S) a( x8 G" S$ P; j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 z0 W1 ], |; s @,root.eventcontroller.simTime);
8 t" k% P6 w: }- f" T @.HasOrder := false;9 q; y& j8 \* O, I1 y
@.DrivingHome := true;0 s) H$ i& _+ A& c. A8 B9 Q9 b
rgManager.tryToStartTransOrder;6 V8 J6 E- g! r, Q6 T) g( h
if @.Destination = void9 [3 S0 p0 `0 N- I- U j
then -- no transport order for vehicle @ m* j1 E5 O7 |" R7 }1 y
@.Destination :=% r e' o- q) \. j1 A* Z
rgManager.nearestFreeStation(@,track.~);
- ?* a. D6 Y5 A# _! K$ O. j newDirection(@);
0 O9 y; f& M; h7 V8 r if @.Destination /= void then
' }) m( o8 C6 {; J! O5 S" B$ ? @.Destination.NumReservation :=( g2 \; B; | X% w
@.Destination.NumReservation + 1;
: G5 q1 }% m/ F! q end;
1 C" _: s: V/ x# d @.CurrIcon := "drivingHome";
+ K/ L/ P! \, |! M2 [ f @.DrivingHome := true;% U) b- j. H, ]' y0 w: m
end;
' j/ v. z) H' n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 i) H& c: ?3 ^ part := @.transpOrder;
8 v, b8 G* m7 j) ?( F) @2 M part.move(@);-- load part
; g. C! K5 U: O! f) y$ j4 U& O @.CurrIcon := "load";
! h. V L6 p( b GlobalDistObj := part.globDestination;
% |0 V2 L; a$ \9 \! }: F assignLObj := rgmanager.rgAssignL;
6 {. ~1 ^/ B$ f5 W row := assignLObj.getRowNo(GlobalDistObj);
; }9 t% E# V1 L if Row = -1 then -- since 70
I' |+ h ]2 z" X7 G if lan=1 then4 ^, e1 v$ y& L7 h! z, |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 D8 C$ f. P2 S) d$ t9 h$ P to_str("in der Andockstation: \"",?.~.name,"\""));9 R4 @; c$ X% j
else; ^, O0 u! }- [# C/ n. t S. h) Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. X( y$ s" b* S" U( C0 ?% J( U& d3 E) G
to_str("in docking station: \"",?.~.name,"\""));
+ M9 d/ C- a7 {* @ end;
* w5 Y0 ^0 {( _) J8 D# t else
2 A! }: a' v9 G0 K4 S" Q @.Destination := assignLObj[1,row];
2 h$ H2 k( d3 l {" ~# b end; : y: J. u& r* a: W* R
newDirection(@);
) W$ Z) q# O# f% x( R @.HasOrder := true;
* q3 c- x5 I- w' F# m end;3 C2 b c \% _' f
end;
4 J5 k2 f' T; X" K) _* m7 \4 Aend; -- of the method
# {: |0 A- W/ o+ ~ |