/* called by: entrance ctrl of the object 'track'! M% ^- w% ~9 i/ @, O+ I3 L
*/# R, z' z# e1 ^: A) ^+ {8 ?
is. I# a; t$ T4 `, r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* M# J7 \8 B* q' j7 l9 ?& qdo! Q0 W0 q; q9 Y0 ^. Q% M
Lan := rootfolder.Internal.Tools.AOLlanguage;5 Q o# t4 h! P4 o: p; N" m
if current = @.Destination -- else return6 A) `1 h/ k: S/ U8 [9 B" `
then' y4 U7 k1 `( l# C8 t
@.Destination := void;
5 d/ k. t' m q% L( U- J8 v( F if @.occupied then
; O9 j- A( _, T! [6 k) ~ part := @.cont;
' ]' s/ b; j$ j+ Y6 D, M& c" g @.transpOrder := void;/ H& `; ` F: v0 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' h; B5 l5 R4 H: ~* Q
@,root.eventcontroller.simTime);
' R, T" {( a3 O* {- e1 U @.HasOrder := false;
4 Y% F: U' z7 I! G @.DrivingHome := true;
5 `% H' J; d- } T) @ rgManager.tryToStartTransOrder;% d; F T9 \! R2 ~$ L2 l$ l" r
if @.Destination = void
8 u8 s) R, p3 ~ then -- no transport order for vehicle @) z8 q* L' q; {
@.Destination :=1 R( Q* M1 v" g. }
rgManager.nearestFreeStation(@,track.~);
* }4 R$ Y8 \4 Y) x4 H2 ~ l' J9 ^ newDirection(@);
4 ~, V+ w* E* F9 v# _1 c3 y' P7 C if @.Destination /= void then, p) F) y$ K% D) [) s8 `$ N" W
@.Destination.NumReservation :=3 L6 T+ F3 Q% B' ]% ]
@.Destination.NumReservation + 1;) I3 h5 U) O6 Y, t
end;9 x- m3 A7 F2 {
@.CurrIcon := "drivingHome";
9 x Y3 h l6 T. \ @.DrivingHome := true;
# B6 F7 v5 H2 Q9 Q9 x ~- s end;( h, S% o/ k0 I2 @' }0 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" q1 _3 w( | {% k$ K! } part := @.transpOrder; s" _2 G \ [8 e
part.move(@);-- load part
2 |; S% j/ y5 u3 S7 x @.CurrIcon := "load";; U! c% c$ O" l) l, l* _
GlobalDistObj := part.globDestination;
0 y+ U e& b, B( M1 j) f+ J assignLObj := rgmanager.rgAssignL;
5 u' b+ P% r/ {. q- E9 \" ? row := assignLObj.getRowNo(GlobalDistObj);8 I6 L6 F6 _# A5 h" _
if Row = -1 then -- since 70. k5 O$ j, M% @- w
if lan=1 then
2 ]) Q/ `5 ^. K, O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ @! J% Y' v7 H+ d
to_str("in der Andockstation: \"",?.~.name,"\""));
( l5 H, l4 h5 s2 w B else5 V1 s, ?2 r- j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' Z: r( Y1 r; \9 ?, g# t4 Q" I+ d
to_str("in docking station: \"",?.~.name,"\"")); " |7 h H- N- v% n4 Q2 ]& W8 X. F) M2 t
end;
W( @2 I5 \9 R" s: j0 l* N else& |/ ?$ f8 {4 T' a5 r$ L
@.Destination := assignLObj[1,row];
$ f6 d) i8 W7 |$ u end; ; d2 x" {0 p+ Y4 A- `; l: u' ~
newDirection(@);$ M2 m/ F3 Y6 X# F% \6 x1 `
@.HasOrder := true;
9 l8 p6 y& @% f$ q: y end;
9 b( T' M8 H3 f4 w) a end;
" ?% A6 M7 M) ^5 p) `2 hend; -- of the method2 H+ k+ t- Z5 P
|