/* called by: entrance ctrl of the object 'track'6 ~9 n: J: a- P$ h7 [" e: h' D
*/
4 i; u& M, @ J. B! ~, Gis5 C4 i c7 I4 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- W* t: ^0 x. L" n/ |$ {$ w( @1 S
do
3 q: X8 m$ t- z1 q3 |" F* Q4 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
" y3 x3 K% `* o8 V }. p if current = @.Destination -- else return3 T/ G$ \ q7 A( q- R
then
: Q7 Q- ]& E, i: a: B5 Z6 b: C @.Destination := void;
: d/ K/ t% ~0 q if @.occupied then
- G& N1 x, d" @6 u3 R4 Z$ N0 e part := @.cont;8 u: O; e) K) N8 F7 k w
@.transpOrder := void;
5 j3 ?, i+ F. a+ ^, D- k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- g. h7 {- A9 L9 [2 a
@,root.eventcontroller.simTime);
5 _& x( g D$ p; k3 m' u* j @.HasOrder := false;
+ g O7 Q2 ~9 D$ r @.DrivingHome := true;1 n' C) @7 D( L. @ }3 f- R; P4 {
rgManager.tryToStartTransOrder;
6 H2 _' C5 w8 C P3 h if @.Destination = void! ~+ z# n4 b8 `- |. P$ B
then -- no transport order for vehicle @2 r+ t+ q6 x* H; T) @
@.Destination :=% R- R9 _! X* C( k1 }% Q* \2 P
rgManager.nearestFreeStation(@,track.~);3 u- y) ~4 A3 c$ y
newDirection(@);
, u/ V0 w+ u5 ~% p7 q! u if @.Destination /= void then8 F: n! [; R- d! B
@.Destination.NumReservation :=% H/ h5 C# }2 x% g x
@.Destination.NumReservation + 1;
: C3 M3 l6 W2 Z& ?" i) j6 j end;
! y# M: Q7 s3 u1 u* y$ M1 o @.CurrIcon := "drivingHome";( R9 T* g# w+ [1 Z3 k$ I
@.DrivingHome := true;
) |. y4 r8 B1 |4 H8 s. j+ I9 m end;
3 p& @# S+ h" {7 ^. N. f* Y$ \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 I/ j# U" R4 ?/ h* B- c5 P
part := @.transpOrder;# }1 y* {& e# W1 p3 N' f
part.move(@);-- load part
: P/ W& i7 J8 M( ? @.CurrIcon := "load";
9 Y/ P5 [* J3 g" m. M GlobalDistObj := part.globDestination;. J: ~) I* @; K6 Q; \
assignLObj := rgmanager.rgAssignL;
) c/ L! z7 T i) r% a5 \ row := assignLObj.getRowNo(GlobalDistObj);* ]: J+ D* P9 m% t8 d P& F
if Row = -1 then -- since 702 w( g, q7 ]7 b+ x6 Z& Q
if lan=1 then4 N$ q+ g3 I- u" U# E' A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' w# R: g8 E2 T% P to_str("in der Andockstation: \"",?.~.name,"\""));/ n& B5 D: s6 R5 d6 _. @
else
5 o+ L9 u7 `7 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 n. p5 _) P# w+ R& Z to_str("in docking station: \"",?.~.name,"\"")); 5 l! V5 P( C/ h! X) x
end;5 C7 k% w) q+ C8 b3 A
else
$ B; E; X' x0 J+ A" K @.Destination := assignLObj[1,row];
# f7 Q i# S& x" n end; 7 D _, `7 N; _# d. ?
newDirection(@);" ` ^% ]' Q0 T9 z5 F$ x: c
@.HasOrder := true;
: L: l/ s# S9 W% {% M2 p; w7 Q1 R end;! g1 Y' I+ V$ o, u3 w
end;
* j, y8 W- K( k9 \! D' ^end; -- of the method
7 M6 O( d$ Z, D& _ |